/* ============================================================
   차대장 디자인 토큰 — 로고(남색 바탕 + 금색 번호판) 기반
   시그니처: 번호판 칩 (라이선스 코드·차량번호를 실물 번호판처럼)
   ============================================================ */
:root {
  --navy-950: #0B1322;
  --navy-900: #101E36;   /* 로고 배경색 */
  --navy-800: #172A4C;
  --navy-700: #21395F;
  --gold: #D4AF37;       /* 로고 번호판 금색 */
  --gold-deep: #A9862A;
  --gold-soft: #F3E7BE;
  --paper: #F4F5F8;
  --card: #FFFFFF;
  --ink: #1B2434;
  --ink-soft: #5A6474;
  --line: #E2E5EC;
  --ok: #2E7D5B;
  --ok-bg: #E8F3EE;
  --alert: #C24638;
  --alert-bg: #FBEAE7;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(11,19,34,.08), 0 8px 24px rgba(11,19,34,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.55;
}
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 14px; }
a { color: var(--navy-700); }

/* ---------- 번호판 칩 (시그니처) ---------- */
.plate {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--navy-900);
  border-radius: 6px;
  padding: 1px 10px;
  font-weight: 800;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* 표 안에 들어가는 연동 코드 — plate-gold는 26px라 셀에 안 맞아 작은 칩으로 쓴다 */
.code-chip {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-950);
  border: 1px solid var(--gold-deep);
  border-radius: 6px;
  padding: 3px 9px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 슬롯 사용자 메모 입력 — 표 안이라 테두리를 옅게 두고 포커스 때만 드러낸다 */
.slot-label {
  width: 100%;
  min-width: 110px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: transparent;
}
.slot-label:focus {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: var(--gold-deep);
  background: #fff;
}

.plate-gold {
  position: relative;
  display: inline-block;
  background: linear-gradient(180deg, #E6C654, var(--gold) 55%, #C79F30);
  color: var(--navy-950);
  border: 2px solid var(--gold-deep);
  border-radius: 10px;
  padding: 14px 34px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 6px rgba(11,19,34,.25);
}
.plate-gold::before, .plate-gold::after {
  content: "";
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--navy-900);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.6);
}
.plate-gold::before { left: 11px; }
.plate-gold::after { right: 11px; }

/* ---------- 로그인 ---------- */
.auth-body {
  min-height: 100vh;
  background: var(--navy-900);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card);
  border-radius: 16px;
  padding: 36px 32px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  animation: rise .45s ease-out both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.auth-brand h1 { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.auth-sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 24px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px;
}
.field input:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold-deep); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 8px;
  padding: 10px 16px; font-size: 14px; font-weight: 700;
  background: var(--navy-800); color: #fff;
}
.btn:hover { background: var(--navy-700); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.btn-gold { background: var(--gold); color: var(--navy-950); }
.btn-gold:hover { background: #DFBC49; }
.btn-ghost { background: transparent; color: var(--navy-800); border: 1px solid var(--line); }
.btn-ghost:hover { background: #EEF0F4; }
.btn-danger { background: var(--alert); }
.btn-danger:hover { background: #A93A2E; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

.btn-outline-gold { background: transparent; color: var(--gold-deep); border: 1.5px solid var(--gold); font-weight: 800; }
.btn-outline-gold:hover { background: var(--gold-soft); color: var(--navy-950); }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-hint { text-align: center; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; margin: 10px 0 0; }

.auth-msg { min-height: 20px; font-size: 13px; color: var(--alert); margin: 8px 0 0; }
.auth-switch { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 16px; }
.auth-switch a { font-weight: 600; cursor: pointer; }

/* 가입 — 개인정보 수집·이용 동의 (필수) */
.consent {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 2px 0 14px; cursor: pointer; font-size: 13.5px; line-height: 1.5;
}
.consent input { flex: none; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--gold-deep); cursor: pointer; }
.consent a { color: var(--gold-deep); font-weight: 700; text-decoration: underline; }
.consent small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; }

/* 동의 전 [가입 신청 제출]이 눌리지 않는다는 것을 눈으로 보이게 */
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--gold); }

