:root{
  --bg:#f5f7fb;
  --surface:#ffffff;
  --surface-soft:#f8fafc;
  --surface-hover:#f1f5f9;
  --text:#0f172a;
  --muted:#64748b;
  --subtle:#94a3b8;
  --line:#e2e8f0;
  --line-strong:#cbd5e1;
  --primary:#2563eb;
  --primary-700:#1d4ed8;
  --primary-soft:#eff6ff;
  --nav:#0b1220;
  --nav-2:#111c30;
  --success:#16a34a;
  --success-soft:#dcfce7;
  --warning:#d97706;
  --warning-soft:#fef3c7;
  --danger:#dc2626;
  --danger-soft:#fee2e2;
  --purple:#7c3aed;
  --purple-soft:#ede9fe;
  --cyan:#0891b2;
  --cyan-soft:#cffafe;
  --shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px rgba(15,23,42,.04);
  --shadow-lg:0 24px 60px rgba(15,23,42,.18);
  --radius-sm:9px;
  --radius:14px;
  --radius-lg:18px;
  --sidebar:252px;
}
*{box-sizing:border-box}
html{font-size:16px}
body{
  margin:0;
  min-width:320px;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea{font:inherit}
button{color:inherit}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:3px solid rgba(37,99,235,.35);
  outline-offset:2px;
}
svg{display:block}
a{color:inherit}
.app-shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);min-height:100vh}
.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg,var(--nav),var(--nav-2));
  color:#fff;
  padding:18px 14px;
  z-index:50;
}
.brand{display:flex;align-items:center;gap:11px;padding:4px 8px 18px}
.brand-mark{
  width:42px;height:42px;border-radius:13px;display:grid;place-items:center;
  background:linear-gradient(145deg,#2563eb,#4f46e5);
  box-shadow:0 8px 20px rgba(37,99,235,.3);
  flex:0 0 auto;
}
.brand-mark svg{width:24px;height:24px;fill:none;stroke:#fff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.brand-copy{min-width:0}
.brand-copy strong{display:block;font-size:14px;letter-spacing:.01em;white-space:nowrap}
.brand-copy span{display:block;margin-top:2px;color:#94a3b8;font-size:11px;white-space:nowrap}
.sidebar-nav{display:grid;gap:4px;overflow:auto;padding:2px 0}
.nav-group-label{
  color:#64748b;
  font-size:10px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  padding:16px 10px 5px;
}
.nav-item{
  display:flex;align-items:center;gap:11px;width:100%;
  border:0;background:transparent;color:#cbd5e1;
  border-radius:10px;padding:10px 11px;text-align:left;
  cursor:pointer;transition:.16s ease;font-size:13px;
}
.nav-item:hover{background:rgba(255,255,255,.07);color:#fff}
.nav-item.active{background:linear-gradient(90deg,#2563eb,#2f6ff1);color:#fff;box-shadow:0 8px 18px rgba(37,99,235,.2)}
.nav-icon{width:18px;height:18px;display:grid;place-items:center;flex:0 0 18px}
.nav-icon svg,.topbar svg,.button-icon svg,.inline-icon svg,.metric-icon svg,.search-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-badge{
  margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:999px;
  display:grid;place-items:center;font-size:10px;font-weight:800;background:#ef4444;color:#fff;
}
.sidebar-footer{margin-top:auto;padding:16px 8px 4px;border-top:1px solid rgba(148,163,184,.12)}
.local-pill{display:flex;align-items:center;gap:7px;color:#cbd5e1;font-size:11px;font-weight:700}
.local-dot{width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.12)}
.sidebar-footer small{display:block;color:#64748b;font-size:10px;line-height:1.4;margin-top:7px}
.main-area{min-width:0}
.topbar{
  height:72px;
  display:flex;align-items:center;gap:16px;
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  padding:0 24px;
  position:sticky;top:0;z-index:40;
}
.command-search{
  position:relative;display:flex;align-items:center;max-width:620px;flex:1;
}
.command-search input{
  width:100%;height:42px;border:1px solid var(--line);border-radius:11px;
  padding:0 42px 0 42px;background:#f8fafc;color:var(--text);outline:none;
  transition:.16s ease;
}
.command-search input:focus{background:#fff;border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.08)}
.search-icon{position:absolute;left:14px;width:18px;height:18px;color:#64748b}
.command-search kbd{
  position:absolute;right:11px;border:1px solid var(--line-strong);background:#fff;
  border-radius:6px;color:#64748b;font-size:11px;padding:2px 6px;box-shadow:0 1px 1px rgba(15,23,42,.04);
}
.topbar-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.branch-button,.profile-button,.icon-button{
  border:1px solid var(--line);background:#fff;border-radius:11px;height:42px;cursor:pointer;
}
.branch-button{display:flex;align-items:center;gap:8px;padding:0 13px;font-size:12px;font-weight:700}
.branch-button svg{width:16px;height:16px}
.icon-button{width:42px;display:grid;place-items:center;position:relative}
.icon-button>span:not(.notification-dot){width:18px;height:18px}
.notification-dot{position:absolute;width:7px;height:7px;border-radius:50%;background:#ef4444;right:9px;top:8px;border:2px solid #fff}
.profile-button{display:flex;align-items:center;gap:9px;padding:0 10px 0 7px}
.profile-button>span:last-child{width:14px;height:14px;color:#64748b}
.avatar{
  width:30px;height:30px;border-radius:9px;display:grid;place-items:center;
  background:linear-gradient(145deg,#1e3a8a,#2563eb);color:#fff;font-size:11px;font-weight:800;
}
.profile-copy{display:grid;text-align:left;line-height:1.05}
.profile-copy strong{font-size:11px}
.profile-copy small{font-size:9px;color:var(--muted);margin-top:3px}
.mobile-menu{display:none}
.page-content{max-width:1560px;margin:0 auto;padding:26px 28px 42px;outline:none}
.page-header{
  display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:20px;
}
.page-title-wrap{min-width:0}
.page-eyebrow{font-size:11px;color:var(--primary);font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}
.page-header h1{font-size:26px;line-height:1.15;margin:0;font-weight:800;letter-spacing:-.025em}
.page-header p{margin:6px 0 0;color:var(--muted);font-size:13px}
.page-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.btn{
  border:1px solid var(--line);background:#fff;border-radius:10px;min-height:40px;padding:0 13px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:700;
  cursor:pointer;transition:.15s ease;white-space:nowrap;
}
.btn:hover{background:var(--surface-hover);border-color:var(--line-strong)}
.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 6px 14px rgba(37,99,235,.16)}
.btn.primary:hover{background:var(--primary-700)}
.btn.danger{background:#fff;color:var(--danger);border-color:#fecaca}
.btn.danger:hover{background:#fef2f2}
.btn.success{background:var(--success);border-color:var(--success);color:#fff}
.btn.ghost{border-color:transparent;background:transparent}
.btn.sm{min-height:32px;padding:0 10px;font-size:11px}
.btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}
.button-icon{width:16px;height:16px;display:grid;place-items:center}
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.kpi-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:16px;box-shadow:var(--shadow);min-width:0;
}
.kpi-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.kpi-label{color:var(--muted);font-size:11px;font-weight:700}
.kpi-value{font-size:22px;font-weight:850;letter-spacing:-.03em;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kpi-note{display:flex;align-items:center;gap:5px;margin-top:7px;color:var(--muted);font-size:10px}
.kpi-note.positive{color:var(--success)}
.kpi-note.warning{color:var(--warning)}
.metric-icon{
  width:38px;height:38px;border-radius:12px;display:grid;place-items:center;
  background:var(--primary-soft);color:var(--primary);flex:0 0 auto;
}
.metric-icon svg{width:18px;height:18px}
.metric-icon.green{background:#ecfdf5;color:#059669}
.metric-icon.amber{background:#fffbeb;color:#d97706}
.metric-icon.purple{background:#f5f3ff;color:#7c3aed}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(310px,.85fr);gap:16px;margin-bottom:16px}
.dashboard-subgrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,.52fr);gap:16px;margin-bottom:16px}
.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:var(--shadow);min-width:0;
}
.card-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 0}
.card-title{font-size:14px;font-weight:800}
.card-subtitle{font-size:10px;color:var(--muted);margin-top:3px}
.card-body{padding:16px}
.card-footer{padding:12px 16px;border-top:1px solid var(--line)}
.card-link{border:0;background:transparent;color:var(--primary);font-size:11px;font-weight:800;cursor:pointer;padding:4px}
.chart-shell{height:230px;position:relative}
.chart-shell svg{width:100%;height:100%;overflow:visible}
.chart-grid-line{stroke:#e9eef5;stroke-width:1}
.chart-line{fill:none;stroke:#2563eb;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.chart-area{fill:url(#chartGradient)}
.chart-point{fill:#fff;stroke:#2563eb;stroke-width:2}
.chart-label{font-size:9px;fill:#94a3b8}
.stock-summary{display:grid;grid-template-columns:150px minmax(0,1fr);gap:18px;align-items:center}
.donut{
  width:142px;height:142px;border-radius:50%;display:grid;place-items:center;position:relative;
  background:conic-gradient(#22c55e 0 var(--p1),#f59e0b var(--p1) var(--p2),#ef4444 var(--p2) var(--p3),#94a3b8 var(--p3) 100%);
}
.donut::after{content:"";width:94px;height:94px;border-radius:50%;background:#fff;position:absolute}
.donut-center{position:relative;z-index:1;text-align:center}
.donut-center strong{display:block;font-size:24px;line-height:1}
.donut-center small{display:block;color:var(--muted);font-size:10px;margin-top:5px}
.legend{display:grid;gap:10px}
.legend-row{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:11px}
.legend-name{display:flex;align-items:center;gap:7px;color:#475569}
.legend-dot{width:8px;height:8px;border-radius:50%}
.legend-row strong{font-size:12px}
.action-list{display:grid;gap:9px}
.action-item{
  display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;
  padding:10px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer;text-align:left;
  transition:.15s ease;
}
.action-item:hover{border-color:#bfdbfe;background:#f8fbff}
.action-icon{
  width:38px;height:38px;border-radius:11px;background:#eff6ff;color:#2563eb;
  display:grid;place-items:center;
}
.action-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.action-copy strong{font-size:11px;display:block}
.action-copy small{font-size:10px;color:var(--muted);display:block;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.action-chevron{color:#94a3b8;width:14px;height:14px}
.attention-list{display:grid;gap:9px}
.attention{
  border:1px solid var(--line);border-radius:12px;padding:11px 12px;display:flex;align-items:flex-start;gap:10px;
}
.attention-marker{width:8px;height:8px;border-radius:50%;margin-top:5px;background:var(--warning);flex:0 0 auto}
.attention.danger .attention-marker{background:var(--danger)}
.attention.success .attention-marker{background:var(--success)}
.attention strong{font-size:11px;display:block}
.attention small{font-size:10px;color:var(--muted);display:block;margin-top:3px;line-height:1.4}
.table-wrap{overflow:auto}
.data-table{width:100%;border-collapse:collapse;min-width:680px}
.data-table th{
  text-align:left;color:#64748b;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;
  padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;background:#fbfcfe;
}
.data-table td{font-size:11px;padding:11px 12px;border-bottom:1px solid #eef2f7;vertical-align:middle}
.data-table tbody tr{transition:.12s ease}
.data-table tbody tr:hover{background:#f8fafc}
.data-table tbody tr.clickable{cursor:pointer}
.data-table tbody tr:last-child td{border-bottom:0}
.table-primary{font-weight:750;color:#1e293b}
.table-secondary{display:block;color:var(--muted);font-size:9px;margin-top:2px}
.money{font-variant-numeric:tabular-nums;font-weight:750}
.status-badge{
  display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;
  font-size:9px;font-weight:850;white-space:nowrap;border:1px solid transparent;
}
.status-badge::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.status-green{background:#ecfdf5;color:#15803d;border-color:#bbf7d0}
.status-amber{background:#fffbeb;color:#b45309;border-color:#fde68a}
.status-red{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.status-blue{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.status-purple{background:#f5f3ff;color:#6d28d9;border-color:#ddd6fe}
.status-gray{background:#f8fafc;color:#64748b;border-color:#e2e8f0}
.progress-track{height:6px;background:#eef2f7;border-radius:999px;overflow:hidden;min-width:90px}
.progress-fill{height:100%;background:linear-gradient(90deg,#2563eb,#22c55e);border-radius:999px}
.activity-list{display:grid}
.activity-row{
  display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;padding:10px 0;border-bottom:1px solid #eef2f7;align-items:start;
}
.activity-row:last-child{border-bottom:0}
.activity-avatar{width:28px;height:28px;border-radius:9px;background:#eff6ff;color:#1d4ed8;display:grid;place-items:center;font-size:9px;font-weight:850}
.activity-copy{font-size:10px;line-height:1.45;color:#475569}
.activity-copy strong{color:#1e293b}
.activity-time{font-size:9px;color:#94a3b8;white-space:nowrap}
.toolbar{
  display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:14px;
}
.toolbar-search{position:relative;min-width:250px;flex:1;max-width:420px}
.toolbar-search input{padding-left:35px}
.toolbar-search .search-icon{left:11px;width:16px;height:16px}
.input,.select,.textarea{
  width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);
  min-height:40px;padding:9px 11px;outline:none;font-size:12px;transition:.15s ease;
}
.input:focus,.select:focus,.textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.08)}
.textarea{min-height:88px;resize:vertical}
.filter-pills{display:flex;gap:7px;overflow:auto;padding-bottom:1px}
.filter-pill{
  border:1px solid var(--line);background:#fff;border-radius:999px;height:34px;padding:0 11px;
  font-size:10px;font-weight:800;color:#64748b;white-space:nowrap;cursor:pointer;
}
.filter-pill.active{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.unit-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.unit-card{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:var(--shadow);transition:.16s ease}
.unit-card:hover{transform:translateY(-1px);border-color:#cbd5e1;box-shadow:0 10px 30px rgba(15,23,42,.08)}
.unit-visual{
  height:132px;background:linear-gradient(145deg,#edf2f7,#f8fafc);display:grid;place-items:center;position:relative;overflow:hidden;
}
.unit-visual::before{content:"";position:absolute;width:150px;height:150px;border-radius:50%;background:rgba(37,99,235,.06);right:-45px;top:-60px}
.car-glyph{width:112px;color:#334155;position:relative;z-index:1}
.car-glyph svg{width:100%;height:auto;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.unit-status{position:absolute;left:10px;top:10px;z-index:2}
.unit-aging{position:absolute;right:10px;top:10px;z-index:2;background:rgba(255,255,255,.9);border:1px solid rgba(203,213,225,.8);border-radius:999px;padding:4px 7px;font-size:9px;font-weight:800;color:#475569}
.unit-body{padding:13px}
.unit-title{font-size:12px;font-weight:800;line-height:1.35;margin-bottom:4px}
.unit-meta{font-size:9px;color:var(--muted);display:flex;gap:7px;flex-wrap:wrap}
.unit-price-row{display:flex;justify-content:space-between;gap:10px;align-items:end;margin-top:12px}
.unit-price small{display:block;color:var(--muted);font-size:8px}
.unit-price strong{display:block;font-size:14px;margin-top:2px}
.unit-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px;padding-top:11px;border-top:1px solid #eef2f7}
.unit-footer small{color:#64748b;font-size:9px}
.segmented{
  display:inline-flex;background:#eef2f7;border-radius:10px;padding:3px;gap:2px;max-width:100%;overflow:auto;
}
.segmented button{
  border:0;background:transparent;border-radius:8px;padding:7px 10px;font-size:10px;font-weight:800;color:#64748b;cursor:pointer;white-space:nowrap;
}
.segmented button.active{background:#fff;color:#0f172a;box-shadow:0 1px 3px rgba(15,23,42,.08)}
.summary-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-bottom:16px}
.summary-item{background:#fff;padding:13px 14px}
.summary-item span{font-size:9px;color:var(--muted);display:block}
.summary-item strong{display:block;font-size:16px;margin-top:4px}
.pipeline{display:grid;grid-template-columns:repeat(4,minmax(210px,1fr));gap:12px;overflow:auto;padding-bottom:4px}
.pipeline-col{min-width:210px;background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:10px}
.pipeline-head{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:10px;font-weight:850;padding:2px 3px 9px}
.pipeline-count{width:21px;height:21px;border-radius:50%;background:#e2e8f0;display:grid;place-items:center;font-size:9px}
.pipeline-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:10px;margin-bottom:8px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.pipeline-card:last-child{margin-bottom:0}
.pipeline-card strong{display:block;font-size:10px}
.pipeline-card span{display:block;font-size:9px;color:var(--muted);margin-top:4px}
.pipeline-card footer{display:flex;justify-content:space-between;gap:8px;margin-top:9px;padding-top:8px;border-top:1px solid #eef2f7;font-size:8px;color:#64748b}
.customer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.customer-card{border:1px solid var(--line);border-radius:14px;background:#fff;padding:13px;cursor:pointer;transition:.15s ease}
.customer-card:hover{border-color:#bfdbfe;background:#fbfdff}
.customer-head{display:flex;gap:10px;align-items:center}
.customer-avatar{width:36px;height:36px;border-radius:11px;background:#e0e7ff;color:#4338ca;display:grid;place-items:center;font-size:11px;font-weight:850}
.customer-info{min-width:0}
.customer-info strong{font-size:11px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-info small{font-size:9px;color:var(--muted)}
.customer-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.customer-stat{background:#f8fafc;border-radius:9px;padding:8px}
.customer-stat span{font-size:8px;color:var(--muted);display:block}
.customer-stat strong{font-size:10px;display:block;margin-top:2px}
.finance-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:16px}
.account-list{display:grid;gap:9px}
.account-row{border:1px solid var(--line);border-radius:12px;padding:11px 12px;display:flex;justify-content:space-between;gap:12px;align-items:center}
.account-name{display:flex;align-items:center;gap:10px}
.account-icon{width:34px;height:34px;border-radius:10px;background:#eff6ff;color:#2563eb;display:grid;place-items:center}
.account-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.account-name strong{display:block;font-size:10px}
.account-name small{display:block;color:var(--muted);font-size:8px;margin-top:2px}
.account-balance{text-align:right}
.account-balance span{font-size:8px;color:var(--muted);display:block}
.account-balance strong{font-size:12px}
.approval-grid{display:grid;gap:12px}
.approval-card{border:1px solid var(--line);border-radius:14px;background:#fff;padding:14px}
.approval-top{display:flex;justify-content:space-between;gap:10px}
.approval-type{font-size:9px;color:var(--primary);font-weight:850;letter-spacing:.06em}
.approval-card h3{font-size:13px;margin:4px 0}
.approval-card p{font-size:10px;color:var(--muted);line-height:1.5;margin:7px 0}
.approval-meta{display:flex;gap:14px;flex-wrap:wrap;font-size:9px;color:#64748b;margin-top:10px}
.approval-actions{display:flex;gap:7px;margin-top:12px;padding-top:11px;border-top:1px solid #eef2f7}
.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.report-card{min-height:250px}
.bar-list{display:grid;gap:12px}
.bar-row{display:grid;grid-template-columns:110px minmax(0,1fr) 80px;gap:10px;align-items:center}
.bar-label{font-size:10px;color:#475569;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{height:8px;border-radius:999px;background:#eef2f7;overflow:hidden}
.bar-fill{height:100%;background:linear-gradient(90deg,#2563eb,#60a5fa);border-radius:999px}
.bar-value{text-align:right;font-size:9px;font-weight:750;color:#475569}
.settings-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px}
.settings-section{padding:16px}
.settings-section h2{font-size:13px;margin:0 0 4px}
.settings-section>p{font-size:10px;color:var(--muted);margin:0 0 16px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field{display:grid;gap:6px;min-width:0}
.field.full{grid-column:1/-1}
.field label{font-size:9px;font-weight:850;color:#475569}
.field-help{font-size:8px;color:var(--muted);line-height:1.4}
.password-input-wrap{position:relative;display:flex;align-items:center}
.password-input-wrap .input{width:100%;padding-right:46px}
.password-visibility-toggle{
  position:absolute;right:5px;top:50%;transform:translateY(-50%);
  width:34px;height:34px;border:0;border-radius:9px;background:transparent;
  color:#64748b;display:grid;place-items:center;cursor:pointer;
}
.password-visibility-toggle:hover{background:#f1f5f9;color:#0f172a}
.password-visibility-toggle:focus-visible{outline:3px solid rgba(37,99,235,.24);outline-offset:1px}
.password-visibility-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.switch-row{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:12px;margin-top:10px}
.switch-copy strong{display:block;font-size:10px}
.switch-copy small{display:block;color:var(--muted);font-size:8px;margin-top:3px;line-height:1.35}
.switch{position:relative;width:38px;height:22px;flex:0 0 auto}
.switch input{opacity:0;width:0;height:0}
.switch-slider{position:absolute;inset:0;border-radius:999px;background:#cbd5e1;cursor:pointer;transition:.2s}
.switch-slider::before{content:"";position:absolute;width:16px;height:16px;border-radius:50%;background:#fff;left:3px;top:3px;box-shadow:0 1px 3px rgba(0,0,0,.18);transition:.2s}
.switch input:checked+.switch-slider{background:#2563eb}
.switch input:checked+.switch-slider::before{transform:translateX(16px)}
.empty-state{text-align:center;padding:44px 20px;color:var(--muted)}
.empty-icon{width:48px;height:48px;border-radius:15px;background:#f1f5f9;color:#64748b;display:grid;place-items:center;margin:0 auto 12px}
.empty-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
.empty-state strong{display:block;color:#334155;font-size:12px}
.empty-state p{font-size:10px;max-width:360px;margin:6px auto 14px;line-height:1.5}
.modal-backdrop{
  position:fixed;inset:0;background:rgba(15,23,42,.48);backdrop-filter:blur(2px);
  z-index:100;display:grid;place-items:center;padding:20px;animation:fadeIn .14s ease;
}
.modal{
  width:min(760px,100%);max-height:min(90vh,900px);background:#fff;border-radius:18px;
  box-shadow:var(--shadow-lg);display:flex;flex-direction:column;overflow:hidden;animation:popIn .16s ease;
}
.modal.wide{width:min(980px,100%)}
.modal.narrow{width:min(540px,100%)}
.modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:17px 18px;border-bottom:1px solid var(--line)}
.modal-header h2{font-size:15px;margin:0}
.modal-header p{font-size:9px;color:var(--muted);margin:4px 0 0}
.modal-body{padding:18px;overflow:auto}
.modal-footer{display:flex;justify-content:flex-end;gap:8px;padding:13px 18px;border-top:1px solid var(--line);background:#fbfcfe}
.close-button{width:34px;height:34px;border:1px solid var(--line);background:#fff;border-radius:9px;display:grid;place-items:center;cursor:pointer}
.close-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.drawer-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:100}
.drawer{
  position:absolute;right:0;top:0;height:100%;width:min(520px,94vw);background:#fff;
  box-shadow:-20px 0 50px rgba(15,23,42,.18);display:flex;flex-direction:column;animation:slideIn .18s ease;
}
.drawer-header{padding:18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px}
.drawer-header h2{font-size:15px;margin:0}
.drawer-header p{font-size:9px;color:var(--muted);margin:4px 0 0}
.drawer-body{padding:18px;overflow:auto;flex:1}
.detail-hero{background:linear-gradient(145deg,#f1f5f9,#fff);border:1px solid var(--line);border-radius:15px;padding:18px;display:grid;grid-template-columns:150px 1fr;gap:18px;align-items:center}
.detail-car{color:#334155}
.detail-car svg{width:100%;height:auto;fill:none;stroke:currentColor;stroke-width:1.2}
.detail-hero h3{font-size:16px;margin:0 0 4px}
.detail-hero p{font-size:10px;color:var(--muted);margin:0}
.detail-price{font-size:18px;font-weight:850;margin-top:9px}
.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin-top:14px}
.detail-item{border:1px solid var(--line);border-radius:11px;padding:10px}
.detail-item span{font-size:8px;color:var(--muted);display:block}
.detail-item strong{font-size:10px;display:block;margin-top:3px;word-break:break-word}
.stepper{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin-bottom:20px}
.step{position:relative;text-align:center}
.step:not(:last-child)::after{content:"";position:absolute;height:2px;background:#e2e8f0;left:50%;right:-50%;top:14px;z-index:0}
.step.done:not(:last-child)::after{background:#93c5fd}
.step-number{position:relative;z-index:1;width:28px;height:28px;border-radius:50%;background:#e2e8f0;color:#64748b;display:grid;place-items:center;margin:0 auto;font-size:9px;font-weight:850;border:4px solid #fff}
.step.active .step-number,.step.done .step-number{background:#2563eb;color:#fff}
.step-label{font-size:8px;color:#64748b;margin-top:5px}
.wizard-section{display:none}
.wizard-section.active{display:block}
.selection-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.selection-card{border:1px solid var(--line);border-radius:12px;padding:11px;cursor:pointer;transition:.15s ease;position:relative}
.selection-card:hover{border-color:#93c5fd}
.selection-card.selected{border-color:#2563eb;background:#f8fbff;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.selection-card strong{font-size:10px;display:block}
.selection-card small{font-size:8px;color:var(--muted);display:block;margin-top:4px}
.payment-option-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.payment-option{border:1px solid var(--line);border-radius:12px;padding:12px;cursor:pointer;transition:.15s ease}
.payment-option.selected{border-color:#2563eb;background:#f8fbff}
.payment-option strong{display:block;font-size:10px}
.payment-option small{display:block;color:var(--muted);font-size:8px;margin-top:4px;line-height:1.4}
.installment-list{display:grid;gap:7px;margin-top:12px}
.installment-row{display:grid;grid-template-columns:38px 1fr 1fr auto;gap:8px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:9px}
.installment-seq{width:28px;height:28px;border-radius:8px;background:#eff6ff;color:#2563eb;display:grid;place-items:center;font-size:9px;font-weight:850}
.installment-row strong{font-size:9px}
.installment-row small{font-size:8px;color:var(--muted)}
.timeline{display:grid}
.timeline-item{display:grid;grid-template-columns:18px 1fr;gap:10px;position:relative;padding-bottom:14px}
.timeline-item:not(:last-child)::before{content:"";position:absolute;width:1px;background:#e2e8f0;left:8px;top:15px;bottom:-2px}
.timeline-dot{width:17px;height:17px;border-radius:50%;background:#dbeafe;border:4px solid #eff6ff;position:relative;z-index:1}
.timeline-item.done .timeline-dot{background:#22c55e;border-color:#dcfce7}
.timeline-item.warning .timeline-dot{background:#f59e0b;border-color:#fef3c7}
.timeline-copy strong{display:block;font-size:9px}
.timeline-copy small{display:block;font-size:8px;color:var(--muted);margin-top:3px}
.callout{border:1px solid #bfdbfe;background:#eff6ff;color:#1e40af;border-radius:11px;padding:11px 12px;font-size:9px;line-height:1.5}
.callout.warning{border-color:#fde68a;background:#fffbeb;color:#92400e}
.callout.danger{border-color:#fecaca;background:#fef2f2;color:#991b1b}
.toast-stack{position:fixed;right:20px;bottom:20px;z-index:200;display:grid;gap:8px;pointer-events:none}
.toast{
  min-width:260px;max-width:380px;background:#0f172a;color:#fff;border-radius:12px;padding:11px 13px;
  box-shadow:0 14px 35px rgba(15,23,42,.25);display:flex;gap:9px;align-items:flex-start;animation:toastIn .18s ease;
}
.toast.success{background:#14532d}
.toast.error{background:#7f1d1d}
.toast-icon{width:18px;height:18px;flex:0 0 auto}
.toast-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}
.toast strong{display:block;font-size:10px}
.toast small{display:block;font-size:8px;opacity:.8;margin-top:3px;line-height:1.4}
.loading-bar{position:fixed;left:0;top:0;height:3px;width:0;background:#2563eb;z-index:300;transition:width .2s ease,opacity .2s ease;opacity:0}
.loading-bar.active{width:72%;opacity:1}
.loading-bar.done{width:100%;opacity:0}
.skeleton{background:linear-gradient(90deg,#eef2f7 25%,#f8fafc 50%,#eef2f7 75%);background-size:200% 100%;animation:shimmer 1.2s infinite;border-radius:9px}
.loading-page{display:grid;gap:14px}
.loading-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.loading-kpis .skeleton{height:105px}
.loading-page>.skeleton{height:360px}
.mobile-overlay{display:none}
.hide{display:none!important}
.text-success{color:var(--success)}
.text-warning{color:var(--warning)}
.text-danger{color:var(--danger)}
.text-muted{color:var(--muted)}
.text-right{text-align:right}
.mt-12{margin-top:12px}
.mt-16{margin-top:16px}
.mb-0{margin-bottom:0}
.w-full{width:100%}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes popIn{from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:none}}
@keyframes slideIn{from{transform:translateX(18px);opacity:.5}to{transform:none;opacity:1}}
@keyframes toastIn{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Beginner-friendly unit intake & gallery */
.clickable-card{cursor:pointer}
.unit-photo-cover{width:100%;height:100%;object-fit:cover;display:block}
.photo-count-badge{
  position:absolute;left:10px;bottom:10px;z-index:2;
  padding:4px 7px;border-radius:999px;background:rgba(15,23,42,.78);color:#fff;
  font-size:8px;font-weight:800;backdrop-filter:blur(5px)
}
.source-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.source-choice{
  display:grid;grid-template-columns:42px minmax(0,1fr);gap:11px;align-items:center;
  border:1px solid var(--line);background:#fff;border-radius:13px;padding:12px;
  text-align:left;cursor:pointer;transition:.15s ease
}
.source-choice:hover{border-color:#bfdbfe;background:#fbfdff}
.source-choice.selected{border-color:#2563eb;background:#f8fbff;box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.source-choice-icon{
  width:42px;height:42px;border-radius:12px;display:grid;place-items:center;
  color:#2563eb;background:#eff6ff
}
.source-choice-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.source-choice strong{display:block;font-size:10px}
.source-choice small{display:block;font-size:8px;color:var(--muted);line-height:1.4;margin-top:3px}
.inline-validation{display:block;font-size:8px;margin-top:3px;font-weight:700}
.inline-validation.success{color:#15803d}
.inline-validation.error{color:#b91c1c}
.photo-upload-zone{
  border:1.5px dashed #bfdbfe;background:#f8fbff;border-radius:15px;
  padding:22px;text-align:center;display:grid;place-items:center
}
.photo-upload-zone .empty-icon{margin:0 0 9px}
.photo-upload-zone strong{font-size:11px}
.photo-upload-zone p{font-size:9px;color:var(--muted);line-height:1.45;margin:5px 0 12px;max-width:430px}
.photo-upload-zone small{font-size:8px;color:#94a3b8;margin-top:9px}
.photo-picker-label{cursor:pointer}
.photo-editor-grid,.photo-manager-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px
}
.photo-editor-card,.photo-manager-card{
  border:1px solid var(--line);border-radius:13px;background:#fff;overflow:hidden
}
.photo-editor-image{height:130px;position:relative;background:#f1f5f9;overflow:hidden}
.photo-editor-image img{width:100%;height:100%;object-fit:cover;display:block}
.photo-remove{
  position:absolute;right:7px;top:7px;width:25px;height:25px;border:0;border-radius:8px;
  background:rgba(15,23,42,.75);color:#fff;display:grid;place-items:center;cursor:pointer;font-size:16px
}
.cover-label{
  position:absolute;left:7px;bottom:7px;background:rgba(37,99,235,.9);color:#fff;
  padding:4px 7px;border-radius:999px;font-size:8px;font-weight:850
}
.photo-editor-controls{padding:9px;display:grid;gap:7px}
.compact-select{min-height:32px;padding:5px 8px;font-size:9px}
.photo-manager-meta{
  display:flex;justify-content:space-between;gap:8px;padding:8px 9px 0;
  color:#64748b;font-size:8px
}
.photo-manager-actions{padding:8px 9px 9px;display:flex;gap:6px;flex-wrap:wrap}
.empty-state.compact{padding:18px 8px}
.simple-choice-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.simple-choice{
  border:1px solid var(--line);border-radius:13px;padding:13px;background:#fff;cursor:pointer;
  display:block;transition:.15s ease
}
.simple-choice input{position:absolute;opacity:0;pointer-events:none}
.simple-choice:hover{border-color:#bfdbfe}
.simple-choice.selected,.simple-choice:has(input:checked){border-color:#2563eb;background:#f8fbff;box-shadow:0 0 0 3px rgba(37,99,235,.07)}
.simple-choice strong{display:block;font-size:10px}
.simple-choice small{display:block;font-size:8px;color:var(--muted);margin-top:4px;line-height:1.4}
.inspection-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.inspection-check{
  display:flex;gap:9px;align-items:flex-start;border:1px solid var(--line);
  border-radius:11px;padding:10px;background:#fff;cursor:pointer
}
.inspection-check input{margin-top:2px;accent-color:#2563eb}
.inspection-check strong{display:block;font-size:9px}
.inspection-check small{display:block;font-size:8px;color:var(--muted);margin-top:3px;line-height:1.35}
.cost-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cost-total-card{
  display:flex;justify-content:space-between;gap:12px;align-items:center;
  background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:12px
}
.cost-total-card span{font-size:9px;color:var(--muted)}
.cost-total-card strong{font-size:14px}
.pricing-summary{
  display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line);
  border:1px solid var(--line);border-radius:13px;overflow:hidden
}
.pricing-summary>div{background:#fff;padding:12px}
.pricing-summary span{display:block;font-size:8px;color:var(--muted)}
.pricing-summary strong{display:block;font-size:12px;margin-top:4px}
.unit-gallery{display:grid;gap:9px}
.gallery-main{
  width:100%;height:270px;border:0;padding:0;border-radius:15px;overflow:hidden;
  background:#f1f5f9;position:relative;cursor:zoom-in
}
.gallery-main img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .18s ease}
.gallery-main:hover img{transform:scale(1.012)}
.gallery-zoom-hint{
  position:absolute;right:10px;bottom:10px;background:rgba(15,23,42,.76);color:#fff;
  border-radius:999px;padding:5px 8px;font-size:8px;font-weight:800;backdrop-filter:blur(5px)
}
.gallery-thumbs{
  display:flex;gap:7px;overflow-x:auto;padding:2px 1px 5px;scrollbar-width:thin
}
.gallery-thumb{
  flex:0 0 82px;height:58px;border:2px solid transparent;padding:0;border-radius:9px;
  overflow:hidden;background:#f1f5f9;cursor:pointer;transition:.14s ease
}
.gallery-thumb:hover{border-color:#93c5fd}
.gallery-thumb.active{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.1)}
.gallery-thumb img{width:100%;height:100%;object-fit:cover;display:block}

.image-lightbox{
  position:fixed;inset:0;z-index:500;background:rgba(2,6,23,.94);display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;color:#fff;padding:18px;animation:fadeIn .14s ease
}
.lightbox-toolbar{
  display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:1500px;width:100%;margin:0 auto 10px
}
.lightbox-toolbar strong{display:block;font-size:13px}
.lightbox-toolbar small{display:block;color:#cbd5e1;font-size:10px;margin-top:3px}
.lightbox-close{
  width:40px;height:40px;border-radius:11px;border:1px solid rgba(255,255,255,.2);
  background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;cursor:pointer
}
.lightbox-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.lightbox-stage{
  min-height:0;display:grid;grid-template-columns:52px minmax(0,1fr) 52px;gap:12px;
  align-items:center;justify-items:center;max-width:1600px;width:100%;margin:auto
}
.lightbox-stage>img{
  max-width:100%;max-height:calc(100vh - 190px);object-fit:contain;border-radius:10px;
  box-shadow:0 22px 60px rgba(0,0,0,.35)
}
.lightbox-nav{
  width:44px;height:56px;border:1px solid rgba(255,255,255,.16);border-radius:12px;
  background:rgba(255,255,255,.08);color:#fff;font-size:30px;display:grid;place-items:center;
  cursor:pointer;transition:.14s ease
}
.lightbox-nav:hover{background:rgba(255,255,255,.16)}
.lightbox-thumbs{
  display:flex;gap:7px;overflow-x:auto;max-width:min(100%,1000px);width:max-content;
  margin:12px auto 0;padding:2px
}
.lightbox-thumbs button{
  width:72px;height:50px;flex:0 0 72px;padding:0;border-radius:8px;overflow:hidden;
  background:#111827;border:2px solid transparent;cursor:pointer
}
.lightbox-thumbs button.active{border-color:#60a5fa}
.lightbox-thumbs img{width:100%;height:100%;object-fit:cover;display:block}

[data-money],[data-group-number]{font-variant-numeric:tabular-nums;font-weight:650;letter-spacing:.01em}
.mb-16{margin-bottom:16px}


/* V3 professional workflow components */
.table-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.action-center-group{margin-bottom:14px}
.action-center-list{display:grid;gap:8px}
.action-center-row{
  width:100%;display:grid;grid-template-columns:105px minmax(0,1fr) auto 18px;gap:11px;align-items:center;
  border:1px solid var(--line);background:#fff;border-radius:12px;padding:11px 12px;text-align:left;cursor:pointer;transition:.14s ease
}
.action-center-row:hover{border-color:#bfdbfe;background:#fbfdff}
.action-center-row.high{border-left:3px solid #ef4444}
.action-center-type{font-size:8px;font-weight:850;color:#64748b;letter-spacing:.05em}
.action-center-copy strong{display:block;font-size:10px}.action-center-copy small{display:block;font-size:8px;color:var(--muted);margin-top:3px}
.action-center-amount{font-size:10px;font-weight:850}.action-center-go{width:14px;color:#94a3b8}
.action-center-go svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
.document-action-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.role-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.role-card{border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px;text-align:left;cursor:pointer}
.role-card:hover,.role-card.selected{border-color:#2563eb;background:#f8fbff}.role-card strong{display:block;font-size:10px}.role-card small{display:block;font-size:8px;color:var(--muted);margin-top:3px}
.backup-list{display:grid;gap:8px}.backup-row{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:10px}.backup-row strong{display:block;font-size:9px}.backup-row small{display:block;font-size:8px;color:var(--muted);margin-top:3px}
.notification-list{display:grid;gap:8px}.notification-row{display:grid;grid-template-columns:8px 1fr;gap:10px;border:1px solid var(--line);border-radius:11px;background:#fff;padding:10px;text-align:left;cursor:pointer}.notification-row strong{display:block;font-size:9px}.notification-row small{display:block;font-size:8px;color:var(--muted);margin-top:3px}.notification-row em{display:block;font-size:7px;color:#94a3b8;margin-top:5px;font-style:normal}.notification-priority{width:7px;height:7px;border-radius:50%;background:#3b82f6;margin-top:4px}.notification-priority.high{background:#ef4444}
.journey-list{display:grid}.journey-row{display:grid;grid-template-columns:16px 1fr;gap:9px;position:relative;padding-bottom:13px}.journey-row:not(:last-child)::before{content:"";position:absolute;left:7px;top:12px;bottom:0;width:1px;background:#e2e8f0}.journey-dot{width:15px;height:15px;border-radius:50%;background:#dbeafe;border:4px solid #eff6ff;position:relative;z-index:1}.journey-row strong{display:block;font-size:9px}.journey-row small{display:block;font-size:8px;color:var(--muted);margin-top:3px}


.financial-statement{display:grid;gap:0}.financial-statement>div{display:flex;justify-content:space-between;gap:20px;padding:10px 2px;border-bottom:1px solid #eef2f7}.financial-statement>div:last-child{border-bottom:0}.financial-statement span{font-size:10px;color:#64748b}.financial-statement strong{font-size:11px;text-align:right}.financial-statement.large>div{padding:13px 3px}.financial-statement.large span{font-size:11px}.financial-statement.large strong{font-size:13px}.financial-statement .subtotal{border-top:1px solid #cbd5e1;font-weight:800}.financial-statement .total{border-top:2px solid #0f172a;border-bottom:0;margin-top:4px;padding-top:14px}.financial-statement .total span,.financial-statement .total strong{font-weight:850;color:#0f172a}
.funnel-row{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.funnel-row>div{background:#f8fafc;border:1px solid var(--line);border-radius:11px;padding:11px;text-align:center;position:relative}.funnel-row>div:not(:last-child)::after{content:"→";position:absolute;right:-9px;top:50%;transform:translateY(-50%);color:#94a3b8;z-index:2}.funnel-row span{display:block;font-size:8px;color:var(--muted)}.funnel-row strong{display:block;font-size:18px;margin-top:4px}


/* Secure local authentication */
.auth-locked .app-shell{filter:blur(2px);pointer-events:none;user-select:none}
.auth-screen{
  position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:22px;
  background:radial-gradient(circle at 20% 10%,rgba(37,99,235,.18),transparent 34%),linear-gradient(145deg,#07101f,#111c30);
}
.auth-card{
  width:min(460px,100%);max-height:94vh;overflow:auto;background:#fff;border-radius:22px;padding:24px;
  box-shadow:0 35px 90px rgba(0,0,0,.36);border:1px solid rgba(255,255,255,.12)
}
.auth-brand{display:flex;align-items:center;gap:11px}.auth-brand .brand-mark{width:44px;height:44px}.auth-brand strong{display:block;font-size:13px}.auth-brand small{display:block;font-size:9px;color:var(--muted);margin-top:3px}
.auth-heading{margin:25px 0 18px}.auth-heading h1{font-size:25px;letter-spacing:-.03em;margin:0}.auth-heading p{font-size:10px;line-height:1.5;color:var(--muted);margin:6px 0 0}
.auth-help{margin-top:20px;padding-top:17px;border-top:1px solid var(--line)}.auth-help>strong{font-size:9px}.auth-help>p{font-size:8px;color:var(--muted);margin:10px 0 0}.auth-help code{background:#f1f5f9;border-radius:5px;padding:2px 5px;color:#334155}
.auth-account-list{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:9px}
.auth-account-list button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px;text-align:left;cursor:pointer}.auth-account-list button:hover{border-color:#bfdbfe;background:#f8fbff}.auth-account-list span{display:block;font-size:8px;font-weight:800}.auth-account-list small{display:block;font-size:7px;color:var(--muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis}
.auth-catalog-link{display:block;text-align:center;text-decoration:none;color:#2563eb;font-size:9px;font-weight:750;margin-top:18px}
.account-security-card{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid var(--line);border-radius:13px;background:#f8fafc}.account-security-avatar{width:42px;height:42px;border-radius:12px;background:#1d4ed8;color:#fff;display:grid;place-items:center;font-size:11px;font-weight:850}.account-security-card strong{display:block;font-size:10px}.account-security-card small{display:block;font-size:8px;color:var(--muted);margin-top:3px}


.report-period-bar{
  display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;
  margin-bottom:14px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:13px
}
.report-period-label{font-size:9px;color:var(--muted);font-weight:750}
.report-custom-range{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.report-custom-range label{display:flex;align-items:center;gap:6px;font-size:8px;font-weight:750;color:#64748b}
.report-custom-range .input{min-height:34px;padding:6px 8px;width:145px}

@media(max-width:1280px){
  .unit-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .customer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1080px){
  :root{--sidebar:222px}
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-grid,.dashboard-subgrid,.finance-grid,.settings-grid{grid-template-columns:1fr}
  .stock-summary{grid-template-columns:130px 1fr}
  .donut{width:124px;height:124px}
  .donut::after{width:82px;height:82px}
  .report-grid{grid-template-columns:1fr}
}
@media(max-width:840px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:fixed;left:0;top:0;width:252px;transform:translateX(-104%);transition:transform .2s ease;box-shadow:14px 0 40px rgba(15,23,42,.2)}
  .sidebar.open{transform:none}
  .mobile-overlay.show{display:block;position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:45}
  .mobile-menu{display:grid}
  .topbar{padding:0 14px;height:64px;gap:9px}
  .profile-copy,.branch-button{display:none}
  .command-search kbd{display:none}
  .command-search input{height:40px}
  .page-content{padding:20px 16px 34px}
  .page-header{flex-direction:column;align-items:stretch}
  .page-actions{justify-content:flex-start}
  .unit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .photo-editor-grid,.photo-manager-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .source-choice-grid,.simple-choice-row,.inspection-check-grid,.cost-grid,.role-grid,.auth-account-list{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .field.full{grid-column:auto}
}
@media(max-width:600px){
  .kpi-grid{grid-template-columns:1fr}
  .kpi-card{padding:14px}
  .kpi-value{font-size:20px}
  .unit-grid,.customer-grid,.selection-grid,.payment-option-grid,.photo-editor-grid,.photo-manager-grid{grid-template-columns:1fr}
  .pricing-summary{grid-template-columns:1fr}
  .gallery-main{height:220px}
  .gallery-thumb{flex-basis:72px;height:52px}
  .image-lightbox{padding:10px}
  .lightbox-stage{grid-template-columns:38px minmax(0,1fr) 38px;gap:6px}
  .lightbox-nav{width:36px;height:48px}
  .lightbox-stage>img{max-height:calc(100vh - 165px)}
  .summary-strip{grid-template-columns:1fr 1fr}
  .action-center-row{grid-template-columns:80px minmax(0,1fr) 16px}.action-center-amount{display:none}
  .document-action-grid{grid-template-columns:1fr}
  .funnel-row{grid-template-columns:1fr 1fr}.funnel-row>div::after{display:none}
  .report-period-bar{align-items:stretch}.report-custom-range{display:grid;grid-template-columns:1fr}.report-custom-range label{justify-content:space-between}.report-custom-range .input{width:170px}
  .stock-summary{grid-template-columns:1fr;text-align:center}
  .donut{margin:auto}
  .legend{max-width:260px;margin:auto;width:100%;text-align:left}
  .page-header h1{font-size:23px}
  .page-actions .btn{flex:1}
  .modal-backdrop{padding:0;align-items:end}
  .modal,.modal.wide,.modal.narrow{width:100%;max-height:94vh;border-radius:18px 18px 0 0}
  .drawer{width:100%}
  .detail-hero{grid-template-columns:1fr;text-align:center}
  .detail-car{max-width:160px;margin:auto}
  .detail-grid{grid-template-columns:1fr}
  .installment-row{grid-template-columns:34px 1fr auto}
  .installment-row>:nth-child(3){grid-column:2/3}
  .toolbar-search{min-width:100%;max-width:none}
  .bar-row{grid-template-columns:90px minmax(0,1fr) 64px}
  .toast-stack{left:12px;right:12px;bottom:12px}
  .toast{min-width:0;max-width:none}
}


/* Public website workspace */
.website-summary .summary-item small{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.website-config-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}
.website-config-main{min-width:0}
.website-config-side{position:sticky;top:86px}
.settings-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.settings-section-head h2{margin:0}
.settings-section-head p{margin:4px 0 0!important}
.step-chip{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 10px;border-radius:999px;background:#eef4ff;color:#2563eb;font-size:10px;font-weight:800;white-space:nowrap}
.website-readiness-head{display:flex;align-items:end;justify-content:space-between;margin:18px 0 8px}
.website-readiness-head strong{font-size:30px;line-height:1;letter-spacing:-.04em}
.website-readiness-head span{font-size:11px;color:var(--muted);font-weight:700}
.website-check-list{margin-top:14px;display:grid;gap:4px}
.website-check{display:grid;grid-template-columns:30px 1fr;gap:9px;align-items:start;padding:10px 0;border-bottom:1px solid var(--line)}
.website-check:last-child{border-bottom:0}
.website-check-icon{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#f8fafc;color:#94a3b8}
.website-check-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.website-check.done .website-check-icon{background:#eafaf0;color:#16a34a}
.website-check.pending .website-check-icon{background:#fff7e8;color:#d97706}
.website-check strong{display:block;font-size:12px}
.website-check small{display:block;margin-top:3px;color:var(--muted);font-size:10px;line-height:1.45}
.website-preview-list{display:grid;gap:8px;margin-top:15px}
.website-preview-row{width:100%;display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;text-align:left;border:1px solid var(--line);background:#fff;border-radius:11px;padding:10px 11px;color:var(--text)}
.website-preview-row:hover{border-color:#b9cff8;background:#f8fbff}
.website-preview-row>span{width:32px;height:32px;border-radius:9px;background:#eef4ff;color:#2563eb;display:grid;place-items:center}
.website-preview-row svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.website-preview-row strong{display:block;font-size:11px}
.website-preview-row small{display:block;margin-top:2px;font-size:9px;color:var(--muted)}
.website-preview-row em{font-style:normal;color:#94a3b8;font-size:15px}
.website-auto-flow{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:14px;padding:12px;border-radius:11px;background:#f8fafc;border:1px solid var(--line)}
.website-auto-flow span{font-size:9px;font-weight:800;color:#334155}
.website-auto-flow b{font-size:12px;color:#94a3b8}
.settings-note{display:block;margin-top:10px;color:var(--muted);font-size:9px;line-height:1.5}
.table-search{display:flex;align-items:center;gap:8px;width:min(310px,100%);height:38px;border:1px solid var(--line);border-radius:10px;padding:0 10px;background:#fff;color:#64748b}
.table-search svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.table-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;font-size:11px;color:var(--text)}
.callout.success{background:#effaf3;border-color:#bde8ca;color:#166534}

@media(max-width:1120px){
  .website-config-grid{grid-template-columns:1fr}
  .website-config-side{position:static;display:grid;grid-template-columns:1fr 1fr;gap:16px}
  .website-config-side .mt-16{margin-top:0}
}
@media(max-width:760px){
  .website-config-side{grid-template-columns:1fr}
  .settings-section-head{align-items:flex-start}
  .website-summary{grid-template-columns:1fr 1fr}
  .table-search{width:100%}
}
@media(max-width:520px){
  .website-summary{grid-template-columns:1fr}
  .website-auto-flow{align-items:flex-start;flex-direction:column}
  .website-auto-flow b{transform:rotate(90deg);margin-left:12px}
}


/* V5 unified UX system */
.action-task-card{border:1px solid var(--line);border-radius:13px;background:#fff;overflow:hidden}
.action-task-card.high{border-left:3px solid #ef4444}
.action-task-main{width:100%;display:grid;grid-template-columns:110px minmax(0,1fr) auto auto 22px;gap:12px;align-items:center;border:0;background:transparent;padding:14px 15px;text-align:left;color:var(--text)}
.action-task-main:hover{background:#f8fbff}
.action-center-copy em{display:block;margin-top:4px;font-style:normal;font-size:10px;color:#64748b;line-height:1.45}
.task-due{font-size:10px;font-weight:800;border-radius:999px;padding:5px 8px;background:#f1f5f9;color:#475569;white-space:nowrap}
.task-due.overdue{background:#fff0f0;color:#b91c1c}
.task-due.today{background:#fff7e8;color:#b45309}
.task-due.upcoming{background:#eef6ff;color:#1d4ed8}
.task-quick-actions{display:flex;justify-content:flex-end;gap:7px;padding:0 15px 12px 137px}
.action-center-list{display:grid;gap:8px}
.action-group-overdue .card-title{color:#b91c1c}

.business-warning{display:grid;grid-template-columns:36px 1fr auto;gap:12px;align-items:center;border:1px solid #fde68a;background:#fffbeb;border-radius:13px;padding:12px 14px;margin-bottom:16px}
.business-warning.danger{border-color:#fecaca;background:#fff5f5}
.business-warning>span{width:34px;height:34px;border-radius:10px;background:#fff;display:grid;place-items:center;color:#d97706}
.business-warning.danger>span{color:#dc2626}
.business-warning svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.business-warning strong{display:block;font-size:12px}.business-warning p{margin:3px 0 0;font-size:10px;color:#64748b}

.unit-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.stock-health{display:inline-flex;padding:3px 6px;border-radius:999px;font-size:7px;font-weight:800;white-space:nowrap}
.stock-health.warning{background:#fff3e6;color:#c2410c}
.unit-recommendation{margin-top:9px;padding:8px 9px;border-radius:9px;background:#fff8eb;color:#9a5a09;font-size:8px;line-height:1.45;border:1px solid #fde4ad}

.sales-journey-strip{display:grid;grid-template-columns:repeat(5,1fr);border:1px solid var(--line);background:#fff;border-radius:13px;margin-bottom:16px;overflow:hidden}
.sales-journey-strip>div{position:relative;padding:11px 12px 11px 42px;border-right:1px solid var(--line)}
.sales-journey-strip>div:last-child{border-right:0}
.journey-step-number{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:22px;height:22px;border-radius:50%;background:#eef4ff;color:#2563eb;display:grid;place-items:center;font-size:9px;font-weight:900}
.sales-journey-strip small{display:block;font-size:8px;color:#64748b}.sales-journey-strip strong{display:block;font-size:14px;margin-top:2px}
.pipeline-head>div small{display:block;font-size:8px;color:#94a3b8;margin-top:2px}
.readiness-ok{color:#15803d;font-weight:800;font-size:9px}.readiness-warn{color:#b45309;font-weight:800;font-size:9px}

.source-pill{display:inline-flex;padding:4px 7px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:8px;font-weight:800}
.customer-card-action{margin-top:12px;padding-top:10px;border-top:1px solid var(--line);font-size:9px;font-weight:800;color:#2563eb}
.lead-primary-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}

.mini-steps{display:flex;gap:4px;align-items:flex-start;margin-top:7px;max-width:330px}
.mini-steps span{position:relative;flex:1;min-width:0;text-align:center;color:#cbd5e1;font-size:8px;font-weight:900}
.mini-steps span:after{content:"";position:absolute;top:5px;left:58%;right:-42%;height:2px;background:#e2e8f0}
.mini-steps span:last-child:after{display:none}.mini-steps span.done{color:#16a34a}.mini-steps span.current{color:#2563eb}
.mini-steps span.done:after{background:#86efac}.mini-steps small{display:block;margin-top:5px;font-size:6.5px;font-weight:600;color:#94a3b8;line-height:1.2}
.supplier-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.supplier-card{display:grid;grid-template-columns:42px 1fr;gap:12px;border:1px solid var(--line);border-radius:13px;background:#fff;padding:14px}
.supplier-icon{width:40px;height:40px;border-radius:11px;background:#eef4ff;color:#2563eb;display:grid;place-items:center}
.supplier-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.supplier-card strong{font-size:11px}.supplier-card small{display:block;color:#64748b;font-size:8px;margin-top:3px}
.supplier-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:7px;border-top:1px solid var(--line);padding-top:10px}
.supplier-stats span{padding:8px;border-radius:9px;background:#f8fafc}.supplier-stats strong{display:block;margin-top:2px}

.account-problem{border-color:#fecaca!important;background:#fff7f7!important}
.finance-account-actions{display:flex;justify-content:flex-end;gap:8px;margin-bottom:12px}
.receivable-aging{margin-bottom:14px}

.approval-guide{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start;border:1px solid #dbeafe;background:#f5f9ff;border-radius:12px;padding:11px 13px;margin-bottom:14px}
.approval-guide>span{color:#2563eb}.approval-guide svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.approval-guide strong{font-size:10px}.approval-guide p{font-size:9px;color:#64748b;margin:3px 0 0}
.approval-impact{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.approval-impact.single{grid-template-columns:1fr}
.approval-impact>div{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:9px}
.approval-impact span{display:block;font-size:8px;color:#64748b}.approval-impact strong{display:block;font-size:10px;margin-top:3px}
.approval-comment{margin-top:10px;padding:9px 10px;border-radius:9px;background:#f8fafc}.approval-comment strong{font-size:9px}.approval-comment p{font-size:9px;margin:3px 0 0;color:#475569}

.business-trend{height:180px;display:grid;grid-template-columns:repeat(6,1fr);gap:10px;align-items:end;padding:10px 2px 0}
.trend-month{height:100%;display:grid;grid-template-rows:1fr auto;gap:6px;align-items:end;text-align:center}
.trend-bars{height:145px;display:flex;align-items:flex-end;justify-content:center;gap:4px}
.trend-bars i,.trend-bars b{display:block;width:12px;border-radius:4px 4px 1px 1px;min-height:4px}
.trend-bars i{background:#2563eb}.trend-bars b{background:#22c55e}
.trend-month span{font-size:8px;color:#64748b}.trend-legend{display:flex;gap:15px;margin-top:8px;font-size:8px;color:#64748b}
.trend-legend i,.trend-legend b{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:4px}.trend-legend i{background:#2563eb}.trend-legend b{background:#22c55e}

.backup-integrity{display:inline-flex;margin-top:5px;padding:3px 7px;border-radius:999px;font-size:8px;font-weight:800}
.backup-integrity.ok{background:#ecfdf3;color:#15803d}.backup-integrity.legacy{background:#fff7e8;color:#b45309}.backup-integrity.bad{background:#fff0f0;color:#b91c1c}

@media(max-width:1200px){
  .action-task-main{grid-template-columns:90px minmax(0,1fr) auto 22px}.action-center-amount{display:none}.task-quick-actions{padding-left:117px}
  .sales-journey-strip{grid-template-columns:repeat(5,minmax(100px,1fr));overflow:auto}
}
@media(max-width:900px){
  .supplier-grid{grid-template-columns:1fr}
  .approval-impact{grid-template-columns:1fr}
  .lead-primary-actions{grid-template-columns:1fr}
  .action-task-main{grid-template-columns:1fr auto}.action-center-type,.action-center-go{display:none}.action-center-copy{grid-column:1}.task-due{grid-column:2;grid-row:1}.task-quick-actions{padding:0 12px 12px}
}
@media(max-width:640px){
  .business-warning{grid-template-columns:34px 1fr}.business-warning .btn{grid-column:1/-1;width:100%}
  .sales-journey-strip{grid-template-columns:repeat(5,130px)}
  .finance-account-actions{flex-direction:column}.finance-account-actions .btn{width:100%}
  .supplier-stats{grid-template-columns:1fr}
}


/* V5.2.1 usability hardening */
.smart-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.toolbar-grow{flex:1 1 auto}
.toolbar-search.compact{width:min(330px,100%);min-width:220px}
.toolbar-select{width:auto;min-width:150px;height:40px;padding-right:34px}
.table-result-count{font-size:11px;font-weight:800;color:var(--muted);white-space:nowrap}
.table-empty-row td{padding:0!important}
.table-empty-row .empty-state{min-height:150px;border:0;border-radius:0;background:transparent}
.approval-type{text-transform:none!important;letter-spacing:.02em!important}
.approval-impact{grid-template-columns:repeat(3,minmax(0,1fr))}
.approval-impact.single{grid-template-columns:1fr}
.approval-impact>div{min-width:0}
.approval-impact strong{overflow-wrap:anywhere}
.business-warning .btn{margin-left:auto;white-space:nowrap}

@media(max-width:900px){
  .smart-toolbar{align-items:stretch}
  .smart-toolbar .segmented{width:100%;overflow:auto}
  .toolbar-grow{display:none}
  .toolbar-search.compact{width:100%}
  .toolbar-select{width:100%}
  .approval-impact{grid-template-columns:1fr}
}


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


/* V5.2.4 guided CRM + sales performance */
.lead-pipeline{margin:16px 0}
.pipeline-flow{display:flex;align-items:center;gap:8px;overflow:auto;padding:4px 2px 2px}
.pipeline-flow>b{color:var(--subtle);font-weight:700}
.pipeline-stage{min-width:120px;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:10px 12px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;cursor:pointer;text-align:left}
.pipeline-stage>span{width:24px;height:24px;border-radius:8px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-size:10px;font-weight:800}
.pipeline-stage>strong{font-size:11px;white-space:nowrap}
.pipeline-stage>em{font-style:normal;font-weight:800;font-size:12px}
.pipeline-stage:hover,.pipeline-stage.active{border-color:#93c5fd;background:#f8fbff}
.sales-person-list{display:grid;gap:8px;margin-top:12px}
.sales-person-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.sales-person-row:last-child{border-bottom:0}
.sales-person-row>div{display:flex;align-items:center;gap:10px}
.sales-person-row>div:first-child{display:grid;gap:3px}
.sales-person-row strong{font-size:12px}
.sales-person-row small,.sales-person-row span{font-size:10px;color:var(--muted)}
.muted-row{opacity:.55}
.rank-pill{width:24px;height:24px;border-radius:8px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-size:10px;font-weight:800}
.target-cell{min-width:110px}
.target-cell>strong{font-size:11px}
.target-cell>.progress-track{margin:5px 0 3px}
.target-cell>small{font-size:9px;color:var(--muted)}
.settings-divider{height:1px;background:var(--line);margin:20px 0}
.detail-primary-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:760px){
  .pipeline-flow{padding-bottom:8px}
  .pipeline-stage{min-width:112px}
  .sales-person-row{align-items:flex-start}
  .sales-person-row>div:last-child{display:grid;justify-items:end}
  .detail-primary-actions{grid-template-columns:1fr}
}


/* V5.2.5 website slideshow, inbox and map controls */
.website-inbox-banner{
  display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;
  margin:0 0 16px;padding:14px 16px;border:1px solid #bfdbfe;border-radius:14px;background:#eff6ff
}
.website-inbox-banner-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#dbeafe;color:#1d4ed8}
.website-inbox-banner-icon svg{width:19px;height:19px}
.website-inbox-banner strong{display:block;font-size:13px;color:#0f2747}
.website-inbox-banner small{display:block;margin-top:3px;color:#5c708c;line-height:1.45}
.inline-link{border:0;background:transparent;padding:0;color:#2563eb;font:inherit;font-weight:750;cursor:pointer}
.inline-link:hover{text-decoration:underline}

.site-slide-manager{margin-top:16px}
.site-slide-upload{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:16px;border:1px dashed #b9cbe1;border-radius:14px;background:#f8fbff
}
.site-slide-upload strong{display:block;font-size:13px;color:#10243f}
.site-slide-upload p{margin:4px 0 0;color:#687b94;font-size:11px;line-height:1.5}
.site-slide-upload .btn{position:relative;flex:0 0 auto;cursor:pointer}
.site-slide-workspace{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px;margin-top:16px}
.site-slide-thumbs{display:flex;flex-direction:column;gap:9px;max-height:560px;overflow:auto;padding-right:3px}
.site-slide-thumb{
  display:grid;grid-template-columns:76px 1fr auto;gap:10px;align-items:center;width:100%;padding:7px;
  border:1px solid #dfe7f1;border-radius:12px;background:#fff;text-align:left;cursor:pointer
}
.site-slide-thumb:hover{border-color:#a8c2e2;background:#fbfdff}
.site-slide-thumb.active{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.site-slide-thumb img{width:76px;height:52px;object-fit:cover;border-radius:8px;background:#e8eef5}
.site-slide-thumb span{font-size:11px;font-weight:800;color:#18304f}
.site-slide-thumb em{font-style:normal;font-size:9px;color:#64748b}
.site-slide-thumb.active em{color:#1d4ed8}
.site-slide-empty{padding:20px 14px;border:1px dashed #d7e1ee;border-radius:12px;background:#fbfcfe;color:#64748b}
.site-slide-empty strong{display:block;color:#24364e;font-size:12px}.site-slide-empty p{font-size:10px;line-height:1.55;margin:5px 0 0}
.site-slide-editor{border:1px solid #dfe7f1;border-radius:14px;background:#fff;overflow:hidden}
.site-slide-editor.empty{display:grid;place-items:center;min-height:220px}
.site-slide-editor-preview{height:245px;background:#e9eff6}
.site-slide-editor-preview img{width:100%;height:100%;object-fit:cover;display:block}
.site-slide-editor>.form-grid{padding:16px}
.site-slide-editor-actions{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-top:1px solid #edf1f6;background:#fafcff
}
.site-slide-editor-actions>div{display:flex;gap:8px;flex-wrap:wrap}
.input-with-suffix{display:flex;align-items:center;gap:8px}
.input-with-suffix .input{max-width:120px}.input-with-suffix span{font-size:11px;color:#66778e}
.location-save-state{
  display:flex;gap:10px;align-items:center;padding:12px;border:1px solid #dbe4ef;border-radius:12px;background:#f8fafc;color:#66778e
}
.location-save-state svg{width:20px;height:20px;flex:0 0 20px}
.location-save-state strong{display:block;color:#263a55;font-size:11px}
.location-save-state small{display:block;margin-top:2px;font-size:10px}
.location-save-state.success{border-color:#bbecd2;background:#f1fcf6;color:#16824a}
.location-save-state.success strong{color:#17663f}
.location-save-state.pending{border-style:dashed}
.location-action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}
.location-action-row .btn svg{width:15px;height:15px}
.btn.full{width:100%;justify-content:center}

.website-message-new td{background:#f5f9ff}
.website-message-new td:first-child{box-shadow:inset 3px 0 0 #2563eb}
.website-message-preview{max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.message-detail{display:grid;gap:15px}
.message-detail-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.message-detail-meta>div,.message-detail-subject{padding:12px;border:1px solid #e3e9f1;border-radius:12px;background:#fbfcfe}
.message-detail-meta span,.message-detail-subject span{display:block;font-size:9px;color:#77879b;margin-bottom:4px}
.message-detail-meta strong,.message-detail-subject strong{font-size:11px;color:#203650}
.message-detail-body{padding:16px;border:1px solid #dce5ef;border-radius:12px;background:#fff;font-size:12px;line-height:1.65;color:#263a55;min-height:100px}
.drawer-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}

@media(max-width:1050px){
  .site-slide-workspace{grid-template-columns:1fr}
  .site-slide-thumbs{flex-direction:row;max-height:none;overflow:auto}
  .site-slide-thumb{min-width:190px;grid-template-columns:70px 1fr}
  .site-slide-thumb em{grid-column:2}
}
@media(max-width:760px){
  .website-inbox-banner{grid-template-columns:auto 1fr}.website-inbox-banner .btn{grid-column:1/-1;width:100%}
  .site-slide-upload{align-items:flex-start;flex-direction:column}
  .site-slide-editor-preview{height:190px}
  .site-slide-editor-actions{align-items:stretch;flex-direction:column}
  .site-slide-editor-actions>div{width:100%}.site-slide-editor-actions .btn{flex:1}
  .message-detail-meta{grid-template-columns:1fr 1fr}
}


/* V5.2.6 canonical showroom identity */
.brand-mark.has-logo{background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.18);overflow:hidden}
.brand-logo-image{width:100%;height:100%;object-fit:contain;padding:5px;border-radius:11px;background:#fff}
.settings-brand-editor{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;
  padding:16px;border:1px solid #dfe7f1;border-radius:14px;background:linear-gradient(180deg,#fbfdff,#f7faff);margin:14px 0 16px
}
.settings-brand-preview{display:flex;align-items:center;gap:14px;min-width:0}
.settings-brand-logo,.settings-brand-logo-fallback{
  width:64px;height:64px;border-radius:14px;border:1px solid #dbe4ef;background:#fff;object-fit:contain;display:grid;place-items:center;flex:0 0 auto
}
.settings-brand-logo{padding:6px}
.settings-brand-logo-fallback{background:linear-gradient(145deg,#2563eb,#4f46e5);color:#fff}
.settings-brand-logo-fallback svg{width:30px;height:30px;stroke:currentColor;fill:none}
.settings-brand-preview strong{display:block;font-size:16px;color:#10243f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.settings-brand-preview small{display:block;margin-top:4px;font-size:10px;color:#6b7c92}
.settings-brand-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.settings-brand-actions small{flex-basis:100%;text-align:right;font-size:9px;color:#7b8ba0}
.website-brand-sync{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px;border:1px solid #dfe7f1;border-radius:13px;background:#f8fbff
}
.website-brand-sync-preview{display:flex;align-items:center;gap:12px;min-width:0}
.website-brand-sync-preview img,.website-brand-sync-fallback{
  width:54px;height:54px;border-radius:12px;border:1px solid #dbe4ef;background:#fff;object-fit:contain;padding:5px;flex:0 0 auto
}
.website-brand-sync-fallback{display:grid;place-items:center;background:linear-gradient(145deg,#2563eb,#4f46e5);color:#fff}
.website-brand-sync-fallback svg{width:25px;height:25px;stroke:currentColor;fill:none}
.website-brand-sync-preview strong{display:block;font-size:13px;color:#17304f}
.website-brand-sync-preview small{display:block;font-size:9px;color:#6f8198;margin-top:3px}

@media(max-width:760px){
  .settings-brand-editor{grid-template-columns:1fr}
  .settings-brand-actions{justify-content:flex-start}
  .settings-brand-actions small{text-align:left}
  .website-brand-sync{align-items:flex-start;flex-direction:column}
  .website-brand-sync .btn{width:100%}
}


/* V5.3 finance cockpit, handover controls, and per-user access */
.finance-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.finance-attention-strip{
  display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:center;
  border:1px solid #dfe7f1;border-radius:13px;background:#fff;padding:12px 14px;margin-bottom:14px
}
.finance-attention-strip>div{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center}
.finance-attention-strip strong{font-size:11px;color:#17304f}
.finance-attention-strip small{grid-column:2;font-size:9px;color:#718197;margin-top:2px}
.attention-dot{width:9px;height:9px;border-radius:50%;background:#94a3b8;grid-row:1/3}
.attention-dot.danger{background:#ef4444}.attention-dot.amber{background:#f59e0b}
.table-result-count{font-size:10px;color:#6f8198;white-space:nowrap}

.finance-managed-accounts .account-row{padding:13px 14px}
.account-inactive{opacity:.62;background:#f8fafc}
.account-edit-link{border:0;background:transparent;color:#2563eb;font-size:9px;font-weight:700;padding:4px 0;cursor:pointer}
.account-edit-link:hover{text-decoration:underline}

.access-user-list{display:grid;gap:8px;margin-top:12px}
.access-user-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 11px;border:1px solid #e1e8f1;border-radius:11px;background:#fbfcfe
}
.access-user-main{display:flex;align-items:center;gap:9px;min-width:0}
.access-avatar{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#eef4ff;color:#2563eb;font-size:10px;font-weight:800;flex:0 0 auto}
.access-user-main strong{display:block;font-size:10.5px;color:#18314f}
.access-user-main small{display:block;font-size:8.5px;color:#728198;margin-top:2px}
.access-user-meta{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;font-size:8.5px;color:#718197}
.access-editor{display:grid;gap:18px}
.access-editor-section{border:1px solid #e1e8f1;border-radius:13px;padding:14px;background:#fbfcfe}
.access-editor-section>h3{margin:0;color:#17304f;font-size:13px}
.access-editor-section>p{margin:4px 0 12px;color:#718197;font-size:10px;line-height:1.5}
.access-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.access-check{
  display:flex;align-items:flex-start;gap:9px;padding:10px;border:1px solid #e3e9f1;border-radius:10px;background:#fff;cursor:pointer
}
.access-check:hover{border-color:#bfd0e7}
.access-check.sensitive{background:#fffaf2;border-color:#f4dfb3}
.access-check input{margin-top:2px;accent-color:#2563eb}
.access-check strong{display:block;font-size:10px;color:#203650;line-height:1.35}
.access-check small{display:block;margin-top:2px;font-size:8.5px;color:#7b899c;line-height:1.4}
.access-permission-group+ .access-permission-group{margin-top:14px}
.access-permission-group h4{margin:0 0 7px;font-size:10px;color:#50657e;text-transform:uppercase;letter-spacing:.45px}

.delivery-check-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 11px;border:1px solid #e1e8f1;border-radius:10px;background:#fbfcfe}
.delivery-check-legend small{font-size:9px;color:#718197;margin-right:8px}
.inspection-check.required-check{border-color:#cbd9ed;background:#fbfdff}
.inspection-check.optional-check{background:#fff}
.inspection-check strong em{font-style:normal;font-size:7.5px;font-weight:700;color:#7b899c;margin-left:5px;text-transform:uppercase;letter-spacing:.35px}
.inspection-check strong .required-mark{color:#b42318}
.inspection-check input:disabled{opacity:1}

@media(max-width:1050px){
  .finance-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .finance-attention-strip{grid-template-columns:1fr 1fr}
  .finance-attention-strip>.btn{grid-column:1/-1;justify-self:start}
}
@media(max-width:760px){
  .finance-kpi-grid,.access-check-grid,.finance-attention-strip{grid-template-columns:1fr}
  .access-user-row{align-items:flex-start;flex-direction:column}
  .access-user-meta{justify-content:flex-start}
  .finance-attention-strip>.btn{grid-column:auto;width:100%}
}


/* V5.3 finance account integrity UX */
.account-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:180px}
.account-row-actions .account-balance{min-width:110px}
.account-manage-button{flex:0 0 auto}
.finance-account-lock{
  display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start;
  margin-bottom:14px;padding:11px 12px;border:1px solid #f2d7a7;border-radius:12px;background:#fffaf0
}
.finance-account-lock>span{width:32px;height:32px;border-radius:9px;background:#fff3d6;color:#b7791f;display:grid;place-items:center}
.finance-account-lock svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.finance-account-lock strong{display:block;font-size:10.5px;color:#6b4b12}
.finance-account-lock small{display:block;margin-top:3px;font-size:8.8px;line-height:1.5;color:#806b45}
.finance-account-current{display:grid;gap:4px;padding:12px;border:1px solid #dfe7f1;border-radius:11px;background:#f8fbff}
.finance-account-current span{font-size:8.5px;color:#708198}
.finance-account-current strong{font-size:16px;color:#18314f}
.finance-account-current small{font-size:8.5px;color:#73849a;line-height:1.5}
.finance-history-stack{display:grid;grid-template-columns:1fr;gap:16px}
.finance-history-stack .data-table{min-width:0}
.finance-history-stack .table-wrap{overflow-x:auto}
#financialAccountForm input:disabled,#financialAccountForm select:disabled{background:#f3f6fa;color:#65768c;cursor:not-allowed}

@media(max-width:760px){
  .account-row{align-items:flex-start}
  .account-row-actions{min-width:auto;flex-direction:column;align-items:flex-end;gap:7px}
  .account-manage-button{width:100%}
}


/* V5.3 team and portable recovery UX */
.access-user-row{align-items:flex-start}
.access-user-main{flex:1 1 auto;align-items:flex-start}
.access-user-copy{min-width:0}
.access-user-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.access-user-title>strong{font-size:11px!important}
.access-user-side{display:grid;justify-items:end;gap:9px;min-width:210px}
.access-user-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.user-task-pills{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}
.user-task-pills span{display:inline-flex;padding:3px 6px;border-radius:999px;background:#eef4ff;color:#315f9c;font-size:7.5px;font-weight:750}
.role-preview{border:1px solid #dfe7f2;border-radius:11px;background:#f8fbff;padding:11px 12px}
.role-preview strong{display:block;font-size:11px;color:#17304f}
.role-preview p{margin:4px 0 0;color:#6f8198;font-size:9px;line-height:1.5}
.credential-card{display:flex;align-items:center;gap:11px;border:1px solid #cce8d8;background:#f2fbf6;border-radius:12px;padding:12px}
.credential-card>span{width:34px;height:34px;border-radius:10px;background:#dff6e8;color:#17804e;display:grid;place-items:center}
.credential-card svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.credential-card strong{display:block;font-size:11px;color:#17304f}
.credential-card small{display:block;margin-top:3px;font-size:8.5px;color:#648071}
.credential-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.backup-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.backup-overview>div{border:1px solid #e1e8f1;border-radius:11px;background:#f8fafc;padding:10px 11px}
.backup-overview span{display:block;font-size:8px;color:#74859a}
.backup-overview strong{display:block;margin-top:4px;font-size:12px;color:#17304f}
.backup-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.backup-action-card{display:grid;grid-template-columns:36px 1fr;gap:10px;align-items:center;border:1px solid #dfe7f2;background:#fff;border-radius:12px;padding:12px;text-align:left;color:#1f334d;cursor:pointer}
.backup-action-card:hover{border-color:#a9c5f8;background:#f8fbff}
.backup-action-card.primary{border-color:#b9cff8;background:#f3f7ff}
.backup-action-card.disabled{opacity:.6;pointer-events:none}
.backup-action-card>span{width:34px;height:34px;border-radius:10px;background:#eef4ff;color:#2563eb;display:grid;place-items:center}
.backup-action-card svg,.backup-file-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.backup-action-card strong{display:block;font-size:10.5px}
.backup-action-card small{display:block;margin-top:3px;color:#718197;font-size:8.5px;line-height:1.4}
.backup-row{padding:11px 12px}
.backup-row-main{display:flex;align-items:flex-start;gap:10px;min-width:0}
.backup-file-icon{width:34px;height:34px;border-radius:10px;background:#f1f5f9;color:#4c6688;display:grid;place-items:center;flex:0 0 auto}
.backup-row-main>div:last-child{min-width:0}
.backup-row-main strong{overflow-wrap:anywhere}
.backup-row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.backup-invalid{background:#fff8f8;border-color:#f3caca}

@media(max-width:760px){
  .access-user-side{min-width:0;width:100%;justify-items:start}
  .access-user-meta,.access-user-actions{justify-content:flex-start}
  .backup-overview,.backup-action-grid{grid-template-columns:1fr}
  .backup-row{align-items:flex-start;flex-direction:column}
  .backup-row-actions{width:100%;justify-content:stretch}
  .backup-row-actions .btn{flex:1}
  .credential-copy{grid-template-columns:1fr}
}


/* V5.3 backup recovery UX */
.backup-action-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.backup-guide{display:flex;align-items:center;gap:8px;border:1px solid #dce7f4;background:#f8fbff;border-radius:11px;padding:10px 12px}
.backup-guide strong{font-size:9px;color:#17304f}
.backup-guide span{font-size:8.5px;color:#657891;line-height:1.45}
.backup-section-heading{display:flex;justify-content:space-between;gap:12px;align-items:end}
.backup-section-heading strong{display:block;font-size:11px;color:#17304f}
.backup-section-heading small{display:block;margin-top:3px;font-size:8.5px;color:#718197}
.backup-row-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.backup-recommended{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#eaf2ff;color:#245fc5;font-size:7.5px;font-weight:850}
.backup-detail-hero,.backup-restore-target{display:flex;align-items:center;gap:11px;border:1px solid #dfe7f2;background:#f8fafc;border-radius:13px;padding:13px}
.backup-detail-hero>span,.backup-restore-target>span{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#eef4ff;color:#2563eb;flex:0 0 auto}
.backup-detail-hero svg,.backup-restore-target svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.backup-detail-hero strong,.backup-restore-target strong{display:block;font-size:11px;color:#17304f}
.backup-detail-hero small,.backup-restore-target small{display:block;margin-top:3px;font-size:8.5px;color:#718197}
.backup-detail-summary{border:1px solid #e1e8f1;border-radius:11px;padding:11px 12px}
.backup-detail-summary>strong{display:block;font-size:9px;color:#17304f}
.backup-detail-summary>div{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.backup-detail-summary span{display:inline-flex;padding:4px 7px;border-radius:999px;background:#f1f5f9;color:#52657d;font-size:8px;font-weight:750}
.backup-technical{border:1px solid #e1e8f1;border-radius:11px;background:#fbfcfe;padding:10px 11px}
.backup-technical summary{cursor:pointer;font-size:8.5px;font-weight:800;color:#52657d}
.backup-technical>div{display:grid;gap:5px;margin-top:10px}
.backup-technical span{font-size:7.5px;color:#8694a7}
.backup-technical code{display:block;overflow-wrap:anywhere;padding:6px 7px;border-radius:7px;background:#f1f5f9;color:#40536b;font-size:7.5px}
.backup-restore-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.backup-restore-grid>div{border:1px solid #e1e8f1;border-radius:10px;background:#fff;padding:9px;text-align:center}
.backup-restore-grid span{display:block;font-size:7.5px;color:#7b899b}
.backup-restore-grid strong{display:block;margin-top:3px;font-size:12px;color:#17304f}
@media(max-width:900px){
  .backup-action-grid-three{grid-template-columns:1fr}
  .backup-restore-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .backup-guide{align-items:flex-start;flex-direction:column}
  .backup-row-title{align-items:flex-start}
  .backup-restore-grid{grid-template-columns:1fr 1fr}
}


/* V5.3.1 cohesive backup, recovery audit, settings navigation and retention UX */
.settings-tabs{
  display:flex;gap:8px;align-items:center;overflow:auto;margin-bottom:16px;padding:5px;
  border:1px solid var(--line);border-radius:13px;background:#f8fafc
}
.settings-tabs button{
  flex:0 0 auto;border:0;background:transparent;color:#64748b;border-radius:9px;padding:9px 12px;
  font-size:10px;font-weight:800;cursor:pointer;white-space:nowrap
}
.settings-tabs button:hover{background:#fff;color:#334155}
.settings-tabs button.active{background:#fff;color:#1d4ed8;box-shadow:0 1px 4px rgba(15,23,42,.09)}
.settings-workspace{display:block;max-width:1180px}
.settings-tab-panel{display:none}
.settings-tab-panel.active{display:block}
.settings-tab-stack{display:grid;gap:16px}
.settings-focused-card{min-height:180px}
.settings-backup-actions{display:flex;gap:9px;flex-wrap:wrap}
.settings-danger-zone{border-color:#f0d4d4;background:#fffafa}
.settings-danger-zone h2{color:#991b1b}

.backup-source-badge{
  display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;font-size:7.5px;font-weight:850;white-space:nowrap
}
.backup-source-badge.system{background:#eef4ff;color:#255fbd}
.backup-source-badge.imported{background:#f2f0ff;color:#6552b8}
.backup-source-badge.safety{background:#fff7e8;color:#a85c0a}
.backup-list{max-height:390px;overflow:auto;padding-right:2px}
.backup-import-ready{
  border:1px solid #d8e7de;background:#f5fbf7;border-radius:11px;padding:11px 12px
}
.backup-import-ready p{margin:7px 0 0;color:#5f7468;font-size:9px;line-height:1.5}
.backup-restore-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.restore-success-hero{
  display:flex;align-items:center;gap:12px;border:1px solid #cce8d8;background:#f2fbf6;border-radius:13px;padding:14px
}
.restore-success-hero>span{
  width:40px;height:40px;border-radius:12px;background:#dff6e8;color:#17804e;display:grid;place-items:center;flex:0 0 auto
}
.restore-success-hero svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2.2}
.restore-success-hero strong{display:block;font-size:12px;color:#14532d}
.restore-success-hero small{display:block;margin-top:3px;font-size:8.5px;color:#5c7767}

.recovery-audit-card{margin:14px 0}
.recovery-audit-list{display:grid}
.recovery-audit-row{
  display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0;border-top:1px solid var(--line)
}
.recovery-audit-row:first-child{border-top:0}
.recovery-audit-row strong{display:block;font-size:10px;color:#24364e}
.recovery-audit-row small{display:block;margin-top:3px;font-size:8px;color:var(--muted);overflow-wrap:anywhere}
.recovery-audit-row>div:last-child{text-align:right}
.recovery-audit-row span,.recovery-audit-row time{display:block;font-size:8px;color:#6b7c92}

@media(max-width:760px){
  .settings-tabs{margin-left:-2px;margin-right:-2px}
  .settings-backup-actions{display:grid;grid-template-columns:1fr}
  .settings-backup-actions .btn{width:100%}
  .backup-restore-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .recovery-audit-row{align-items:flex-start;flex-direction:column;gap:5px}
  .recovery-audit-row>div:last-child{text-align:left}
}


/* V5.4 vehicle master + focal point controls */
.vehicle-master-banner{
  display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;
  border:1px solid #bfdbfe;background:#f8fbff;border-radius:14px;padding:12px 13px;
}
.vehicle-master-icon{
  width:44px;height:44px;border-radius:12px;background:#eaf2ff;color:#2563eb;
  display:grid;place-items:center;
}
.vehicle-master-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
.vehicle-master-banner strong{display:block;font-size:11px}
.vehicle-master-banner p{margin:3px 0 0;color:#64748b;font-size:9px;line-height:1.45}
.master-badge{
  padding:5px 8px;border-radius:999px;background:#dbeafe;color:#1d4ed8;
  font-size:8px;font-weight:850;white-space:nowrap;
}
.vehicle-master-status{
  border:1px dashed #cbd5e1;border-radius:11px;background:#f8fafc;padding:9px 11px;
  display:flex;justify-content:space-between;gap:12px;align-items:center;
}
.vehicle-master-status strong{font-size:9px;color:#334155}
.vehicle-master-status span{font-size:8px;color:#64748b;text-align:right}
.vehicle-master-status.matched{border-style:solid;border-color:#bbf7d0;background:#f0fdf4}
.vehicle-master-status.matched strong{color:#15803d}
.vehicle-master-status.manual{border-style:solid;border-color:#fde68a;background:#fffbeb}
.vehicle-master-status.manual strong{color:#a16207}

.slide-focus-row{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;
  border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:11px 12px;margin:12px 0;
}
.slide-focus-row strong{display:block;font-size:10px}
.slide-focus-row small{display:block;font-size:8px;color:var(--muted);margin-top:3px;line-height:1.4}
.slide-focus-grid{
  display:grid;grid-template-columns:repeat(3,24px);grid-template-rows:repeat(3,24px);gap:4px;
  padding:6px;border-radius:10px;background:#e2e8f0;
}
.slide-focus-point{
  width:24px;height:24px;border:1px solid #cbd5e1;background:#fff;border-radius:7px;
  display:grid;place-items:center;cursor:pointer;padding:0;
}
.slide-focus-point span{width:6px;height:6px;border-radius:50%;background:#94a3b8}
.slide-focus-point:hover{border-color:#93c5fd}
.slide-focus-point.active{border-color:#2563eb;background:#eff6ff;box-shadow:0 0 0 2px rgba(37,99,235,.1)}
.slide-focus-point.active span{background:#2563eb}
.site-slide-editor-preview{position:relative;overflow:hidden}
.site-slide-editor-preview img{width:100%;height:100%;object-fit:cover}
.slide-preview-safe-area{
  position:absolute;left:7%;top:12%;bottom:12%;width:42%;border:1px dashed rgba(255,255,255,.7);
  border-radius:10px;pointer-events:none;box-shadow:0 0 0 999px rgba(2,6,23,.04);
}
.slide-preview-safe-area span{
  position:absolute;left:8px;top:8px;padding:4px 7px;border-radius:999px;
  background:rgba(15,23,42,.7);color:#fff;font-size:7px;font-weight:800;
}

@media(max-width:760px){
  .vehicle-master-banner{grid-template-columns:42px 1fr}.master-badge{grid-column:1/-1;justify-self:start}
  .vehicle-master-status{align-items:flex-start;flex-direction:column}
  .vehicle-master-status span{text-align:left}
  .slide-focus-row{grid-template-columns:1fr}
}


/* V5.4.1 explicit vehicle master combobox */
.vehicle-combobox{position:relative}
.vehicle-suggestions{
  position:absolute;left:0;right:0;top:calc(100% - 2px);z-index:40;
  display:none;max-height:260px;overflow:auto;
  border:1px solid #cbd5e1;border-radius:12px;background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.14);padding:6px;
}
.vehicle-suggestions.open{display:block}
.vehicle-suggestion{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
  border:0;background:#fff;border-radius:9px;padding:9px 10px;text-align:left;
  color:#0f172a;cursor:pointer;
}
.vehicle-suggestion:hover,.vehicle-suggestion:focus-visible{background:#eff6ff;outline:0}
.vehicle-suggestion span{font-size:10px;font-weight:800}
.vehicle-suggestion small{font-size:8px;color:#64748b}
.vehicle-suggestion-empty{
  padding:10px 11px;color:#64748b;font-size:9px;line-height:1.45;
}


/* V5.4.2 vehicle master settings workspace */
.settings-inline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.master-summary{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;
  border:1px solid var(--line);background:var(--line);border-radius:13px;overflow:hidden;margin:15px 0;
}
.master-summary>div{background:#fff;padding:12px 14px}
.master-summary span{display:block;font-size:8px;color:var(--muted)}
.master-summary strong{display:block;font-size:17px;margin-top:3px}
.master-toolbar{margin-bottom:12px}
.master-toolbar .toolbar-search{max-width:520px}
.vehicle-master-list{display:grid;gap:8px}
.vehicle-master-row{
  display:grid;grid-template-columns:190px minmax(0,1.5fr) minmax(220px,.9fr) auto;
  gap:14px;align-items:center;border:1px solid var(--line);border-radius:13px;background:#fff;padding:12px 13px;
}
.vehicle-master-row:hover{border-color:#cbd5e1;background:#fcfdff}
.vehicle-master-identity strong{display:block;font-size:11px}
.vehicle-master-identity span{display:block;font-size:10px;color:#475569;margin-top:2px}
.vehicle-master-variants{display:flex;gap:6px;align-items:center;flex-wrap:wrap;min-width:0}
.master-chip{
  display:inline-flex;align-items:center;min-height:24px;padding:4px 7px;border-radius:999px;
  border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;font-size:8px;font-weight:750;
}
.master-chip.more{background:#f8fafc;border-color:#e2e8f0;color:#64748b}
.master-muted{font-size:9px;color:#94a3b8}
.vehicle-master-meta{display:grid;gap:3px;min-width:0}
.vehicle-master-meta span{font-size:9px;color:#334155}
.vehicle-master-meta small{font-size:8px;color:#94a3b8}
.vehicle-master-actions{display:flex;gap:7px;justify-content:flex-end}
.master-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.master-check{
  display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;
  padding:9px 10px;background:#fff;font-size:10px;font-weight:750;cursor:pointer;
}
.master-check:has(input:checked){border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.master-check input{width:16px;height:16px;accent-color:#2563eb}

@media(max-width:1100px){
  .vehicle-master-row{grid-template-columns:160px minmax(0,1fr) auto}
  .vehicle-master-meta{grid-column:2/3}
  .vehicle-master-actions{grid-column:3;grid-row:1/3}
}
@media(max-width:760px){
  .settings-inline-actions{justify-content:flex-start;width:100%}
  .master-summary{grid-template-columns:repeat(3,1fr)}
  .vehicle-master-row{grid-template-columns:1fr;gap:10px}
  .vehicle-master-meta,.vehicle-master-actions{grid-column:auto;grid-row:auto}
  .vehicle-master-actions{justify-content:flex-start}
  .master-check-grid{grid-template-columns:1fr}
}


/* V5.4.3 supplier master workspace */
.supplier-master-list{display:grid;gap:8px}
.supplier-master-row{
  display:grid;grid-template-columns:minmax(210px,1.15fr) minmax(210px,1fr) 120px auto;
  gap:14px;align-items:center;border:1px solid var(--line);border-radius:13px;background:#fff;padding:12px 13px;
}
.supplier-master-row:hover{border-color:#cbd5e1;background:#fcfdff}
.supplier-master-main,.supplier-master-contact,.supplier-master-usage{min-width:0}
.supplier-master-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.supplier-master-title strong{font-size:11px}
.supplier-master-main>small,.supplier-master-contact small,.supplier-master-usage small{display:block;color:var(--muted);font-size:8px;margin-top:3px}
.supplier-master-contact span{display:block;font-size:9px;font-weight:750;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.supplier-master-usage strong{display:block;font-size:14px}
.supplier-master-actions{display:flex;gap:7px;justify-content:flex-end}
.field-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.field-label-row label{margin:0}
.link-button{border:0;background:transparent;padding:0;color:#2563eb;font:inherit;font-size:9px;font-weight:850;cursor:pointer}
.link-button:hover{text-decoration:underline}
.supplier-intake-box{
  border:1px solid #dbeafe;background:#f8fbff;border-radius:13px;padding:12px 13px;
}
.supplier-intake-box .field{margin:0}

@media(max-width:1050px){
  .supplier-master-row{grid-template-columns:minmax(200px,1fr) minmax(180px,1fr) auto}
  .supplier-master-usage{grid-column:2/3}
  .supplier-master-actions{grid-column:3;grid-row:1/3}
}
@media(max-width:760px){
  .supplier-master-row{grid-template-columns:1fr;gap:9px}
  .supplier-master-usage,.supplier-master-actions{grid-column:auto;grid-row:auto}
  .supplier-master-actions{justify-content:flex-start}
  .field-label-row{align-items:flex-start;flex-direction:column}
}


/* V5.4.4 compact master data workspace */
.master-data-workspace{display:grid;gap:14px}
.master-data-switcher{
  display:inline-grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:8px;
  width:min(560px,100%);padding:5px;border:1px solid var(--line);border-radius:14px;background:#eef3f9;
}
.master-data-switcher button{
  display:flex;align-items:center;gap:10px;min-height:58px;padding:9px 12px;
  border:1px solid transparent;border-radius:11px;background:transparent;color:#475569;text-align:left;cursor:pointer;
}
.master-data-switcher button:hover{background:rgba(255,255,255,.72)}
.master-data-switcher button.active{
  background:#fff;border-color:#dbe3ef;color:#0f172a;box-shadow:0 4px 14px rgba(15,23,42,.07);
}
.master-switch-icon{
  width:34px;height:34px;border-radius:10px;background:#dbeafe;color:#2563eb;display:grid;place-items:center;flex:0 0 auto;
}
.master-switch-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
.master-data-switcher strong{display:block;font-size:10px}
.master-data-switcher small{display:block;margin-top:2px;font-size:8px;color:#64748b}

.master-dataset-card{padding:0;overflow:hidden}
.master-dataset-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 18px 14px;
  border-bottom:1px solid #eef2f7;
}
.master-dataset-head h2{margin:3px 0 4px;font-size:17px;letter-spacing:-.02em}
.master-dataset-head p{margin:0;max-width:720px;color:var(--muted);font-size:9px;line-height:1.5}
.section-kicker{font-size:7.5px;font-weight:900;letter-spacing:.12em;color:#2563eb}
.master-dataset-head .btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}

.master-summary.compact{
  margin:14px 18px 0;grid-template-columns:repeat(3,minmax(0,1fr));border-radius:11px;
}
.master-summary.compact>div{padding:10px 12px}
.master-summary.compact strong{font-size:15px}

.master-controlbar{
  display:grid;grid-template-columns:minmax(260px,1fr) 180px auto;gap:10px;align-items:center;
  padding:12px 18px;border-bottom:1px solid #eef2f7;
}
.master-search{
  display:flex;align-items:center;gap:8px;height:38px;padding:0 11px;border:1px solid #d9e2ec;border-radius:10px;background:#fff;
}
.master-search.wide{grid-column:1/3}
.master-search svg{width:15px;height:15px;fill:none;stroke:#64748b;stroke-width:1.8;flex:0 0 auto}
.master-search input{width:100%;border:0;outline:0;background:transparent;font:inherit;font-size:9px;color:#0f172a}
.master-filter{
  height:38px;display:flex;align-items:center;gap:7px;padding:0 9px;border:1px solid #d9e2ec;border-radius:10px;background:#fff;
}
.master-filter span{font-size:8px;font-weight:800;color:#64748b}
.master-filter select{min-width:0;flex:1;border:0;outline:0;background:transparent;font-size:9px;color:#0f172a}
.master-result-count{font-size:8px;font-weight:750;color:#64748b;white-space:nowrap;text-align:right}

.master-table{margin:0 18px;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#fff}
.master-table-head{
  display:grid;align-items:center;gap:12px;padding:8px 12px;background:#f8fafc;border-bottom:1px solid #e2e8f0;
  color:#64748b;font-size:7.5px;font-weight:850;text-transform:uppercase;letter-spacing:.045em;
}
.vehicle-master-table .master-table-head,
.vehicle-master-table .master-table-row{grid-template-columns:165px minmax(0,1.55fr) minmax(135px,.65fr) 90px 94px}
.supplier-master-table .master-table-head,
.supplier-master-table .master-table-row{grid-template-columns:minmax(230px,1.15fr) minmax(230px,1fr) 90px 115px}
.master-table-body{display:grid}
.master-table-row{
  display:grid;align-items:center;gap:12px;min-height:58px;padding:9px 12px;border-bottom:1px solid #eef2f7;
}
.master-table-row:last-child{border-bottom:0}
.master-table-row:hover{background:#fbfdff}
.master-col{min-width:0}
.master-identity strong,.supplier-name strong{display:block;font-size:10px;color:#0f172a}
.master-col small,.master-identity small,.supplier-name small{display:block;margin-top:2px;color:#94a3b8;font-size:7.5px}
.master-variants{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.master-chip{min-height:21px;padding:3px 6px;font-size:7px}
.master-chip.more{font-weight:800}
.master-spec span,.supplier-contact span{display:block;font-size:8px;font-weight:750;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.master-spec small,.supplier-contact small{display:block;margin-top:2px;color:#94a3b8;font-size:7.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.master-usage{text-align:left}
.master-usage strong{display:block;font-size:11px;color:#0f172a}
.master-usage small{display:block;font-size:7px;color:#94a3b8}
.master-row-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px}
.icon-action{
  width:30px;height:30px;border:1px solid #e2e8f0;border-radius:9px;background:#fff;color:#64748b;
  display:grid;place-items:center;cursor:pointer;
}
.icon-action:hover{background:#f8fafc}
.icon-action.danger{border-color:#fecaca;color:#dc2626}
.icon-action.danger:hover{background:#fef2f2}
.icon-action svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
.supplier-name-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap}

.master-pagination{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px 0;
}
.master-pagination>span{font-size:8px;color:#64748b}
.master-pagination>div{display:flex;gap:7px}
.master-pagination .btn[disabled]{opacity:.45;cursor:not-allowed}
.master-footnote{
  display:flex;align-items:flex-start;gap:8px;margin:12px 18px 18px;padding:9px 11px;border-radius:10px;background:#f8fafc;color:#475569;
}
.master-footnote>span{width:18px;height:18px;color:#64748b;flex:0 0 auto}
.master-footnote svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
.master-footnote p{margin:0;font-size:8px;line-height:1.45}
.master-empty{
  min-height:250px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;
}
.master-empty .empty-icon{margin-bottom:10px}
.master-empty strong{font-size:11px}
.master-empty p{max-width:420px;margin:5px 0 11px;font-size:8.5px;color:#64748b;line-height:1.45}

@media(max-width:1180px){
  .vehicle-master-table .master-table-head,
  .vehicle-master-table .master-table-row{grid-template-columns:145px minmax(0,1.35fr) minmax(125px,.7fr) 78px 88px}
  .supplier-master-table .master-table-head,
  .supplier-master-table .master-table-row{grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) 78px 108px}
}
@media(max-width:900px){
  .master-controlbar{grid-template-columns:1fr 160px}
  .master-result-count{grid-column:1/-1;text-align:left}
  .master-search.wide{grid-column:auto}
  .vehicle-master-table .master-table-head{grid-template-columns:145px 1fr 90px}
  .vehicle-master-table .master-table-head span:nth-child(3),
  .vehicle-master-table .master-table-head span:nth-child(4){display:none}
  .vehicle-master-table .master-table-row{grid-template-columns:145px 1fr 90px}
  .vehicle-master-table .master-spec,.vehicle-master-table .master-usage{display:none}
  .supplier-master-table .master-table-head{grid-template-columns:1fr 1fr 105px}
  .supplier-master-table .master-table-head span:nth-child(3){display:none}
  .supplier-master-table .master-table-row{grid-template-columns:1fr 1fr 105px}
  .supplier-master-table .master-usage{display:none}
}
@media(max-width:700px){
  .master-data-switcher{width:100%;grid-template-columns:1fr 1fr}
  .master-dataset-head{flex-direction:column;padding:15px}
  .master-dataset-head .settings-inline-actions{width:100%}
  .master-dataset-head .settings-inline-actions .btn{flex:1}
  .master-summary.compact{margin:12px 15px 0}
  .master-controlbar{grid-template-columns:1fr;padding:12px 15px}
  .master-search.wide{grid-column:auto}
  .master-filter{width:100%}
  .master-table{margin:0 15px}
  .master-table-head{display:none!important}
  .vehicle-master-table .master-table-row,
  .supplier-master-table .master-table-row{grid-template-columns:1fr auto;gap:8px;padding:11px}
  .vehicle-master-table .master-variants,.supplier-master-table .supplier-contact{grid-column:1/-1}
  .vehicle-master-table .master-spec,.vehicle-master-table .master-usage,.supplier-master-table .master-usage{display:none}
  .master-row-actions{grid-column:2;grid-row:1}
  .master-pagination{padding:12px 15px 0;align-items:flex-start;flex-direction:column}
  .master-footnote{margin:12px 15px 15px}
}


/* V5.4.5 public stock readiness */
.inventory-public-info{
  display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;align-items:center;
  border:1px solid #bfdbfe;background:#f8fbff;border-radius:13px;padding:12px 14px;margin-bottom:16px;
}
.inventory-public-icon{
  width:34px;height:34px;border-radius:10px;background:#eff6ff;color:#2563eb;
  display:grid;place-items:center;
}
.inventory-public-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.inventory-public-info strong{display:block;font-size:11px;color:#0f172a}
.inventory-public-info p{margin:3px 0 0;font-size:9px;line-height:1.45;color:#64748b}

@media(max-width:760px){
  .inventory-public-info{grid-template-columns:34px 1fr}
  .inventory-public-info>.btn{grid-column:1/-1;width:100%}
}


/* V5.4.6 expired session recovery */
.auth-session-notice{
  display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:start;
  margin:12px 0 16px;padding:10px 11px;border:1px solid #fde68a;border-radius:11px;background:#fffbeb;color:#92400e;
}
.auth-session-notice>span{
  width:34px;height:34px;border-radius:9px;background:#fff;display:grid;place-items:center;color:#d97706;
}
.auth-session-notice svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.auth-session-notice strong{display:block;font-size:10px;color:#92400e}
.auth-session-notice p{margin:3px 0 0;font-size:8.5px;line-height:1.45;color:#a16207}


/* ==========================================================================
   V6.0 Mobile & Tablet Professional Application Shell
   Keeps desktop >=1200px unchanged. Tablet gets a navigation rail; mobile
   gets an Android-style app bar, bottom navigation, search overlay and More sheet.
   ========================================================================== */

.mobile-app-title,.mobile-search-trigger,.mobile-bottom-nav,.mobile-more-root{display:none}

/* Tablet: compact always-visible navigation rail */
@media (min-width:768px) and (max-width:1199px){
  :root{--sidebar:76px}
  .app-shell{grid-template-columns:76px minmax(0,1fr)}
  .sidebar{
    position:sticky!important;left:auto!important;top:0;width:auto!important;height:100vh;
    transform:none!important;box-shadow:none!important;padding:14px 10px;overflow:visible
  }
  .brand{justify-content:center;padding:2px 0 16px}
  .brand-mark{width:44px;height:44px;border-radius:14px}
  .brand-copy,.nav-group-label,.sidebar-footer{display:none!important}
  .sidebar-nav{gap:6px;overflow:visible}
  .nav-item{
    position:relative;justify-content:center;min-height:50px;padding:0;border-radius:13px;
    font-size:0;overflow:visible
  }
  .nav-item>.nav-icon{width:21px;height:21px;flex-basis:21px}
  .nav-item>span:not(.nav-icon):not(.nav-badge){display:none!important}
  .nav-item .nav-badge{
    position:absolute;right:5px;top:4px;min-width:17px;height:17px;padding:0 4px;font-size:8px;border:2px solid var(--nav)
  }
  .nav-item::after{
    content:attr(data-mobile-label);position:absolute;left:64px;top:50%;transform:translateY(-50%) translateX(-4px);
    opacity:0;pointer-events:none;white-space:nowrap;background:#0f172a;color:#fff;border-radius:8px;
    padding:7px 9px;font-size:10px;font-weight:750;box-shadow:0 8px 20px rgba(15,23,42,.2);
    transition:.14s ease;z-index:80
  }
  .nav-item:hover::after,.nav-item:focus-visible::after{opacity:1;transform:translateY(-50%) translateX(0)}
  .mobile-menu{display:none!important}
  .topbar{height:66px;padding:0 18px;gap:12px}
  .branch-button{display:none}
  .profile-copy{display:none}
  .profile-button{padding:0 8px}
  .command-search{max-width:520px}
  .page-content{padding:22px 22px 40px}
  .page-header{gap:14px;margin-bottom:18px}
  .page-header h1{font-size:24px}
  .btn{min-height:42px}
  .input,.select{min-height:44px}
  .textarea{min-height:96px}
}

/* Mobile application shell */
@media (max-width:767px){
  html{scroll-padding-top:calc(64px + env(safe-area-inset-top))}
  body{
    min-width:320px;
    padding-bottom:calc(74px + env(safe-area-inset-bottom));
    overscroll-behavior-y:none
  }
  body.mobile-sheet-open{overflow:hidden}
  .app-shell{display:block;min-height:100dvh}
  .sidebar{display:none!important}
  .main-area{min-width:0}
  .topbar{
    height:calc(60px + env(safe-area-inset-top));
    min-height:calc(60px + env(safe-area-inset-top));
    padding:env(safe-area-inset-top) 12px 0;
    gap:8px;background:rgba(255,255,255,.97);backdrop-filter:blur(18px);
    box-shadow:0 1px 0 rgba(226,232,240,.9)
  }
  .mobile-menu{display:none!important}
  .mobile-app-title{
    display:grid;min-width:0;margin-right:auto;line-height:1.05
  }
  .mobile-app-title small{
    color:var(--primary);font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase
  }
  .mobile-app-title strong{
    display:block;margin-top:3px;font-size:17px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
  }
  .topbar-actions{margin-left:0;gap:5px}
  .mobile-search-trigger{display:grid}
  .branch-button,.profile-copy,.profile-button>span:last-child{display:none!important}
  .icon-button,.profile-button{
    width:44px;height:44px;min-width:44px;border-radius:13px
  }
  .profile-button{padding:0;justify-content:center}
  .profile-button .avatar{width:32px;height:32px;border-radius:10px}
  .notification-dot{right:8px;top:7px}
  .command-search{
    position:fixed;left:12px;right:12px;top:calc(66px + env(safe-area-inset-top));
    width:auto;max-width:none;z-index:72;
    padding:9px;background:#fff;border:1px solid var(--line);border-radius:15px;
    box-shadow:0 18px 40px rgba(15,23,42,.16);
    opacity:0;visibility:hidden;transform:translateY(-8px);pointer-events:none;
    transition:.16s ease
  }
  .command-search.mobile-open{
    opacity:1;visibility:visible;transform:none;pointer-events:auto
  }
  .command-search input{
    height:46px;border-radius:12px;background:#f8fafc;font-size:14px;padding-left:40px;padding-right:12px
  }
  .command-search kbd{display:none!important}
  .search-icon{left:22px}
  .page-content{
    max-width:none;padding:18px 14px calc(30px + env(safe-area-inset-bottom));
    min-height:calc(100dvh - 134px);overflow-x:hidden
  }
  .page-header{
    display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-bottom:16px
  }
  .page-eyebrow{font-size:10px;margin-bottom:3px}
  .page-header h1{font-size:23px;line-height:1.12}
  .page-header p{font-size:13px;line-height:1.48;margin-top:5px}
  .page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
  .page-actions>.btn:only-child{grid-column:1/-1}
  .page-actions .btn{width:100%}
  .card{border-radius:16px}
  .card-header{padding:15px}
  .card-title{font-size:14px}
  .card-subtitle{font-size:11px;line-height:1.45}
  .card-body{padding:15px}
  .btn{
    min-height:46px;padding:0 14px;border-radius:12px;font-size:13px;touch-action:manipulation
  }
  .btn.sm{min-height:42px;padding:0 12px;font-size:12px}
  .icon-button,.close-button{min-height:44px;min-width:44px}
  .close-button{width:44px;height:44px;border-radius:12px}
  .input,.select,.textarea{
    min-height:48px;border-radius:12px;font-size:16px;padding:11px 12px
  }
  .textarea{min-height:104px;font-size:15px}
  .field label{font-size:12px}
  .field-help{font-size:11px;line-height:1.45}
  .filter-pills{margin:0 -2px;padding:1px 2px 4px;scrollbar-width:none}
  .filter-pills::-webkit-scrollbar,.segmented::-webkit-scrollbar{display:none}
  .filter-pill{height:40px;padding:0 13px;font-size:11px}
  .segmented{
    display:flex;width:100%;border-radius:12px;overflow-x:auto;scrollbar-width:none
  }
  .segmented button{min-height:40px;padding:8px 12px;font-size:11px;flex:0 0 auto}
  .toolbar,.smart-toolbar{gap:8px}
  .toolbar-search,.toolbar-search.compact{min-width:100%;width:100%;max-width:none}
  .toolbar-select{min-height:46px;width:100%}
  .summary-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));border-radius:16px;margin-bottom:14px
  }
  .summary-item{padding:13px}
  .summary-item span{font-size:10px;line-height:1.35}
  .summary-item strong{font-size:17px}
  .summary-item small{font-size:10px;line-height:1.35}
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .kpi-card{padding:14px;border-radius:16px}
  .kpi-label{font-size:11px}
  .kpi-value{font-size:20px}
  .kpi-note{font-size:10px;line-height:1.35}
  .metric-icon{width:36px;height:36px;border-radius:11px}
  .dashboard-grid,.dashboard-subgrid,.finance-grid,.settings-grid,.report-grid{gap:12px}
  .business-warning{grid-template-columns:34px minmax(0,1fr);gap:10px;padding:12px;border-radius:14px}
  .business-warning .btn{grid-column:1/-1;width:100%}
  .action-task-main{grid-template-columns:minmax(0,1fr) auto;padding:13px;gap:10px}
  .action-center-copy strong{font-size:13px}
  .action-center-copy small{font-size:11px;line-height:1.4}
  .action-center-copy em{font-size:11px}
  .task-due{font-size:10px}
  .task-quick-actions{padding:0 12px 12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .task-quick-actions .btn{width:100%}
  .unit-grid,.customer-grid{gap:10px}
  .unit-card,.customer-card{border-radius:16px}
  .unit-card{overflow:hidden}
  .unit-title{font-size:14px}
  .unit-meta,.unit-footer small,.customer-info small{font-size:11px}
  .unit-price strong{font-size:17px}
  .status-badge{font-size:10px;padding:5px 8px}
  .table-secondary{font-size:10px;line-height:1.35}
  .data-table th{font-size:10px}
  .data-table td{font-size:12px}
  .table-wrap{
    margin-left:-2px;margin-right:-2px;padding-bottom:4px;
    scrollbar-width:thin;overscroll-behavior-x:contain
  }
  .data-table{min-width:700px}
  .modal-backdrop{padding:0;align-items:end}
  .modal,.modal.wide,.modal.narrow{
    width:100%;max-height:calc(94dvh - env(safe-area-inset-top));
    border-radius:22px 22px 0 0
  }
  .modal::before{
    content:"";width:38px;height:4px;border-radius:999px;background:#cbd5e1;
    margin:8px auto -2px;flex:0 0 auto
  }
  .modal-header{padding:14px 14px 12px}
  .modal-header h2{font-size:17px}
  .modal-header p{font-size:11px;line-height:1.4}
  .modal-body{padding:15px 14px 18px}
  .modal-footer{
    position:sticky;bottom:0;z-index:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
    padding:11px 14px calc(11px + env(safe-area-inset-bottom));background:rgba(255,255,255,.98)
  }
  .modal-footer .btn{width:100%}
  .drawer{
    position:fixed;width:100%;height:100dvh;max-height:100dvh;border-radius:0;box-shadow:none;
    padding-top:env(safe-area-inset-top)
  }
  .drawer-header{
    position:sticky;top:0;background:#fff;z-index:2;padding:12px 14px;border-bottom:1px solid var(--line)
  }
  .drawer-header h2{font-size:17px}
  .drawer-header p{font-size:11px}
  .drawer-body{padding:14px 14px calc(24px + env(safe-area-inset-bottom))}
  .detail-hero{padding:14px;gap:12px;border-radius:16px}
  .detail-hero h3{font-size:17px}
  .detail-hero p{font-size:11px}
  .detail-price{font-size:20px}
  .detail-item{padding:11px;border-radius:12px}
  .detail-item span{font-size:10px}
  .detail-item strong{font-size:12px}
  .stepper{margin:2px 0 18px}
  .step-label{font-size:10px}
  .step-number{width:30px;height:30px;font-size:10px}
  .source-choice{min-height:64px}
  .source-choice strong{font-size:13px}
  .source-choice small{font-size:11px;line-height:1.35}
  .toast-stack{
    left:12px;right:12px;bottom:calc(84px + env(safe-area-inset-bottom))
  }

  .mobile-bottom-nav{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:70;
    min-height:calc(68px + env(safe-area-inset-bottom));
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.98);backdrop-filter:blur(18px);
    border-top:1px solid rgba(226,232,240,.95);box-shadow:0 -8px 24px rgba(15,23,42,.06)
  }
  .mobile-bottom-item{
    position:relative;flex:1 1 0;min-width:0;min-height:56px;border:0;background:transparent;
    border-radius:14px;color:#64748b;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:4px;padding:4px 2px;font-size:10px;font-weight:750;touch-action:manipulation
  }
  .mobile-bottom-item::before{
    content:"";position:absolute;top:4px;width:42px;height:28px;border-radius:999px;background:transparent;z-index:-1
  }
  .mobile-bottom-item.active{color:var(--primary)}
  .mobile-bottom-item.active::before{background:var(--primary-soft)}
  .mobile-bottom-icon{width:21px;height:21px;display:grid;place-items:center}
  .mobile-bottom-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .mobile-bottom-item>b{
    position:absolute;top:3px;left:calc(50% + 8px);min-width:17px;height:17px;border-radius:999px;
    display:grid;place-items:center;padding:0 4px;background:#ef4444;color:#fff;border:2px solid #fff;
    font-size:8px;line-height:1
  }
  .mobile-more-root{display:block}
  .mobile-more-backdrop{
    position:fixed;inset:0;z-index:120;background:rgba(15,23,42,.42);backdrop-filter:blur(2px);
    display:flex;align-items:flex-end;animation:fadeIn .14s ease
  }
  .mobile-more-sheet{
    width:100%;max-height:88dvh;overflow:auto;background:#fff;border-radius:24px 24px 0 0;
    padding:8px 14px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -24px 60px rgba(15,23,42,.18);
    animation:sheetUp .18s ease
  }
  .mobile-sheet-handle{width:40px;height:4px;background:#cbd5e1;border-radius:999px;margin:2px auto 10px}
  .mobile-more-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 0 10px}
  .mobile-more-head small{display:block;font-size:10px;color:var(--muted)}
  .mobile-more-head strong{display:block;margin-top:2px;font-size:18px}
  .mobile-account-card{
    width:100%;min-height:66px;border:1px solid var(--line);background:#f8fafc;border-radius:16px;
    display:grid;grid-template-columns:42px 1fr 24px;gap:11px;align-items:center;text-align:left;padding:10px 12px
  }
  .mobile-account-card .avatar{width:42px;height:42px;border-radius:13px}
  .mobile-account-card strong{display:block;font-size:13px}
  .mobile-account-card small{display:block;margin-top:3px;color:var(--muted);font-size:11px}
  .mobile-account-chevron{color:#64748b}
  .mobile-account-chevron svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;transform:rotate(-90deg)}
  .mobile-more-grid{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:14px
  }
  .mobile-more-item{
    position:relative;min-height:86px;border:1px solid var(--line);background:#fff;border-radius:15px;
    padding:10px 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:7px;text-align:center;font-size:11px;font-weight:750;color:#334155
  }
  .mobile-more-item.active{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
  .mobile-more-icon{width:24px;height:24px;color:var(--primary)}
  .mobile-more-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mobile-more-item>b{
    position:absolute;right:7px;top:7px;min-width:18px;height:18px;border-radius:999px;background:#ef4444;color:#fff;
    display:grid;place-items:center;padding:0 4px;font-size:8px
  }
  .mobile-more-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}
  .mobile-more-actions .btn{text-decoration:none}
  .auth-screen{
    padding:calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom))
  }
  .auth-card{width:100%;max-width:460px;max-height:100%;border-radius:20px;padding:20px}
  .auth-brand strong{font-size:14px}
  .auth-brand small{font-size:11px}
  .auth-heading{margin:22px 0 17px}
  .auth-heading h1{font-size:24px}
  .auth-heading p{font-size:13px;line-height:1.5}
  .auth-catalog-link{font-size:12px;min-height:44px;display:flex;align-items:center;justify-content:center}

}

@media (max-width:420px){
  .page-content{padding-left:12px;padding-right:12px}
  .kpi-grid{grid-template-columns:1fr 1fr}
  .kpi-card{padding:12px}
  .kpi-value{font-size:18px}
  .summary-item{padding:11px}
  .summary-item strong{font-size:16px}
  .mobile-bottom-nav{padding-left:5px;padding-right:5px}
  .mobile-bottom-item{font-size:9px}
  .mobile-more-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .mobile-more-item{min-height:82px;font-size:10px}
}

@keyframes sheetUp{from{transform:translateY(24px);opacity:.8}to{transform:none;opacity:1}}

/* ==========================================================================
   V6.1 Mobile POV polish
   Phone-only refinements from real 390x844 UAT. Desktop remains untouched.
   ========================================================================== */
@media (max-width:767px){
  body{background:#f6f8fb}
  .topbar{
    height:calc(58px + env(safe-area-inset-top));
    min-height:calc(58px + env(safe-area-inset-top));
    padding-left:14px;padding-right:10px
  }
  .mobile-app-title small{font-size:9px;letter-spacing:.095em}
  .mobile-app-title strong{font-size:16px;margin-top:2px}
  .topbar-actions{gap:4px}
  .icon-button,.profile-button{width:42px;height:42px;min-width:42px;border-radius:14px}
  .profile-button .avatar{width:31px;height:31px;border-radius:10px}
  .page-content{
    padding-top:14px;padding-left:14px;padding-right:14px;
    padding-bottom:calc(26px + env(safe-area-inset-bottom))
  }

  /* The app bar already names the page. Avoid repeating the same title in content. */
  .page-header.mobile-title-redundant .page-eyebrow,
  .page-header.mobile-title-redundant .page-title-wrap h1{display:none}
  .page-header.mobile-title-redundant .page-title-wrap p{margin-top:0}
  .page-header.mobile-title-redundant{gap:10px;margin-bottom:14px}

  .page-header{gap:10px;margin-bottom:14px}
  .page-eyebrow{font-size:9px;letter-spacing:.09em}
  .page-header h1{font-size:22px;letter-spacing:-.03em}
  .page-header p{font-size:12px;line-height:1.45;color:#64748b}
  .page-actions{gap:8px}
  .page-actions .btn{min-height:44px;font-size:12px;border-radius:13px}
  .page-actions .btn.primary{box-shadow:0 5px 12px rgba(37,99,235,.14)}

  .kpi-grid{gap:9px;margin-bottom:12px}
  .kpi-card{
    padding:12px;border-radius:16px;box-shadow:0 1px 2px rgba(15,23,42,.04);
    min-height:96px
  }
  .kpi-top{gap:8px}
  .kpi-label{font-size:10px;line-height:1.3}
  .kpi-value{font-size:18px;margin-top:6px}
  .kpi-note{font-size:9px;line-height:1.35;margin-top:6px;min-height:24px;align-items:flex-start}
  .metric-icon{width:34px;height:34px;border-radius:11px}
  .metric-icon svg{width:16px;height:16px}

  .card{
    border-radius:17px;box-shadow:0 1px 2px rgba(15,23,42,.04)
  }
  .card-header{padding:14px 14px 0;gap:10px}
  .card-title{font-size:13px}
  .card-subtitle{font-size:10px}
  .card-link{font-size:10px;min-height:36px;display:inline-flex;align-items:center}
  .card-body{padding:14px}
  .dashboard-grid,.dashboard-subgrid,.finance-grid,.settings-grid,.report-grid{
    grid-template-columns:1fr!important;gap:12px;margin-bottom:12px
  }
  .chart-shell{height:188px}
  .stock-summary{grid-template-columns:116px minmax(0,1fr);gap:14px;text-align:left}
  .donut{width:112px;height:112px}
  .donut::after{width:74px;height:74px}
  .donut-center strong{font-size:20px}
  .legend{gap:8px}
  .legend-row{font-size:10px}
  .legend-row strong{font-size:11px}

  .summary-strip{gap:0;margin-bottom:12px}
  .summary-item{min-width:0}
  .summary-item span{font-size:9px}
  .summary-item strong{font-size:16px}
  .summary-item small{font-size:9px}

  .action-list{gap:8px}
  .action-item{min-height:58px;padding:9px;border-radius:13px}
  .action-icon{width:36px;height:36px}
  .action-copy strong{font-size:11px}
  .action-copy small{font-size:9px}
  .attention{padding:10px 11px}
  .attention strong{font-size:11px}
  .attention small{font-size:9px}

  .toolbar,.smart-toolbar{margin-bottom:12px}
  .filter-pill{height:38px}
  .segmented button{min-height:38px}
  .sales-journey-strip{overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
  .sales-journey-strip::-webkit-scrollbar{display:none}
  .sales-journey-strip>div{min-width:112px}

  /* Real mobile data presentation: rows become compact cards instead of mini desktop tables. */
  .mobile-table-card{overflow:visible;background:transparent;border:0;box-shadow:none}
  .mobile-table-card>.card-header{
    background:#fff;border:1px solid var(--line);border-bottom:0;
    border-radius:16px 16px 0 0;padding:13px
  }
  .mobile-table-card>.table-wrap{
    overflow:visible;margin:0;padding:0
  }
  .mobile-card-table{display:block;min-width:0!important;width:100%;border-collapse:separate}
  .mobile-card-table thead{display:none}
  .mobile-card-table tbody{display:grid;gap:9px}
  .mobile-card-table tr{
    display:grid!important;grid-template-columns:1fr 1fr;gap:9px 12px;
    background:#fff;border:1px solid var(--line);border-radius:15px;
    padding:12px;box-shadow:0 1px 2px rgba(15,23,42,.035)
  }
  .mobile-card-table tr.clickable{cursor:pointer}
  .mobile-card-table td{
    display:block!important;border:0!important;padding:0!important;min-width:0;
    font-size:11px;background:transparent!important
  }
  .mobile-card-table td::before{
    content:attr(data-label);display:block;margin-bottom:3px;
    color:#94a3b8;font-size:8px;font-weight:800;line-height:1.25;
    text-transform:uppercase;letter-spacing:.04em
  }
  .mobile-card-table td[colspan]{grid-column:1/-1}
  .mobile-card-table td[colspan]::before{display:none}
  .mobile-card-table td:last-child{
    grid-column:1/-1;padding-top:2px!important
  }
  .mobile-card-table td:last-child .table-actions{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px
  }
  .mobile-card-table td:last-child .btn{width:100%;min-height:40px}
  .mobile-card-table .money{white-space:normal}
  .mobile-card-table .progress-track{min-width:0;width:100%;margin-top:5px}

  .form-grid{grid-template-columns:1fr!important}
  .field.full{grid-column:auto}
  .switch-row{padding:11px}
  .source-choice-grid,.selection-grid,.payment-option-grid,
  .photo-editor-grid,.photo-manager-grid,.cost-grid,.role-grid,
  .inspection-check-grid,.simple-choice-row{grid-template-columns:1fr!important}

  .modal-body,.drawer-body{overscroll-behavior:contain}
  .modal-footer{gap:8px}
  .modal-footer .btn{min-width:0}
  .drawer-header{min-height:64px;align-items:center}

  .mobile-bottom-nav{
    min-height:calc(66px + env(safe-area-inset-bottom));
    padding-top:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom))
  }
  .mobile-bottom-item{min-height:54px;gap:3px;font-size:9px}
  .mobile-bottom-item::before{top:3px;width:40px;height:27px}
  .mobile-bottom-icon,.mobile-bottom-icon svg{width:20px;height:20px}
}

@media (max-width:420px){
  .page-content{padding-left:12px;padding-right:12px}
  .kpi-card{padding:11px}
  .kpi-value{font-size:17px}
  .chart-shell{height:176px}
  .stock-summary{grid-template-columns:104px minmax(0,1fr)}
  .donut{width:100px;height:100px}
  .donut::after{width:66px;height:66px}
  .mobile-card-table tr{padding:11px;gap:8px 10px}
}

@media (min-width:768px) and (max-width:1199px){
  .page-content{max-width:1100px}
  .dashboard-grid,.dashboard-subgrid{grid-template-columns:1fr 1fr}
  .kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}



/* ==========================================================================
   V6.2 Full Mobile Feature Audit
   Touch-first refinements across Action Center, CRM, Sales, Inventory, Finance,
   Approvals, Reports, Website, Settings, Recovery and operational wizards.
   Desktop >=1200px keeps the established shell and density.
   ========================================================================== */
@media (max-width:767px){
  /* Global interaction and hierarchy */
  .password-input-wrap .input{padding-right:54px}
  .password-visibility-toggle{width:44px;height:44px;right:2px;border-radius:11px}
  body.overlay-open,body.mobile-search-open{overflow:hidden;overscroll-behavior:none}
  .page-actions{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
  .btn,.btn.sm,.filter-pill,.segmented button{touch-action:manipulation}
  .filter-pill{height:42px}
  .segmented button{min-height:42px}
  .icon-button,.profile-button{width:44px;height:44px;min-width:44px}
  .card-link{min-height:40px;padding:7px 4px}
  .summary-strip{overflow:hidden}
  .summary-item{min-width:0}
  .summary-item strong,.kpi-value{overflow-wrap:anywhere}

  /* Action Center */
  .action-task-main{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "type due"
      "copy copy"
      "amount go";
    align-items:start;row-gap:7px
  }
  .action-task-main .action-center-type{grid-area:type;align-self:center}
  .action-task-main .task-due{grid-area:due;justify-self:end}
  .action-task-main .action-center-copy{grid-area:copy}
  .action-task-main .action-center-amount{grid-area:amount;align-self:center}
  .action-task-main .action-center-go{grid-area:go;justify-self:end;align-self:center}
  .task-quick-actions{
    grid-template-columns:repeat(auto-fit,minmax(96px,1fr));
    padding:0 12px 12px!important
  }
  .task-quick-actions .btn{min-width:0}
  .action-center-type{font-size:9px}
  .task-due{font-size:9px;padding:5px 7px}

  /* Sales + CRM: swipeable pipeline lanes, not mini desktop kanban. */
  .pipeline{
    display:flex!important;gap:10px;overflow-x:auto;overflow-y:hidden;
    scroll-snap-type:x mandatory;scroll-padding-left:1px;padding:1px 1px 6px;
    scrollbar-width:none;overscroll-behavior-x:contain
  }
  .pipeline::-webkit-scrollbar{display:none}
  .pipeline-col{
    flex:0 0 min(84vw,330px);min-width:0;scroll-snap-align:start;
    padding:11px;border-radius:15px
  }
  .pipeline-head{font-size:11px}
  .pipeline-head>div small{font-size:9px}
  .pipeline-card{padding:11px;border-radius:12px}
  .pipeline-card strong{font-size:11px}
  .pipeline-card span{font-size:9px}
  .sales-journey-strip{
    display:flex!important;gap:0;overflow-x:auto;scroll-snap-type:x proximity;
    scrollbar-width:none
  }
  .sales-journey-strip::-webkit-scrollbar{display:none}
  .sales-journey-strip>div{
    flex:0 0 116px;min-width:116px;scroll-snap-align:start;
    padding:10px 10px 10px 38px
  }
  .journey-step-number{left:10px}
  .lead-primary-actions{grid-template-columns:repeat(auto-fit,minmax(105px,1fr))}
  .supplier-grid{grid-template-columns:1fr!important}
  .supplier-card{padding:12px}

  /* Inventory */
  .inventory-public-info{padding:11px 12px;gap:10px}
  .inventory-public-info strong{font-size:10px}
  .inventory-public-info p{font-size:9px}
  .unit-grid{grid-template-columns:1fr!important}
  .unit-card{min-width:0}
  .unit-title-row{gap:6px}

  /* Finance */
  .finance-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .finance-attention-strip{grid-template-columns:1fr!important;gap:9px;padding:11px 12px}
  .finance-attention-strip>.btn{width:100%}
  .finance-account-actions{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px
  }
  .finance-account-actions .btn{width:100%}
  .account-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
  .account-row-actions{
    min-width:0;display:flex;flex-direction:column;align-items:flex-end;gap:6px
  }
  .account-row-actions .account-balance{min-width:0}
  .account-manage-button{width:auto!important;min-width:94px}
  .financial-statement>div{gap:12px}
  .financial-statement span{min-width:0}
  .financial-statement strong{max-width:55%;overflow-wrap:anywhere}
  .receivable-aging{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  /* Approvals */
  .approval-card{padding:12px;border-radius:15px}
  .approval-top{align-items:flex-start}
  .approval-card h3{font-size:13px;line-height:1.35}
  .approval-card p{font-size:10px}
  .approval-meta{gap:7px 12px}
  .approval-impact{grid-template-columns:1fr!important;gap:7px}
  .approval-actions{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px
  }
  .approval-actions .btn{width:100%}

  /* Reports */
  .report-period-bar{display:grid;grid-template-columns:1fr;gap:9px;padding:11px}
  .report-custom-range{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .report-custom-range label{display:grid;gap:5px}
  .report-custom-range .input{width:100%!important;min-width:0}
  .report-card{min-height:0}
  .business-trend{
    grid-template-columns:repeat(6,minmax(52px,1fr));min-width:330px;overflow:visible
  }
  .bar-row{grid-template-columns:74px minmax(0,1fr) 58px;gap:7px}
  .bar-label{font-size:9px}
  .bar-value{font-size:8px}
  .funnel-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .funnel-row>div::after{display:none}
  .financial-statement.large span{font-size:10px}
  .financial-statement.large strong{font-size:11px}

  /* Website and slideshow workspace */
  .website-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .website-config-side{grid-template-columns:1fr!important}
  .settings-section-head{gap:10px}
  .step-chip{min-height:30px;font-size:9px}
  .site-slide-thumbs{
    scroll-snap-type:x proximity;scroll-padding-left:1px;padding-bottom:4px
  }
  .site-slide-thumb{min-width:min(78vw,280px);scroll-snap-align:start}
  .site-slide-editor-preview{height:180px}
  .site-slide-editor>.form-grid{padding:13px}
  .site-slide-editor-actions{padding:11px 13px}
  .site-slide-editor-actions>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}
  .location-action-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
  .location-action-row .btn{width:100%}
  .message-detail-meta{grid-template-columns:1fr 1fr}
  .drawer-actions{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));width:100%
  }
  .drawer-actions .btn{width:100%}

  /* Settings, access control and master data */
  .settings-tabs{
    scroll-snap-type:x proximity;scroll-padding-left:2px;scrollbar-width:none
  }
  .settings-tabs::-webkit-scrollbar{display:none}
  .settings-tabs button{min-height:42px;scroll-snap-align:start}
  .settings-section{padding:14px}
  .access-editor{gap:12px}
  .access-editor-section{padding:12px}
  .access-check-grid{grid-template-columns:1fr!important}
  .access-check{min-height:58px;padding:11px}
  .access-user-side{min-width:0;width:100%;justify-items:stretch}
  .access-user-actions{
    width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:7px
  }
  .access-user-actions .btn{width:100%}
  .master-data-switcher{grid-template-columns:1fr 1fr;gap:6px}
  .master-data-switcher button{min-width:0;padding:8px}
  .master-switch-icon{width:32px;height:32px}
  .master-data-switcher strong{font-size:9px}
  .master-data-switcher small{font-size:7px}
  .master-summary.compact{grid-template-columns:repeat(2,minmax(0,1fr))}
  .master-summary.compact>div:last-child{grid-column:1/-1}
  .master-controlbar{gap:8px}
  .master-search,.master-filter{height:44px}
  .master-table-row{border-radius:0}
  .master-row-actions .icon-action{width:40px;height:40px}

  /* Backup / restore */
  .backup-overview{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .backup-overview>div{padding:9px}
  .backup-action-grid{grid-template-columns:1fr}
  .backup-action-card{min-height:64px}
  .backup-row{align-items:flex-start;flex-direction:column}
  .backup-row>div:last-child{width:100%}
  .backup-row .btn{width:100%}
  .backup-restore-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .recovery-audit-row{padding:9px 0}

  /* Forms, wizards, photo management and handover */
  .stepper{
    grid-template-columns:repeat(4,minmax(70px,1fr));overflow-x:auto;
    scrollbar-width:none;padding-bottom:2px
  }
  .stepper::-webkit-scrollbar{display:none}
  .step-label{font-size:9px;line-height:1.25}
  .source-choice{min-height:70px}
  .inspection-check-grid,.photo-manager-grid,.photo-editor-grid,
  .selection-grid,.payment-option-grid,.cost-grid,.role-grid{grid-template-columns:1fr!important}
  .inspection-check,.source-choice,.selection-card,.payment-option{padding:11px}
  .modal-footer{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
  .modal-footer:empty{display:none}
  .modal-body{padding-bottom:calc(20px + env(safe-area-inset-bottom))}
  .credential-copy{grid-template-columns:minmax(0,1fr) auto}
  .credential-copy .btn{min-width:92px}

  /* Accessible mobile card tables: visually hide headings but keep them in the accessibility tree. */
  .mobile-card-table thead{
    position:absolute!important;width:1px!important;height:1px!important;
    padding:0!important;margin:-1px!important;overflow:hidden!important;
    clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;
    white-space:nowrap!important;border:0!important
  }
  .mobile-card-table tbody{width:100%}
  .mobile-card-table td::before{line-height:1.3}
}

@media (max-width:420px){
  .finance-kpi-grid{grid-template-columns:1fr 1fr!important}
  .report-custom-range{grid-template-columns:1fr}
  .website-summary{grid-template-columns:1fr 1fr!important}
  .backup-overview{grid-template-columns:1fr 1fr}
  .backup-overview>div:last-child{grid-column:1/-1}
  .credential-copy{grid-template-columns:1fr}
  .credential-copy .btn{width:100%}
  .master-data-switcher small{display:none}
}

@media (min-width:768px) and (max-width:1199px){
  .page-actions{max-width:52%}
  .dashboard-grid,.dashboard-subgrid{align-items:start}
  .pipeline{scrollbar-width:thin;overscroll-behavior-x:contain}
  .settings-workspace,.website-config-grid{max-width:100%}
  .modal{max-width:calc(100vw - 112px)}
  .drawer{width:min(560px,72vw)}
}

body.overlay-open{overflow:hidden}

/* ==========================================================================
   V6.3 Interaction Hardening
   Final touch-target, overlay and mobile control polish.
   ========================================================================== */
@media (max-width:767px){
  .master-row-actions .icon-action,
  .lightbox-close,
  .lightbox-nav{
    width:44px!important;height:44px!important;min-width:44px;min-height:44px
  }
  .lightbox-stage{grid-template-columns:44px minmax(0,1fr) 44px;gap:7px}
  .slide-focus-grid{
    grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px);gap:6px;
    width:max-content;max-width:100%
  }
  .slide-focus-point{width:44px;height:44px;border-radius:10px}
  .slide-focus-point span{width:8px;height:8px}
  .switch{width:46px;height:28px}
  .switch-slider::before{width:22px;height:22px}
  .switch input:checked+.switch-slider::before{transform:translateX(18px)}
  .lightbox-thumbs button{min-height:52px}
  .mobile-more-item,.mobile-account-card,.notification-row{touch-action:manipulation}
}

/* Keyboard and motion accessibility without changing the normal desktop visual language. */
:where(button,a,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid rgba(37,99,235,.28);outline-offset:2px
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;animation-duration:.001ms!important;
    animation-iteration-count:1!important;transition-duration:.001ms!important
  }
}
