/* ============================================================
   AutoBook Design System — based on realink.pro design language
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --accent:        #FFAE00;
  --accent-dim:    rgba(255,174,0,0.12);
  --accent-border: rgba(255,174,0,0.28);
  --accent-glow:   rgba(255,174,0,0.08);
  --text:          #ffffff;
  --sec:           rgba(255,255,255,0.70);
  --muted:         rgba(255,255,255,0.45);
  --muted-hi:      rgba(255,255,255,0.75);
  --border:        rgba(255,255,255,0.10);
  --border-hi:     rgba(255,255,255,0.22);
  --card:          rgba(255,255,255,0.04);
  --card-hover:    rgba(255,255,255,0.06);
  --green:         #4EEEA0;
  --green-dim:     rgba(78,238,160,0.12);
  --red:           #ef4444;
  --red-dim:       rgba(239,68,68,0.10);
  --yellow:        #f59e0b;
  --yellow-dim:    rgba(245,158,11,0.12);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;
  --sec-py:        64px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: #0d0f14;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.8; }

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

p { margin: 0; }

/* ── Layout ────────────────────────────────────────────────── */
.rl-wrap {
  max-width: 1120px;
  padding: 0 20px;
  margin: 0 auto;
}

.rl-sec {
  padding: var(--sec-py) 0;
  border-bottom: 1px solid var(--border);
}

/* ── Typography ────────────────────────────────────────────── */
.rl-h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.rl-h2 {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.rl-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}

.rl-label--pill {
  display: inline-block;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 4px 12px;
}

.rl-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Cards ─────────────────────────────────────────────────── */
.rl-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: background 0.2s, border-color 0.2s;
}

.rl-card:hover {
  background: var(--card-hover);
  border-color: var(--border-hi);
}

.rl-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.rl-icard { display: flex; gap: 16px; align-items: flex-start; }

.rl-icard-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.rl-icard-icon--green  { background: var(--green-dim); }
.rl-icard-icon--red    { background: var(--red-dim); }
.rl-icard-icon--yellow { background: var(--yellow-dim); }

/* ── Buttons ───────────────────────────────────────────────── */
.rl-btn {
  background: var(--accent);
  color: #0d0f14;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: filter 0.2s, transform 0.2s;
  line-height: 1;
  font-family: inherit;
  white-space: nowrap;
}
.rl-btn:hover { filter: brightness(1.08); transform: translateY(-1px); color: #0d0f14; opacity: 1; }
.rl-btn:active { transform: translateY(0); }

.rl-btn-ghost {
  border: 1px solid var(--border-hi);
  color: var(--text);
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, color 0.2s;
  line-height: 1;
  font-family: inherit;
  white-space: nowrap;
}
.rl-btn-ghost:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

.rl-btn--full  { width: 100%; justify-content: center; }
.rl-btn-sm     { padding: 7px 14px; font-size: 13px; }
.rl-btn-danger { background: var(--red); color: #fff; }
.rl-btn-danger:hover { color: #fff; }

/* ── Grids ─────────────────────────────────────────────────── */
.rl-grid-2, .rl-grid-3, .rl-grid-4, .rl-grid-auto { display: grid; gap: 16px; }
.rl-grid-2    { grid-template-columns: repeat(2, 1fr); }
.rl-grid-3    { grid-template-columns: repeat(3, 1fr); }
.rl-grid-4    { grid-template-columns: repeat(4, 1fr); }
.rl-grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

@media (max-width: 768px) {
  .rl-grid-2, .rl-grid-3, .rl-grid-4 { grid-template-columns: 1fr; }
}

/* ── Badge ─────────────────────────────────────────────────── */
.rl-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px; font-weight: 600; color: var(--accent);
}
.rl-badge-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: ab-pulse 2s ease-in-out infinite;
}

/* ── Utilities ─────────────────────────────────────────────── */
.rl-checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rl-checklist li { font-size: 14px; color: var(--sec); padding-left: 20px; position: relative; }
.rl-checklist li::before { content: "✓"; color: var(--green); font-weight: 700; position: absolute; left: 0; }

.rl-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.rl-stat-num   { font-size: clamp(24px,3vw,36px); font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 4px; }
.rl-stat-label { font-size: 13px; color: var(--muted); }

.rl-note {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px; color: var(--sec); line-height: 1.6;
}
.rl-note--warn   { background: var(--yellow-dim); border-left-color: var(--yellow); }
.rl-note--danger { background: var(--red-dim);    border-left-color: var(--red); }

.rl-trust { display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--sec); font-size: 14px; }
.rl-trust-item::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* ── FAQ ───────────────────────────────────────────────────── */
.rl-faq-item { border-bottom: 1px solid var(--border); }
.rl-faq-q {
  width: 100%; background: none; border: none;
  color: var(--text); font-size: 15px; font-weight: 600;
  padding: 16px 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-family: inherit; text-align: left;
}
.rl-faq-arrow { color: var(--accent); transition: transform 0.2s; flex-shrink: 0; }
.rl-faq-item.open .rl-faq-arrow { transform: rotate(45deg); }
.rl-faq-a { display: none; padding-bottom: 16px; color: var(--sec); font-size: 14px; line-height: 1.7; }
.rl-faq-item.open .rl-faq-a { display: block; }

