:root {
  --ink: #14213d;
  --ink-soft: #4c5872;
  --muted: #7d879b;
  --line: #e5eaf2;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --accent: #2f8f88;
  --accent-strong: #19746f;
  --green: #208765;
  --green-soft: #e7f7f0;
  --orange: #c97b36;
  --orange-soft: #fff3e4;
  --danger: #c94f59;
  --radius-card: 22px;
  --radius-control: 14px;
  --shadow-soft: 0 12px 34px rgba(23, 39, 75, 0.08);
  --shadow-modal: 0 30px 90px rgba(8, 19, 49, 0.22);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 82% -10%, rgba(92, 102, 191, 0.10), transparent 30rem),
    var(--canvas);
}

button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(47, 143, 136, 0.28);
  outline-offset: 2px;
}

img { display: block; max-width: 100%; }

.app-shell { min-height: 100dvh; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.shell-inner { width: min(100% - 32px, 1120px); margin: 0 auto; }

.app-header {
  padding: max(18px, env(safe-area-inset-top)) 0 12px;
}

.topbar, .section-heading, .hero-topline, .card-heading, .vehicle-mainline, .row-line, .form-actions, .dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, #182a54, #4f51a5 58%, #0e9f95);
  box-shadow: 0 8px 18px rgba(33, 51, 111, 0.22);
}
.brand-name { font-weight: 800; letter-spacing: -0.04em; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 1px; }

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
}
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: linear-gradient(135deg, #dae2ff, #d3f3ea);
  font-size: 13px;
  font-weight: 800;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 28px;
  border-radius: var(--radius-card);
  color: #fff;
  background:
    radial-gradient(circle at 84% 12%, rgba(107, 238, 219, 0.28), transparent 22%),
    radial-gradient(circle at 72% 94%, rgba(152, 123, 255, 0.32), transparent 32%),
    linear-gradient(132deg, #142343 0%, #2c3a78 54%, #1e7f7c 125%);
  box-shadow: 0 20px 50px rgba(30, 47, 93, 0.20);
}
.hero::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -74px;
  top: -92px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255,255,255,0.035), 0 0 0 58px rgba(255,255,255,0.025);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 24px; }