.auth-foot { text-align: center; margin: 18px 0 0; font-size: 12.5px; }
.auth-foot a { color: var(--ink-soft); text-decoration: underline; }

/* ---------- 콘솔 레이아웃 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0;
  background: var(--navy-900); color: #C7D0DF;
  display: flex; flex-direction: column;
  padding: 20px 14px;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: #fff; }
.side-brand b { font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
/* PC 바탕화면 바로가기(PWA 설치) — 로고 옆 작은 버튼 */
.side-install {
  margin-left: auto; color: #C7D0DF; border-color: #21395F;
  font-size: 11px; padding: 3px 6px; white-space: nowrap; flex-shrink: 0;
}
.side-complex { margin-bottom: 16px; }
.side-complex select {
  width: 100%; padding: 9px 10px; border-radius: 8px;
  background: var(--navy-800); color: #fff; border: 1px solid var(--navy-700);
}
/* 이용기간 — 운영자 페이지와 같은 값(플랜 · 만료일)을 관리자도 보게 한다 */
.side-expiry { padding: 8px 2px 0; font-size: 12px; color: #8391A6; }
.side-expiry b { color: #C7D0DF; font-weight: 700; }
.side-expiry.expired b { color: #FF8A80; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: #B8C2D4;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14.5px; font-weight: 600; text-align: left;
}
.nav button:hover { background: var(--navy-800); color: #fff; }
.nav button.active { background: var(--navy-700); color: var(--gold); }
.side-foot { margin-top: auto; padding: 12px 8px 0; font-size: 12.5px; color: #8391A6; border-top: 1px solid var(--navy-800); }
.side-foot .btn { margin-top: 8px; }

/* 방침 링크 — side-foot(모바일에서 display:none) 바깥에 있어 어느 화면에서도 보인다 */
.side-legal { padding: 10px 8px 0; margin: 0; font-size: 12px; }
.side-legal a { color: #8391A6; text-decoration: underline; }
.side-legal a:hover { color: var(--gold); }

.main { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }

/* 대시보드 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat .label { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .value.alert { color: var(--alert); }
.stat.stat-click { cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
.stat.stat-click:hover { border-color: var(--gold); box-shadow: 0 6px 18px rgba(11,19,34,.10); transform: translateY(-1px); }
.stat-go { float: right; font-size: 11.5px; font-weight: 700; color: var(--gold-deep); }

/* 세대별 보유 현황 타일 */
.hh-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 820px) { .hh-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); } }
.hh-tile { text-align: center; padding: 16px 8px; border: 1px solid var(--line); border-radius: 12px; background: #FBFCFE; }
.hh-tile .hh-n { font-size: 27px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hh-tile .hh-l { font-size: 13px; color: var(--ink-soft); font-weight: 700; margin-top: 3px; }
.hh-tile.clickable { cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
.hh-tile.clickable:hover { border-color: var(--gold); background: #fff; box-shadow: 0 6px 18px rgba(11,19,34,.10); transform: translateY(-1px); }
.hh-tile.clickable:hover .hh-l { color: var(--gold-deep); }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.grid-2.halves { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .grid-2, .grid-2.halves { grid-template-columns: 1fr; } }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }

/* 테이블 */
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tools input[type="search"], .tools select {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; min-width: 200px;
}
.tools .spacer { flex: 1; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 12.5px; color: var(--ink-soft);
  border-bottom: 1px solid var(--line); padding: 8px 10px; font-weight: 700;
}
table.data td { border-bottom: 1px solid var(--line); padding: 9px 10px; vertical-align: middle; }
table.data tr:hover td { background: #FAFBFD; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-alert { background: var(--alert-bg); color: var(--alert); }
.muted { color: var(--ink-soft); font-size: 13px; }
.empty { padding: 34px 10px; text-align: center; color: var(--ink-soft); }

/* 차량 대장 — 조회 필터 바 */
.filter-bar { align-items: center; gap: 10px; }

/* 조회 바 — 항목을 한 줄에 나란히, 좁으면 접어 내린다 */
.filter-card { margin-bottom: 14px; padding: 14px 16px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-row .spacer { flex: 1; }

/* 제목 옆 총 대수 */
.count-chip {
  margin-left: 8px; padding: 3px 10px; border-radius: 999px;
  background: var(--gold-soft); color: var(--navy-950);
  font-size: 12.5px; font-weight: 700; vertical-align: middle;
}
/* 등록 계열 버튼과 엑셀 계열 버튼 사이 구분선 */
.act-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--line); }

.filter-group {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; background: #F4F6FA; border: 1px solid var(--line); border-radius: 10px;
}
.filter-label { font-size: 12px; font-weight: 800; color: var(--ink-soft); letter-spacing: .02em; }
.filter-input {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; width: 64px; min-width: 0;
  background: #fff;
}
.filter-input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 2px rgba(212,175,55,.22); }

/* 차량 대장 — 인라인 편집 표 */
.veh-scroll { max-height: 64vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
/* 열 개수·순서는 app.html colgroup 참조. 좁은 창에서는 찌그러지는 대신 가로 스크롤. */
.veh-table { margin: 0; table-layout: fixed; min-width: 1100px; }
.veh-table col.col-dong { width: 60px; }
.veh-table col.col-ho { width: 60px; }
.veh-table col.col-plate { width: 130px; }
.veh-table col.col-type { width: 104px; }
.veh-table col.col-phone { width: 132px; }
.veh-table col.col-date { width: 112px; }
.veh-table col.col-act { width: 148px; }
.veh-table td .cell { padding-left: 5px; padding-right: 5px; }
.veh-table td .cell.center { padding-left: 2px; padding-right: 2px; }
/* 날짜 셀(입주일자·등록일·해지일)은 글자·아이콘 여백을 줄여 좁은 열에도 온전히 보이게 */
.veh-table input[type="date"].cell { font-size: 12px; padding: 7px 2px 7px 5px; min-width: 0; }
.veh-table input[type="date"].cell::-webkit-calendar-picker-indicator { margin-inline-start: 0; padding: 0; }
.veh-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #EBEFF5; color: var(--ink);
  text-align: center; font-size: 14px; font-weight: 800; letter-spacing: .01em;
  padding: 12px 8px; border-bottom: 2px solid #D6DCE6;
}
.veh-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.veh-table th.sortable:hover { background: #E0E7F1; }
.sort-ind { font-size: 11px; color: var(--gold-deep); }
.req-star { color: var(--alert); font-weight: 800; }
.veh-table td { padding: 5px 6px; vertical-align: middle; border-bottom: 1px solid #EEF1F5; }
.veh-table tbody tr:nth-child(even) > td { background: #FBFCFE; }
.veh-table tbody tr:hover > td { background: #F1F5FB; }
.cell {
  width: 100%; border: 1px solid transparent; background: transparent;
  padding: 7px 8px; border-radius: 6px; font-size: 14px; color: var(--ink);
}
.cell.center { text-align: center; }
.cell::placeholder { color: #B4BCC9; font-weight: 400; }
.cell:hover { border-color: #D4DAE4; background: #fff; }
.cell:focus { outline: none; border-color: var(--gold-deep); background: #fff; box-shadow: 0 0 0 2px rgba(212,175,55,.25); }
.cell.invalid { border-color: var(--alert); background: var(--alert-bg); }

.row-actions-cell { text-align: right; white-space: nowrap; }
.row-actions-cell .row-status { font-size: 11.5px; margin-right: 6px; white-space: nowrap; }
.btn-edit { background: var(--navy-800); color: #fff; }
.btn-edit:hover { background: var(--navy-700); }
tr.dirty > td { background: #FFFBEA !important; }
tr.dirty .btn-edit { background: var(--gold); color: var(--navy-950); box-shadow: 0 0 0 2px rgba(212,175,55,.35); }
tr.saved-flash > td { animation: saveflash 1.2s ease; }
@keyframes saveflash { from { background: #E4F3EA !important; } to {} }

.miss-list { list-style: none; margin: 0; padding: 0; }
.miss-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.miss-list li:last-child { border-bottom: none; }
.miss-list time { margin-left: auto; color: var(--ink-soft); font-size: 12.5px; }

/* 라이선스 화면 */
.license-hero { text-align: center; padding: 34px 20px 30px; }
.license-hero .muted { margin-top: 14px; }
/* 라이선스: 플레이스토어 QR */
.qr-box { margin: 18px auto 0; display: flex; gap: 18px; align-items: center; justify-content: center; text-align: left; flex-wrap: wrap; }
.qr-box img { display: block; width: 160px; height: 160px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; }
.qr-box .muted { margin-top: 4px; }
.qr-link { display: flex; gap: 6px; margin-top: 10px; max-width: 420px; }
.qr-link input { flex: 1; min-width: 0; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #F7F8FA; color: var(--ink-soft); }

.plan-badge { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--gold-soft); color: var(--gold-deep); vertical-align: middle; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 8px; }

/* 모달 · 토스트 */
.modal-back {
  position: fixed; inset: 0; background: rgba(11,19,34,.55);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal { background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 460px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.modal h3 { margin: 0 0 12px; font-size: 17px; }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal .field input { font-size: 14px; }
.hidden { display: none !important; }
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--navy-950); color: #fff; padding: 11px 18px;
  border-radius: 999px; font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 60; max-width: 90vw;
}
#toast.show { opacity: 1; }

/* ===== 운영자 콘솔 ===== */
.nav-badge { display:inline-block; min-width:18px; padding:0 6px; margin-left:auto; background:var(--alert); color:#fff;
  font-size:11px; font-weight:800; line-height:18px; text-align:center; border-radius:999px; }
.rev-row { display:flex; justify-content:space-between; align-items:baseline; padding:9px 0; font-size:14px; }
.rev-row b { font-size:18px; font-weight:800; font-variant-numeric:tabular-nums; }
.hr { border:none; border-top:1px solid var(--line); margin:6px 0; }

.plan-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
@media (max-width:820px){ .plan-grid { grid-template-columns:1fr; } }
.plan-card { position:relative; padding:24px 20px; text-align:center; }
.plan-card.featured { border:2px solid var(--gold); box-shadow:0 10px 30px rgba(212,175,55,.18); }
.plan-badge2 { position:absolute; top:-11px; left:50%; transform:translateX(-50%); background:var(--gold); color:var(--navy-950);
  font-size:11px; font-weight:800; padding:3px 12px; border-radius:999px; }
.plan-name { font-size:16px; font-weight:800; color:var(--navy-800); }
.plan-price { font-size:32px; font-weight:800; letter-spacing:-.02em; margin:8px 0 2px; }
.plan-price span { font-size:14px; font-weight:600; color:var(--ink-soft); }
.plan-sub { font-size:13px; color:var(--ink-soft); }
.plan-seat { margin-top:12px; font-size:14px; font-weight:700; color:var(--gold-deep); background:var(--gold-soft);
  display:inline-block; padding:5px 14px; border-radius:999px; }

/* 관리자 플랜·결제: 카드 전체가 버튼 — 호버/포커스에만 금색 테두리(상시 featured 테두리 없음) */
#tab-billing .plan-card { cursor:pointer; outline:2px solid transparent; outline-offset:-2px;
  transition:outline-color .15s, box-shadow .15s, transform .15s; }
#tab-billing .plan-card:hover, #tab-billing .plan-card:focus-visible {
  outline-color:var(--gold); box-shadow:0 10px 30px rgba(212,175,55,.18); transform:translateY(-2px); }
#tab-billing .plan-cta { margin-top:14px; font-size:14px; font-weight:800; color:var(--ink-soft); }
#tab-billing .plan-card:hover .plan-cta, #tab-billing .plan-card:focus-visible .plan-cta { color:var(--gold-deep); }

.plan-pill { display:inline-block; padding:3px 11px; border-radius:999px; font-size:12px; font-weight:800; }
.plan-free { background:#EEF1F6; color:#6B7688; }
.plan-basic { background:#E7F0FF; color:#2F62C4; }
.plan-standard { background:#E4EAF5; color:#21395F; }
.plan-pro { background:var(--gold-soft); color:var(--gold-deep); }

.bars { display:flex; flex-direction:column; gap:12px; padding-top:4px; }
.bar-row { display:flex; align-items:center; gap:10px; font-size:13px; }
.bar-label { width:64px; font-weight:700; color:var(--ink-soft); }
.bar-track { flex:1; height:12px; background:#EEF1F6; border-radius:999px; overflow:hidden; }
.bar-fill { display:block; height:100%; border-radius:999px; background:var(--navy-700); }
.bar-fill.plan-basic { background:#5B8DEF; } .bar-fill.plan-standard { background:#21395F; }
.bar-fill.plan-pro { background:var(--gold); } .bar-fill.plan-free { background:#C7D0DF; }
.bar-val { width:90px; text-align:right; font-weight:700; font-variant-numeric:tabular-nums; }

/* ===== 단속 기록 · 이력 표 (가독성 개선) ===== */
.log-scroll, .hist-scroll {
  max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px;
}
.log-table { margin: 0; table-layout: fixed; width: 100%; }
.log-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #EBEFF5; color: var(--ink);
  text-align: center; font-size: 14px; font-weight: 800; letter-spacing: .01em;
  padding: 12px 8px; border-bottom: 2px solid #D6DCE6; white-space: nowrap;
}
.log-table td { padding: 9px 10px; text-align: center; border-bottom: 1px solid #EEF1F5; vertical-align: middle; }
.log-table td:first-child { text-align: left; }
.log-table tbody tr:nth-child(even) > td { background: #FBFCFE; }
.log-table tbody tr:hover > td { background: #F1F5FB; }
.log-c-time { width: 132px; } .log-c-plate { width: 150px; } .log-c-res { width: 88px; }
.log-c-dongho { width: 120px; } .log-c-type { width: 130px; } .log-c-dev { width: 110px; }

/* 클릭 가능한 번호판 (단속기록 → 30일 기록) */
.plate-link {
  cursor: pointer; font: inherit; color: inherit;
  background: #fff; border: 2px solid var(--navy-900); border-radius: 6px;
  padding: 1px 10px; font-weight: 800; letter-spacing: .06em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: background .12s, box-shadow .12s;
}
.plate-link:hover { background: var(--gold-soft); box-shadow: 0 0 0 2px rgba(212,175,55,.35); }

/* 이력 모달 */
.modal-wide { max-width: 720px; }
.hist-summary { margin: 2px 0 12px; font-size: 13px; }
#histPlate { margin-left: 6px; font-size: 15px; }

/* 차량 대장 관리 열: 이력/수정/삭제 3버튼 수용 */
.veh-table col.col-act { width: 170px; }

/* ===== 운영자 · 단지 관리 표 (인라인 편집) ===== */
.cx-scroll { max-height: 66vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.cx-table { margin: 0; table-layout: fixed; width: 100%; min-width: 1080px; }
.cx-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #EBEFF5; color: var(--ink);
  text-align: center; font-size: 13.5px; font-weight: 800; line-height: 1.25;
  padding: 10px 6px; border-bottom: 2px solid #D6DCE6; white-space: nowrap;
}
.cx-table td { padding: 5px 6px; vertical-align: middle; border-bottom: 1px solid #EEF1F5; }
.cx-table tbody tr:nth-child(even) > td { background: #FBFCFE; }
.cx-table tbody tr:hover > td { background: #F1F5FB; }
.cx-c-name { width: 152px; } .cx-c-kapt { width: 86px; } .cx-c-plan { width: 94px; }
.cx-c-date { width: 124px; } .cx-c-num { width: 60px; } .cx-c-phone { width: 132px; }
.cx-c-join { width: 92px; } .cx-c-act { width: 168px; }

.cx-cell {
  width: 100%; border: 1px solid transparent; background: transparent;
  padding: 7px 8px; border-radius: 6px; font-size: 14px; color: var(--ink);
}
.cx-cell.center { text-align: center; }
.cx-cell::placeholder { color: #B4BCC9; font-weight: 400; }
.cx-cell:hover { border-color: #D4DAE4; background: #fff; }
.cx-cell:focus { outline: none; border-color: var(--gold-deep); background: #fff; box-shadow: 0 0 0 2px rgba(212,175,55,.25); }
.cx-plan-sel { width: 100%; padding: 6px 4px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; }
.cx-num { text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.cx-join { text-align: center; font-size: 12.5px; }
.cx-linknum {
  background: none; border: none; padding: 2px 4px; font: inherit; font-weight: 800;
  color: var(--navy-700); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  font-variant-numeric: tabular-nums;
}
.cx-linknum:hover { color: var(--gold-deep); }
tr.cx-dirty > td { background: #FFFBEA !important; }
tr.cx-dirty .btn-edit { background: var(--gold); color: var(--navy-950); box-shadow: 0 0 0 2px rgba(212,175,55,.35); }

/* 단지 관리 — 열 제목 클릭 정렬 */
.cx-table th.sortable { cursor: pointer; user-select: none; }
.cx-table th.sortable:hover { background: #E0E7F1; }

/* ===== 운영자 대시보드 — 최근 가입 · 만료 임박 목록 ===== */
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 6px; border-bottom: 1px solid var(--line);
  font-size: 14px; cursor: pointer; border-radius: 8px;
}
.dash-list li:last-child { border-bottom: none; }
.dash-list li:hover { background: #F5F7FB; }
.dash-list li:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.dash-list b { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-right { margin-left: auto; color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.d-badge-warn { background: var(--gold-soft); color: var(--gold-deep); }
.d-badge-over { background: var(--alert-bg); color: var(--alert); }

/* 긴 도움말 접기 */
.help-details { margin: 0 0 10px; }
.help-details summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.help-details summary:hover { color: var(--navy-800); }
.help-details[open] { padding: 8px 12px 2px; background: #F7F8FB; border: 1px solid var(--line); border-radius: 10px; }

/* 모바일 */
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: column; padding: 14px; }
  .nav { flex-direction: row; overflow-x: auto; }
  .side-foot { display: none; }
  .main { padding: 18px 14px 60px; }
  .plate-gold { font-size: 20px; padding: 12px 26px; }
}

/* ---------- 단지 현황 (운영자 읽기 전용 패널) ---------- */
.cxv-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(11, 19, 34, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.cxv-back.hidden { display: none; }
.cxv-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(11, 19, 34, .3);
  width: min(1080px, 100%);
  max-height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.cxv-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.cxv-head-txt h3 { margin: 0 0 2px; font-size: 18px; color: var(--navy-900); }
.cxv-head-txt p { margin: 0; font-size: 13px; }
.cxv-head-act { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cxv-head-act select {
  padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink);
}
.cxv-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.cxv-stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.cxv-stat b { display: block; font-size: 19px; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.cxv-stat span { font-size: 12px; color: var(--ink-soft); }
.cxv-tabs {
  display: flex; gap: 4px; padding: 10px 20px 0;
  border-bottom: 1px solid var(--line);
}
.cxv-tabs button {
  border: 0; background: transparent;
  padding: 9px 14px; border-radius: 8px 8px 0 0;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.cxv-tabs button.active { color: var(--navy-900); border-bottom-color: var(--gold); }
.cxv-body { padding: 16px 20px 20px; overflow: auto; }
.cxv-pane.hidden { display: none; }
.cxv-scroll { overflow-x: auto; }
.cxv-scroll table.data { min-width: 640px; }
.cxv-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.cxv-tag-ok   { background: var(--ok-bg);    color: var(--ok); }
.cxv-tag-miss { background: var(--alert-bg); color: var(--alert); }
@media (max-width: 640px) {
  .cxv-back { padding: 0; }
  .cxv-panel { max-height: 100vh; border-radius: 0; }
  .cxv-head { flex-direction: column; }
}