/* ============================================================
   AutoBook-specific components
   ============================================================ */

/* ── Navigation ────────────────────────────────────────────── */
.ab-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,15,20,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.ab-nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: 60px;
}

.ab-nav-logo {
  display: flex; align-items: center;
  text-decoration: none; opacity: 1;
}
.ab-nav-logo-img {
  height: 32px; width: auto; display: block;
}
.ab-nav-logo:hover { opacity: .85; }

.ab-nav-links {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.ab-nav-user {
  font-size: 13px; color: var(--muted);
  padding: 0 4px;
}

/* ── Car Cards ─────────────────────────────────────────────── */
.ab-car-card {
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.ab-car-card:hover {
  background: var(--card-hover);
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255,174,0,0.08);
}

.ab-car-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.ab-car-link:hover { opacity: 1; color: inherit; }

.ab-car-card-make  { font-size: 20px; font-weight: 800; color: var(--text); }
.ab-car-card-meta  { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ab-car-card-total {
  font-size: 24px; font-weight: 800; color: var(--accent);
  margin-top: 16px; letter-spacing: -0.02em;
}
.ab-car-card-actions {
  display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap;
  position: relative; z-index: 1;
}

/* ── Expense Table ─────────────────────────────────────────── */
.ab-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}

.ab-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
}

.ab-table td {
  padding: 12px;
  background: var(--card);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  vertical-align: top;
}

.ab-table td:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.ab-table td:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.ab-table tr:hover td    { background: var(--card-hover); }

