/* TesMore 사용자 웹 — 다크 테마 */
:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --card: #1a1d26;
  --card-2: #222634;
  --line: #2b3040;
  --text: #e5e7eb;
  --text-2: #9ca3af;
  --text-3: #6b7280;
  --accent: #E82127;
  --accent-2: #ff4b50;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 12px;
  --side-w: 232px;
  --top-h: 56px;
  --tab-h: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: var(--s1); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.noscript { padding: 24px; text-align: center; }

/* 브랜드 */
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 800; }
.brand-lg { font-size: 28px; }
.brand-lg .brand-mark { width: 40px; height: 40px; font-size: 22px; border-radius: 10px; }

/* 로그인 */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(232,33,39,.18), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px 24px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.login-sub { margin: 0; color: var(--text-2); }
.login-msg { margin: 0; color: var(--text-2); font-size: 14px; min-height: 1em; white-space: pre-line; }
.login-msg.err { color: var(--accent-2); }
.admin-link { font-size: 13px; color: var(--text-3); }
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 300px; min-height: 44px; margin: 10px auto 0;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: #111318; color: #fff; font-weight: 600; cursor: pointer; }
.tbtn:hover { border-color: #E82127; }
.tbtn:disabled { opacity: .6; cursor: default; }
.tmark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #E82127; color: #fff; font-size: 13px; font-weight: 800; }

/* 레이아웃 */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: #10131a; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.side-head { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.side-head .side-close { display: none; }
.nav { padding: 8px; display: grid; gap: 2px; }
.nav-group { font-size: 11px; color: var(--text-3); padding: 12px 10px 4px; letter-spacing: .5px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; }
.nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.nav a.active { background: rgba(232,33,39,.14); color: #fff; }
.nav a.active .ni { color: var(--accent-2); }
.ni { width: 20px; text-align: center; font-size: 15px; flex: none; }
.main-col { margin-left: var(--side-w); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 20px; background: rgba(11,13,18,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .menu-btn, .topbar .brand-top { display: none; }
.page-title { font-size: 17px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.veh-select { max-width: 180px; }
.plan-chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.plan-chip:hover { text-decoration: none; }
.plan-chip.paid { border-color: rgba(232,33,39,.5); color: #fff; background: rgba(232,33,39,.18); }
.main { padding: 20px; max-width: 1280px; margin: 0 auto; outline: none; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 35; }
.tabbar { display: none; }
.icon-btn { background: none; border: 0; color: var(--text); font-size: 20px; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--card); }

/* 공지 */
.banners { display: grid; gap: 0; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 10px 20px; font-size: 14px; border-bottom: 1px solid var(--line); background: #13213a; }
.banner.warning { background: #2e2410; }
.banner.critical, .banner.error, .banner.danger { background: #3a1416; }
.banner b { display: block; }
.banner .bx { margin-left: auto; flex: none; background: none; border: 0; color: var(--text-2); font-size: 18px; cursor: pointer; padding: 0 4px; }
.banner-body { white-space: pre-line; color: var(--text-2); }

/* 카드·그리드 */
.stack { display: grid; gap: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { min-width: 0; }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; border-color: #3a4155; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.tile .tl { font-size: 12px; color: var(--text-2); }
.tile .tv { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere; }
.tile .tv small { font-size: 13px; color: var(--text-2); font-weight: 500; margin-left: 2px; }
.tile .ts { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 16px; }
.kv > div { min-width: 0; }
.kv dt, .kv .k { font-size: 12px; color: var(--text-2); }
.kv dd, .kv .v { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* 요약 히어로 */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.hero-info { display: grid; gap: 14px; align-content: start; }
.hero-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-name h2 { font-size: 22px; }
.batt { display: grid; gap: 6px; }
.hero .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.batt-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.batt-pct { font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.batt-range { font-size: 18px; color: var(--text-2); }
.batt-bar { height: 10px; border-radius: 6px; background: #2a2f3d; overflow: hidden; }
.batt-bar > i { display: block; height: 100%; background: var(--good); border-radius: 6px; transition: width .4s; }
.batt-bar.low > i { background: var(--bad); }
.batt-bar.mid > i { background: var(--warn); }
.map-sm { height: 260px; border-radius: 10px; overflow: hidden; background: #151821; }
.map-md { height: 380px; border-radius: 10px; overflow: hidden; background: #151821; }
.map-lg { height: 560px; max-height: 70vh; border-radius: 10px; overflow: hidden; background: #151821; }

/* 상태 뱃지 */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: #2a2f3d; color: var(--text); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.no-dot::before { display: none; }
.b-online { color: #86efac; background: rgba(34,197,94,.14); }
.b-driving { color: #93c5fd; background: rgba(57,135,229,.18); }
.b-charging { color: #fde68a; background: rgba(245,158,11,.16); }
.b-asleep { color: #c4b5fd; background: rgba(144,133,233,.16); }
.b-offline { color: #9ca3af; background: rgba(156,163,175,.12); }
.b-updating { color: #fdba74; background: rgba(217,89,38,.18); }
.b-bad { color: #fca5a5; background: rgba(239,68,68,.16); }
.b-good { color: #86efac; background: rgba(34,197,94,.14); }
.b-warn { color: #fde68a; background: rgba(245,158,11,.16); }
.b-dc { color: #fdba74; background: rgba(217,89,38,.18); }
.b-ac { color: #93c5fd; background: rgba(57,135,229,.18); }
.live-dot { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.live-dot.on i { background: var(--good); box-shadow: 0 0 0 3px rgba(34,197,94,.2); }

/* 폼 */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=email], select, textarea {
  background: #11141c; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--text); min-height: 36px; min-width: 0; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(57,135,229,.6); outline-offset: 0; border-color: transparent; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.8); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); cursor: pointer; font-size: 14px; font-weight: 600; min-height: 36px; white-space: nowrap; }
.btn:hover { background: #2b3040; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #c81b21; }
.btn.danger { background: transparent; border-color: rgba(239,68,68,.6); color: #fca5a5; }
.btn.danger:hover { background: rgba(239,68,68,.12); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; color: var(--text-2); }
.field input, .field select { width: 100%; }
.f-date { width: 150px; }
.f-preset { width: 120px; }
.filters .field.f-preset select { width: 100%; }
.f-num { width: 110px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; background: #11141c; border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; color: var(--text-2); padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.seg button.on { background: var(--card-2); color: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }

/* 표 */
.tbl-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(43,48,64,.6); font-variant-numeric: tabular-nums; vertical-align: top; }
.tbl td.r, .tbl th.r { text-align: right; white-space: nowrap; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(255,255,255,.03); }
.tbl .addr { max-width: 340px; }
.tbl .addr .ad { display: block; min-width: 0; }
.tbl .addr div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 28px 12px; text-align: center; color: var(--text-2); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* 차트 */
.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 180px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* 안내 패널 */
.panel { text-align: center; padding: 40px 20px; display: grid; gap: 12px; justify-items: center; }
.panel .pi { font-size: 40px; line-height: 1; }
.panel h2 { font-size: 19px; }
.panel p { margin: 0; color: var(--text-2); max-width: 460px; white-space: pre-line; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #2a2f3d; border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px 0; }
.note { font-size: 13px; color: var(--text-2); background: #151821; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.note.warn { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.08); color: #fde68a; }
.note.bad { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.08); color: #fca5a5; }

/* 목록 */
.list { display: grid; gap: 0; }
.li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 4px; border-bottom: 1px solid rgba(43,48,64,.6); color: inherit; min-width: 0; }
.li:last-child { border-bottom: 0; }
a.li:hover { background: rgba(255,255,255,.03); text-decoration: none; }
.li .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); flex: none; font-size: 16px; }
.li .body { min-width: 0; flex: 1; }
.li .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .t2 { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .side { text-align: right; flex: none; font-variant-numeric: tabular-nums; font-size: 14px; }
.li .side .t2 { text-align: right; }
.day-h { font-size: 12px; color: var(--text-3); padding: 14px 4px 4px; font-weight: 600; }

/* Tesla 차량 카드 */
.vcard { display: grid; gap: 10px; }
.vcard + .vcard { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* 토스트·모달 */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #262b38; border: 1px solid var(--line); border-left: 4px solid var(--s1); padding: 10px 14px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 14px; pointer-events: auto; animation: tin .2s ease-out; }
.toast.ok { border-left-color: var(--good); }
.toast.err { border-left-color: var(--bad); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 14px; }
.modal p { margin: 0; color: var(--text-2); white-space: pre-line; }
.modal input { width: 100%; }

/* 구글 지도(gmap.js) — 툴팁·풍선·주소 출처 */
.gm-host { background: #151821; }
.gm-tip { position: absolute; z-index: 10; transform: translate(-50%, -100%); padding: 4px 8px; border-radius: 6px; background: #1f2330; color: var(--text);
  font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.gm-tip[hidden] { display: none; }
.gm-pop { color: #111827; font-size: 13px; line-height: 1.5; }
.gm-pop a { color: #1d4ed8; }
.gm-pin { border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-sizing: border-box; }
.map-credit { margin-top: 6px; font-size: 11px; color: var(--text-2); text-align: right; }
.map-credit a { color: inherit; }
.car-pin { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(232,33,39,.3); }

/* 반응형 */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: min(80vw, 280px); }
  .sidebar.open { transform: none; }
  .side-head .side-close { display: inline-grid; }
  .main-col { margin-left: 0; }
  .topbar .menu-btn { display: inline-grid; margin-left: -8px; }
  .topbar .brand-top { display: inline-flex; }
  .page-title { display: none; }
  .top-right { margin-left: auto; }
  .topbar { padding: 0 12px; gap: 8px; }
  .main { padding: 16px 16px calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(16,19,26,.97); border-top: 1px solid var(--line); z-index: 30; }
  .tabbar a, .tabbar button { display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--text-2); font-size: 11px; background: none; border: 0; cursor: pointer; padding: 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .ni { font-size: 19px; width: auto; }
  .tabbar .active { color: #fff; }
  .tabbar .active .ni { color: var(--accent-2); }
  .banner { padding: 10px 16px; }
  .toasts { bottom: calc(var(--tab-h) + 16px); }
}
@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile .tv { font-size: 19px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .veh-select { max-width: 130px; }
  .map-md { height: 300px; }
  .map-lg { height: 440px; }
  .chart-box { height: 210px; }
  .chart-box.tall { height: 260px; }
  .batt-pct { font-size: 38px; }
  .f-date { width: calc(50% - 5px); }
  .f-preset { width: 100%; }
  .filters .field.f-date input { width: 100%; }
  .tbl-wrap { margin: 0; padding: 0; overflow: visible; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tbl td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl td::before { content: attr(data-label); color: var(--text-2); font-size: 12px; text-align: left; flex: none; }
  .tbl td.r { text-align: right; white-space: normal; }
  .tbl td.first { font-weight: 600; text-align: left; display: block; }
  .tbl td.first::before { display: none; }
  .tbl .addr { max-width: none; min-width: 0; }
  .tbl .addr div { white-space: normal; }
  .card { padding: 14px; }
}

/* 보조 */
.seg a { color: var(--text-2); padding: 6px 12px; border-radius: 7px; white-space: nowrap; font-size: 14px; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--card-2); color: #fff; }
.chk { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.share { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #2a2f3d; gap: 2px; }
.share i { display: block; height: 100%; }
@media (max-width: 420px) {
  .topbar .plan-chip { display: none; }
  .brand-top { font-size: 16px; }
}
.map-sm, .map-md, .map-lg { position: relative; z-index: 0; isolation: isolate; }

/* 차 활성화·결제 */
.car-row .card-h h3 { overflow-wrap: anywhere; }
.price-big { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-big small { font-size: 14px; font-weight: 500; color: var(--text-2); }
.modal .field select { width: 100%; }

/* 주문·예약 */
.li .t2.wrap { white-space: normal; overflow-wrap: anywhere; }

/* 추가 기능(비용·알림·공유·분석·인사이트·차 정보) */
.note.ok { border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.08); color: #bbf7d0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.pre { white-space: pre-line; margin: 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
textarea { width: 100%; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.copy-row { display: flex; gap: 8px; margin: 10px 0 6px; }
.copy-row input { flex: 1; min-width: 0; }
/* 스위치 */
.switch-row { align-items: center; cursor: pointer; }
.switch { position: relative; flex: none; width: 44px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #3a4155; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--good); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid rgba(57,135,229,.6); outline-offset: 2px; }
.switch input:disabled + i { opacity: .6; }
/* 펼치는 목록(여행·업데이트 내용) */
details.trip { border-bottom: 1px solid rgba(43,48,64,.6); min-width: 0; }
details.trip:last-child { border-bottom: 0; }
details.trip > summary { list-style: none; cursor: pointer; border-bottom: 0; }
details.trip > summary::-webkit-details-marker { display: none; }
details.trip > summary:hover { background: rgba(255,255,255,.03); }
details.trip > summary .side::after { content: "▾"; display: block; color: var(--text-3); font-size: 12px; }
details.trip[open] > summary .side::after { content: "▴"; }
.trip-d { padding: 4px 4px 14px 50px; }
/* 히트맵 */
.heat-wrap { overflow-x: auto; }
.heat { width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.heat th { font-size: 11px; font-weight: 500; color: var(--text-3); text-align: center; padding: 0; }
.heat tbody th { width: 26px; text-align: left; }
.heat td { height: 22px; border-radius: 4px; background: #222634; }
.heat-l { display: flex; align-items: center; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.heat-l i { width: 80px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(57,135,229,.18), rgba(57,135,229,1)); }
/* 운전 점수 */
.score-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.score-num { font-size: 56px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.score-num small { font-size: 18px; color: var(--text-2); font-weight: 500; margin-left: 4px; }
.grade { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; font-size: 30px; font-weight: 800; background: #2a2f3d; }
/* 증감 */
.delta { font-size: 12px; color: var(--text-2); }
.delta.good { color: #86efac; }
.delta.bad { color: #fca5a5; }
.delta.dim { opacity: .5; }
/* 백분위 막대 */
.pbar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #2a2f3d, #3a4155); }
.pbar i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--accent); }
.pbar-l { display: flex; justify-content: space-between; margin-top: 4px; }
@media (max-width: 640px) {
  .trip-d { padding-left: 4px; }
  .score-num { font-size: 46px; }
}

/* 여행 상세·위치 기록 */
.map-wrap { position: relative; }
.map-busy { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; background: rgba(15,17,23,.62); color: var(--text); font-size: 14px; text-align: center; padding: 16px; }
.map-busy[hidden] { display: none !important; }
.leg-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; flex: none; }
.leg-dot.stop-dot { background: #9ca3af; }
.leg-dot.chg-dot { background: #c98500; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.leg-line { display: inline-block; width: 18px; height: 5px; border-radius: 3px; flex: none; }
/* 주행 상세: 차트에서 고른 시각의 값(좁은 화면에서는 줄바꿈) */
.hx-hud.d-hud { max-width: calc(100% - 20px); flex-wrap: wrap; justify-content: center; white-space: normal; border-radius: 14px; row-gap: 2px; }
.li.stop { background: rgba(255,255,255,.015); }
.li.stop .t1 { font-weight: 500; color: var(--text-2); }

/* 위치 타임라인(하루·달력·히트맵·경로·장소·활동) */
.hx-tabs { padding: 10px 12px; }
@media (max-width: 420px) { .hx-tabs .seg button { padding: 6px 9px; } }   /* 탭 여섯 개가 좁은 폰에서 한 줄에(가로 스크롤 없이) */
.hx-daybar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hx-daybar input[type=date] { width: 160px; }
.hx-dayh { font-weight: 650; margin-left: 4px; }
.hx-month { font-size: 17px; min-width: 116px; text-align: center; font-variant-numeric: tabular-nums; }
.hx-day { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.hx-tl { padding: 12px; }
.hx-tl .card-h { margin-bottom: 8px; }
.hx-list { position: relative; max-height: 640px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.hx-mapc { position: sticky; top: calc(var(--top-h) + 12px); }
.hx-v { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); cursor: pointer; min-width: 0; transition: border-color .15s, background .15s; outline: none; }
.hx-v:hover, .hx-v.on, .hx-v:focus-visible { border-color: var(--s1); background: #242b3d; }
.hx-v.now, .hx-m.now { box-shadow: inset 3px 0 0 var(--accent); }
.hx-num { flex: none; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--s1); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.hx-v.chg .hx-num { background: var(--s4); }
.hx-v .body { min-width: 0; flex: 1; }
.hx-v .t1, .hx-m .t1 { font-weight: 600; overflow-wrap: anywhere; }
.hx-v .t2, .hx-m .t2 { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.hx-chg { font-size: 13px; color: #fde68a; margin-top: 3px; }
.hx-chg a { color: #fde68a; }
.hx-m { display: flex; align-items: center; gap: 4px; margin: 2px 0 2px 12px; padding: 4px 0 4px 14px; border-left: 4px solid var(--c, var(--s1)); min-width: 0; }
.hx-m.on .hx-mb { background: rgba(255,255,255,.05); }
.hx-mb { flex: 1; min-width: 0; color: inherit; display: block; padding: 6px 8px; border-radius: 8px; }
a.hx-mb:hover { background: rgba(255,255,255,.05); text-decoration: none; }
.hx-mb .t1 { font-size: 14px; }
.hx-more { color: var(--s1); white-space: nowrap; }
.hx-loc { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer; font-size: 17px; }
.hx-loc:hover { color: var(--text); background: var(--card-2); }
.hx-pin-w { overflow: visible; }
.hx-pin { position: absolute; transform: translate(-50%, -50%); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--s1); color: #fff; border: 2px solid #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.5); transition: transform .15s; }
.hx-pin.chg { background: var(--s4); }
.hx-pin.now { box-shadow: 0 0 0 4px rgba(34,197,94,.35); }
.hx-pin.on { transform: translate(-50%, -50%) scale(1.35); background: var(--accent); }
.hx-hud { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; align-items: baseline; background: rgba(17,20,28,.9); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 13px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; color: var(--text-2); }
.hx-hud b { color: #fff; font-size: 15px; }
.hx-play { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.hx-play .seg button { padding: 4px 9px; font-size: 13px; }
.hx-play input[type=range] { flex: 1 1 180px; min-width: 120px; accent-color: var(--accent); }
.hx-play #hp-btn { min-width: 98px; }
.hx-note { margin: 6px 0 0; }
.hx-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hx-cal .wd { text-align: center; font-size: 12px; color: var(--text-3); padding: 2px 0 4px; }
.hx-cal .wd.sun, .hx-cd.sun .hx-cdn { color: #fca5a5; }
.hx-cal .wd.sat, .hx-cd.sat .hx-cdn { color: #93c5fd; }
.hx-cd { min-height: 76px; border-radius: 8px; border: 1px solid var(--line); background: #151821; color: var(--text); padding: 6px 7px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; cursor: pointer; min-width: 0; overflow: hidden; }
.hx-cd.has { border-color: transparent; }
.hx-cd.has .hx-cdn { color: #fff; }
.hx-cd.none { opacity: .5; }
.hx-cd.today { outline: 2px solid var(--accent); outline-offset: -2px; opacity: 1; }
.hx-cd:disabled { opacity: .22; cursor: default; }
.hx-cd:not(:disabled):hover { border-color: var(--s1); opacity: 1; }
.hx-cdn { font-size: 13px; font-weight: 650; }
.hx-cdk { margin-top: auto; font-size: 14px; font-weight: 650; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-cdk small { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.75); margin-left: 1px; }
.hx-cdc { font-size: 11px; color: rgba(255,255,255,.75); }
.hx-psum { display: grid; gap: 10px; }
.hx-big { font-size: 17px; color: var(--text-2); }
.hx-big b { font-size: 24px; color: var(--text); font-variant-numeric: tabular-nums; margin: 0 1px 0 3px; }
.hx-cities .badge { font-weight: 500; color: var(--text-2); }
#hq-tbl tbody tr { cursor: pointer; }
@media (max-width: 900px) {
  .hx-day { grid-template-columns: minmax(0, 1fr); }
  .hx-list { max-height: none; overflow: visible; }
  .hx-mapc { position: static; }
}
@media (max-width: 640px) {
  .hx-daybar input[type=date] { flex: 1 1 140px; width: auto; }
  .hx-dayh { order: 4; flex: 1 1 auto; margin: 0; font-size: 14px; }
  #hd-today { order: 5; }
  .hx-map { height: 380px; }
  .hx-cal { gap: 3px; }
  .hx-cd { min-height: 54px; padding: 4px 3px; }
  .hx-cdk { font-size: 12px; }
  .hx-cdk small, .hx-cdc { display: none; }
  .hx-big { font-size: 15px; }
  .hx-big b { font-size: 20px; }
  .hx-hud { gap: 8px; padding: 4px 10px; font-size: 12px; }
}

/* 요금 단계 Pro / Pro+ · 이번 달 사용량 */
.t-pro { color: #e5e7eb; background: #2f3546; }
.t-plus { color: #fff; background: linear-gradient(90deg, #E82127, #d55181); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px; }
.plans.one { grid-template-columns: minmax(0, 360px); }
.plan-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--card-2); min-width: 0; }
.plan-box.plus { border-color: rgba(213,81,129,.55); }
.plan-box .plan-name { margin-bottom: 6px; }
.plan-box .price-big { font-size: 22px; margin-bottom: 6px; }
.plan-lim { width: 100%; border-collapse: collapse; font-size: 13px; }
.plan-lim td { padding: 4px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.plan-lim td.r { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.usage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
.ub { min-width: 0; }
.ub-h { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--text-2); }
.ub-n { font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.ub-bar { height: 6px; border-radius: 3px; background: #2a2f3d; overflow: hidden; margin-top: 4px; }
.ub-bar > i { display: block; height: 100%; background: var(--s1); border-radius: 3px; }
.ub.hi .ub-bar > i { background: var(--warn); }
.ub.hi .ub-n { color: #fde68a; }
.ub.full .ub-bar > i { background: var(--bad); }
.ub.full .ub-n { color: #fca5a5; }
.modal .usage { grid-template-columns: minmax(0, 1fr); }
.usage-mini { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--text-2); }
.usage-mini:hover { text-decoration: none; }
.usage-mini b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.usage-mini .hi b { color: #fde68a; }
.usage-mini .full b { color: #fca5a5; }
@media (max-width: 640px) {
  .usage { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .plans { gap: 8px; }
  .plan-box { padding: 10px; }
  .plan-box .price-big { font-size: 18px; }
  .plan-box .price-big small { font-size: 12px; }
  .plan-lim { font-size: 12px; }
}

/* 계정 삭제(#/account-delete) · 로그인 화면 문서 링크 */
.del-acct .del-g { display: grid; gap: 2px; margin-top: 8px; }
.del-acct .del-g > b { font-size: 13px; color: var(--text-2); font-weight: 650; }
.del-list { margin: 0; padding-left: 1.2em; font-size: 14px; }
.del-list li { margin: 2px 0; }
.legal-links { margin: 0; font-size: 13px; color: var(--text-3); }
.legal-links a { color: var(--text-2); }
.lang-btn { background: none; border: 1px solid var(--line); color: var(--text-2); border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.lang-btn:hover { color: var(--text); border-color: var(--text-3); }
.side-foot { margin-top: auto; padding: 12px 18px 18px; flex: none; }

/* TeslaMate 가져오기 진행 막대 */
.imp-bar { height: 8px; border-radius: 99px; background: var(--line, rgba(127,127,127,.25)); overflow: hidden; margin: 12px 0 4px; }
.imp-bar i { display: block; height: 100%; background: var(--accent, #3e6cff); border-radius: inherit; transition: width .3s; }
