@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #ffedd5;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-hover-bg: rgba(255,255,255,0.06);
  --sidebar-active-bg: rgba(249,115,22,0.15);
  --sidebar-active-text: #fb923c;
  --sidebar-border: rgba(255,255,255,0.07);
  --sidebar-width: 248px;
  --success-bg: #dcfce7;
  --success-text: #15803d;
  --danger-bg: #fee2e2;
  --danger-text: #b91c1c;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --info-bg: #dbeafe;
  --info-text: #1d4ed8;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.10);
}

body.theme-blue { --primary:#2563eb; --primary-dark:#1d4ed8; --primary-light:#dbeafe; --sidebar-active-text:#60a5fa; --sidebar-active-bg:rgba(37,99,235,0.15); }
body.theme-green { --primary:#16a34a; --primary-dark:#15803d; --primary-light:#dcfce7; --sidebar-active-text:#4ade80; --sidebar-active-bg:rgba(22,163,74,0.15); }
body.theme-red { --primary:#dc2626; --primary-dark:#b91c1c; --primary-light:#fee2e2; --sidebar-active-text:#f87171; --sidebar-active-bg:rgba(220,38,38,0.15); }
body.theme-purple { --primary:#7c3aed; --primary-dark:#6d28d9; --primary-light:#ede9fe; --sidebar-active-text:#a78bfa; --sidebar-active-bg:rgba(124,58,237,0.15); }
body.theme-orange { --primary:#f97316; --primary-dark:#ea580c; --primary-light:#ffedd5; --sidebar-active-text:#fb923c; --sidebar-active-bg:rgba(249,115,22,0.15); }
body.theme-charcoal { --primary:#374151; --primary-dark:#1f2937; --primary-light:#e5e7eb; --sidebar-active-text:#9ca3af; --sidebar-active-bg:rgba(55,65,81,0.2); }

*,*::before,*::after{box-sizing:border-box;}
html,body{margin:0;padding:0;}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,p{margin-top:0;}

.layout { display:flex; min-height:100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top:0; left:0;
  height: 100vh;
  z-index: 100;
  border-right: 1px solid var(--sidebar-border);
  transition: transform 0.25s ease;
}

.sidebar-brand { padding:22px 16px 18px; border-bottom:1px solid var(--sidebar-border); flex-shrink:0; }

.sidebar-logo { display:flex; align-items:center; gap:12px; text-decoration:none; }

.sidebar-logo-icon { width:38px; height:38px; background:var(--primary); border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.sidebar-logo-icon svg { width:20px; height:20px; stroke:white; }

.sidebar-logo-text { font-size:1.05rem; font-weight:800; color:#f1f5f9; letter-spacing:-0.02em; line-height:1.2; }
.sidebar-logo-sub { font-size:0.68rem; color:#475569; letter-spacing:0.08em; text-transform:uppercase; font-weight:600; margin-top:2px; }

.sidebar-nav { flex:1; padding:10px 8px; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#1e293b transparent; }
.sidebar-nav::-webkit-scrollbar{width:4px;}
.sidebar-nav::-webkit-scrollbar-thumb{background:#1e293b;border-radius:2px;}

.sidebar-section-label { font-size:0.68rem; letter-spacing:0.09em; text-transform:uppercase; font-weight:700; color:#334155; padding:10px 10px 5px; }

.sidebar-link {
  display:flex; align-items:center; gap:10px;
  padding:9px 10px; border-radius:8px;
  color:var(--sidebar-text); text-decoration:none;
  font-size:0.875rem; font-weight:500;
  transition:background 0.15s, color 0.15s;
  cursor:pointer; border:none; background:none;
  width:100%; text-align:left; margin-bottom:2px; line-height:1.4;
}
.sidebar-link:hover { background:var(--sidebar-hover-bg); color:#cbd5e1; }
.sidebar-link.active { background:var(--sidebar-active-bg); color:var(--sidebar-active-text); font-weight:600; }
.sidebar-link svg { width:17px; height:17px; flex-shrink:0; opacity:0.7; }
.sidebar-link.active svg,.sidebar-link:hover svg { opacity:1; }

.sidebar-footer { padding:12px 8px; border-top:1px solid var(--sidebar-border); flex-shrink:0; }

#platform-garage-switcher { padding:0 4px; margin-bottom:10px !important; }
#platform-garage-switcher label { font-size:0.72rem; color:#475569; margin-bottom:4px; font-weight:600; text-transform:uppercase; letter-spacing:0.06em; }
#platform-garage-switcher select {
  background: rgba(255,255,255,0.07) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #cbd5e1 !important;
  font-size: 0.82rem;
  padding: 8px 28px 8px 10px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
}

.sidebar-user { display:flex; align-items:center; gap:9px; padding:7px 10px; border-radius:8px; margin-bottom:4px; }
.sidebar-user-avatar { width:30px; height:30px; border-radius:50%; background:#1e293b; display:flex; align-items:center; justify-content:center; font-size:0.75rem; font-weight:700; color:#94a3b8; flex-shrink:0; }
.sidebar-user-info { flex:1; min-width:0; }
#current-user-badge { font-size:0.78rem; color:var(--sidebar-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
.sidebar-logout { color:#64748b !important; font-size:0.82rem; }
.sidebar-logout:hover { color:#ef4444 !important; background:rgba(239,68,68,0.08) !important; }

/* MAIN */
.main { flex:1; margin-left:var(--sidebar-width); min-height:100vh; display:flex; flex-direction:column; min-width:0; }

.topbar {
  background:var(--surface); border-bottom:1px solid var(--border);
  padding:0 28px; height:62px;
  display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:50; flex-shrink:0;
}
.topbar-title { font-size:1.05rem; font-weight:700; color:var(--text); letter-spacing:-0.01em; margin:0; }
.topbar-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

.page-content { padding:24px 28px; flex:1; animation: fadeIn 0.15s ease; }

/* CARDS */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:22px 24px; margin-bottom:18px; box-shadow:var(--shadow); }
.card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; gap:12px; }
.card-title { font-size:0.975rem; font-weight:700; color:var(--text); margin:0; }

/* STAT CARDS */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; margin-bottom:20px; }
.stat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:18px 20px; box-shadow:var(--shadow); }
.stat-card[data-href] { cursor:pointer; transition:box-shadow 0.15s,transform 0.15s; }
.stat-card[data-href]:hover { box-shadow:var(--shadow-md); transform:translateY(-1px); }
.stat-icon { width:38px; height:38px; border-radius:9px; background:var(--primary-light); display:flex; align-items:center; justify-content:center; margin-bottom:12px; }
.stat-icon svg { width:18px; height:18px; stroke:var(--primary); }
.stat-label { font-size:0.72rem; color:var(--muted); font-weight:600; margin-bottom:4px; text-transform:uppercase; letter-spacing:0.06em; }
.stat-value { font-size:1.8rem; font-weight:800; color:var(--text); line-height:1; letter-spacing:-0.03em; }

/* BUTTONS */
.action-button {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:8px 16px; border-radius:8px;
  font-family:'DM Sans',sans-serif; font-size:0.875rem; font-weight:600;
  cursor:pointer; border:1.5px solid var(--border);
  background:var(--surface); color:var(--text-2);
  transition:all 0.15s ease; white-space:nowrap; text-decoration:none; line-height:1.4;
}
.action-button:hover { background:var(--bg); border-color:#cbd5e1; color:var(--text); }
.action-button.primary { background:var(--primary); border-color:var(--primary); color:#fff; }
.action-button.primary:hover { background:var(--primary-dark); border-color:var(--primary-dark); }
.action-button svg { width:15px; height:15px; }
.button-row { display:flex; gap:8px; flex-wrap:wrap; }

/* FORMS */
.field-group { margin-bottom:18px; }
label { display:block; margin-bottom:6px; font-size:0.82rem; font-weight:600; color:var(--text-2); letter-spacing:0.01em; }
input:not([type="checkbox"]):not([type="radio"]),select,textarea {
  width:100%; border:1.5px solid var(--border);
  background:var(--surface); color:var(--text);
  border-radius:8px; padding:10px 13px;
  font-family:'DM Sans',sans-serif; font-size:0.9rem;
  transition:border-color 0.15s,box-shadow 0.15s;
  -webkit-appearance:none; appearance:none;
}
input[type="checkbox"], input[type="radio"] {
  width:auto; cursor:pointer;
  accent-color:var(--primary);
  width:16px; height:16px; flex-shrink:0;
}
select {
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat:no-repeat; background-position:right 10px center; background-size:18px; padding-right:36px;
}
textarea { min-height:110px; resize:vertical; }
input:not([type='checkbox']):not([type='radio']):focus,select:focus,textarea:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-light); }
input[type="file"] { padding:8px 12px; background:var(--bg); cursor:pointer; font-size:0.85rem; }
.two-col { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.three-col { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }

/* JOB CARDS */
.job-card {
  background:var(--surface); border:1px solid var(--border);
  border-left:4px solid var(--border); border-radius:var(--radius);
  padding:16px 20px; margin-bottom:10px; box-shadow:var(--shadow);
  transition:box-shadow 0.15s,transform 0.15s;
  cursor:pointer;
}
.job-card:hover { box-shadow:var(--shadow-md); transform:translateY(-1px); }
.job-card.status-booked    { border-left-color:var(--info-text); }
.job-card.status-in-progress { border-left-color:var(--warning-text); }
.job-card.status-completed { border-left-color:var(--success-text); }
.job-card.status-cancelled { border-left-color:#94a3b8; }
.job-card-top { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:12px; gap:12px; }
.job-reg { display:inline-block; font-size:1.05rem; font-weight:800; letter-spacing:0.06em; font-family:'Courier New',monospace; background:#fef08a; color:#1c1917; border:2px solid #d1d5db; border-radius:5px; padding:2px 10px; }
.job-meta { color:var(--muted); font-size:0.85rem; margin-top:5px; }
.job-details-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.job-label { font-size:0.7rem; color:var(--muted); text-transform:uppercase; letter-spacing:0.06em; font-weight:700; margin-bottom:3px; }
.job-value { font-weight:600; font-size:0.875rem; }
.job-value-strong { font-weight:800; }
/* .job-open-button removed — cards are now fully clickable */

/* FILTER BUTTONS - status tinted when active */
[data-job-filter] .action-button.primary[data-filter="today"]       { background:#0ea5e9; border-color:#0ea5e9; color:#fff; }
[data-job-filter] .action-button.primary[data-filter="booked"]      { background:var(--info-text); border-color:var(--info-text); color:#fff; }
[data-job-filter] .action-button.primary[data-filter="in progress"] { background:var(--warning-text); border-color:var(--warning-text); color:#fff; }
[data-job-filter] .action-button.primary[data-filter="completed"]   { background:var(--success-text); border-color:var(--success-text); color:#fff; }
[data-job-filter] .action-button.primary[data-filter="cancelled"]   { background:#64748b; border-color:#64748b; color:#fff; }

/* STATUS BADGES */
.job-status { display:inline-flex; align-items:center; gap:5px; border-radius:6px; padding:4px 10px; font-size:0.72rem; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; white-space:nowrap; flex-shrink:0; }
.job-status::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; flex-shrink:0; }
.job-status.booked { background:var(--info-bg); color:var(--info-text); }
.job-status.in-progress { background:var(--warning-bg); color:var(--warning-text); }
.job-status.completed { background:var(--success-bg); color:var(--success-text); }
.job-status.cancelled { background:var(--danger-bg); color:var(--danger-text); }

/* LAYOUT HELPERS */
.page-top { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
.hint { color:var(--muted); font-size:0.875rem; }
.positive { color:var(--success-text) !important; }
.negative { color:var(--danger-text) !important; }
.overview-title { margin-top:20px; font-size:0.95rem; font-weight:700; }
.overview-row { margin-top:14px; }

/* SETTINGS */
.settings-section { border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); margin-top:14px; overflow:hidden; }
.settings-section summary { cursor:pointer; list-style:none; padding:14px 18px; font-weight:700; font-size:0.9rem; display:flex; align-items:center; justify-content:space-between; user-select:none; }
.settings-section summary::-webkit-details-marker{display:none;}
.settings-section summary::after { content:'▾'; font-size:0.9rem; transition:transform 0.2s; color:var(--muted); }
.settings-section[open] summary::after { transform:rotate(180deg); }
.settings-section-body { padding:0 18px 18px; border-top:1px solid var(--border); }

/* INVOICE */
.invoice-shell{max-width:1000px;margin:0 auto;}
.invoice-paper{background:#fff;border-radius:var(--radius-lg);padding:36px;box-shadow:var(--shadow-md);}
.invoice-top{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;margin-bottom:28px;}
.invoice-brand img{max-height:72px;max-width:220px;object-fit:contain;display:block;margin-bottom:10px;}
.invoice-title{text-align:right;}
.invoice-title h2{margin:0 0 8px;}
.invoice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-bottom:24px;}
.invoice-block{background:var(--bg);border-radius:var(--radius);padding:14px;border:1px solid var(--border);}
.invoice-block h3{margin:0 0 10px;font-size:0.78rem;text-transform:uppercase;letter-spacing:0.07em;color:var(--muted);font-weight:700;}
.invoice-table{width:100%;border-collapse:collapse;margin-top:16px;}
.invoice-table th{padding:10px 12px;border-bottom:2px solid var(--border);text-align:left;font-size:0.72rem;text-transform:uppercase;letter-spacing:0.06em;color:var(--muted);font-weight:700;}
.invoice-table td{padding:12px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top;font-size:0.9rem;}
.invoice-table th:last-child,.invoice-table td:last-child{text-align:right;}
.invoice-summary{margin-top:24px;margin-left:auto;max-width:340px;}
.invoice-summary-row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid var(--border);}
.invoice-summary-row.total{font-weight:800;font-size:1.05rem;border-bottom:none;padding-top:14px;}
.invoice-sections{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-top:24px;}
.invoice-note{white-space:pre-wrap;line-height:1.6;font-size:0.9rem;}
.invoice-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px;}

/* PHOTOS */
.photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-top:12px;}
.photo-card{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--surface);box-shadow:var(--shadow);}
.photo-card img{width:100%;height:160px;object-fit:cover;display:block;background:var(--surface-2);}
.photo-card-meta{padding:10px;display:grid;gap:8px;}
.photo-card-name{font-weight:600;font-size:0.82rem;word-break:break-word;}

/* DATA TABLE */
.data-table{width:100%;border-collapse:collapse;}
.data-table th{text-align:left;padding:10px 14px;font-size:0.7rem;font-weight:700;text-transform:uppercase;letter-spacing:0.07em;color:var(--muted);border-bottom:2px solid var(--border);}
.data-table td{padding:13px 14px;border-bottom:1px solid var(--border);font-size:0.875rem;}
.data-table tbody tr:hover{background:var(--bg);}
.data-table tbody tr:last-child td{border-bottom:none;}

/* LOGIN */
.login-layout {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:var(--sidebar-bg); padding:20px; position:relative; overflow:hidden;
}
.login-layout::before {
  content:''; position:absolute; inset:0;
  background:radial-gradient(ellipse 60% 50% at 30% 60%,rgba(249,115,22,0.12) 0%,transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% 20%,rgba(99,102,241,0.08) 0%,transparent 60%);
  pointer-events:none;
}
.login-card { background:var(--surface); border-radius:20px; padding:44px; width:100%; max-width:420px; box-shadow:0 25px 60px rgba(0,0,0,0.3); position:relative; z-index:1; }
.login-brand { text-align:center; margin-bottom:36px; }
.login-logo-icon { width:58px; height:58px; background:var(--primary); border-radius:16px; display:flex; align-items:center; justify-content:center; margin:0 auto 18px; box-shadow:0 8px 20px rgba(249,115,22,0.35); }
.login-logo-icon svg { width:28px; height:28px; stroke:white; }
.login-brand h1 { font-size:1.8rem; font-weight:800; color:var(--text); margin:0 0 6px; letter-spacing:-0.03em; }
.login-brand p { color:var(--muted); font-size:0.875rem; margin:0; }
#login-error { background:var(--danger-bg); color:var(--danger-text); border:1px solid #fca5a5; border-radius:8px; padding:10px 14px; font-size:0.875rem; margin-top:14px; }

/* RESPONSIVE */
@media(max-width:768px){
  .sidebar{transform:translateX(-100%);}
  .sidebar.mobile-open{transform:translateX(0);box-shadow:4px 0 20px rgba(0,0,0,0.3);}
  .main{margin-left:0;}
  .topbar{padding:0 16px;}
  .page-content{padding:16px;}
  .two-col,.job-details-grid{grid-template-columns:1fr;}
  .job-card-top{flex-direction:column;align-items:flex-start;}
  .invoice-title{text-align:left;}
}

@media print{
  .sidebar,.topbar,.invoice-actions{display:none!important;}
  .main{margin-left:0;}
  .invoice-paper{box-shadow:none;padding:0;border:none;}
  .page-content{padding:0;}
  body{background:white;}
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sidebar-bg);
  color: #f1f5f9;
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  pointer-events: all;
  max-width: 360px;
  animation: toast-in 0.25s ease;
  border-left: 4px solid var(--primary);
}

.toast.toast-success { border-left-color: var(--success-text); }
.toast.toast-error   { border-left-color: #ef4444; }
.toast.toast-info    { border-left-color: #60a5fa; }

.toast-out { animation: toast-out 0.25s ease forwards; }

.toast-icon { font-size: 1rem; flex-shrink: 0; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}

/* ============================================================
   MOBILE HAMBURGER
   ============================================================ */
.topbar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-2);
  margin-right: 8px;
}
.topbar-hamburger:hover { background: var(--bg); }
.topbar-hamburger svg   { width: 22px; height: 22px; display: block; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.visible { display: block; }

@media(max-width:768px) {
  .topbar-hamburger { display: flex; align-items: center; }
}

/* ============================================================
   CONFIRM DIALOG
   ============================================================ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-md);
}
.confirm-box h3    { margin: 0 0 10px; font-size: 1rem; }
.confirm-box p     { color: var(--muted); font-size: 0.875rem; margin: 0 0 22px; }
.confirm-box-btns  { display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================================
   PLATFORM ADMIN GARAGE SWITCHER IN SIDEBAR
   ============================================================ */

#platform-garage-switcher select:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary-light);
}

#platform-garage-switcher select option {
  background: #1e293b;
  color: #f1f5f9;
}

/* EMPTY STATE */
.empty-state { text-align:center; padding:48px 24px; }
.empty-state-icon { font-size:2.5rem; margin-bottom:14px; }
.empty-state h3 { font-size:1rem; font-weight:700; margin-bottom:8px; color:var(--text); }
.empty-state p { color:var(--muted); font-size:0.875rem; margin-bottom:22px; }

/* VRM LOADING */
.action-button.loading { opacity:0.65; cursor:not-allowed; pointer-events:none; }
.action-button.loading::after { content:' …'; }

/* PHONE LINK */
a.tel-link { color:inherit; text-decoration:none; font-weight:inherit; }
a.tel-link:hover { color:var(--primary); text-decoration:underline; }

/* INPUT UPPERCASE */
input.uppercase { text-transform:uppercase; }
input.uppercase::placeholder { text-transform:none; }

/* REDUNDANT PAGE-TOP H2 INSIDE CARDS - hide it */
.card .page-top h2 { display:none; }
.card .page-top:has(> h2:only-child) { display:none; }

/* ============================================================
   REPORT MINI BAR CHARTS
   ============================================================ */
.data-table td .bar-wrap { background:var(--primary-light); border-radius:3px; height:6px; overflow:hidden; min-width:60px; }
.data-table td .bar-fill  { background:var(--primary); height:100%; border-radius:3px; transition:width 0.4s ease; }

/* ============================================================
   MISC POLISH
   ============================================================ */
/* Smooth page transitions */

@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }

/* Better focus ring */
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Card section dividers */
.card-divider { border:none; border-top:1px solid var(--border); margin:16px 0; }

/* Customer registrations as plates */
.reg-pill { display:inline-block; font-family:'Courier New',monospace; font-size:0.78rem; font-weight:800;
  background:#fef08a; color:#1c1917; border:2px solid #d1d5db; border-radius:4px; padding:1px 8px; }

/* FIELD VALIDATION ERRORS */
.field-error { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.15) !important; }
.field-error-msg { font-size: 0.78rem; color: #ef4444; margin-top: 4px; font-weight: 500; }

/* TOAST CONTAINER */
.toast-container { position:fixed; top:24px; left:50%; transform:translateX(-50%); z-index:9999; display:flex; flex-direction:column; align-items:center; gap:8px; pointer-events:none; }
.toast { display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:10px; padding:12px 16px; font-size:0.875rem; font-weight:500; color:var(--text); box-shadow:0 4px 20px rgba(0,0,0,0.15); pointer-events:all; cursor:pointer; max-width:360px; animation:toast-in 0.25s ease; }
.toast.toast-success { border-left-color: var(--success-text, #16a34a); }
.toast.toast-error   { border-left-color: #ef4444; }
.toast.toast-warning { border-left-color: #f59e0b; }
.toast.toast-info    { border-left-color: #60a5fa; }
.toast-out { animation: toast-out 0.25s ease forwards; }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
@keyframes toast-in  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toast-out { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(12px); } }

/* VRM LOCKED VEHICLE FIELDS */
input.vrm-locked {
  background: var(--bg) !important;
  color: var(--muted) !important;
  cursor: not-allowed !important;
  border-color: var(--border) !important;
  opacity: 0.75;
}
input.vrm-locked:focus {
  border-color: var(--border) !important;
  box-shadow: none !important;
}