.ab-month-header td {
  background: none !important;
  font-size: 12px; font-weight: 700;
  color: var(--muted-hi);
  padding: 24px 12px 8px;
  border-bottom: 1px solid var(--border);
  border-radius: 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ab-year-total td {
  background: var(--accent-dim) !important;
  font-weight: 700;
  color: var(--accent);
  border-radius: 0 !important;
}
.ab-year-total td:first-child { border-radius: var(--radius) 0 0 var(--radius) !important; }
.ab-year-total td:last-child  { border-radius: 0 var(--radius) var(--radius) 0 !important; }

.ab-grand-total td {
  background: rgba(255,174,0,0.16) !important;
  font-weight: 800; color: var(--accent); font-size: 15px;
  border-radius: 0 !important;
}
.ab-grand-total td:first-child { border-radius: var(--radius) 0 0 var(--radius) !important; }
.ab-grand-total td:last-child  { border-radius: 0 var(--radius) var(--radius) 0 !important; }

/* ── Category Badges ───────────────────────────────────────── */
.ab-cat {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  white-space: nowrap; display: inline-block;
  vertical-align: top;
}
.ab-cat--to         { background: rgba(255,174,0,0.12);  color: #FFAE00; }
.ab-cat--repair     { background: rgba(245,158,11,0.12);  color: #f59e0b; }
.ab-cat--tuning     { background: rgba(139,92,246,0.12);  color: #a78bfa; }
.ab-cat--tires      { background: rgba(59,130,246,0.12);  color: #60a5fa; }
.ab-cat--body       { background: rgba(236,72,153,0.12);  color: #f472b6; }
.ab-cat--consumable { background: rgba(255,255,255,0.08); color: var(--muted-hi); }
.ab-cat--other      { background: rgba(255,255,255,0.06); color: var(--muted); }

/* ── Analytics ─────────────────────────────────────────────── */
.ab-analytics-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 768px) { .ab-analytics-grid { grid-template-columns: 1fr; } }

.ab-chart-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.ab-chart-title {
  font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 16px;
}

/* Category stats list */
.ab-stat-list  { display: flex; flex-direction: column; gap: 3px; }
.ab-stat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--card);
  transition: background .15s;
}
.ab-stat-row:hover { background: var(--card-hover); }
.ab-stat-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ab-stat-name { flex: 1; min-width: 0; }
.ab-stat-amount { font-weight: 700; white-space: nowrap; text-align: right; }
.ab-stat-pct  { width: 44px; text-align: right; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.ab-stat-total {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-top: 4px;
  background: var(--accent-dim); border-radius: var(--radius);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--accent);
}
.ab-stat-total .ab-stat-pct { color: var(--accent); }

/* Top-5 list */
.ab-top-list { display: flex; flex-direction: column; gap: 3px; }
.ab-top-row {
  display: grid;
  grid-template-columns: 28px 120px 150px 1fr auto;
  align-items: start; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--card);
  transition: background .15s;
}
.ab-top-row:hover { background: var(--card-hover); }
.ab-top-num    { font-size: 13px; color: var(--muted); line-height: 1.5; }
.ab-top-date   { font-size: 13px; color: var(--muted); white-space: nowrap; line-height: 1.5; }
.ab-top-cat    { line-height: 1.5; }
.ab-top-desc   { font-size: 13px; line-height: 1.5; white-space: pre-line; min-width: 0; }
.ab-top-amount { font-weight: 700; white-space: nowrap; text-align: right; line-height: 1.5; }

@media (max-width: 640px) {
  .ab-top-row {
    grid-template-columns: 24px 1fr auto;
    grid-template-areas:
      "num  cat    amount"
      "num  desc   desc"
      ".    date   date";
    gap: 6px 10px;
  }
  .ab-top-num    { grid-area: num; }
  .ab-top-cat    { grid-area: cat; }
  .ab-top-date   { grid-area: date; }
  .ab-top-desc   { grid-area: desc; }
  .ab-top-amount { grid-area: amount; }
}

/* ── Import Zone ───────────────────────────────────────────── */
.ab-import-zone {
  border: 2px dashed var(--border-hi);
  border-radius: var(--radius-lg);
  padding: 48px 24px; text-align: center;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  user-select: none;
}
.ab-import-zone:hover,
.ab-import-zone.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.ab-preview-status-ok    { color: var(--green); font-weight: 600; }
.ab-preview-status-warn  { color: var(--yellow); font-weight: 600; }
.ab-preview-status-error { color: var(--red); font-size: 11px; line-height: 1.4; }

/* ── Forms ─────────────────────────────────────────────────── */
.ab-form-group { margin-bottom: 18px; }

.ab-label {
  font-size: 12px; font-weight: 600;
  color: var(--muted-hi); display: block;
  margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.06em;
}

.ab-input, .ab-select, .ab-textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px; font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.ab-input:focus, .ab-select:focus, .ab-textarea:focus {
  border-color: var(--accent-border);
  background: rgba(255,255,255,0.09);
}
.ab-input::placeholder, .ab-textarea::placeholder { color: var(--muted); }

.ab-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(255,255,255,0.4)' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px; cursor: pointer;
}
.ab-select option { background: #1a1c27; color: var(--text); }

.ab-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

.ab-input[type="date"],
.ab-input[type="month"],
.ab-input[type="number"] { color-scheme: dark; }

.ab-check {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14px; color: var(--sec);
  user-select: none;
}
.ab-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer; flex-shrink: 0;
}

.ab-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .ab-row-2 { grid-template-columns: 1fr; } }

