/* pdsno1 덧칠 — Tabler 변수 위에 시안(mockup/tabler.html)의 색·간격 규칙만 얹는다. */

/* ---------- 테마 토큰 ---------- */
:root {
    --tblr-font-sans-serif: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    --surface: var(--tblr-bg-surface);
    --fg: var(--tblr-body-color);
    --primary: var(--tblr-primary);
    --primary-fg: var(--tblr-primary-fg);
    --line: var(--tblr-border-color);
    --line-soft: color-mix(in oklab, var(--tblr-border-color) 55%, var(--tblr-bg-surface));
    --line-strong: var(--tblr-border-active-color);
    --muted: var(--tblr-secondary);
    --faint: color-mix(in oklab, var(--tblr-secondary) 70%, var(--tblr-bg-surface));
    --head-bg: color-mix(in oklab, var(--tblr-body-color) 4%, var(--tblr-bg-surface));
    --row-alt: color-mix(in oklab, var(--tblr-body-color) 2%, var(--tblr-bg-surface));
    --hover: color-mix(in oklab, var(--tblr-primary) 7%, var(--tblr-bg-surface));
    --sel: color-mix(in oklab, var(--tblr-primary) 14%, var(--tblr-bg-surface));
    --tint: color-mix(in oklab, var(--tblr-primary) 12%, var(--tblr-bg-surface));
    --tint-text: var(--tblr-link-color);
    --shadow-pop: var(--tblr-shadow-dropdown);
}
html, body { height: 100%; }
body { font-family: var(--tblr-font-sans-serif); -webkit-font-smoothing: antialiased; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 12.5px; letter-spacing: -.01em; }
.tnum { font-variant-numeric: tabular-nums; }
.dim { color: var(--faint); }
.muted { color: var(--muted); }

/* ---------- 틀: 세로 사이드바 + 위 막대 ---------- */
.page { min-height: 0; }
.page-wrapper { flex: none; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--tblr-primary); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
#sidebar .navbar-brand { gap: 10px; justify-content: flex-start; font-size: 15px; color: inherit; text-decoration: none; }
#sidebar .nav-link, #sidebar .dropdown-item { width: 100%; text-align: left; cursor: pointer; }
#sidebar .navbar-nav { --tblr-sidebar-nav-padding-y: .55rem; font-size: 13.5px; }
#sidebar .dropdown-item { font-size: 13px; padding-top: .4rem; padding-bottom: .4rem; }
#sidebar .nav-link .soon { margin-left: auto; }
#sidebar .nav-link.disabled { cursor: default; }
#sidebar .side-foot { padding: 10px 16px; font-size: 11.5px; color: color-mix(in oklab, var(--tblr-navbar-color) 75%, transparent); }
@media (min-width: 992px) {
    html[data-bs-sidebar=folded] #sidebar .soon,
    html[data-bs-sidebar=folded] #sidebar .side-foot { display: none; }
    html[data-bs-sidebar=folded] #sidebar .navbar-brand { justify-content: center; padding-left: 0; padding-right: 0; }
    html[data-bs-sidebar=folded] #sidebar .nav-link { justify-content: center; }
    html[data-bs-sidebar=folded] #sidebar .nav-link-icon { margin: 0; }
}
.topbar { flex: none; min-height: 3.25rem; }
.topbar .container-fluid { gap: 8px; flex-wrap: nowrap; }
.top-brand { display: none; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin: 0; padding: 0; color: inherit; text-decoration: none; }
.gsearch { width: min(380px, 40vw); }
.input-icon .form-control-sm ~ .input-icon-addon, .input-icon .input-icon-addon:has(~ .form-control-sm) { height: 100%; --tblr-input-icon-addon-width: 2rem; font-size: 1em; }
.input-icon .form-control-sm { padding-inline-start: 2rem; }
.nav-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 1034; opacity: 0; pointer-events: none; transition: opacity .18s; }
.nav-scrim.show { opacity: 1; pointer-events: auto; }
.view { flex: 1; min-height: 0; overflow: auto; }

