/* ==========================================================================
 *  PMS 연동 화면 공통 스타일
 *  사용: index.php / room_pms_type.php / property_room_list.php
 * ========================================================================== */

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f5f6f8;
    color: #222;
    font-family: Arial, "Malgun Gothic", sans-serif;
    font-size: 14px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px; }

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0; }

.sub { color: #666; margin: 0 0 20px; }
.muted { color: #777; font-size: 12.5px; }
code { font-family: Consolas, monospace; font-size: 12.5px; }

a.back { color: #37474f; text-decoration: none; font-size: 13px; }
a.back:hover { text-decoration: underline; }

/* ---- 카드 ---- */
.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 18px;
}
.card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 12px;
}

/* ---- 폼 ---- */
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; }
label { font-size: 13px; color: #444; }

input[type=text], input[type=date], input[type=number], select {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-family: inherit;
    background: #fff;
}

button {
    padding: 9px 16px;
    font-size: 13px;
    background: #263238;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}
button:hover { background: #37474f; }
button.secondary { background: #607d8b; }
button.small { padding: 5px 10px; font-size: 12px; }

/* ---- 상태 표시 ---- */
.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}
.pill.ok   { background: #e6f4ea; color: #1e7e34; }
.pill.bad  { background: #fdecea; color: #c0392b; }
.pill.warn { background: #fff4e5; color: #8a5a00; }

.status-line {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.err {
    background: #fdecea;
    border: 1px solid #f5c6c2;
    color: #96281b;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    line-height: 1.6;
}

.empty { color: #777; padding: 18px 0; }

/* ---- 데이터 테이블 ---- */
.tbl-scroll {
    overflow-x: auto;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
}

table.dtable {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    line-height: 1.5;
}
/* 칸마다 격자선 — 열이 많아도 어느 칸인지 눈으로 따라가기 쉽게.
   행을 가로로 따라 읽는 일이 많아 가로선을 세로선보다 진하게 둔다. */
table.dtable th, table.dtable td {
    border: 0;
    border-bottom: 1px solid #ccd5db;
    border-right: 1px solid #e6ebee;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
    vertical-align: top;
}
table.dtable th:last-child, table.dtable td:last-child { border-right: 0; }
table.dtable thead th {
    background: #f2f5f7;
    color: #37474f;
    font-weight: 600;
    border-bottom: 2px solid #dbe1e5;
    position: sticky;
    top: 0;
    z-index: 1;
    /* 한글 머리글은 줄바꿈을 허용한다 — 긴 이름이 값 짧은 열까지 넓히지 않도록.
       단, 아래 영문 컬럼명은 쪼개지 않는다(한 글자씩 끊겨 열이 뭉개진다). */
    white-space: normal;
    word-break: keep-all;   /* 한글은 낱글자가 아니라 어절 단위로 줄바꿈 */
    max-width: 11em;
}
table.dtable th .colname {
    display: block;
    font-weight: 400;
    color: #90a4ae;
    font-size: 10.5px;
    font-family: Consolas, monospace;
    margin-top: 2px;
    white-space: nowrap;
}
table.dtable tbody tr:nth-child(even) { background: #fafbfc; }
table.dtable tbody tr:hover { background: #eef4f8; }
table.dtable tbody tr:last-child > td { border-bottom: 0; }

td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.cell-null { color: #c5cdd3; }

/* 메모처럼 내용이 본문인 칸: 줄바꿈을 살려 여러 줄로 (자르지 않는다) */
table.dtable td.wrap { white-space: normal; }
table.dtable td.wrap > span {
    display: block;
    max-width: 44em;
    min-width: 20em;
    white-space: pre-wrap;
    word-break: keep-all;
    line-height: 1.55;
}

/* 내용·주소처럼 긴 값: 폭을 제한하고 말줄임 (전체 값은 마우스를 올리면 title 로) */
td.clip > span {
    display: inline-block;
    max-width: 20em;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

/* ---- 요약 숫자 타일 ---- */
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.stat {
    flex: 1 1 170px;
    padding: 12px 14px;
    background: #fafbfc;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
}
.stat.accent { background: #eef4f7; border-color: #cfdde5; }
.stat-label { display: block; color: #607d8b; font-size: 12.5px; margin-bottom: 6px; }
.stat-label .colname { display: inline; font-size: 11px; color: #90a4ae; font-family: Consolas, monospace; }
.stat-value {
    display: block;
    font-size: 19px;
    font-weight: 600;
    color: #263238;
    font-variant-numeric: tabular-nums;
}
.stat-value.neg { color: #c0392b; }

/* 금액 표 */
td.num.neg { color: #c0392b; }
table.dtable tbody tr.group > td { background: #eef2f5; font-weight: 600; }
table.dtable tbody tr.total > td { background: #e3e9ed; font-weight: 700; border-top: 2px solid #cfd8dc; }
table.dtable tbody tr.group:hover > td, table.dtable tbody tr.total:hover > td { background: #e6edf2; }

/* ---- 룸 차트 (객실 x 날짜) ---- */
.wrap.wide { max-width: 1700px; }

.cal-nav { display: inline-flex; gap: 6px; margin-left: auto; }
.cal-nav a {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #37474f;
    text-decoration: none;
    font-size: 12.5px;
}
.cal-nav a:hover { background: #eceff1; border-color: #b0bec5; }

.chart-scroll {
    overflow: auto;
    max-height: 72vh;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
}

table.chart {
    /* 날짜 열 기본 너비 (화면이 넓으면 비율대로 함께 늘어난다) */
    --day-w: 84px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
}
table.chart th, table.chart td {
    /* 표와 같게 가로선(행 구분)을 세로선보다 진하게 */
    border-right: 1px solid #e2e7ea;
    border-bottom: 1px solid #ccd5db;
    padding: 0 4px;
    height: 26px;
    text-align: center;
    white-space: nowrap;
    background: #fff;
}

/* 머리글 (날짜 · 요일) */
table.chart thead th {
    position: sticky;
    background: #f2f5f7;
    color: #37474f;
    font-weight: 600;
    z-index: 2;
}
table.chart thead tr:first-child th { top: 0; }
table.chart thead tr:nth-child(2) th { top: 26px; font-weight: 400; color: #78909c; }
table.chart thead th.sun, table.chart td.cell.sun { color: #c0392b; }
table.chart thead th.sat, table.chart td.cell.sat { color: #1565c0; }
table.chart thead th.today { background: #fff3d6; color: #8a5a00; }
table.chart th.day, table.chart th.dow, table.chart td.cell { width: var(--day-w); }

/* 왼쪽 고정 열 (층 · 객실 · 타입 · 상태) */
table.chart .c-floor { width: 54px; left: 0; }
table.chart .c-room  { width: 74px; left: 54px; font-weight: 600; color: #263238; }
table.chart .c-type  { width: 52px; left: 128px; color: #546e7a; }
table.chart .c-sts   { width: 46px; left: 180px; }
table.chart td.c-floor, table.chart td.c-room, table.chart td.c-type, table.chart td.c-sts {
    position: sticky;
    z-index: 1;
    background: #fafbfc;
}
table.chart thead th.c-floor, table.chart thead th.c-room,
table.chart thead th.c-type, table.chart thead th.c-sts { z-index: 3; }
table.chart td.c-sts { border-right: 2px solid #dbe1e5; }
table.chart th.c-sts { border-right: 2px solid #dbe1e5; }

/* 객실 상태 뱃지 */
.sts {
    display: inline-block;
    min-width: 26px;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    font-family: Consolas, monospace;
}
.sts.vac { background: #e8f0fe; color: #1565c0; }
.sts.occ { background: #fff1e0; color: #b25e00; }
.sts.ooo { background: #ececec; color: #616161; }

/* 빈 칸 · 오늘 열 */
table.chart td.cell.today { background: #fffdf3; }

/* 배정 막대 */
table.chart td.bar {
    background-color: #d6f0f4;
    border-left: 3px solid #4db6c4;
    color: #14515c;
    text-align: center;
    overflow: hidden;
    /* 막대가 여러 날을 덮어도 하루 경계가 보이도록 세로선을 깐다.
       칸 너비는 화면에 따라 늘어나므로 픽셀이 아니라 '막대 폭 ÷ 일수' 비율로 긋는다.
       (--n = 이 막대가 덮는 일수, HTML 에서 넣어준다) */
    background-image: linear-gradient(to right, rgba(0, 0, 0, .16) 0 1px, transparent 1px);
    background-size: calc(100% / var(--n, 1)) 100%;
    background-repeat: repeat-x;
}
table.chart td.bar > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
table.chart td.bar.warn { background: #fde3e0; border-left-color: #d9534f; color: #8c2f28; }
table.chart td.bar.cut-l { border-left-style: dashed; }
table.chart td.bar.cut-r { border-right: 3px dashed #4db6c4; }

.chart-legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bar-sample {
    display: inline-block;
    width: 22px;
    height: 12px;
    border-radius: 3px;
    background: #d6f0f4;
    border-left: 3px solid #4db6c4;
    vertical-align: middle;
}
.bar-sample.warn { background: #fde3e0; border-left-color: #d9534f; }
/* ---- 적용된 조회 조건 (칩) ---- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #eee;
}
.filters-label { color: #777; font-size: 12.5px; margin-right: 2px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #eceff1;
    border: 1px solid #dbe1e5;
    border-radius: 14px;
    font-size: 12.5px;
    color: #37474f;
}
.chip b { font-weight: 600; color: #607d8b; font-size: 11.5px; }
.chip a {
    color: #90a4ae;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    padding: 0 1px;
}
.chip a:hover { color: #c0392b; }

a.chip-clear {
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 12.5px;
    color: #607d8b;
    text-decoration: underline;
}
a.chip-clear:hover { color: #263238; }

/* ---- 저장 버튼 줄 ---- */
.save-box {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid #eee;
}
.save-box form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ---- 페이지 이동 ---- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 0 0 18px;
}
.pager a, .pager span.cur, .pager span.off {
    display: inline-block;
    min-width: 34px;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #37474f;
    text-decoration: none;
    text-align: center;
    font-size: 13px;
}
.pager a:hover { background: #eceff1; border-color: #b0bec5; }
.pager span.cur { background: #263238; border-color: #263238; color: #fff; font-weight: 600; }
.pager span.off { color: #bbb; background: #fafafa; }
.pager span.gap { color: #999; padding: 0 2px; }
.pager .muted { margin-left: 8px; }

/* ---- 키/값 테이블 ---- */
table.kvtable { border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
table.kvtable th, table.kvtable td {
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    text-align: left;
}
table.kvtable th { background: #f5f5f5; font-weight: 600; white-space: nowrap; }

/* ---- 원본 JSON ---- */
pre {
    background: #0f1720;
    color: #d6e2f0;
    padding: 14px;
    border-radius: 8px;
    overflow: auto;
    max-height: 420px;
    font-family: Consolas, "SF Mono", monospace;
    font-size: 12.5px;
    line-height: 1.5;
    margin: 10px 0 0;
}

/* ---- 메인 메뉴 버튼 ---- */
.menu { display: flex; flex-wrap: wrap; gap: 12px; }
a.btn {
    display: block;
    min-width: 260px;
    padding: 16px 18px;
    background: #263238;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    line-height: 1.5;
}
a.btn:hover { background: #37474f; }
a.btn .title { font-size: 15px; font-weight: 600; }
a.btn .desc { display: block; font-size: 12.5px; color: #cfd8dc; margin-top: 4px; }

/* ---------------------------------------------------------------------------
   객실 현황판 (room_indicator.php)
   PMS Room Indicator 처럼 객실을 카드로 깔아 놓는다.
--------------------------------------------------------------------------- */
.rooms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.room {
    border: 1px solid #d8dee3;
    border-radius: 4px;
    background: #fff;
    padding: 5px 7px 6px;
    font-size: 12px;
    min-height: 92px;
    display: flex;
    flex-direction: column;
}
.room.occ { background: #fffdf6; border-color: #e6d9b8; }
.room.ooo { background: #f2f2f2; border-color: #cfcfcf; }

.room-top { display: flex; align-items: center; gap: 3px; margin-bottom: 3px; }
.room-top .room-in, .room-top .room-out { margin-left: auto; }

.rbadge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10.5px;
    font-weight: 700;
    font-family: Consolas, monospace;
    background: #eceff1;
    color: #455a64;
    white-space: nowrap;
}
.rbadge.vc { background: #e8f0fe; color: #1565c0; }   /* 빈객실 · 정비완료 */
.rbadge.vi { background: #e6f4ea; color: #1e7e34; }   /* 빈객실 · 점검완료 */
.rbadge.vd { background: #fde3e0; color: #c0392b; }   /* 빈객실 · 미정비 */
.rbadge.oc { background: #fff1e0; color: #b25e00; }   /* 재실 · 정비완료 */
.rbadge.oi { background: #e6f4ea; color: #1e7e34; }   /* 재실 · 점검완료 */
.rbadge.od { background: #fff4e5; color: #8a5a00; }   /* 재실 · 미정비 */
.rbadge.oo { background: #37474f; color: #fff; }      /* 고장객실 */
.rbadge.prog {
    background: transparent;
    color: #78909c;
    border: 1px solid #dbe1e5;
    font-weight: 400;
}

.room-in  { color: #b25e00; font-size: 11px; }
.room-out { color: #90a4ae; font-size: 11px; }

.room-no {
    font-size: 14px;
    font-weight: 700;
    color: #263238;
    font-variant-numeric: tabular-nums;
}
.room-no span { font-size: 11px; font-weight: 400; color: #78909c; margin-left: 3px; }
.room-no-occ { color: #c0392b; }

.room-guest {
    margin-top: 2px;
    color: #37474f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.room-guest.empty-slot { color: transparent; }
.room-stay { color: #78909c; font-size: 11px; font-variant-numeric: tabular-nums; }

.room-foot {
    margin-top: auto;
    padding-top: 3px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.room-foot a { font-size: 11px; color: #1565c0; text-decoration: none; }
.room-foot a:hover { text-decoration: underline; }
.room-fee {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    color: #546e7a;
    font-size: 11.5px;
}
.room-fee.neg { color: #c0392b; }

/* Daily On The Book (daily_on_the_book.php) */
table.dtable.otb td, table.dtable.otb th { padding: 4px 7px; font-size: 12px; }
table.dtable.otb td.num.strong { font-weight: 600; color: #263238; }
table.dtable.otb td .zero { color: #c5cdd3; }
table.dtable.otb tr.est > td { background: #f7f8f9; color: #607d8b; }
table.dtable.otb tr.est:hover > td { background: #eef2f5; }
table.dtable.otb tr.snap > td {
    background: #eef4f7;
    color: #607d8b;
    font-size: 11px;
    border-top: 1px dashed #cfdde5;
}
table.dtable.otb td.sun { color: #c0392b; }
table.dtable.otb td.sat { color: #1565c0; }
.warn-dot { color: #b25e00; font-weight: 700; margin-left: 2px; }

/* 일계표 (ac_daily_trial.php) — 계정 계층 들여쓰기 */
table.dtable.ac td.coa { white-space: nowrap; }
table.dtable.ac td.coa.lev2 { font-weight: 700; color: #263238; }
table.dtable.ac td.coa.lev3 { padding-left: 14px; font-weight: 600; }
table.dtable.ac td.coa.lev4 { padding-left: 26px; }
table.dtable.ac td.coa.lev5 { padding-left: 40px; color: #37474f; }
table.dtable.ac thead th { text-align: center; }

/* Daily Revenue Summary (pos_daily_revenue.php) */
.two-col { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.4fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
table.kvtable.sumtable { width: 100%; }
table.kvtable.sumtable th { width: 46%; text-align: left; font-weight: 500; }
table.kvtable.sumtable td.num { text-align: right; font-variant-numeric: tabular-nums; width: 27%; }
table.kvtable.sumtable td.num.dim { background: #fafbfc; }
table.kvtable.sumtable td .zero { color: #c5cdd3; }
table.kvtable.sumtable tr.total > th,
table.kvtable.sumtable tr.total > td { background: #f0f3f5; font-weight: 700; color: #263238; }

/* Daily Sold Room (daily_sold_room.php) — 세로 객실타입 · 가로 날짜 */
.scroll-x { overflow-x: auto; }
table.dtable.dsr { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.dsr th, table.dtable.dsr td { padding: 4px 8px; font-size: 12px; }
table.dtable.dsr td.num, table.dtable.dsr th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.dsr th .dow { font-weight: 400; color: #90a4ae; font-size: 11px; }
table.dtable.dsr th.sat, table.dtable.dsr td.sat { color: #1565c0; }
table.dtable.dsr th.sun, table.dtable.dsr td.sun { color: #c62828; }
table.dtable.dsr th.closed { background: #eef3ee; }
table.dtable.dsr td .zero { color: #cfd8dc; }
table.dtable.dsr .tot { background: #f4f6f8; font-weight: 600; }
table.dtable.dsr tfoot td { border-top: 1px solid #cfd8dc; background: #fbfcfd; font-weight: 600; }
table.dtable.dsr tfoot tr.sum td { background: #f0efe4; color: #8a6d1f; }
table.dtable.dsr tfoot tr.pct td { background: #f7f8f5; }
/* 왼쪽 세 열은 가로로 스크롤해도 붙어 있게 */
table.dtable.dsr .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.dsr thead .stick, table.dtable.dsr tfoot .stick { z-index: 3; }
table.dtable.dsr thead .stick { background: #f7f9fa; }
table.dtable.dsr tfoot .stick { background: #fbfcfd; }
table.dtable.dsr tfoot tr.sum .stick { background: #f0efe4; }
table.dtable.dsr .s1 { left: 0; min-width: 190px; }
table.dtable.dsr .s2 { left: 190px; width: 52px; }
table.dtable.dsr .s3 { left: 242px; width: 56px; box-shadow: 1px 0 0 #cfd8dc; }

/* Group Reservation List (group_rsvn_list.php) */
table.dtable.grl { white-space: nowrap; }
table.dtable.grl th, table.dtable.grl td { padding: 4px 8px; font-size: 12px; }
table.dtable.grl td.num, table.dtable.grl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.grl td.wrapcell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
table.dtable.grl td .zero { color: #cfd8dc; }
table.dtable.grl tr.gsum td { background: #f7f8f5; font-weight: 600; border-top: 1px solid #e0e4e7; }
table.dtable.grl tfoot tr.sum td { background: #f0efe4; color: #8a6d1f; font-weight: 700;
                                   border-top: 1px solid #cfd8dc; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 4px 0; }
.checks .chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; }
.checks .chk input { margin: 0; }

/* Daily Pick Up Status (daily_pickup_status.php) */
table.dtable.pku { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.pku th, table.dtable.pku td { padding: 3px 7px; font-size: 12px; }
table.dtable.pku td.num, table.dtable.pku th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.pku th.grp { text-align: center; background: #eef2f4; border-bottom: 1px solid #cfd8dc; }
table.dtable.pku th.grp.other { background: #f4f1ea; }
table.dtable.pku th.g-sub { text-align: center; background: #f7f9fa; }
table.dtable.pku td.g-sub { background: #fafbfc; font-weight: 600; }
table.dtable.pku td .zero { color: #cfd8dc; }
table.dtable.pku tr.sat td, table.dtable.pku tr.sat td.stick { color: #1565c0; }
table.dtable.pku tr.sun td, table.dtable.pku tr.sun td.stick { color: #c62828; }
table.dtable.pku .grand { background: #f4f6f8; font-weight: 700; }
table.dtable.pku tfoot tr.sum td { background: #f0efe4; color: #8a6d1f; font-weight: 700;
                                   border-top: 1px solid #cfd8dc; }
table.dtable.pku .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.pku thead .stick, table.dtable.pku tfoot .stick { z-index: 3; background: #f7f9fa; }
table.dtable.pku tfoot tr.sum .stick { background: #f0efe4; }
table.dtable.pku .s1 { left: 0; width: 58px; }
table.dtable.pku .s2 { left: 58px; width: 40px; box-shadow: 1px 0 0 #cfd8dc; }

/* Room Available (room_available.php) — 음수 잔여 강조 */
table.dtable.dsr td .neg { color: #c62828; font-weight: 600; }

/* Sales By Year (sales_by_year.php) — 세로 1~31일 · 가로 12개월 */
table.dtable.sby { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.sby th, table.dtable.sby td { padding: 3px 7px; font-size: 12px; }
table.dtable.sby td.num, table.dtable.sby th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.sby th.grp { text-align: center; background: #eef2f4; border-bottom: 1px solid #cfd8dc; }
table.dtable.sby th.grp.alt, table.dtable.sby th.num.alt { background: #f4f1ea; }
table.dtable.sby td.alt { background: #fcfaf5; }
table.dtable.sby td.none { background: #f3f5f6; }
table.dtable.sby td.none.alt { background: #f1eee8; }
table.dtable.sby td .zero { color: #cfd8dc; }
table.dtable.sby td.est { color: #6d4c41; font-style: italic; }
table.dtable.sby tfoot tr.sum td { background: #f0efe4; color: #8a6d1f; font-weight: 700;
                                   border-top: 1px solid #cfd8dc; }
table.dtable.sby .stick { position: sticky; left: 0; background: #fff; z-index: 2;
                          width: 44px; box-shadow: 1px 0 0 #cfd8dc; }
table.dtable.sby thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.sby tfoot tr.sum .stick { background: #f0efe4; z-index: 3; }
.est-dot { color: #b5651d; font-weight: 700; }

/* In House List (in_house_list.php) */
table.dtable.ihl { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.ihl th, table.dtable.ihl td { padding: 4px 7px; font-size: 12px; }
table.dtable.ihl td.num, table.dtable.ihl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.ihl td.wrapcell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
table.dtable.ihl td .zero { color: #cfd8dc; }
table.dtable.ihl td.tot { background: #f7f8f5; font-weight: 600; }
table.dtable.ihl .tag { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 3px;
                        background: #eceff1; color: #546e7a; font-size: 11px; }
table.dtable.ihl tfoot tr.sum td { background: #f0efe4; color: #8a6d1f; font-weight: 700;
                                   border-top: 1px solid #cfd8dc; }
table.dtable.ihl .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.ihl thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.ihl tfoot tr.sum .stick { background: #f0efe4; z-index: 3; }
table.dtable.ihl .s1 { left: 0; width: 62px; }
table.dtable.ihl .s2 { left: 62px; min-width: 140px; box-shadow: 1px 0 0 #cfd8dc; }

/* Special Service List (special_service_list.php) */
table.dtable.ssl { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.ssl th, table.dtable.ssl td { padding: 4px 7px; font-size: 12px; }
table.dtable.ssl td.num, table.dtable.ssl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.ssl td.wrapcell { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
table.dtable.ssl td .zero { color: #cfd8dc; }
table.dtable.ssl td.tot { background: #f7f8f5; font-weight: 600; }
table.dtable.ssl .tag { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 3px;
                        background: #eceff1; color: #546e7a; font-size: 11px; }
table.dtable.ssl tfoot tr.sum td { background: #f0efe4; color: #8a6d1f; font-weight: 700;
                                   border-top: 1px solid #cfd8dc; }
table.dtable.ssl .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.ssl thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.ssl tfoot tr.sum .stick { background: #f0efe4; z-index: 3; }
table.dtable.ssl .s1 { left: 0; width: 58px; }
table.dtable.ssl .s2 { left: 58px; width: 82px; box-shadow: 1px 0 0 #cfd8dc; }

/* Daily Room & Outlet Revenue (daily_room_outlet_revenue.php)
   ⚠️ 묶음 클래스에 g- 를 붙인다 — .room 은 객실 현황판의 카드 스타일이라
      그냥 쓰면 표 칸이 카드처럼 부풀어 버린다. */
table.dtable.dro { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.dro th, table.dtable.dro td { padding: 4px 9px; font-size: 12px; line-height: 1.35;
                                           height: auto; vertical-align: middle; }
table.dtable.dro td.num, table.dtable.dro th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* 머리글 — 위는 묶음, 아래는 열 이름 */
table.dtable.dro tr.grpline th { text-align: center; font-weight: 700; padding: 3px 9px;
                                 border-bottom: 1px solid #dfe4e8; color: #37474f; }
table.dtable.dro tr.colline th { font-weight: 600; color: #455a64;
                                 border-bottom: 1px solid #cfd8dc; vertical-align: bottom; }
table.dtable.dro tr.colline th .loc { display: block; font-weight: 400; color: #90a4ae; font-size: 10px; }

/* 묶음별 바탕색 — 머리글부터 합계까지 세로줄로 이어진다 */
table.dtable.dro th.g-room  { background: #eef3f6; }
table.dtable.dro th.g-pos   { background: #f6f2e9; }
table.dtable.dro th.g-prev  { background: #f2f1f5; color: #5b6b7c; }
table.dtable.dro th.g-grand { background: #e8eef0; }
table.dtable.dro td.g-room  { background: #f8fafb; }
table.dtable.dro td.g-pos   { background: #fdfbf6; }
table.dtable.dro td.g-prev  { background: #fafafc; color: #5b6b7c; }
table.dtable.dro td.g-grand { background: #eef3f5; font-weight: 700; color: #1b3a4b; }
table.dtable.dro td.g-tot, table.dtable.dro th.g-tot { font-weight: 700; }
table.dtable.dro th.g-grand, table.dtable.dro td.g-grand {
    border-left: 1px solid #cfd8dc; border-right: 1px solid #cfd8dc; }

table.dtable.dro td .zero { color: #cbd5da; }
table.dtable.dro td.est { font-style: italic; }
table.dtable.dro tbody tr:hover td { background: #fffdf2; }
table.dtable.dro tr.sat td.stick { color: #1565c0; }
table.dtable.dro tr.sun td.stick { color: #c62828; }
table.dtable.dro tfoot tr.sum td { background: #f0efe4; color: #7a5f18; font-weight: 700;
                                   border-top: 2px solid #cfd8dc; }
table.dtable.dro tfoot tr.sum td.g-grand { background: #e6e2cd; }

/* 증감 */
table.dtable.dro .up { color: #2e7d32; font-weight: 700; }
table.dtable.dro .down { color: #c62828; font-weight: 700; }
.status-line .up { color: #2e7d32; font-weight: 700; }
.status-line .down { color: #c62828; font-weight: 700; }

/* 왼쪽 두 열 고정 */
table.dtable.dro .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.dro thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.dro tfoot tr.sum .stick { background: #f0efe4; z-index: 3; }
table.dtable.dro .s1 { left: 0; min-width: 62px; text-align: left; }
table.dtable.dro .s2 { left: 62px; min-width: 34px; text-align: center; box-shadow: 1px 0 0 #cfd8dc; }
/* 접히는 설명 상자 */
details.note { margin: 10px 0 0; padding: 8px 12px; background: #fafbfc;
               border: 1px solid #e3e8ea; border-radius: 6px; font-size: 12px; color: #607d8b; }
details.note summary { cursor: pointer; font-weight: 600; color: #455a64; }
details.note ul { margin: 8px 0 0; padding-left: 18px; }
details.note li { margin: 3px 0; line-height: 1.6; }
details.note b { color: #37474f; }

/* Global Guest List (global_guest_list.php)
   ⚠️ 표 안에서 쓰는 이름은 전역 클래스와 겹치지 않게 표 선택자 안에 둔다. */
table.dtable.ggl { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.ggl th, table.dtable.ggl td { padding: 4px 7px; font-size: 12px; line-height: 1.35; }
table.dtable.ggl td.num, table.dtable.ggl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.ggl td.wrapcell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
table.dtable.ggl td .zero { color: #cfd8dc; }
table.dtable.ggl td.tot { background: #f7f8f5; font-weight: 600; }
table.dtable.ggl .tag { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 3px;
                        background: #eceff1; color: #546e7a; font-size: 11px; }
table.dtable.ggl tfoot tr.sum td { background: #f0efe4; color: #7a5f18; font-weight: 700;
                                   border-top: 2px solid #cfd8dc; }
table.dtable.ggl .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.ggl thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.ggl tfoot tr.sum .stick { background: #f0efe4; z-index: 3; }
table.dtable.ggl .s1 { left: 0; min-width: 60px; box-shadow: 1px 0 0 #cfd8dc; }

/* 긴 글이 든 칸은 한 줄로 자르고 마우스를 올리면 전문을 보여 준다.
   ⚠️ 접어서 여러 줄로 두면 비고 한 건(최장 279자)이 줄 높이를 20줄까지 밀어 올린다. */
td.wrapcell { white-space: nowrap; }
td.wrapcell[title]:hover { text-decoration: underline dotted #b0bec5; cursor: help; }

/* Room Status List (room_status_list.php)
   ⚠️ 표 안에서 쓰는 이름은 전역 클래스와 겹치지 않게 표 선택자 안에 둔다. */
table.dtable.rsl { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.rsl th, table.dtable.rsl td { padding: 4px 7px; font-size: 12px; line-height: 1.35; }
table.dtable.rsl td.mid, table.dtable.rsl th.mid { text-align: center; }
table.dtable.rsl td.wrapcell { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
table.dtable.rsl .tick { color: #1565c0; font-weight: 700; }
table.dtable.rsl .tag { display: inline-block; padding: 0 4px; border-radius: 3px;
                        background: #eceff1; color: #546e7a; font-size: 11px; }
table.dtable.rsl .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.rsl thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.rsl .s1 { left: 0; min-width: 44px; }
table.dtable.rsl .s2 { left: 44px; min-width: 62px; box-shadow: 1px 0 0 #cfd8dc; }

/* Update Room Status (update_room_status.php)
   ⚠️ 표 안에서 쓰는 이름은 전역 클래스와 겹치지 않게 표 선택자 안에 둔다. */
table.dtable.urs { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.urs th, table.dtable.urs td { padding: 5px 9px; font-size: 12.5px; line-height: 1.35; }
table.dtable.urs td.wrapcell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.dtable.urs td.bad  { color: #c0392b; font-weight: 600; }   /* 미정비 · 청소요청 · 고장 */
table.dtable.urs td.busy { color: #b25e00; }                     /* 재실 · 청소중 */
table.dtable.urs td.calm { color: #8a97a0; }                     /* 손볼 것이 없는 방 */
table.dtable.urs .tag { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 3px;
                        background: #eceff1; color: #90a4ae; font-size: 11px; }
table.dtable.urs .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.urs thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.urs .s1 { left: 0; min-width: 66px; box-shadow: 1px 0 0 #cfd8dc; }

/* 온라인 회원 (cyber_member_list.php)
   ⚠️ 표 안에서 쓰는 이름은 전역 클래스와 겹치지 않게 표 선택자 안에 둔다. */
table.dtable.cyb { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.cyb th, table.dtable.cyb td { padding: 4px 7px; font-size: 12px; line-height: 1.35; }
table.dtable.cyb td.num, table.dtable.cyb th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.cyb td.mid, table.dtable.cyb th.mid { text-align: center; }
table.dtable.cyb td.wrapcell { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
table.dtable.cyb td .zero { color: #cfd8dc; }
table.dtable.cyb td.calm { color: #8a97a0; }
table.dtable.cyb .bad { color: #c0392b; font-weight: 600; }
table.dtable.cyb .tick { color: #1565c0; font-weight: 700; }
table.dtable.cyb .tag { display: inline-block; padding: 0 4px; border-radius: 3px;
                        background: #eceff1; color: #546e7a; font-size: 11px; }
table.dtable.cyb tr.gone td { background: #fbf7f7; color: #9e9e9e; }
table.dtable.cyb .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.cyb thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.cyb tr.gone .stick { background: #fbf7f7; }
table.dtable.cyb .s1 { left: 0; min-width: 110px; box-shadow: 1px 0 0 #cfd8dc; }

/* Credit Card List (credit_card_list.php)
   ⚠️ 표 안에서 쓰는 이름은 전역 클래스와 겹치지 않게 표 선택자 안에 둔다. */
table.dtable.ccl { border-collapse: separate; border-spacing: 0; white-space: nowrap; }
table.dtable.ccl th, table.dtable.ccl td { padding: 4px 7px; font-size: 12px; line-height: 1.35; }
table.dtable.ccl td.num, table.dtable.ccl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dtable.ccl td.mid, table.dtable.ccl th.mid { text-align: center; }
table.dtable.ccl td.wrapcell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
table.dtable.ccl td .zero { color: #b0bec5; }
table.dtable.ccl td.tot { background: #f7f8f5; font-weight: 600; }
table.dtable.ccl .cardno { font-family: Consolas, monospace; letter-spacing: -0.2px; }
table.dtable.ccl .bad { color: #c0392b; font-weight: 600; }
table.dtable.ccl tr.cxl td { background: #fdf3f2; color: #b03a2e; }
table.dtable.ccl tfoot tr.sum td { background: #f0efe4; color: #7a5f18; font-weight: 700;
                                   border-top: 2px solid #cfd8dc; }
table.dtable.ccl .stick { position: sticky; background: #fff; z-index: 2; }
table.dtable.ccl thead .stick { background: #f7f9fa; z-index: 3; }
table.dtable.ccl tfoot tr.sum .stick { background: #f0efe4; z-index: 3; }
table.dtable.ccl tr.cxl .stick { background: #fdf3f2; }
table.dtable.ccl .s1 { left: 0; min-width: 110px; box-shadow: 1px 0 0 #cfd8dc; }

/* 단추처럼 보이는 링크 (내려받기 등 — 폼을 보내지 않고 주소로 가는 것) */
a.btn-link {
    display: inline-block;
    padding: 9px 16px;
    font-size: 13px;
    background: #2e7d32;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-family: inherit;
    line-height: 1;
}
a.btn-link:hover { background: #388e3c; }

/* 기간별 세금계산서 리스트 — 머리글을 회계정보 / 거래처 정보 / Amount 로 묶는다 */
table.dtable.tbx th.grp { text-align: center; background: #eef2f4; border-bottom: 1px solid #cfd8dc; }
table.dtable.tbx thead tr:nth-child(2) th { top: 38px; }
table.dtable.tbx th, table.dtable.tbx td { padding: 7px 10px; }
table.dtable.tbx td.diff { color: #c0392b; }   /* 증빙일자가 회계일자와 다른 줄 */

/* 수분양자 속초 운영 현황 — 제목 옆 년·월 고르기 + 여섯 칸의 전년대비 뱃지 */
.ops-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ops-head h1 { margin-bottom: 0; }
.ops-picker { display: flex; gap: 8px; }
.ops-picker select { min-width: 96px; }

/* 여섯 칸은 flex 로 두면 마지막 하나가 혼자 줄바꿈해 가로로 늘어난다 — 그리드로 고르게 나눈다 */
.stats.ops-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}
.stats.ops-cards .stat { background: #fff; }
.stats.ops-cards .stat-label { text-align: center; }
.stats.ops-cards .stat-value { text-align: center; margin-bottom: 8px; }
.ops-unit { font-size: 12px; font-weight: 400; color: #90a4ae; margin-left: 3px; }

/* 색은 좋고 나쁨이 아니라 부호를 따른다 — 비용이 늘어도 '오름' 색이다 */
.ops-delta {
    display: block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    color: #78909c;
    background: #f4f6f7;
}
.ops-delta b { font-weight: 700; margin-left: 4px; }
.ops-delta i { font-style: normal; font-size: 10px; }
.ops-delta.up   { background: #eef1fd; color: #3949ab; }
.ops-delta.down { background: #fdeeee; color: #c0392b; }

table.dtable.ops td.num, table.dtable.ops th { font-variant-numeric: tabular-nums; }
table.dtable.ops td.num .colname { margin-left: 4px; }

/* 운영 지수 — 왼쪽 영업지표 + 오른쪽 두 해치 막대 */
.ops-section {
    margin: 26px 0 10px;
    font-size: 17px;
    color: #263238;
}
.ops-idx {
    display: grid;
    grid-template-columns: minmax(240px, 292px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.ops-kpi {
    padding: 14px;
    background: #fafbfc;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
}
.ops-kpi-head {
    padding: 10px 12px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #e4e7ea;
    border-radius: 6px;
}
.ops-kpi-head span { display: block; font-size: 12px; color: #7e57c2; margin-bottom: 4px; }
.ops-kpi-head strong { font-size: 19px; color: #4527a0; font-variant-numeric: tabular-nums; }
/* 두 칸을 반씩 나누면 '2,414,922,584 원' 이 줄바꿈된다 — 값 길이대로 잡게 둔다 */
.ops-kpi dl { display: grid; grid-template-columns: max-content max-content; gap: 14px 18px; margin: 0; }
.ops-kpi dl .wide { grid-column: 1 / -1; }
.ops-kpi dt { font-size: 12.5px; color: #607d8b; margin-bottom: 4px; }
.ops-kpi dd {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #263238;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ops-kpi dd span { font-size: 12px; font-weight: 400; color: #90a4ae; }
.ops-kpi-note { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: #78909c; }

.ops-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 6px;
}
.ops-legend-grp {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 6px 12px;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
}
.ops-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #546e7a; }
.ops-legend .sw { width: 14px; height: 14px; border-radius: 3px; }
.ops-chart-unit { font-size: 11.5px; color: #90a4ae; margin-bottom: 2px; }

/* 지난해는 옅게, 올해는 진하게 — 같은 뜻끼리 색을 맞춘다 */
.sw.prev.sales,  svg.ops-bars .b.prev.sales  { background: #ecd6a4; fill: #ecd6a4; }
.sw.prev.cost,   svg.ops-bars .b.prev.cost   { background: #f8c3c3; fill: #f8c3c3; }
.sw.prev.profit, svg.ops-bars .b.prev.profit { background: #b8e0b2; fill: #b8e0b2; }
.sw.cur.sales,   svg.ops-bars .b.cur.sales   { background: #d9a441; fill: #d9a441; }
.sw.cur.cost,    svg.ops-bars .b.cur.cost    { background: #ee4b4b; fill: #ee4b4b; }
.sw.cur.profit,  svg.ops-bars .b.cur.profit  { background: #1faa4b; fill: #1faa4b; }

svg.ops-bars { display: block; width: 100%; min-width: 620px; height: auto; }
svg.ops-bars .grid { stroke: #eceff1; stroke-width: 1; }
svg.ops-bars .axis { stroke: #cfd8dc; stroke-width: 1; }
svg.ops-bars .ytick { fill: #90a4ae; font-size: 11px; text-anchor: end; }
svg.ops-bars .xtick { fill: #607d8b; font-size: 12px; text-anchor: middle; }

@media (max-width: 900px) {
    .ops-idx { grid-template-columns: 1fr; }
}
.ops-kpi-note .ops-warn { color: #8a5a00; }

/* 매출 현황 — 도넛 넷 + 일별 표 */
.sales-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
    gap: 0 18px;
}
.sales-chart { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
svg.sales-donut { width: 230px; height: 230px; flex: 0 0 auto; }
svg.sales-donut .sl { stroke: #fff; stroke-width: 1.5; }
svg.sales-donut .c-top {
    text-anchor: middle;
    font-size: 21px;
    font-weight: 700;
    fill: #263238;
}
svg.sales-donut .c-sub { text-anchor: middle; font-size: 12px; fill: #90a4ae; }

ul.sales-legend { flex: 1 1 190px; list-style: none; margin: 0; padding: 0; }
ul.sales-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12.5px;
    border-bottom: 1px solid #f0f3f5;
}
ul.sales-legend li:last-child { border-bottom: 0; }
ul.sales-legend i { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
ul.sales-legend .nm { flex: 1 1 auto; color: #546e7a; }
ul.sales-legend .vl { color: #263238; font-weight: 600; font-variant-numeric: tabular-nums; }
ul.sales-legend .pc {
    width: 44px;
    text-align: right;
    color: #90a4ae;
    font-variant-numeric: tabular-nums;
}

table.dtable.sales td.num, table.dtable.sales th { font-variant-numeric: tabular-nums; }
table.dtable.sales tbody tr.today > td { background: #fffdf3; font-weight: 600; }
table.dtable.sales tbody tr.today:hover > td { background: #fff8e1; }

a.btn-link.small-link {
    padding: 4px 10px;
    font-size: 12px;
    background: #fff;
    color: #37474f;
    border: 1px solid #cfd8dc;
    margin-left: auto;
}
a.btn-link.small-link:hover { background: #eceff1; }

/* Post Of Deposit — 취소건은 흐리게, 합계줄은 진하게 */
table.dtable.pod td.num, table.dtable.pod th { font-variant-numeric: tabular-nums; }
table.dtable.pod tbody tr.void > td { background: #fdf3f2; color: #8a6a66; }
table.dtable.pod tbody tr.void:hover > td { background: #fbe9e7; }
table.dtable.pod tfoot tr.sum > td {
    background: #eef2f5;
    font-weight: 700;
    border-top: 2px solid #cfd8dc;
}
table.dtable.pod td.clip > span { max-width: 14em; }

/* Rate Type — 줄을 눌러 고르는 목록 + Yes/No 뱃지 */
table.dtable.rt tbody tr.pick { cursor: pointer; }
table.dtable.rt tbody tr.pick.on > td { background: #eef4f8; font-weight: 600; }
table.dtable.rt tbody tr.pick.on:hover > td { background: #e3edf4; }
table.dtable.rt tbody tr.off > td { color: #98a6ae; background: #fafbfc; }
table.dtable.rt td.num { text-align: right; font-variant-numeric: tabular-nums; }

.yn { font-size: 12px; font-weight: 600; }
.yn.yes { color: #1e7e34; }
.yn.no  { color: #90a4ae; }

/* Rate Type — 요금 달력 (객실 타입을 골랐을 때) */
.rt-cal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin: 14px 0 8px;
}
.rt-cal-head strong { font-size: 16px; color: #263238; }
.rt-cal-nav a { font-size: 12.5px; color: #37474f; text-decoration: none; }
.rt-cal-nav a:hover { text-decoration: underline; }

table.rt-cal {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
table.rt-cal th {
    padding: 7px 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #546e7a;
    background: #f2f5f7;
    border: 1px solid #e4e7ea;
}
table.rt-cal th.sun { color: #c0392b; }
table.rt-cal th.sat { color: #1565c0; }
table.rt-cal td {
    height: 72px;
    padding: 6px 8px;
    border: 1px solid #e4e7ea;
    vertical-align: top;
    background: #fff;
}
table.rt-cal td.pad { background: #fafbfc; }
table.rt-cal td.none { background: #fafbfc; }
table.rt-cal td.clash { background: #fdf3f2; }
table.rt-cal .d { display: block; font-size: 12.5px; color: #546e7a; }
table.rt-cal td.sun .d { color: #c0392b; }
table.rt-cal td.sat .d { color: #1565c0; }
/* 공휴일 — 토요일 파랑(td.sat .d)보다 세게 걸어야 빨강이 이긴다 */
table.rt-cal .d.hol, table.rt-cal td.sat .d.hol { color: #c0392b; font-weight: 700; }
table.rt-cal .hn {
    display: block;
    font-size: 10.5px;
    color: #c0392b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
table.rt-cal .s {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #90a4ae;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
table.rt-cal .f {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #263238;
    font-variant-numeric: tabular-nums;
}
table.rt-cal .f.none { font-size: 11.5px; font-weight: 400; color: #c5cdd3; }

a.btn-link.small-link.on { background: #263238; color: #fff; border-color: #263238; }

/* 토글 두 개는 나란히 붙인다 (매출 현황의 오른쪽 정렬 규칙을 여기서만 푼다) */
.status-line a.btn-link.small-link { margin-left: 0; }

/* ---------------------------------------------------------------------------
   로그인 (index.php)
   IP 주소 + 패스워드를 받는 좁은 카드.
--------------------------------------------------------------------------- */
input[type=password] {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-family: inherit;
    background: #fff;
}

.card.login { max-width: 360px; }
.card.login .field { margin-bottom: 14px; }
.card.login input[type=text],
.card.login input[type=password] { width: 100%; }
.card.login button { width: 100%; padding: 10px 16px; font-size: 14px; }
.card.login button[disabled] { background: #b0bec5; cursor: not-allowed; }
.card.login .err { margin-bottom: 14px; }
.login-hint { margin: 14px 0 0; line-height: 1.6; }

/* 로그인한 뒤 메뉴 위에 오는 제목줄 + 로그아웃 */
.topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: flex-start;
}
.topbar h1 { margin-bottom: 4px; }
.topbar .sub { margin-bottom: 20px; }
.topbar form.logout {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
}
.card.login .notice {
    background: #eef4fa;
    border: 1px solid #cfe0f0;
    color: #2c5678;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
    line-height: 1.5;
}