/* ── Flash Messages ────────────────────────────────────────── */
.ab-flash {
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 14px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
  transition: opacity 0.4s; cursor: pointer;
}
.ab-flash--success { background: var(--green-dim);  border: 1px solid rgba(78,238,160,0.3);  color: var(--green);  }
.ab-flash--error   { background: var(--red-dim);    border: 1px solid rgba(239,68,68,0.3);   color: var(--red);    }
.ab-flash--warning { background: var(--yellow-dim); border: 1px solid rgba(245,158,11,0.3);  color: var(--yellow); }

/* ── Empty States ──────────────────────────────────────────── */
.ab-empty { text-align: center; padding: 72px 20px; }
.ab-empty-icon  { font-size: 52px; margin-bottom: 16px; }
.ab-empty-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.ab-empty-desc  { font-size: 14px; color: var(--muted); margin-bottom: 28px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ── Modal ─────────────────────────────────────────────────── */
.ab-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.ab-modal-overlay.open { opacity: 1; pointer-events: all; }

.ab-modal {
  background: #13151e;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 560px; width: 90%;
  max-height: 90vh; overflow-y: auto;
}

.ab-modal-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 24px;
}
.ab-modal-title { font-size: 18px; font-weight: 700; }
.ab-modal-close {
  background: none; border: none; color: var(--muted);
  font-size: 22px; cursor: pointer; line-height: 1;
  padding: 0 4px; transition: color 0.2s;
}
.ab-modal-close:hover { color: var(--text); }

/* ── Breadcrumb ────────────────────────────────────────────── */
.ab-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
  margin-bottom: 24px; flex-wrap: wrap;
}
.ab-breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.ab-breadcrumb a:hover { color: var(--text); opacity: 1; }
.ab-breadcrumb-sep { opacity: 0.35; }
.ab-breadcrumb-cur { color: var(--muted-hi); }

/* ── Year Filter Pills ─────────────────────────────────────── */
.ab-year-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.ab-year-pill {
  padding: 5px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--border-hi);
  color: var(--muted-hi); text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.ab-year-pill:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.ab-year-pill.active { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }

/* ── Page Header block ─────────────────────────────────────── */
.ab-page-head {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 32px;
}
.ab-page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Spinner ───────────────────────────────────────────────── */
.ab-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-hi);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ab-spin 0.6s linear infinite;
  display: inline-block; vertical-align: middle;
  flex-shrink: 0;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes ab-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
@keyframes ab-spin { to { transform: rotate(360deg); } }