.hero-copy { max-width: 580px; }
.hero-eyebrow { color: rgba(255,255,255,0.68); font-size: 13px; }
.hero h1 { max-width: 560px; margin: 14px 0 10px; font-size: clamp(30px, 7vw, 54px); line-height: 1.04; letter-spacing: -0.07em; }
.hero-description { max-width: 34rem; margin: 0; color: rgba(255,255,255,0.70); line-height: 1.65; font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero .primary-button { background: #fff; color: #172548; box-shadow: 0 10px 22px rgba(0,0,0,0.14); }
.hero .ghost-button { color: #fff; border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.08); }
.hero-visual { align-self: end; justify-self: end; width: min(100%, 280px); }
.hero-visual-card { padding: 16px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.14); background: rgba(7, 18, 48, 0.20); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.mini-label { color: rgba(255,255,255,0.62); font-size: 11px; }
.mini-value { margin-top: 6px; font-size: 28px; font-weight: 750; letter-spacing: -0.06em; }
.mini-chart { display: flex; align-items: end; gap: 6px; height: 66px; margin-top: 14px; }
.mini-chart i { display: block; flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, rgba(170, 245, 226, 0.90), rgba(112, 164, 255, 0.26)); }
.mini-chart i:nth-child(1) { height: 38%; }
.mini-chart i:nth-child(2) { height: 58%; }
.mini-chart i:nth-child(3) { height: 45%; }
.mini-chart i:nth-child(4) { height: 74%; }
.mini-chart i:nth-child(5) { height: 62%; }
.mini-chart i:nth-child(6) { height: 92%; }

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 16px;
  right: 16px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(218, 226, 239, 0.92);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 16px 36px rgba(25, 39, 69, 0.14);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.nav-item {
  min-height: 52px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 14px;
  color: #8490a5;
  background: transparent;
  font-size: 11px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-item:active { transform: scale(.97); }
.nav-item.active { color: var(--ink); background: #edf1fb; font-weight: 750; }
.nav-glyph { font-size: 20px; line-height: 1; font-weight: 500; }

.page-content { padding: 20px 0 28px; }
.view { animation: rise-in .24s ease both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.metric-card { min-height: 112px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 6px 20px rgba(28, 44, 82, 0.04); }
.metric-card.highlight { border-color: transparent; color: #fff; background: linear-gradient(135deg, #1f3d73, #4954a3 68%, #2b9189); box-shadow: 0 14px 28px rgba(42, 61, 132, 0.16); }
.metric-label { color: var(--muted); font-size: 12px; }
.highlight .metric-label { color: rgba(255,255,255,0.68); }
.metric-value { margin-top: 10px; font-size: clamp(20px, 5.5vw, 30px); line-height: 1; letter-spacing: -0.06em; font-weight: 780; }
.metric-note { margin-top: 10px; color: var(--muted); font-size: 11px; }
.highlight .metric-note { color: rgba(255,255,255,0.62); }

.section-heading { margin: 24px 0 12px; }
.section-heading h2, .section-heading h3 { margin: 0; font-size: 18px; letter-spacing: -0.04em; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.text-button { padding: 4px 0; color: var(--accent-strong); background: none; font-size: 13px; font-weight: 700; }

.panel { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-soft); }
.panel-body { padding: 18px; }
.panel + .panel { margin-top: 12px; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-card { min-height: 102px; padding: 16px; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.action-card:hover { border-color: #c9d4ea; box-shadow: 0 10px 24px rgba(35, 55, 98, .08); }
.action-card:active { transform: translateY(1px) scale(.99); }
.action-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #223a70, #5262ba); font-size: 22px; font-weight: 300; }
.action-card.secondary .action-icon { background: linear-gradient(135deg, #177f7a, #61b7a2); }
.action-title { margin-top: 12px; font-size: 14px; font-weight: 750; }
.action-caption { margin-top: 3px; color: var(--muted); font-size: 11px; }

.vehicle-list { display: grid; gap: 10px; }
.vehicle-swipe { position: relative; overflow: hidden; border-radius: 18px; background: var(--danger); touch-action: pan-y; }
.vehicle-card { position: relative; z-index: 1; transition: transform .22s ease; }
.vehicle-card.is-dragging { transition: none; }
.vehicle-swipe.is-open .vehicle-card { transform: translateX(-84px); }
.swipe-delete { position: absolute; inset: 0 0 0 auto; width: 84px; color: #fff; background: var(--danger); font-size: 13px; font-weight: 750; }
.swipe-delete:active { background: #ad3d49; }
.vehicle-card { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 6px 20px rgba(28, 44, 82, 0.04); }
.vehicle-card:has(.vehicle-thumb) { padding-left: 10px; }
.vehicle-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; }
.vehicle-thumb { width: 54px; height: 54px; overflow: hidden; border-radius: 15px; background: linear-gradient(135deg, #dfe7fb, #d7f1eb); }
.vehicle-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #3d588c; font-size: 19px; font-weight: 800; }
.vehicle-name { min-width: 0; font-weight: 780; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vehicle-meta { margin-top: 6px; color: var(--muted); font-size: 12px; }
.vehicle-mainline { align-items: flex-start; }
.vehicle-right { text-align: right; }
.vehicle-price { font-size: 15px; font-weight: 780; letter-spacing: -0.04em; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-badge.sold { color: var(--accent-strong); background: #e8f1fd; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.vehicle-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eff2f7; }
.vehicle-profit { color: var(--green); font-size: 12px; font-weight: 750; }
.vehicle-profit.loss { color: var(--danger); }
.inline-actions { display: flex; align-items: center; gap: 8px; }

.primary-button, .secondary-button, .ghost-button, .danger-button, .small-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 750;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.primary-button { color: #fff; background: linear-gradient(135deg, #1b3568, #4c54aa 72%, #2b9189); box-shadow: 0 9px 20px rgba(54, 72, 151, .16); }
.secondary-button { color: var(--ink); border: 1px solid var(--line); background: #fff; }
.ghost-button { color: var(--ink-soft); border: 1px solid var(--line); background: transparent; }
.danger-button { color: #fff; background: var(--danger); }
.small-button { min-height: 34px; padding: 0 11px; border-radius: 11px; font-size: 12px; }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover, .small-button:hover { transform: translateY(-1px); }
.primary-button:active, .secondary-button:active, .ghost-button:active, .small-button:active { transform: scale(.98); }
.full-width { width: 100%; }

.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap input { width: 100%; padding: 13px 14px 13px 42px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fff; }
.search-mark { position: absolute; left: 15px; top: 11px; color: var(--muted); font-size: 20px; }
.filter-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab { flex: 0 0 auto; padding: 8px 13px; border-radius: 999px; color: var(--muted); background: #edf0f6; font-size: 12px; font-weight: 700; }
.filter-tab.active { color: #fff; background: var(--ink); }

.empty-state { padding: 34px 18px; text-align: center; border: 1px dashed #cad3e3; border-radius: 18px; background: rgba(255,255,255,.55); }
.empty-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 15px; color: #355188; background: #e8efff; font-size: 22px; }
.empty-state h3 { margin: 0; font-size: 15px; }
.empty-state p { max-width: 250px; margin: 8px auto 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.summary-hero { padding: 20px; color: #fff; border-radius: 20px; background: linear-gradient(135deg, #1d3363, #4854a2 66%, #278b82); }
.summary-hero .metric-value { font-size: 34px; }
.year-picker { display: inline-flex; align-items: center; gap: 4px; padding: 5px; border-radius: 12px; background: rgba(255,255,255,.12); }
.year-picker button { width: 30px; height: 30px; border-radius: 9px; color: #fff; background: rgba(255,255,255,.08); }
.year-picker strong { min-width: 54px; text-align: center; font-size: 13px; }
.month-list { display: grid; gap: 9px; }
.month-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.month-row.current { border-color: #b9d9d5; background: linear-gradient(90deg, #f5fbfa, #fff); }
.month-label { font-size: 13px; font-weight: 780; }
.month-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.month-bar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, #4d5ca9, #3a9d93); }
.month-meta { margin-top: 6px; color: var(--muted); font-size: 11px; }
.month-profit { color: var(--green); font-size: 13px; font-weight: 780; text-align: right; }
.month-profit.loss { color: var(--danger); }

.detail-card { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); }
.detail-title { margin: 0; font-size: 25px; letter-spacing: -0.06em; }
.detail-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.timeline { position: relative; display: grid; gap: 18px; margin-top: 22px; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 16px; bottom: 16px; width: 1px; background: #dce4f0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.timeline-dot { z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; border: 5px solid #fff; border-radius: 50%; color: #fff; background: #2f8f88; font-size: 11px; font-weight: 800; box-shadow: 0 0 0 1px #b8ddd8; }
.timeline-dot.pending { color: #79849a; background: #e6eaf1; box-shadow: 0 0 0 1px #d9dfeb; }
.timeline-label { color: var(--muted); font-size: 12px; }
.timeline-value { margin-top: 5px; font-size: 17px; font-weight: 780; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.detail-metric { padding: 13px; border-radius: 15px; background: #f7f9fc; }
.detail-metric span { display: block; color: var(--muted); font-size: 11px; }
.detail-metric strong { display: block; margin-top: 7px; font-size: 15px; }
.detail-note { margin-top: 12px; padding: 12px 13px; border-radius: 15px; background: #f7f9fc; }
.detail-note span { color: var(--muted); font-size: 11px; }
.detail-note p { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.detail-photo { width: 100%; max-height: 230px; margin-top: 16px; object-fit: cover; border-radius: 16px; }
.detail-photo-area { margin-top: 16px; }
.detail-photo-frame { display: grid; min-height: 92px; place-items: center; overflow: hidden; border-radius: 16px; background: #f7f9fc; }
.detail-photo-frame .detail-photo { margin-top: 0; }
.detail-photo-empty { color: var(--muted); font-size: 12px; }
.detail-photo-upload { position: relative; overflow: hidden; margin-top: 10px; cursor: pointer; }
.detail-photo-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.detail-photo-upload.is-loading { opacity: .6; pointer-events: none; }

.profile-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.profile-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: var(--ink); background: linear-gradient(135deg, #dbe4ff, #d4f4ea); font-weight: 800; }
.profile-name { font-size: 16px; font-weight: 800; }
.profile-email { margin-top: 4px; color: var(--muted); font-size: 12px; }
.settings-list { overflow: hidden; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid #eff2f6; }
.setting-row:last-child { border-bottom: 0; }
.setting-title { font-size: 13px; font-weight: 700; }
.setting-caption { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.mode-chip { padding: 6px 9px; border-radius: 999px; color: var(--accent-strong); background: #e8f4f1; font-size: 11px; font-weight: 750; white-space: nowrap; }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; align-items: end; padding: 12px; background: rgba(16, 29, 60, .36); animation: fade-in .2s ease both; }
.dialog { width: min(100%, 620px); max-height: min(88dvh, 720px); overflow: auto; margin: 0 auto; padding: 20px; border: 1px solid rgba(255,255,255,.72); border-radius: 24px 24px 18px 18px; background: #fff; box-shadow: var(--shadow-modal); animation: sheet-in .25s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.dialog h2 { margin: 0; font-size: 21px; letter-spacing: -0.05em; }
.dialog-heading { align-items: flex-start; margin-bottom: 18px; }
.close-button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); background: #f3f5f8; font-size: 22px; line-height: 1; }
.form-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid #dfe5ee; border-radius: 13px; color: var(--ink); background: #fbfcfe; }
.field textarea { min-height: 82px; padding: 12px 13px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #a5afc0; }
.field-note { margin: -2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.upload-box { position: relative; display: grid; place-items: center; min-height: 88px; overflow: hidden; border: 1px dashed #c8d3e4; border-radius: 15px; color: var(--muted); background: #f8faff; font-size: 12px; }
.upload-box input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-preview { width: 100%; height: 130px; object-fit: cover; }
.sale-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.sale-preview div { padding: 11px; border-radius: 13px; background: #f6f8fc; }
.sale-preview span { display: block; color: var(--muted); font-size: 10px; }
.sale-preview strong { display: block; margin-top: 5px; font-size: 14px; }
.sale-preview .positive strong { color: var(--green); }
.sale-preview .negative strong { color: var(--danger); }
.error-message { margin: 0 0 12px; padding: 10px 12px; border-radius: 11px; color: #a63e4a; background: #fff0f1; font-size: 12px; }
.success-message { margin: 0 0 12px; padding: 10px 12px; border-radius: 11px; color: #176c62; background: #e8f7f2; font-size: 12px; }
.form-actions { margin-top: 18px; justify-content: flex-end; }
.form-actions .primary-button { min-width: 116px; }

.auth-page { min-height: 100dvh; display: grid; align-items: center; padding: 28px 0; }
.auth-shell { width: min(100% - 32px, 430px); margin: 0 auto; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-card { padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.90); box-shadow: var(--shadow-soft); }
.auth-card h1 { margin: 0; font-size: 28px; letter-spacing: -0.06em; }
.auth-card > p { margin: 8px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-switch { margin-top: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.auth-switch button { padding: 0; color: var(--accent-strong); background: none; font-weight: 750; }
.demo-button { width: 100%; margin-top: 10px; }

.toast-region { position: fixed; z-index: 80; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); display: grid; justify-items: center; pointer-events: none; }
.toast { max-width: min(100%, 380px); padding: 11px 15px; border-radius: 999px; color: #fff; background: rgba(20, 33, 61, .92); box-shadow: 0 12px 26px rgba(20,33,61,.22); font-size: 12px; animation: toast-in .2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-loader { width: min(100% - 32px, 480px); margin: 20vh auto; }
.loader-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 17px; color: #fff; background: linear-gradient(135deg, #182a54, #4f51a5 58%, #0e9f95); font-weight: 800; }
.skeleton-line, .skeleton-card { overflow: hidden; position: relative; background: #e8edf5; }
.skeleton-line::after, .skeleton-card::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent); animation: skeleton 1.2s infinite; }
.skeleton-line { width: 40%; height: 14px; border-radius: 6px; }
.skeleton-card { height: 180px; margin-top: 18px; border-radius: 22px; }
@keyframes skeleton { to { transform: translateX(100%); } }

@media (min-width: 720px) {
  .app-shell { padding-bottom: 24px; }
  .shell-inner { width: min(100% - 48px, 1120px); }
  .app-header { padding-top: 28px; }
  .hero { padding: 36px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 280px; align-items: end; min-height: 260px; }
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 240px)); }
  .bottom-nav { position: static; width: max-content; margin: 18px auto 0; display: flex; padding: 5px; border-radius: 16px; box-shadow: none; background: rgba(235, 239, 247, .82); }
  .nav-item { min-width: 86px; min-height: 42px; display: flex; gap: 7px; padding: 0 13px; }
  .nav-glyph { font-size: 17px; }
  .page-content { padding-top: 26px; }
  .vehicle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .month-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-backdrop { align-items: center; }
  .dialog { border-radius: 24px; }
  .form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
  .dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 20px; align-items: start; }
  .dashboard-grid .section-heading { margin-top: 0; }
  .vehicle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .bottom-nav, .hero-visual-card { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.summary-detail-group { margin-top: 18px; }
.summary-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.summary-group-heading strong { font-size: 13px; }
.summary-group-heading span { color: var(--muted); font-size: 11px; }
.month-profit small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 600; }

.admin-shell { min-height: 100dvh; color: #eaf0ff; background: radial-gradient(circle at 76% -12%, rgba(99, 91, 211, .24), transparent 30rem), #0d1630; }
.admin-layout { width: min(100%, 1500px); min-height: 100dvh; display: grid; grid-template-columns: 238px minmax(0, 1fr); margin: 0 auto; }
.admin-sidebar { display: flex; flex-direction: column; gap: 8px; padding: 30px 18px 22px; border-right: 1px solid rgba(187, 203, 244, .13); background: rgba(7, 14, 34, .48); }
.admin-sidebar-brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 32px; }
.admin-sidebar-brand .brand-mark { flex: 0 0 auto; }
.admin-sidebar-brand strong, .admin-sidebar-brand small { display: block; }
.admin-sidebar-brand strong { font-size: 14px; letter-spacing: -.03em; }
.admin-sidebar-brand small { margin-top: 3px; color: #8693b9; font-size: 11px; }
.admin-sidebar-label { margin: 0 10px 4px; color: #64729a; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.admin-nav-item, .admin-logout { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border-radius: 13px; color: #aab5d2; background: transparent; text-align: left; font-size: 13px; font-weight: 700; }
.admin-nav-item.active { color: #fff; background: linear-gradient(135deg, rgba(93, 104, 206, .44), rgba(44, 157, 151, .32)); box-shadow: inset 0 0 0 1px rgba(196, 210, 255, .10); }
.admin-nav-item:hover, .admin-logout:hover { color: #fff; background: rgba(255,255,255,.08); }
.admin-sidebar-note { margin: auto 10px 18px; color: #6e7b9f; font-size: 11px; line-height: 1.6; }
.admin-logout { color: #b7c1d9; background: rgba(255,255,255,.05); }
.admin-main { min-width: 0; padding-bottom: 40px; background: radial-gradient(circle at 90% -8%, rgba(86, 103, 198, .15), transparent 26rem), #f5f7fb; }
.admin-topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(22px, 4vw, 52px); border-bottom: 1px solid rgba(190, 205, 242, .13); color: #eaf0ff; background: linear-gradient(135deg, #111d3d, #26366b); }
.admin-topbar-label { display: block; margin-bottom: 5px; color: #8392ba; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.admin-topbar strong { font-size: 14px; }
.admin-secure { padding: 7px 10px; border: 1px solid rgba(156, 223, 208, .18); border-radius: 999px; color: #9bdbc9; background: rgba(31, 142, 126, .16); font-size: 11px; }
.admin-page { width: min(100% - 44px, 1120px); margin: 0 auto; padding-top: 38px; color: var(--ink); }
.admin-page-heading, .admin-account-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.eyebrow { display: block; margin-bottom: 8px; color: #6273b5; font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.admin-page h1, .admin-account-toolbar h1 { margin: 0; color: #152344; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.07em; }
.admin-page-heading p, .admin-account-toolbar p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.admin-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.admin-kpi { min-height: 128px; padding: 17px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.90); box-shadow: 0 10px 28px rgba(24, 40, 79, .07); }
.admin-kpi span, .admin-kpi small { display: block; color: var(--muted); font-size: 11px; }
.admin-kpi strong { display: block; margin-top: 15px; color: #172647; font-size: 25px; letter-spacing: -.06em; }
.admin-kpi small { margin-top: 9px; }
.admin-kpi.highlight { border-color: transparent; background: linear-gradient(135deg, #1e356c, #5058aa 70%, #2a9188); }
.admin-kpi.highlight span, .admin-kpi.highlight strong, .admin-kpi.highlight small { color: #fff; }
.admin-kpi strong.loss, .admin-account-stats .loss, .admin-month-row .loss { color: var(--danger); }
.admin-panel { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-soft); }
.admin-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.admin-panel-heading h2 { margin: 0; color: #172647; font-size: 18px; letter-spacing: -.04em; }
.admin-panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.admin-account-list { display: grid; gap: 8px; }
.admin-account-row { display: grid; grid-template-columns: minmax(190px, 1.1fr) minmax(300px, 1.5fr) auto; align-items: center; gap: 16px; padding: 13px; border: 1px solid #edf0f5; border-radius: 15px; background: #fbfcfe; }
.admin-account-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-account-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #30458a; background: linear-gradient(135deg, #dce6ff, #d4f2e9); font-size: 13px; font-weight: 800; }
.admin-account-identity strong, .admin-account-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-identity strong { font-size: 13px; }
.admin-account-identity small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.admin-account-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 11px; }
.admin-account-stats b { color: #23365e; font-weight: 800; }
.admin-search { position: relative; margin-bottom: 14px; }
.admin-search span { position: absolute; left: 14px; top: 9px; color: var(--muted); font-size: 20px; }
.admin-search input { width: 100%; min-height: 45px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; }
.admin-tabs { display: flex; gap: 5px; margin: -4px 0 20px; padding: 5px; border-radius: 14px; background: rgba(223, 229, 242, .72); }
.admin-tab { min-height: 36px; flex: 1; border-radius: 10px; color: #6c7893; background: transparent; font-size: 12px; font-weight: 800; }
.admin-tab.active { color: #24356d; background: #fff; box-shadow: 0 5px 12px rgba(45, 61, 104, .08); }
.admin-account-toolbar select { min-width: 210px; min-height: 42px; padding: 0 12px; border: 1px solid #dbe2ee; border-radius: 12px; color: var(--ink); background: #fff; }
.admin-filter-tabs { margin-bottom: 15px; }
.admin-vehicle-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.admin-vehicle-card { min-width: 0; padding: 14px; border: 1px solid #e8edf5; border-radius: 16px; background: #fbfcfe; }
.admin-vehicle-card > .status-badge { float: right; margin-top: -2px; }
.admin-vehicle-card .vehicle-name { padding-right: 64px; }
.admin-vehicle-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #edf0f5; }
.admin-vehicle-footer .vehicle-profit { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-month-list { margin: 22px 0; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-soft); }
.admin-month-row { width: 100%; display: grid; grid-template-columns: 54px 1fr 1fr auto; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid #edf0f5; color: var(--muted); background: transparent; text-align: left; font-size: 11px; }
.admin-month-row:last-child { border-bottom: 0; }
.admin-month-row.current { color: #24356e; border-radius: 11px; background: #f1f6ff; }
.admin-month-row strong { color: var(--green); font-size: 12px; text-align: right; }
.admin-month-row strong.loss { color: var(--danger); }
.admin-summary-details { margin-top: 0; }
.admin-empty { padding: 28px 12px; color: var(--muted); text-align: center; font-size: 12px; }
.auth-hint { margin: 16px 0 0 !important; color: #7b87a1 !important; font-size: 11px !important; line-height: 1.5 !important; }

@media (max-width: 900px) {
  .admin-layout { display: block; }
  .admin-sidebar { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid rgba(187, 203, 244, .13); }
  .admin-sidebar-brand { margin: 0 10px 0 0; }
  .admin-sidebar-label, .admin-sidebar-note { display: none; }
  .admin-nav-item { min-height: 38px; padding: 0 10px; }
  .admin-logout { justify-self: end; min-height: 38px; }
  .admin-topbar { min-height: 64px; }
}

@media (max-width: 680px) {
  .admin-page { width: min(100% - 28px, 560px); padding-top: 24px; }
  .admin-topbar { padding: 0 16px; }
  .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .admin-kpi { min-height: 112px; padding: 14px; }
  .admin-kpi strong { margin-top: 12px; font-size: 21px; }
  .admin-account-row { grid-template-columns: 1fr auto; gap: 12px; }
  .admin-account-stats { grid-column: 1 / -1; order: 3; }
  .admin-account-row > .small-button { grid-column: 2; grid-row: 1; }
  .admin-vehicle-list { grid-template-columns: 1fr; }
  .admin-account-toolbar { align-items: start; flex-direction: column; }
  .admin-account-toolbar select { width: 100%; }
  .admin-month-list, .admin-panel { padding: 15px; }
  .admin-month-row { grid-template-columns: 44px 1fr auto; gap: 7px; }
  .admin-month-row span:nth-child(3) { display: none; }
  .admin-month-row strong { grid-column: 3; grid-row: 1; }
}