/* ---------- 홈 ---------- */
.home { padding: 20px 24px 32px; max-width: 1200px; }
.home .page-header { margin: 0 0 16px; }
.stat .num { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .num small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat .num.num-sm { font-size: 22px; }
.stat { text-align: left; width: 100%; }
.stat .go { font-size: 12px; color: var(--tint-text); }
/* 내 할 일(다음 연락 · 미배정 접수) · 통신사별 막대 — 시안 renderHome() */
.todo-sub { padding: 7px 16px; font-size: 12px; font-weight: 600; background: var(--head-bg); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.card-header + .todo-sub { border-top: 0; }
.todo { display: grid !important; grid-template-columns: 70px 64px 1fr auto 16px; align-items: center; gap: 12px; font-size: 13px; text-align: left; }
.todo .ti { color: var(--faint); }
.todo2 { display: grid !important; grid-template-columns: 18px 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; padding-top: 11px; padding-bottom: 11px; }
.todo2 .badge { justify-self: start; }
.todo2 .todo-main { color: inherit; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo2 .todo-main:hover .todo-task { text-decoration: underline; }
.todo2 .todo-task { color: var(--muted); }
.todo2 .todo-staff { font-size: 12px; white-space: nowrap; }
.todo2.is-done .todo-main { text-decoration: line-through; color: var(--muted); }
.alim-ic { color: color-mix(in oklab, var(--tblr-yellow) 75%, var(--fg)); margin-left: 4px; }
/* 페이백 대기 판(지시서 62): 접수 번호 · 고객명 · 예정액 · 개통일 · 상태 꼬리표 · 담당자 */
.pb-sub { display: flex; align-items: center; gap: 6px; }
.pb-sub .pb-late { color: var(--tblr-red); font-weight: 700; }
.pb-sub .pb-hold { color: color-mix(in oklab, var(--tblr-orange) 80%, var(--fg)); font-weight: 700; }
.pb-pick { display: inline-flex; margin-left: 6px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.pb-pick button { padding: 1px 7px; border: 0; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.5; }
.pb-pick button + button { border-left: 1px solid var(--line); }
.pb-pick button.on { background: var(--surface); color: var(--fg); }
.pb-pick button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.pb-sub .pb-all { margin-left: auto; font-weight: 500; }
.todo.pb-row { grid-template-columns: 70px minmax(0, 1fr) auto auto auto minmax(0, 64px) 16px; }
.pb-row .pb-amt { font-weight: 600; }
.pb-row .todo-staff { font-size: 12px; }
.bar-row { padding: 6px 0; font-size: 13px; text-decoration: none; }
.bar-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-row .progress { height: 10px; }

/* ---------- 준비 중 ---------- */
.ph { display: grid; place-items: center; min-height: 100%; padding: 40px 20px; }
.ph .empty-icon .ti { font-size: 48px; }

/* ---------- 로그인 ---------- */
.login-page { min-height: 100%; }
.login-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }

/* ---------- 반응형: 좁은 화면은 사이드바가 서랍 ---------- */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 1035; width: 264px; padding: 0;
        flex-direction: column; flex-wrap: nowrap; align-items: stretch;
        transform: translateX(-100%); transition: transform .2s ease;
    }
    #layout.drawer-open #sidebar { transform: none; }
    #sidebar > .container-fluid { flex-direction: column; flex-wrap: nowrap; align-items: stretch; height: 100%; padding: 0; }
    #sidebar .navbar-brand { padding: .75rem 1rem; margin: 0; }
    #sidebar .navbar-collapse { display: flex !important; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; align-items: stretch; }
    #sidebar .navbar-nav { flex-direction: column; padding: 0 .5rem; }
    #sidebar .navbar-nav .nav-link { padding: .55rem .75rem; justify-content: flex-start; }
    #sidebar .navbar-nav .nav-link-icon { width: 1.5rem; margin-right: .5rem; }
    #sidebar .dropdown-menu { position: static; background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0; color: inherit; min-width: 0; }
    #sidebar .dropdown-item { color: inherit; padding-left: 2.75rem; border-radius: var(--tblr-border-radius); display: flex; }
    #sidebar .dropdown-item.active { background: var(--tblr-navbar-active-bg); font-weight: 600; }
    #sidebar .side-foot { border-top: 1px solid var(--tblr-navbar-border-color); }
    .page-wrapper { margin-inline-start: 0 !important; }
    .top-brand { display: flex; }
    .gsearch { display: none; }
}
@media (max-width: 640px) {
    .home { padding: 16px 12px 24px; }
    .stat .num { font-size: 26px; }
    .todo { grid-template-columns: 64px 1fr 16px; }
    .todo .todo-model, .todo .todo-time { display: none; }
    .todo.pb-row { grid-template-columns: 58px minmax(0, 1fr) auto auto 16px; }
    .pb-row .todo-staff { display: none; }
    .todo2 { grid-template-columns: 18px 58px 1fr; }
    .todo2 .todo-staff { display: none; }
}

/* ---------- 읽기 전용 시범(14a) ---------- */
.pilot-badge { flex: none; font-size: 11px; font-weight: 600; }
/* 잠근 버튼: 화면 스크립트가 disabled를 다시 풀어도 눌리지 않게(차단은 서버가 한다) */
.pilot-locked { pointer-events: none; opacity: .5; }
/* 버튼 묶음을 통째로 잠그는 <fieldset disabled> — 배치는 그대로 */
.pilot-lock { display: contents; }