/* ── Auth pages ────────────────────────────────────────────── */
.ab-auth-wrap {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.ab-auth-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.ab-auth-logo {
  font-size: 22px; font-weight: 800;
  color: var(--text); text-align: center;
  margin-bottom: 4px; letter-spacing: -0.02em;
}
.ab-auth-logo span { color: var(--accent); }
.ab-auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.ab-auth-footer { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.ab-auth-footer a { color: var(--accent); }

/* ── Table actions (btn row) ───────────────────────────────── */
.ab-table-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.ab-table td:has(.ab-table-actions) { vertical-align: middle; }

/* ── Expense list (div-based) ──────────────────────────────── */
.ab-exp-list { display: flex; flex-direction: column; gap: 3px; }

.ab-exp-month {
  padding: 20px 4px 8px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.ab-exp-month:first-child { padding-top: 0; }

.ab-exp-row {
  display: grid;
  grid-template-columns: 120px 155px 1fr auto 76px;
  grid-template-areas: "date cat desc amount actions";
  align-items: start;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: background .15s;
}
.ab-exp-row:hover { background: var(--card-hover); }

.ab-exp-date    { grid-area: date;    font-size: 13px; color: var(--muted); white-space: nowrap; line-height: 1.5; }
.ab-exp-cat     { grid-area: cat;     line-height: 1.5; }
.ab-exp-desc    { grid-area: desc;    font-size: 13px; line-height: 1.5; white-space: pre-line; min-width: 0; }
.ab-exp-amount  { grid-area: amount;  font-weight: 700; white-space: nowrap; text-align: right; line-height: 1.5; }
.ab-exp-actions { grid-area: actions; display: flex; gap: 6px; justify-content: flex-end; align-items: flex-start; }
.ab-exp-parts   { font-size: 10px; color: var(--muted); margin-left: 4px; vertical-align: middle; }

.ab-exp-year-total {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--accent-dim); border-radius: var(--radius);
  padding: 10px 14px; margin-top: 4px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent);
}
.ab-exp-grand-total {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,174,0,0.16); border-radius: var(--radius);
  padding: 14px; margin-top: 8px;
  font-size: 16px; font-weight: 800; color: var(--accent);
}

@media (max-width: 640px) {
  .ab-exp-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "cat     amount"
      "desc    desc"
      "date    actions";
    gap: 8px;
  }
}

/* ── Planned Works ─────────────────────────────────────────── */
.ab-plan-list { display: flex; flex-direction: column; gap: 3px; }

.ab-plan-row {
  display: grid;
  grid-template-columns: 36px 155px 1fr auto 76px;
  grid-template-areas: "check cat desc amount actions";
  align-items: start;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: background .15s;
}
.ab-plan-row:hover { background: var(--card-hover); }
.ab-plan-row--done { opacity: .7; }

/* Checkbox button */
.ab-plan-check-form { grid-area: check; display: flex; align-items: flex-start; padding-top: 2px; }
.ab-plan-check {
  grid-area: check;
  display: flex; align-items: flex-start; padding-top: 2px;
  width: 22px; height: 22px; flex-shrink: 0;
  background: none; border: none; padding: 0; cursor: pointer;
}
.ab-plan-check-inner {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--border-hi);
  background: transparent;
  transition: border-color .15s, background .15s;
  font-size: 13px; font-weight: 700;
}
.ab-plan-check:hover .ab-plan-check-inner {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.ab-plan-check--done { cursor: default; }
.ab-plan-check-inner--done {
  border-color: var(--green);
  background: rgba(34,197,94,0.12);
  color: var(--green);
}

.ab-plan-cat    { grid-area: cat;    line-height: 1.5; }
.ab-plan-desc   { grid-area: desc;   font-size: 13px; line-height: 1.5; white-space: pre-line; min-width: 0; }
.ab-plan-desc--done { text-decoration: line-through; color: var(--muted); }
.ab-plan-amount { grid-area: amount; font-weight: 700; white-space: nowrap; text-align: right; line-height: 1.5; }
.ab-plan-actions { grid-area: actions; display: flex; gap: 6px; justify-content: flex-end; align-items: flex-start; }

@media (max-width: 640px) {
  .ab-plan-row {
    grid-template-columns: 36px 1fr auto;
    grid-template-areas:
      "check  cat     amount"
      "check  desc    desc"
      ".      actions actions";
    gap: 8px;
  }
}

/* ── Misc helpers ──────────────────────────────────────────── */
.ab-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.ab-text-muted  { color: var(--muted); }
.ab-text-accent { color: var(--accent); }
.ab-fw-800 { font-weight: 800; }
.ab-mono { font-family: 'Courier New', monospace; font-size: 0.88em; letter-spacing: 0.03em; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .rl-wrap { padding: 0 14px; }
  .ab-car-card-actions { gap: 6px; }
  .ab-nav-user { display: none; }
  .ab-page-head { flex-direction: column; align-items: flex-start; }
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Selection ─────────────────────────────────────────────── */
::selection { background: var(--accent-dim); color: var(--accent); }
