/* ==========================================================================
   StockMap WMS — design tokens, layout and components
   --accent is replaced at runtime with each company's brand color.
   ========================================================================== */
:root {
  --accent: #185adb;
  --accent-strong: #11419e;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, white);
  --accent-line: color-mix(in srgb, var(--accent) 24%, white);
  --gradient: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 60%, color-mix(in srgb, var(--accent) 70%, #08a3c9) 100%);
  --sidebar: linear-gradient(170deg, color-mix(in srgb, var(--accent-strong) 70%, #0b1733) 0%, var(--accent-strong) 70%, color-mix(in srgb, var(--accent) 80%, #0b1733) 100%);
  --ink: #172b4d;
  --ink-soft: #44546f;
  --muted: #6b7a90;
  --line: #e2e8f0;
  --line-strong: #cfd8e3;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --ok: #1f845a;
  --ok-soft: #e6f4ed;
  --warn: #9a6b10;
  --warn-soft: #fff6e0;
  --warn-line: #f0dfb0;
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 1px 3px rgb(16 24 40 / 6%);
  --shadow-lg: 0 24px 60px rgb(16 42 67 / 22%);
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Manrope', var(--font);
  --sidebar-width: 224px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }
h1 { font-size: 24px; letter-spacing: -0.6px; margin: 0 0 6px; line-height: 1.2; }
h2 { font-size: 22px; letter-spacing: -0.3px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0; }
p { line-height: 1.65; margin: 0 0 12px; }
a { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
[hidden] { display: none !important; }
.icon { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { display: block; text-align: center; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.section-title { margin: 22px 0 10px; }
.mobile-only { display: none; }

/* --- Buttons -------------------------------------------------------------- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 600; font-size: 13px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 9px 14px; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, filter .15s;
}
button:hover, .button:hover { border-color: var(--accent-line); background: var(--surface-alt); }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
button:disabled { opacity: .55; cursor: wait; }
.primary, .button.primary { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
.primary:hover, .button.primary:hover { filter: brightness(1.07); background: var(--gradient); border-color: transparent; }
.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.danger:hover { background: #a93226; border-color: #a93226; }
.danger-outline { color: var(--danger); border-color: #f1c4bf; }
.ghost { background: transparent; border-color: transparent; }
.ghost-light { background: rgb(255 255 255 / 10%); color: #fff; border-color: rgb(255 255 255 / 35%); }
.ghost-light:hover { background: rgb(255 255 255 / 18%); border-color: #fff; }
.large { padding: 13px 22px; font-size: 15px; border-radius: 10px; }
.small, button.small, .button.small { padding: 6px 10px; font-size: 12px; }
.block { width: 100%; }
.link-button { background: none; border: 0; color: var(--accent); padding: 4px 6px; font-size: 12px; }
.link-button:hover { background: var(--accent-soft); border: 0; }
.link-button.danger { background: none; color: var(--danger); }
.icon-button { background: transparent; border: 0; padding: 7px; color: var(--ink-soft); border-radius: 8px; }
.icon-button:hover { background: var(--surface-alt); border: 0; }

/* --- Forms ---------------------------------------------------------------------- */
label { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 500; margin-bottom: 15px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { background: var(--surface-alt); color: var(--muted); }
textarea { resize: vertical; min-height: 84px; }
input[type=checkbox] { display: inline-block; width: auto; margin: 3px 0 0; accent-color: var(--accent); }
input[type=color] { width: 56px; height: 40px; padding: 4px; margin: 0; }
.check-row { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; font-size: 13px; color: var(--ink); }
.check-row.inline { margin: 0; align-items: center; }
.check-row.inline input { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
/* Rack color picker: round swatches; the radio itself is hidden, the ring shows the choice. */
.rack-colors { border: 0; padding: 0; margin: 0 0 15px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rack-colors legend { color: var(--ink-soft); font-size: 12px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.rack-colors .swatch { margin: 0; position: relative; cursor: pointer; display: flex; }
.rack-colors .swatch input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rack-colors .swatch span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong); }
.rack-colors .swatch .swatch-none { width: auto; padding: 0 12px; line-height: 26px; border-radius: 15px; font-size: 12px;
  color: var(--ink); background: var(--surface-alt); }
.rack-colors .swatch input[type=radio]:checked + span,
.rack-colors .swatch-custom:has(input[type=radio]:checked) input[type=color] { box-shadow: 0 0 0 2px var(--ink); }
.rack-colors .swatch input[type=radio]:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 2px var(--accent); }
.rack-colors .swatch-custom input[type=color] { width: 44px; height: 30px; padding: 2px; border-radius: 15px; cursor: pointer; }
.form-grid.four { grid-template-columns: repeat(4, 1fr); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.form-error { color: var(--danger); font-size: 12px; min-height: 18px; margin: 4px 0 0; }
.field-hint { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; font-weight: 400; }
.field-hint.ok { color: var(--ok); }
.field-hint.bad { color: var(--danger); }
.input-addon { display: flex; align-items: stretch; margin-top: 6px; }
.input-addon input { margin: 0; border-radius: 8px 0 0 8px; min-width: 0; }
.input-addon span { display: flex; align-items: center; padding: 0 12px; font-size: 13px; color: var(--muted); background: var(--surface-alt); border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 8px 8px 0; white-space: nowrap; }
.copy-field { display: flex; align-items: center; gap: 6px; margin-top: 6px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 12px; }
.copy-field code { background: none; border: 0; padding: 0; flex: 1; overflow-wrap: anywhere; font-size: 13px; color: var(--ink); }
.copy-field code.secret { font-size: 13px; font-weight: 600; }
.color-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.logo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.logo-row label.button { margin: 0; font-weight: 600; color: var(--ink); }
.logo-row p { margin: 6px 0 0; }

/* --- Brand marks ------------------------------------------------------------------ */
.brand-mark { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--gradient); color: #fff; font: 800 18px var(--font-display); }
.brand-mark.has-logo { object-fit: contain; background: #fff; padding: 3px; }
.brand-mark.large { width: 52px; height: 52px; font-size: 24px; border-radius: 13px; }
.brand-mark.xl { width: 72px; height: 72px; font-size: 32px; border-radius: 16px; border: 1px solid var(--line); }

/* --- Boot / error pages ------------------------------------------------------------- */
.boot { min-height: 40vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
#root > .boot { min-height: 100vh; }
.error-page { text-align: center; padding: 24px; max-width: 520px; margin: auto; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Landing ---------------------------------------------------------------------------- */
.landing { background: var(--surface); }
.landing-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 5vw, 64px); background: rgb(255 255 255 / 92%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.landing-brand { display: flex; align-items: center; gap: 10px; font: 800 18px var(--font-display); color: var(--ink); text-decoration: none; }
.landing-brand .brand-mark { width: 34px; height: 34px; }
.landing-nav nav { display: flex; align-items: center; gap: 6px; }
.landing-nav nav a { color: var(--ink-soft); text-decoration: none; padding: 8px 12px; font-weight: 500; }
.landing-nav nav a:hover { color: var(--accent); }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: clamp(48px, 8vw, 96px) clamp(16px, 5vw, 64px); background: var(--gradient); color: #fff; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -1.5px; margin: 14px 0 18px; }
.hero p { font-size: 17px; color: rgb(255 255 255 / 85%); max-width: 520px; }
.hero small { color: rgb(255 255 255 / 70%); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.hero .primary { background: #fff; color: var(--accent-strong); }
.hero .primary:hover { background: #fff; filter: brightness(.96); }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; font-weight: 700; color: var(--accent); margin-bottom: 8px; text-transform: uppercase; }
.eyebrow.light { color: rgb(255 255 255 / 80%); }
.hero-art { display: flex; justify-content: center; perspective: 1200px; }
.art-card { width: min(420px, 100%); background: rgb(255 255 255 / 12%); border: 1px solid rgb(255 255 255 / 25%); border-radius: 18px; padding: 20px; transform: rotateY(-12deg) rotateX(6deg); box-shadow: 0 40px 80px rgb(0 0 0 / 25%); backdrop-filter: blur(6px); }
.art-head { display: flex; gap: 6px; margin-bottom: 18px; }
.art-head span { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 45%); }
.art-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.art-metrics div { background: rgb(255 255 255 / 14%); border-radius: 10px; padding: 10px; }
.art-metrics small { display: block; font-size: 10px; color: rgb(255 255 255 / 75%); }
.art-metrics b { font: 800 20px var(--font-display); }
.art-card .art-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.art-card .art-grid i { height: 30px; border-radius: 5px; background: rgb(255 255 255 / 28%); border: 1px solid rgb(255 255 255 / 40%); }
.art-card .art-grid i.full { background: #ffd27a; border-color: #ffe2a8; }
.art-card .art-grid i.empty { background: transparent; }
.landing-section { padding: clamp(48px, 7vw, 88px) clamp(16px, 5vw, 64px); }
.landing-section.alt { background: var(--bg); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head.left { text-align: left; margin: 28px 0 16px; max-width: none; }
.section-head.left h2 { font-size: 18px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1120px; margin: auto; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.feature h3 { margin: 14px 0 6px; font-size: 16px; }
.feature p { color: var(--muted); margin: 0; }
.feature-icon { width: 44px; height: 44px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; max-width: 1120px; margin: auto; align-items: stretch; }
.plans-grid.compact { max-width: none; margin-bottom: 24px; }
.plan-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.plan-card.featured { border: 2px solid var(--accent); box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 18%, transparent); }
.plan-card.current { border: 2px solid var(--ok); }
.plan-card h3 { font-size: 19px; }
.plan-card > p { min-height: 44px; margin: 6px 0 0; font-size: 13px; }
.plan-card button { margin-top: auto; }
.plan-badge { position: absolute; top: -11px; left: 22px; background: var(--gradient); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.plan-card.current .plan-badge { background: var(--ok); }
.plan-price { margin: 16px 0; display: flex; align-items: baseline; gap: 4px; }
.plan-price b { font: 800 30px var(--font-display); letter-spacing: -1px; }
.plan-price span { color: var(--muted); }
.plan-features { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; font-size: 13px; }
.plan-features li { display: flex; gap: 8px; align-items: center; }
.plan-features li .icon { color: var(--accent); }
.plan-features li.off { color: var(--muted); text-decoration: line-through; }
.plan-features li.off .icon { color: var(--muted); }
.landing-cta { text-align: center; padding: 72px 24px; background: var(--surface); }
.landing-cta p { color: var(--muted); margin-bottom: 24px; }
.landing-footer { display: flex; justify-content: space-between; gap: 12px; padding: 22px clamp(16px, 5vw, 64px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.landing-footer a { color: var(--muted); }
.success-block { text-align: center; padding: 6px 0 4px; }
.success-block > .icon { color: var(--ok); margin-bottom: 8px; }

/* --- Login --------------------------------------------------------------------------- */
.login-screen { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; background: var(--surface); }
.login-art { position: relative; overflow: hidden; padding: 64px 10%; background: var(--gradient); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.login-art h1 { color: #fff; font-size: clamp(36px, 4vw, 52px); line-height: 1.15; margin: 40px 0 14px; }
.login-art p { color: rgb(255 255 255 / 85%); font-size: 17px; }
.login-brand { display: flex; align-items: center; gap: 12px; font: 800 20px var(--font-display); }
.login-art .art-grid { display: grid; grid-template-columns: repeat(3, 54px); gap: 9px; margin-top: 36px; transform: skewY(-8deg); }
.login-art .art-grid i { height: 42px; border-radius: 6px; background: rgb(255 255 255 / 18%); border: 1px solid rgb(255 255 255 / 35%); }
.login-art .art-grid i:nth-child(3n) { background: rgb(255 255 255 / 40%); }
.login-form { align-self: center; width: 100%; max-width: 420px; margin: auto; padding: 32px; }
.login-form h2 { font-size: 28px; }
.login-form p.muted { margin-bottom: 26px; }
.login-form button { margin-top: 6px; }
.login-form small.center { margin-top: 22px; }
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg); }
.card-form { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.card-form .brand-mark { margin-bottom: 18px; }

/* --- App shell ------------------------------------------------------------------------- */
#sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--sidebar); color: rgb(255 255 255 / 82%); z-index: 30; display: flex; flex-direction: column; overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none; }
/* No visible scrollbar: on short screens the menu still scrolls with the wheel or touch. */
#sidebar::-webkit-scrollbar { display: none; }
#sidebar .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; color: #fff; text-decoration: none; font: 800 17px var(--font-display); }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav { display: grid; gap: 1px; padding: 0 10px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 7px; color: rgb(255 255 255 / 80%); text-decoration: none; font-weight: 500; font-size: 13px; line-height: 1.35; }
#nav a .icon { width: 16px; height: 16px; flex-shrink: 0; }
#nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav a:hover { background: rgb(255 255 255 / 9%); color: #fff; }
#nav a.active { background: rgb(255 255 255 / 15%); color: #fff; box-shadow: inset 3px 0 0 #fff; }
.nav-label { font-size: 9.5px; letter-spacing: 1.5px; font-weight: 700; color: rgb(255 255 255 / 50%); margin: 10px 12px 3px; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: #ffd27a; color: #5c3d00; font-size: 11px; text-align: center; }
.sidebar-bottom { margin-top: auto; padding: 12px 14px; font-size: 11px; color: rgb(255 255 255 / 60%); display: grid; gap: 8px; }
.plan-chip { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgb(255 255 255 / 20%); border-radius: 8px; color: rgb(255 255 255 / 85%); }
.main-wrap { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb span { margin: 0 8px; color: var(--line-strong); }
.breadcrumb b { color: var(--ink); font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 6px; }
.user-button { border: 0; background: transparent; padding: 5px 8px; gap: 10px; }
.user-button:hover { background: var(--surface-alt); border: 0; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.user-meta { display: grid; text-align: left; line-height: 1.25; }
.user-meta b { font-size: 13px; }
.user-meta small { font-size: 11px; color: var(--muted); font-weight: 500; }
#menu-toggle { display: none; }
.scrim { display: none; }
main#main { padding: 20px 24px 32px; width: 100%; max-width: 1500px; margin: 0 auto; }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 32px; font-size: 13px; border-bottom: 1px solid; }
.banner span { flex: 1; min-width: 200px; }
.banner.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }
.banner.warning { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.banner.danger { background: var(--danger-soft); border-color: #f5c6c0; color: var(--danger); }

/* --- Page content -------------------------------------------------------------------------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 720px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric { padding: 18px 20px; }
.metric-label { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; font-weight: 500; }
.metric-label span { color: var(--accent); }
.metric strong { display: block; font: 800 30px var(--font-display); letter-spacing: -1px; margin: 10px 0 6px; }
.metric strong small { font-size: 18px; }
.metric small { font-size: 12px; color: var(--muted); }
.metric small b { color: var(--accent); font-weight: 600; }
.metric.warn { border-color: var(--warn-line); background: linear-gradient(180deg, var(--warn-soft), var(--surface) 70%); }
.metric.warn .metric-label span { color: var(--warn); }
.meter { height: 6px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 6px 0 8px; }
.meter span { display: block; height: 100%; background: var(--gradient); border-radius: 6px; }
.meter.warn span { background: #e0a526; }
.columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; margin-bottom: 22px; }
.panel { overflow: hidden; margin-bottom: 22px; }
.columns .panel { margin-bottom: 0; }
.panel.narrow { max-width: 720px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head p { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.panel-content { padding: 20px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar select { width: auto; min-width: 170px; margin: 0; }
.search { position: relative; flex: 0 1 320px; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { margin: 0; padding-left: 34px; }
.filter-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.notice { display: block; background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 12px 15px; border-radius: 8px; font-size: 13px; line-height: 1.6; color: var(--accent-strong); margin-bottom: 18px; }
.notice.warning { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.notice .icon { margin-right: 4px; }
.empty-state { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty-state .icon { color: var(--line-strong); margin-bottom: 8px; }
.empty-state p { margin: 0; }
.badge { font-size: 10px; letter-spacing: .5px; padding: 4px 8px; border-radius: 5px; background: var(--ok-soft); color: var(--ok); font-weight: 700; }

/* --- Tables & pills --------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; background: var(--surface-alt); padding: 11px 18px; white-space: nowrap; }
td { font-size: 13px; padding: 13px 18px; border-top: 1px solid var(--line); vertical-align: middle; }
td small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
tr:hover td { background: color-mix(in srgb, var(--accent) 3%, white); }
tr.inactive td { opacity: .55; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { text-align: right; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; border-radius: 20px; padding: 3px 9px; font-size: 11px; font-weight: 600; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.rejected { background: var(--danger-soft); color: var(--danger); }
.method { display: inline-block; min-width: 54px; text-align: center; font: 700 11px ui-monospace, Consolas, monospace; padding: 3px 6px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); }
.method.post { background: var(--accent-soft); color: var(--accent-strong); }
.method.patch { background: var(--warn-soft); color: var(--warn); }
.code-block { font: 12px/1.6 ui-monospace, 'Cascadia Code', Consolas, monospace; background: #0f1b33; color: #dbe7ff; padding: 14px 16px; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 14px; }
.summary-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; font-size: 13px; }
.summary-list b { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .3px; }
.list-row { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.invoice-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.invoice-box span { display: block; }
.invoice-box b { font-size: 16px; }
.usage { margin-bottom: 12px; }
.usage > div:first-child { display: flex; justify-content: space-between; font-size: 13px; }

/* --- Map & dashboard widgets ---------------------------------------------------------------------- */
.warehouse-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.warehouse-preview > div { min-width: 0; }
.aisle-label { font-size: 11px; color: var(--muted); letter-spacing: .5px; margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rack-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.cell { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 6px; min-height: 40px; color: var(--accent-strong); font-size: 11px; padding: 6px; font-weight: 600; min-width: 0; }
.cell:hover { border-color: var(--accent); background: var(--accent-soft); }
.cell.empty { background: var(--surface-alt); border-color: var(--line); color: var(--muted); }
.cell.full { background: #fff1d6; border-color: #f2d59a; color: #8a5a00; }
.legend { display: flex; gap: 18px; margin-top: 18px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; background: var(--accent-line); vertical-align: -1px; }
.legend i.empty { background: var(--line); }
.legend i.full { background: #f2d59a; }
.alert-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.alert-item:last-of-type { border-bottom: 0; }
.alert-icon { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); border-radius: 8px; }
.alert-item strong { font-size: 13px; }
.alert-item p { font-size: 12px; color: var(--muted); margin: 2px 0; }
.map-description { font-size: 12px; color: var(--muted); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.rack { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.rack h3 { margin-bottom: 12px; font-size: 12px; color: var(--ink-soft); }
.rack .cell { width: 100%; margin: 4px 0; justify-content: space-between; min-height: 46px; font-weight: 500; }
.map-switch { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.map-switch .tabs { border-bottom: 0; margin-bottom: -1px; }
.demo-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; cursor: pointer; }
.demo-toggle input { margin: 0; }
.wh3d { position: relative; background: linear-gradient(180deg, #f8fafd 0%, #edf2f8 100%); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.wh3d-canvas { display: block; width: 100%; height: clamp(380px, 64vh, 760px); touch-action: none; cursor: grab; user-select: none; }
.wh3d-controls { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.wh3d-controls .icon-button { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); width: 36px; height: 36px; display: grid; place-items: center; padding: 0; color: var(--ink-soft); }
.wh3d-controls .icon-button:hover { color: var(--accent); border-color: var(--accent-line); }
.wh3d-help { position: absolute; left: 12px; bottom: 10px; right: 60px; margin: 0; font-size: 11px; color: var(--muted); pointer-events: none; }
.wh3d-tip { position: absolute; z-index: 2; min-width: 190px; max-width: 280px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); font-size: 12px; pointer-events: none; }
.wh3d-tip strong { display: block; font-size: 13px; color: var(--ink); }
.wh3d-tip small { display: block; color: var(--muted); margin-top: 2px; }
.wh3d-tip ul { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); }
.wh3d-tip li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.wh3d-tip li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh3d-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(11 23 51 / 38%); color: #fff; font-weight: 600; font-size: 15px; pointer-events: none; }
.wh3d-hint[hidden] { display: none; }
.wh3d .empty-state { min-height: 300px; display: grid; place-content: center; }
.legend i.used3d { background: var(--accent); }
.legend i.full { background: #f2d59a; }
.legend i.dim { background: var(--accent-line); opacity: .35; }
.wh3d + .legend i.full { background: #e3a43a; }
@media (max-width: 720px) { .wh3d-help { display: none; } .wh3d-canvas { height: 52vh; } }

/* --- Floor plan editor ------------------------------------------------------------------------------- */
.plan-editor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.plan-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); background: var(--surface-alt); }
.plan-toolbar select { width: auto; min-width: 160px; margin: 0; }
.plan-toolbar button { display: inline-flex; align-items: center; gap: 6px; }
.plan-spacer { flex: 1; }
.plan-stage { position: relative; }
.plan-stage canvas { display: block; width: 100%; height: clamp(380px, 62vh, 740px); touch-action: none; cursor: grab; outline: none; background: #fbfcfe; }
.plan-stage canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-line); }
.plan-info { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.plan-info kbd { font: 600 11px ui-monospace, Consolas, monospace; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
.plan-warning { color: var(--danger); font-weight: 600; margin-left: 6px; }
.plan-warning .icon { vertical-align: -2px; }
.plan-dirty { color: var(--warn); font-weight: 600; margin-left: 6px; }
.confirm-text { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 6px; }
button.primary.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (max-width: 720px) { .plan-spacer { display: none; } .plan-stage canvas { height: 56vh; } }

/* --- Dialog & toast ---------------------------------------------------------------------------------- */
dialog { border: 1px solid var(--line); border-radius: 14px; width: calc(100% - 32px); max-width: 600px; max-height: 90vh; overflow-y: auto; padding: 24px; color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.wide { max-width: 780px; }
dialog.xwide { max-width: 1180px; }
dialog::backdrop { background: rgb(15 27 51 / 50%); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { font-size: 20px; margin: 0; }
.modal-head .eyebrow:empty { display: none; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(420px, calc(100% - 40px)); padding: 14px 18px; border-radius: 10px; font-size: 13px; box-shadow: 0 10px 30px rgb(0 0 0 / 14%); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.toast.success { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }

/* --- Welcome greeting ------------------------------------------------------------------------------------ */
.welcome { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 14px;
  padding: 14px 22px 14px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: welcome-in .45s cubic-bezier(.2, .9, .3, 1.2); transition: opacity .6s, transform .6s; max-width: calc(100% - 32px); }
.welcome b { display: block; font: 800 18px var(--font-display); }
.welcome span:not(.avatar) { color: var(--muted); font-size: 13px; }
.welcome.hide { opacity: 0; transform: translate(-50%, -16px); }
.avatar.large { width: 46px; height: 46px; font-size: 20px; background: var(--gradient); color: #fff; flex-shrink: 0; }
@keyframes welcome-in { from { opacity: 0; transform: translate(-50%, -20px) scale(.96); } }

/* --- Tabs, timelines, misc --------------------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 10px 14px; color: var(--muted); }
.tabs button:hover { background: none; color: var(--ink); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs button span { font-size: 11px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; }
.metrics.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric.warn.rejected { border-color: #f5c6c0; background: linear-gradient(180deg, var(--danger-soft), var(--surface) 70%); }
.metric.warn.rejected .metric-label span { color: var(--danger); }
.panel-foot { padding: 0 20px 16px; }
.small-boot { min-height: 80px; }
.alert-icon.rejected { background: var(--danger-soft); color: var(--danger); }
.span-2 { grid-column: 1 / -1; }
.span-2 code { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.invoice-box.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.invoice-box small { display: block; color: var(--muted); font-size: 11px; }
.ok-text { display: block; color: var(--ok); font-size: 11px; margin-top: 4px; }
.warn-text { display: block; color: var(--warn); font-size: 11px; margin-top: 4px; white-space: normal; }
td.wrap { white-space: normal; min-width: 220px; }
.align-end { align-self: end; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; border: 2px dashed var(--line-strong);
  border-radius: 12px; text-align: center; cursor: pointer; color: var(--ink); background: var(--surface-alt); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .icon { color: var(--accent); }
.nfe-table { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; }
.nfe-table td { vertical-align: top; }
.nfe-table input:not([type=checkbox]), .nfe-table select { margin: 0 0 6px; padding: 7px 9px; font-size: 13px; min-width: 130px; }
.nfe-table .tiny { width: 76px; min-width: 0 !important; }
.nfe-table .check-row { font-size: 12px; margin: 2px 0 0; justify-content: flex-start; }
.nfe-table td:nth-child(3) { min-width: 300px; }
.nfe-table td:first-child { min-width: 180px; white-space: normal; }
.inline-fields { display: flex; gap: 6px; }
.inline-fields select { flex: 1; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline-icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.timeline p { margin: 3px 0 2px; }

/* --- Legal pages ------------------------------------------------------------------------------------------- */
.legal { max-width: 820px; margin: 0 auto; padding: 40px 20px 80px; background: var(--surface); min-height: 100vh; }
.legal h1 { font-size: 32px; margin-top: 18px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.75; }
.center-link { display: block; margin: 4px auto 0; }
.form-actions.left { justify-content: flex-start; }
.inline-settings { display: flex; align-items: flex-end; gap: 10px; max-width: 520px; }
.inline-settings label { flex: 1; margin: 0; }

/* --- Baskets & NFC ---------------------------------------------------------------------------------------- */
.nfc-panel { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 80%); }
.nfc-reader { display: grid; grid-template-columns: auto 1fr minmax(260px, 420px); gap: 16px 20px; align-items: center; }
.nfc-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--gradient); color: #fff; }
.nfc-copy p { margin: 4px 0 0; }
.nfc-form { display: flex; gap: 8px; }
.nfc-form input { margin: 0; font-size: 16px; letter-spacing: 1px; }
.nfc-actions { grid-column: 2 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.person-card { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.person-card p { margin: 2px 0 0; }
.addon-button { border-radius: 0 8px 8px 0; border-left: 0; margin: 0; }

/* --- Fleet ---------------------------------------------------------------------------------------------------- */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.vehicle-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.vehicle-card:hover, .vehicle-card:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 30px rgb(16 42 67 / 12%); }
.vehicle-card.inactive { opacity: .6; }
.vehicle-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--surface-alt); }
.vehicle-photo.empty { display: grid; place-items: center; color: var(--line-strong); }
.vehicle-photo.small { width: 160px; border-radius: 10px; border: 1px solid var(--line); }
.vehicle-photo.detail { border-radius: 12px; border: 1px solid var(--line); }
.vehicle-body { padding: 14px 16px 16px; }
.vehicle-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.vehicle-tech { margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.vehicle-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; background: var(--surface-alt); border-radius: 10px; padding: 10px 4px; }
.vehicle-stats b { display: block; font: 800 18px var(--font-display); }
.vehicle-stats span { font-size: 11px; color: var(--muted); }
.vehicle-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.vehicle-detail { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 20px; margin-bottom: 18px; align-items: start; }
.metrics.compact .metric { padding: 14px; }
.metrics.compact .metric strong { font-size: 22px; margin: 6px 0 4px; }
.photo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.photo-row label.button { margin: 0; color: var(--ink); font-weight: 600; }
.photo-row p { margin: 6px 0 0; }
/* Brazilian Mercosul plate */
.plate { display: inline-flex; flex-direction: column; align-items: center; min-width: 96px; padding: 0 8px 2px; border: 2px solid #1d2b44; border-radius: 6px;
  background: #fff; font: 800 17px/1.1 ui-monospace, Consolas, monospace; letter-spacing: 1.5px; color: #111; overflow: hidden; }
.plate small { align-self: stretch; text-align: center; background: #1f4ea3; color: #fff; font: 700 8px/1.6 var(--font); letter-spacing: 2px; margin: 0 -8px 2px; }

/* --- Service orders, tools and check-lists ------------------------------------------------------------------ */
.pill.info { background: var(--accent-soft); color: var(--accent-strong); }
.pill.muted { background: var(--surface-alt); color: var(--muted); }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tech-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.tech-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; }
.tech-card .vehicle-stats { margin-bottom: 12px; }
.tech-card ul { margin: 0 0 12px; padding-left: 18px; font-size: 13px; }
.signature-field { margin: 14px 0; }
.signature-label { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.signature-pad { display: block; width: 100%; height: 170px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.signature-img { display: block; max-width: 320px; width: 100%; height: auto; border-bottom: 1px solid var(--ink); background: #fff; }
.term-box { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 8px; padding: 12px 15px; font-size: 13px; line-height: 1.6; max-height: 220px; overflow-y: auto; }
.check-table td { vertical-align: middle; }
.check-table input, .check-table select { margin: 0; min-width: 70px; }
.check-table tr.diff td { background: var(--warn-soft); }
.qty-input { width: 90px; margin: 0; }
.danger-text { color: var(--danger); font-weight: 700; }
.table-wrap + label, .table-wrap + p + label { margin-top: 16px; }
.inline-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 13px; }
.inline-label input { width: auto; margin: 0; }
#material-form select { flex: 1 1 260px; margin: 0; }
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; color: #000; font: 11pt/1.45 var(--font); }
  #print-area h1 { font-size: 16pt; margin: 0 0 4px; }
  #print-area h2 { font-size: 12pt; margin: 16px 0 6px; }
  #print-area table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  #print-area th, #print-area td { border: 1px solid #999; padding: 4px 6px; text-align: left; }
  #print-area .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
  #print-area .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 24px; page-break-inside: avoid; }
  #print-area .sign { align-items: end; }
  #print-area .sign img { height: 70px; width: auto; max-width: 100%; display: block; }
  #print-area .line { border-top: 1px solid #000; padding-top: 4px; font-size: 9.5pt; }
  #print-area .small { font-size: 8.5pt; color: #444; word-break: break-all; }
  @page { size: A4; margin: 14mm; }
}

/* --- Responsive ----------------------------------------------------------------------------------------- */
@media (max-width: 1100px) { .metrics.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.menu-open #sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgb(15 27 51 / 40%); }
  .main-wrap { margin-left: 0; }
  #menu-toggle { display: inline-flex; }
  .topbar { padding: 0 12px; height: 60px; }
  .banner { padding: 10px 16px; }
  main#main { padding: 20px 16px 32px; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .landing-nav nav a { display: none; }
}
@media (max-width: 720px) {
  h1 { font-size: 24px; }
  .breadcrumb, .user-meta { display: none; }
  .page-head { align-items: flex-start; }
  .metrics { gap: 10px; }
  .metric { padding: 14px; }
  .metric strong { font-size: 24px; }
  .form-grid, .form-grid.four, .summary-list, .invoice-box, .invoice-box.four { grid-template-columns: 1fr; }
  .metrics.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome { top: 12px; width: calc(100% - 24px); }
  .nfc-reader { grid-template-columns: 1fr; }
  .nfc-icon { display: none; }
  .nfc-actions { grid-column: auto; }
  .vehicle-detail { grid-template-columns: 1fr; }
  .inline-settings { flex-direction: column; align-items: stretch; }
  .feature-grid { grid-template-columns: 1fr; }
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .mobile-only { display: flex; margin-bottom: 26px; }
  .login-form { padding: 28px 20px; }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rack { padding: 12px; }
  .toolbar select { flex: 1; min-width: 0; }
  .search { flex: 1 1 100%; }
  .landing-nav .ghost { display: none; }
  .landing-footer { flex-direction: column; }
  .panel-head { padding: 16px; flex-wrap: wrap; }
  .panel-content { padding: 16px; }
  th, td { padding: 11px 12px; }
}
