:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #647282;
  --line: #d8e0e8;
  --primary: #176b87;
  --primary-dark: #0f5268;
  --accent: #d97706;
  --ok: #16835f;
  font-size: 17px;
  font-family: Segoe UI, Roboto, Arial, sans-serif;
}
body.theme-dark {
  --bg: #162026;
  --surface: #202b32;
  --ink: #edf4f7;
  --muted: #9fb1bc;
  --line: #34454f;
  --primary: #20a3c2;
  --primary-dark: #8be2f1;
  --accent: #ff8f3d;
  --ok: #58d68d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 1rem; }
button, input, select, textarea { font: inherit; font-size: 16px; }
button, a { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.loading-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(8,18,24,.54); opacity: 0; pointer-events: none; transition: opacity .18s ease; backdrop-filter: blur(5px); }
.loading-backdrop.visible { opacity: 1; pointer-events: auto; }
.loading-card { min-width: 260px; border-radius: 8px; padding: 24px; display: grid; place-items: center; gap: 12px; background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,247,251,.96)); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 28px 80px rgba(0,0,0,.32); color: #102532; text-align: center; }
.loading-mark { width: 54px; height: 54px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #176b87, #ff8f3d); color: #fff; font-size: 1.2rem; font-weight: 900; box-shadow: 0 16px 34px rgba(23,107,135,.26); overflow: hidden; }
.loading-mark.logo-mark { background: #fff; padding: 6px; }
.loading-mark img { width: 100%; height: 100%; object-fit: contain; }
.loading-spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid #d9e9ef; border-top-color: #176b87; animation: spinLoading .75s linear infinite; }
.loading-card strong { font-size: 1.15rem; }
.loading-card span { color: #647282; font-weight: 800; }
@keyframes spinLoading { to { transform: rotate(360deg); } }
.soft-refreshing { position: relative; }
.soft-refreshing::after {
  content: "Atualizando dados...";
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(15,82,104,.94);
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  box-shadow: 0 14px 36px rgba(0,0,0,.24);
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(135deg, #071923 0%, #102532 45%, #176b87 100%);
  background-size: 42px 42px, 42px 42px, auto;
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,143,61,.18), transparent 34%, rgba(8,18,24,.28));
  pointer-events: none;
}
.login-box, .panel, .metric, .check-item { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; box-shadow: 0 10px 30px rgba(31,44,58,.05); }
.login-box {
  width: min(450px, 100%);
  display: grid;
  gap: 15px;
  position: relative;
  z-index: 1;
  padding: 24px;
  border-color: rgba(255,255,255,.34);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(241,248,251,.96));
  box-shadow: 0 32px 90px rgba(0,0,0,.34);
}
.login-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.login-brand .brand-mark { width: 56px; height: 56px; background: linear-gradient(135deg, #176b87, #ff8f3d); box-shadow: 0 16px 30px rgba(23,107,135,.25); }
.login-brand strong { display: block; color: #102532; font-size: 1.45rem; line-height: 1.12; overflow-wrap: anywhere; }
.login-brand small { display: block; color: #647282; font-size: .9rem; font-weight: 800; margin-top: 4px; }
.login-kicker { display: block; color: #176b87 !important; margin: 0 0 2px !important; font-size: .75rem !important; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.login-produced { position: fixed; right: 18px; bottom: 14px; z-index: 1; color: rgba(255,255,255,.78); font-size: .82rem; font-weight: 800; }
.tech-diagnostic { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tech-diagnostic.hidden { display: none; }
.tech-head strong { display: block; color: var(--primary-dark); font-size: 1.05rem; }
.tech-head span { display: block; margin-top: 3px; color: var(--muted); font-size: .88rem; line-height: 1.3; }
.tech-check { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-weight: 800; }
.tech-check input { width: 20px; height: 20px; min-height: 20px; padding: 0; flex: 0 0 auto; }
.tech-check span { margin: 0; color: var(--ink); font-size: .92rem; }
.tech-status { border-radius: 8px; padding: 12px; font-weight: 900; text-align: center; }
.tech-status.ok { background: #eaf8f0; color: #116b4e; border: 1px solid #bde8cd; }
.tech-status.fail { background: #fff0ee; color: #a12a20; border: 1px solid #f1b8b0; }
.tech-grid { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 10px; padding: 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.tech-grid span { color: var(--muted); font-size: .86rem; font-weight: 800; }
.tech-grid strong { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: .9rem; }
.tech-grid.compact { grid-template-columns: 88px 1fr; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: white; font-weight: 800; }
.brand-mark.logo-mark { background: #fff; padding: 5px; overflow: hidden; }
.brand-mark.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-logo { width: 58px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: #ffffff; color: #102532; font-weight: 900; overflow: hidden; border: 1px solid rgba(255,255,255,.18); }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.brand-logo span { display: none; margin: 0; color: #102532; font-size: 1rem; }
.brand-logo.logo-missing img { display: none; }
.brand-logo.logo-missing span { display: block; }
.brand span, .muted { display: block; color: #647282; font-size: .9rem; margin-top: 3px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.app-shell.dashboard-fullscreen { grid-template-columns: 1fr; background: #151d22; width: 100vw; height: 100vh; overflow: hidden; }
.app-shell.dashboard-fullscreen .topbar { display: none; }
.app-shell.dashboard-fullscreen .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-105%); transition: .2s; z-index: 40; }
.app-shell.dashboard-fullscreen.menu-open .sidebar { transform: translateX(0); }
.app-shell.dashboard-fullscreen.menu-open .menu-dismiss { display: block; z-index: 35; }
.app-shell.dashboard-fullscreen main { min-height: 100vh; overflow: hidden; }
.app-shell.dashboard-fullscreen .page { min-height: 100vh; padding: 0; }
.app-shell.dashboard-fullscreen .ops-fullscreen-page { width: 100vw; height: 100vh; }
.sidebar { background:
  linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 34%),
  linear-gradient(160deg, #071923 0%, #102532 48%, #153846 100%);
  color: white; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 100vh; overflow-y: auto; overscroll-behavior: contain; box-shadow: inset -1px 0 0 rgba(255,255,255,.08), 18px 0 40px rgba(5,18,26,.08); }
.sidebar .brand { min-height: 74px; padding: 10px; border-radius: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.sidebar .brand strong { color: #ffffff; letter-spacing: .2px; }
.sidebar .brand span { color: #a8c4d1; font-weight: 700; }
.sidebar .brand-logo { box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.menu-group { color: #8bd9ee; font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin: 16px 8px 0; padding-left: 12px; position: relative; }
.menu-group::before { content: ''; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #ff8f3d; box-shadow: 0 0 14px #ff8f3d; transform: translateY(-50%); }
.sidebar button { justify-content: flex-start; color: #d7e4ec; background: rgba(255,255,255,.035); border: 1px solid transparent; border-radius: 8px; min-height: 50px; padding: 9px 11px; text-align: left; font-size: 1rem; display: flex; align-items: center; gap: 11px; position: relative; overflow: hidden; transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease; }
.sidebar button::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(32,163,194,.18), rgba(255,143,61,.12)); opacity: 0; transition: opacity .18s ease; }
.sidebar button.active, .sidebar button:hover { background: rgba(255,255,255,.1); border-color: rgba(139,226,241,.28); color: white; transform: translateX(3px); box-shadow: 0 12px 24px rgba(0,0,0,.14); }
.sidebar button.active::after, .sidebar button:hover::after { opacity: 1; }
.sidebar button.active { border-left: 4px solid #ff8f3d; }
.menu-icon { width: 34px; height: 34px; border-radius: 8px; display: grid !important; place-items: center; flex: 0 0 auto; background: rgba(255,255,255,.1); color: #8be2f1 !important; font-size: .9rem !important; font-weight: 900; margin: 0 !important; position: relative; z-index: 1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sidebar button.active .menu-icon, .sidebar button:hover .menu-icon { background: linear-gradient(135deg, #20a3c2, #ff8f3d); color: #ffffff !important; box-shadow: 0 10px 22px rgba(32,163,194,.24); }
.menu-label { color: inherit !important; display: block; margin: 0 !important; position: relative; z-index: 1; font-weight: 800; }
.logout-button { margin-top: auto; color: #ffd6d2 !important; }
.logout-button .menu-icon { color: #ffd6d2 !important; }
.menu-dismiss { position: fixed; inset: 0; z-index: 8; border: 0; background: rgba(16,37,50,.3); display: none; }
.topbar { min-height: 64px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.app-title { font-size: 1.35rem; white-space: nowrap; }
.theme-toggle { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; min-height: 42px; padding: 8px 14px; font-weight: 800; }
.page { padding: 24px; display: grid; gap: 20px; }
.ops-fullscreen-page { min-height: 100vh; max-height: 100vh; overflow: hidden; padding: 12px; align-content: start; background:
  radial-gradient(circle at 12% 8%, rgba(47,128,237,.24), transparent 30%),
  radial-gradient(circle at 88% 14%, rgba(255,143,61,.18), transparent 28%),
  linear-gradient(135deg, #0e161b 0%, #14232a 45%, #182127 100%);
  color: #edf4f7; }
.two-cols { grid-template-columns: minmax(320px, 520px) 1fr; align-items: start; }
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.primary, .secondary, .ghost { border: 0; border-radius: 8px; min-height: 50px; padding: 13px 16px; display: inline-flex; align-items: center; gap: 9px; justify-content: center; font-size: 1rem; }
.primary { background: var(--primary); color: white; font-weight: 700; }
.primary:hover { background: var(--primary-dark); }
.secondary { background: #e6f2f5; color: var(--primary-dark); border: 1px solid #b9dbe4; font-weight: 700; }
.file-action { position: relative; overflow: hidden; cursor: pointer; }
.file-action input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ghost { background: #ffffff; border: 1px solid #b8c5d2; color: #263747; font-weight: 700; }
.danger { background: #b42318; color: white; border: 0; font-weight: 700; }
.small { min-height: 38px; padding: 8px 11px; font-size: .92rem; }
.full { width: 100%; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; min-height: 50px; padding: 12px 13px; background: var(--surface); color: var(--ink); font-size: 1rem; }
textarea { min-height: 100px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 14px; }
.form-grid h2, .form-grid .wide, .form-grid button, .notice { grid-column: 1 / -1; }
.field span { color: var(--muted); font-size: .92rem; display: block; margin-bottom: 6px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.metric-grid.compact { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.metric span { color: var(--muted); display: block; }
.metric strong { font-size: 34px; margin-top: 6px; display: block; }
.ops-hero { background: rgba(255,255,255,.08); color: white; border-radius: 8px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 18px 46px rgba(0,0,0,.24); backdrop-filter: blur(10px); }
.ops-title-row { display: flex; align-items: center; gap: 12px; }
.ops-logo { width: 48px; height: 48px; border-radius: 8px; background: white; object-fit: contain; padding: 5px; }
.ops-hero h2 { margin: 2px 0 0; font-size: 2rem; line-height: .98; text-transform: uppercase; }
.ops-hero p { margin: 5px 0 0; color: #b9d7e4; font-weight: 700; font-size: .9rem; }
.ops-live { display: inline-flex; align-items: center; gap: 8px; color: #8be2f1; font-size: .78rem; font-weight: 900; text-transform: uppercase; }
.ops-live::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #58d68d; box-shadow: 0 0 18px #58d68d; }
.ops-summary { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 8px; }
.ops-mini { background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.15); border-left: 5px solid var(--lane); border-radius: 8px; padding: 9px 12px; box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.ops-mini span { color: #bdd2dc; font-weight: 900; font-size: .86rem; text-transform: uppercase; }
.ops-mini strong { display: block; margin-top: 2px; font-size: 1.65rem; color: #ffffff; line-height: 1; text-shadow: 0 6px 18px rgba(0,0,0,.28); }
.ops-board { display: grid; grid-template-columns: repeat(6, minmax(205px, 1fr)); gap: 9px; overflow: hidden; align-items: stretch; min-height: 0; }
.ops-lane { height: calc(100vh - 175px); min-height: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--lane) 20%, #19242b), rgba(18,29,35,.86)); border: 1px solid rgba(255,255,255,.14); border-top: 5px solid var(--lane); border-radius: 8px; padding: 7px; box-shadow: 0 16px 38px rgba(0,0,0,.24); overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr); }
.ops-lane > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.ops-lane > header strong { font-size: .9rem; color: #ffffff; text-transform: uppercase; line-height: 1.08; overflow-wrap: anywhere; }
.ops-lane > header span { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: var(--lane); color: white; font-weight: 900; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lane) 22%, transparent); }
.ops-lane-list { display: grid; gap: 6px; align-content: start; max-height: 100%; overflow: auto; padding-right: 2px; overscroll-behavior: contain; }
.ops-card { background: linear-gradient(180deg, #ffffff, #f2f7fb); border: 1px solid rgba(255,255,255,.7); border-left: 4px solid var(--lane); border-radius: 8px; padding: 7px; display: grid; gap: 4px; box-shadow: 0 12px 24px rgba(0,0,0,.18); }
.ops-card header { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.ops-card strong { display: block; font-size: .96rem; color: #0f5268; }
.ops-card header span { display: block; margin-top: 4px; color: #526575; font-size: .8rem; font-weight: 900; text-transform: uppercase; }
.ops-card header b { white-space: nowrap; border-radius: 999px; background: color-mix(in srgb, var(--lane) 18%, #ffffff); color: #0f5268; padding: 5px 9px; font-size: .78rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lane) 28%, transparent); }
.ops-card p { margin: 0; font-weight: 900; line-height: 1.08; font-size: .78rem; color: #15242d; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ops-card-grid { display: grid; gap: 4px; }
.ops-card-grid span { display: grid; grid-template-columns: 58px 1fr; gap: 5px; font-size: .72rem; color: #17202a; }
.ops-card-grid span::first-line { color: var(--muted); }
.ops-card footer { display: flex; justify-content: space-between; gap: 6px; align-items: center; border-top: 1px solid #dfe8ee; padding-top: 5px; color: #667789; font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.ops-origin { color: #0f5268; }
.mercosul-plate { width: 98px; min-height: 31px; border: 2px solid #161b22; border-radius: 5px; background: #f8fafc; color: #101820 !important; display: grid !important; place-items: end center; padding: 11px 4px 3px; position: relative; font-family: Arial Black, Impact, sans-serif; letter-spacing: .5px; line-height: 1; font-size: .78rem; box-shadow: inset 0 0 0 1px #e5e7eb, 0 8px 18px rgba(16,24,32,.18); }
.mercosul-plate::before { content: "BRASIL"; position: absolute; left: -2px; right: -2px; top: -2px; height: 13px; border-radius: 4px 4px 0 0; background: #0647a5; color: white; display: grid; place-items: center; font: 700 7px Segoe UI, Arial, sans-serif; letter-spacing: .8px; }
.mercosul-plate.mini { width: 118px; min-height: 36px; padding: 13px 5px 3px; font-size: .9rem; letter-spacing: .8px; box-shadow: inset 0 0 0 1px #e5e7eb, 0 7px 15px rgba(16,24,32,.14); }
.mercosul-plate.mini::before { height: 12px; font-size: 6px; }
.empty-lane { margin: 24px 0; color: #bdd2dc; text-align: center; font-weight: 900; }
.approval-banner {
  border: 1px solid #b7efd4;
  border-left: 6px solid #16a05f;
  border-radius: 8px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #e8fff3, #f8fffb);
  color: #0f6b43;
  display: grid;
  gap: 3px;
  box-shadow: 0 12px 30px rgba(22,160,95,.12);
}
.approval-banner strong { font-size: 1.05rem; text-transform: uppercase; }
.approval-banner span { color: #227455; font-weight: 800; }
.consulta-panel .compact-table td, .consulta-panel .compact-table th { padding: 8px 10px; }
.dashboard-finance { display: grid; gap: 14px; }
.finance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.finance-grid > div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.finance-grid span { display: block; color: var(--muted); font-size: .92rem; }
.finance-grid strong { display: block; margin-top: 6px; color: var(--primary-dark); font-size: 1.25rem; }
.dash-hero { background: #202b32; color: white; border-radius: 8px; padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid #34454f; }
.dash-hero h2 { margin: 0; font-size: 1.8rem; }
.dash-hero p { margin: 6px 0 0; color: #b9c8cf; }
.dash-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.dash-card { background: #202b32; color: white; border: 1px solid #34454f; border-radius: 8px; min-height: 122px; padding: 18px; position: relative; overflow: hidden; }
.dash-card span { display: block; color: #b9c8cf; font-weight: 700; }
.dash-card strong { display: block; font-size: 36px; margin-top: 8px; }
.dash-card i { position: absolute; left: 16px; right: 16px; bottom: 14px; height: 18px; background: linear-gradient(90deg, transparent 0 10%, #20a3c2 10% 18%, transparent 18% 30%, #ff5f7a 30% 42%, transparent 42% 56%, #1fc7a7 56% 70%, transparent 70% 82%, #ff8f3d 82% 90%, transparent 90%); opacity: .75; }
.report-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.executive-dashboard { background: #151d22; padding: 18px; border-radius: 8px; min-height: 100vh; align-content: start; }
.tv-controls { position: fixed; right: 18px; top: 14px; z-index: 25; display: flex; gap: 10px; opacity: .2; transition: .2s; }
.tv-controls:hover { opacity: 1; }
.tv-controls button { min-height: 38px; padding: 8px 12px; }
.xl-dashboard { display: grid; grid-template-columns: 180px 1fr; gap: 16px; color: #edf4f7; }
.xl-filter, .xl-panel, .xl-kpi, .dash-hero { background: #202b32; border: 1px solid #34454f; box-shadow: 0 18px 45px rgba(0,0,0,.24); }
.xl-filter { border-radius: 8px; padding: 16px; display: grid; gap: 10px; align-content: start; }
.xl-logo { width: 120px; height: 82px; border-radius: 12px; display: grid; place-items: center; background: #ffffff; color: #102532; font-size: 28px; font-weight: 900; margin: 0 auto 6px; overflow: hidden; border: 1px solid #34454f; }
.xl-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.xl-logo span { display: none; color: #102532; }
.xl-logo.logo-missing img { display: none; }
.xl-logo.logo-missing span { display: block; }
.xl-filter strong { text-align: center; }
.xl-filter span { color: #9fb1bc; font-size: .82rem; font-weight: 800; margin-top: 10px; text-transform: uppercase; }
.xl-filter button { background: transparent; color: #c9d6dc; border: 0; border-radius: 6px; min-height: 34px; text-align: left; padding: 8px 10px; font-weight: 800; }
.xl-filter button.active, .xl-filter button:hover { background: #2f80ed; color: white; }
.xl-main { display: grid; gap: 14px; min-width: 0; }
.xl-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.xl-topbar h2 { margin: 0; font-size: 2rem; }
.xl-topbar p { margin: 4px 0 0; color: #9fb1bc; }
.xl-kpis { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; }
.tv-status-board { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 12px; }
.tv-lane { min-height: 250px; background: #202b32; border: 1px solid #34454f; border-radius: 8px; padding: 12px; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.tv-lane header { display: flex; justify-content: space-between; align-items: center; color: #edf4f7; }
.tv-lane header span { min-width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: #2f80ed; color: white; font-weight: 900; }
.tv-car-list { display: grid; gap: 10px; align-content: start; }
.tv-car-list p { margin: 0; color: #9fb1bc; padding: 18px 6px; text-align: center; }
.tv-car-card { min-height: 96px; background: #162329; border: 1px solid #34454f; border-left: 5px solid #20a3c2; border-radius: 8px; padding: 14px; display: grid; gap: 6px; box-shadow: 0 12px 26px rgba(0,0,0,.18); align-content: center; }
.tv-car-card b { color: #ffffff; font-size: 1.15rem; }
.tv-car-card span { color: #76b6ff; font-weight: 900; }
.tv-car-card small { color: #c4d2d8; }
.tv-car-card em { color: #ffcf8a; font-style: normal; font-weight: 800; }
.xl-kpi { border-radius: 8px; min-height: 104px; padding: 14px; position: relative; overflow: hidden; }
.xl-kpi b { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: white; font-size: 22px; float: left; margin-right: 12px; }
.xl-kpi span { display: block; color: #9fb1bc; font-size: .82rem; font-weight: 800; }
.xl-kpi strong { display: block; margin-top: 4px; font-size: 28px; }
.xl-kpi i { position: absolute; left: 78px; right: 14px; bottom: 14px; height: 18px; background: linear-gradient(90deg, transparent 0 8%, #ff5f7a 8% 14%, transparent 14% 25%, #20a3c2 25% 34%, transparent 34% 47%, #1fc7a7 47% 61%, transparent 61% 74%, #ff8f3d 74% 86%, transparent 86%); opacity: .8; }
.xl-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; }
.xl-panel { border-radius: 8px; padding: 16px; min-height: 230px; }
.xl-wide { grid-column: span 2; }
.xl-title { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.xl-title h3 { margin: 0; color: #edf4f7; }
.xl-title strong, .xl-title span { color: #9fb1bc; font-size: .9rem; }
.xl-line-chart { width: 100%; height: 190px; display: block; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)); border-radius: 6px; }
.xl-axis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; color: #9fb1bc; font-size: .76rem; margin-top: 8px; }
.xl-status { display: grid; gap: 12px; }
.xl-radial { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xl-radial div { min-height: 96px; border-radius: 8px; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at center, #273842 0 45%, transparent 46%), conic-gradient(#20a3c2 0 70%, #34454f 70%); }
.xl-radial strong { font-size: 30px; }
.xl-radial span, .xl-map span { display: block; color: #c0d0d8; font-size: .82rem; }
.xl-map { min-height: 92px; border-radius: 8px; background: linear-gradient(135deg,#182329,#273842); display: grid; place-items: center; text-align: center; border: 1px dashed #4b606b; }
.xl-map strong { font-size: 34px; color: #ff8f3d; }
.xl-bar { display: grid; grid-template-columns: 74px 1fr 110px; gap: 10px; align-items: center; margin: 15px 0; }
.xl-bar span { color: #c0d0d8; font-weight: 800; font-size: .9rem; }
.xl-bar div { height: 104px; display: flex; align-items: end; background: rgba(255,255,255,.05); border-radius: 6px; overflow: hidden; }
.xl-bar i { display: block; height: 100%; min-width: 8px; border-radius: 6px 6px 0 0; }
.xl-bar strong { color: #edf4f7; text-align: right; font-size: .88rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .9rem; }
.badge { border-radius: 999px; padding: 5px 10px; background: #edf7ed; color: var(--ok); font-size: .9rem; font-weight: 700; }
.local-badge { background: #fff3df; color: #9a5a0a; }
.cards-list { display: grid; gap: 10px; max-height: 70vh; overflow: auto; }
.list-card { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 4px; width: 100%; }
.list-card span { color: var(--muted); }
.list-head { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.scanner { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.camera { width: 100%; max-height: 58vh; background: #101820; border-radius: 8px; margin-top: 14px; }
.scan-camera-frame { position: relative; overflow: hidden; border-radius: 8px; margin-top: 14px; background: #101820; }
.scan-camera-frame .camera { display: block; margin-top: 0; border-radius: 8px; }
.plate-scan-target { position: absolute; left: 50%; top: 50%; width: min(72%, 520px); aspect-ratio: 4.8 / 1; transform: translate(-50%, -50%); border: 3px solid rgba(255,255,255,.92); border-radius: 10px; box-shadow: 0 0 0 999px rgba(2, 16, 24, .22), 0 0 24px rgba(255,255,255,.35); display: grid; place-items: center; pointer-events: none; transition: all .2s ease; }
.plate-scan-target::before, .plate-scan-target::after { content: ''; position: absolute; width: 22px; height: 22px; border-color: #fff; border-style: solid; }
.plate-scan-target::before { left: -3px; top: -3px; border-width: 4px 0 0 4px; border-radius: 10px 0 0 0; }
.plate-scan-target::after { right: -3px; bottom: -3px; border-width: 0 4px 4px 0; border-radius: 0 0 10px 0; }
.plate-scan-target span { background: rgba(8, 31, 43, .82); color: #fff; border-radius: 999px; padding: 7px 13px; font-weight: 900; font-size: .92rem; letter-spacing: 0; }
.plate-scan-target.found { border-color: #37d399; box-shadow: 0 0 0 999px rgba(4, 120, 87, .12), 0 0 34px rgba(55,211,153,.78); animation: plateFoundPulse .65s ease both; }
.plate-scan-target.found::before, .plate-scan-target.found::after { border-color: #37d399; }
.plate-scan-target.found span { background: #0f766e; color: #fff; }
@keyframes plateFoundPulse { 0% { transform: translate(-50%, -50%) scale(.96); } 55% { transform: translate(-50%, -50%) scale(1.04); } 100% { transform: translate(-50%, -50%) scale(1); } }
.scan-result { display: grid; gap: 12px; align-content: start; }
.camera-box.wide, .form-grid > .camera-box, .form-grid > .notice { grid-column: 1 / -1; }
.plate-result-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 14px; }
.plate-result-card.compact { margin-top: 6px; }
.plate-result-info { display: grid; gap: 8px; min-width: 0; }
.plate-result-info h3 { margin: 0; color: var(--primary-dark); }
.plate-result-info p { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 8px; }
.quick-grid span { display: grid; gap: 3px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #f8fafc; }
.quick-grid b { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.quick-grid em { color: var(--ink); font-style: normal; font-weight: 800; overflow-wrap: anywhere; }
.checklist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.check-item { display: grid; gap: 9px; padding: 14px; }
.check-item.has-photo { border-color: #8fd0bb; background: #f4fbf8; }
.photo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.photo-status { border-radius: 999px; background: #edf2f7; color: var(--muted); font-size: 12px; font-weight: 800; padding: 5px 9px; white-space: nowrap; }
.photo-status.ok { background: #e8f7ef; color: var(--ok); }
.photo-preview, .photo-placeholder { width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; border: 1px solid var(--line); }
.photo-preview { object-fit: cover; background: #eef2f6; }
.photo-placeholder { display: grid; place-items: center; background: #f8fafc; color: var(--muted); font-weight: 700; }
.car-sketch { position: relative; overflow: hidden; background: linear-gradient(180deg,#f8fafc,#eef2f6); color: var(--primary-dark); }
.car-sketch::before { content: ""; position: absolute; width: 58%; height: 38%; left: 21%; top: 30%; border: 4px solid #176b87; border-radius: 42px 42px 18px 18px; background: rgba(23,107,135,.08); }
.car-sketch::after { content: ""; position: absolute; width: 68%; height: 5px; left: 16%; top: 67%; background: #176b87; border-radius: 999px; box-shadow: 22px 12px 0 -1px #263747, calc(100% - 22px) 12px 0 -1px #263747; }
.car-sketch span, .car-sketch small { position: relative; z-index: 1; background: rgba(255,255,255,.78); border-radius: 999px; padding: 5px 10px; text-align: center; }
.car-sketch small { align-self: start; font-size: .78rem; color: var(--muted); }
.sketch-left::before, .sketch-right::before { width: 72%; left: 14%; height: 32%; border-radius: 28px; }
.sketch-left::after, .sketch-right::after { width: 76%; left: 12%; }
.sketch-back::before { border-radius: 20px 20px 36px 36px; }
.sketch-panel::before { width: 70%; left: 15%; top: 28%; height: 34%; border-radius: 14px; }
.sketch-panel::after { width: 38%; left: 31%; top: 63%; box-shadow: none; }
.vehicle-drawing { display: grid; grid-template-rows: 1fr auto auto; gap: 6px; padding: 14px; background: linear-gradient(180deg,#f9fbfd,#eef4f7); color: var(--primary-dark); overflow: hidden; text-align: center; }
.vehicle-drawing svg { width: 100%; height: 100%; min-height: 92px; }
.vehicle-drawing .body { fill: rgba(23,107,135,.12); stroke: var(--primary); stroke-width: 4; }
.vehicle-drawing .glass { fill: rgba(23,107,135,.2); stroke: var(--primary); stroke-width: 2; }
.vehicle-drawing .lamp { fill: var(--accent); opacity: .9; }
.vehicle-drawing .wheel { fill: #263747; }
.vehicle-drawing span { font-weight: 900; color: var(--primary-dark); }
.vehicle-drawing small { color: var(--muted); font-size: .82rem; font-weight: 800; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-card { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 0; overflow: hidden; text-align: left; color: var(--ink); }
.photo-card img { width: 100%; height: 112px; object-fit: cover; display: block; background: #eef2f6; }
.photo-card span { display: block; padding: 9px; font-weight: 800; color: var(--primary-dark); }
.product-thumb-button { width: 64px; height: 54px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: #eef2f6; overflow: hidden; display: block; }
.product-thumb { width: 100%; height: 100%; object-fit: cover; display: block; background: #eef2f6; }
.thumb-empty { display: inline-grid; place-items: center; width: 58px; min-height: 38px; border-radius: 6px; background: #eef2f6; color: var(--muted); font-size: .76rem; font-weight: 800; text-align: center; }
.vehicle-photo-board { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.vehicle-photo-slot { min-height: 150px; border: 2px solid var(--line); border-radius: 8px; background: #f8fafc; color: var(--primary-dark); padding: 0; overflow: hidden; display: grid; place-items: center; position: relative; text-align: center; }
.vehicle-photo-slot.wide-slot { grid-column: 1 / -1; min-height: 210px; }
.vehicle-photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vehicle-photo-slot span { position: absolute; left: 10px; right: 10px; bottom: 10px; border-radius: 8px; background: rgba(16,37,50,.82); color: white; padding: 7px 9px; font-weight: 900; }
.vehicle-photo-slot .slot-sketch { width: 78%; height: 58%; border: 2px dashed #b8c5d2; border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-weight: 900; background: linear-gradient(180deg,#ffffff,#eef4f7); }
.vehicle-photo-slot small { position: absolute; bottom: 12px; color: var(--muted); font-weight: 800; }
.vehicle-photo-slot .slot-actions { position: absolute; right: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.vehicle-photo-slot.has-photo .slot-actions { opacity: .12; transition: .18s; }
.vehicle-photo-slot.has-photo:hover .slot-actions, .vehicle-photo-slot.has-photo:focus-within .slot-actions { opacity: 1; }
.vehicle-photo-slot .slot-actions button { width: auto; min-height: 34px; padding: 7px 10px; box-shadow: 0 8px 20px rgba(16,37,50,.16); }
.photo-list.compact { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.checked-only { margin-top: 6px; }
.image-viewer img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 8px; background: #101820; }
.draw-editor { display: grid; gap: 14px; }
.draw-canvas { width: 100%; max-height: 68vh; border-radius: 8px; border: 1px solid var(--line); background: #101820; touch-action: none; }
.hamburger { display: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; min-height: 42px; min-width: 48px; }
.tabs { margin-bottom: 18px; }
.wizard-body { display: grid; gap: 16px; }
.os-wizard { width: 100%; max-width: 100%; overflow: hidden; }
.os-workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; min-width: 0; }
.os-workspace > *, .wizard-body, .form-grid, .subpanel { min-width: 0; }
.os-menu { display: grid; gap: 8px; position: sticky; top: 88px; }
.os-menu button { justify-content: flex-start; width: 100%; }
.save-os-actions { display: grid; grid-template-columns: minmax(170px, .7fr) minmax(260px, 1fr); gap: 12px; align-items: stretch; }
.save-os-actions button { width: 100%; }
.client-form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.error { color: #b42318; }
.notice { background: #fff8e7; border: 1px solid #f3d78a; border-radius: 8px; padding: 12px; color: #785200; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16,37,50,.48); z-index: 30; display: grid; place-items: center; padding: 18px; }
.modal { width: min(920px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0,0,0,.24); padding: 20px; }
.overlay-backdrop { z-index: 95; }
.overlay-modal { width: min(980px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal h2 { margin: 0; }
.modal-grid { display: grid; gap: 16px; }
.share-link, .share-preview { border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: var(--primary-dark); padding: 12px; white-space: pre-wrap; word-break: break-word; }
.share-link { font-weight: 800; text-decoration: underline; }
.share-preview { margin: 0; font: inherit; color: #263747; }
.message-backdrop { position: fixed; inset: 0; background: rgba(16,37,50,.38); z-index: 60; display: grid; place-items: center; padding: 18px; }
.message-box { width: min(520px, 100%); background: white; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0,0,0,.24); padding: 24px; display: grid; gap: 14px; text-align: center; }
.message-box h2 { margin: 0; color: var(--primary-dark); }
.message-box p { margin: 0; line-height: 1.45; color: #263747; white-space: pre-wrap; word-break: break-word; }
.message-box.error { border-top: 6px solid #b42318; }
.message-box.warning { border-top: 6px solid var(--accent); }
.message-box.success { border-top: 6px solid var(--ok); }
.message-box.info { border-top: 6px solid var(--primary); }
.center { justify-content: center; }
.subpanel { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.inline-grid { display: grid; grid-template-columns: 1.4fr .7fr .8fr; gap: 10px; margin-bottom: 10px; }
.vehicle-history .subpanel { display: grid; gap: 10px; }
.empty { color: var(--muted); text-align: center; padding: 20px; }
.row-actions { position: relative; overflow: visible; }
.action-menu-list { width: 230px; display: grid; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 42px rgba(16,37,50,.2); }
.action-trigger::after { content: "v"; margin-left: 8px; font-weight: 900; }
.action-popover-root { position: fixed; inset: 0; z-index: 80; background: transparent; }
.action-menu-list.floating { position: fixed; z-index: 81; }
.action-menu-list button { width: 100%; justify-content: flex-start; }
.totals-panel { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 10px; }
.totals-panel strong { color: var(--primary-dark); font-size: 1.05rem; }
.totals-grid { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(150px, 1fr); gap: 9px 12px; align-items: center; }
.totals-grid span { color: var(--muted); font-weight: 800; }
.totals-grid b { color: var(--ink); font-size: 1.08rem; }
.totals-grid input { min-height: 42px; }
.final-total { background: #eaf6f9; border-color: #b9dbe4; }
.final-total strong { font-size: 1.18rem; }
h3 { margin: 0; font-size: 1.12rem; }
@media (max-width: 980px) {
  :root { font-size: 16px; }
  .app-shell, .two-cols, .scanner, .metric-grid, .form-grid, .os-workspace { grid-template-columns: 1fr; }
  .plate-result-card { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .ops-summary { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .ops-board { grid-template-columns: minmax(280px, 1fr); overflow: visible; }
  .ops-lane { min-height: auto; }
  .ops-lane-list { max-height: none; }
  .ops-hero { align-items: stretch; flex-direction: column; }
  .xl-dashboard { grid-template-columns: 1fr; }
  .xl-filter { grid-template-columns: repeat(4, minmax(100px, 1fr)); align-items: center; }
  .xl-logo { width: 96px; height: 58px; font-size: 22px; margin: 0; }
  .xl-kpis, .xl-grid { grid-template-columns: 1fr 1fr; }
  .tv-status-board { grid-template-columns: 1fr 1fr; }
  .xl-wide { grid-column: span 2; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); height: 100vh; height: 100dvh; max-height: 100dvh; transform: translateX(-105%); transition: .2s; z-index: 10; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .app-shell.menu-open .menu-dismiss { display: block; }
  .app-shell.menu-open main { pointer-events: none; }
  .app-shell.menu-open .topbar { pointer-events: auto; }
  .sidebar .logout-button { margin-top: 8px; }
  .hamburger { display: inline-flex; }
  .os-menu { position: static; display: flex; overflow: auto; padding-bottom: 6px; }
  .os-menu button { min-width: 150px; }
  .save-os-actions { grid-template-columns: 1fr; }
  .page { padding: 14px; gap: 14px; }
  .topbar { min-height: 58px; padding: 8px 12px; justify-content: flex-start; }
  .topbar span { display: none; }
  .app-title { font-size: 18px; }
  .panel, .metric, .check-item { padding: 13px; }
  .modal { padding: 13px; }
  .message-box { padding: 18px; }
  .inline-grid { grid-template-columns: 1fr; }
  table { min-width: 520px; }
  th, td { padding: 10px 11px; }
  .row-actions { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .list-head { display: grid; align-items: stretch; }
  .list-head h2 { margin: 0; font-size: 1.35rem; }
  .table-wrap { overflow: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .responsive-table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; }
  .responsive-table thead { display: none; }
  .responsive-table tbody { display: grid; gap: 10px; }
  .responsive-table tr { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--surface); box-shadow: 0 8px 22px rgba(31,44,58,.06); }
  .responsive-table td { border: 0; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; font-size: .95rem; }
  .responsive-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--muted); font-size: .78rem; font-weight: 900; text-transform: uppercase; }
  .responsive-table td > * { max-width: 100%; }
  .responsive-table td.empty { display: block; text-align: center; padding: 16px; }
  .responsive-table td.empty::before { content: ''; display: none; }
  .responsive-table .row-actions { justify-content: stretch; }
  .responsive-table .row-actions .action-trigger,
  .responsive-table .row-actions > button,
  .responsive-table .row-actions > .actions-row { width: min(180px, 100%); margin-left: auto; }
  .os-wizard .responsive-table td { align-items: flex-start; }
  .os-wizard .responsive-table td:not(.row-actions) { display: grid; grid-template-columns: 110px minmax(0, 1fr); justify-content: initial; }
  .os-wizard .responsive-table td::before { white-space: normal; }
  .os-list-table tr { grid-template-columns: 1fr; }
  .os-list-table td:nth-child(2) { display: grid; justify-items: end; text-align: right; overflow-wrap: anywhere; }
  .mercosul-plate.mini { width: 106px; min-height: 32px; padding: 12px 5px 3px; font-size: .82rem; }
  .badge { padding: 5px 8px; font-size: .82rem; }
}
@media (max-width: 560px) {
  :root { font-size: 15px; }
  .page { padding: 8px; gap: 10px; }
  .executive-dashboard { padding: 10px; }
  .xl-topbar, .xl-title { display: grid; }
  .xl-filter, .xl-kpis, .xl-grid, .xl-radial, .tv-status-board { grid-template-columns: 1fr; }
  .xl-wide { grid-column: auto; }
  .xl-line-chart { height: 150px; }
  .xl-bar { grid-template-columns: 1fr; }
  .xl-bar div { height: 44px; align-items: stretch; }
  .actions-row { align-items: stretch; gap: 8px; }
  .actions-row > * { width: 100%; }
  .primary, .secondary, .ghost, .danger { width: 100%; min-height: 43px; padding: 10px 12px; }
  input, select, textarea { min-height: 44px; padding: 10px 11px; }
  .login-box, .panel, .metric, .check-item, .subpanel, .totals-panel { padding: 10px; }
  .modal { width: 100%; max-height: 96vh; padding: 10px; border-radius: 8px; }
  .modal header { align-items: start; margin-bottom: 10px; }
  .modal h2 { font-size: 1.18rem; line-height: 1.15; }
  .form-grid { gap: 10px; }
  .field span { font-size: .84rem; margin-bottom: 4px; }
  h3 { font-size: 1rem; }
  .vehicle-photo-board { grid-template-columns: 1fr; }
  .vehicle-photo-slot.wide-slot { min-height: 170px; }
  .vehicle-photo-slot { min-height: 135px; }
  .metric strong { font-size: 28px; }
  .brand-mark { width: 38px; height: 38px; }
  .modal-backdrop, .message-backdrop { padding: 10px; }
  .os-menu button { min-width: 135px; }
  .save-os-actions { gap: 8px; }
  .action-menu-list { width: min(230px, calc(100vw - 20px)); }
  .responsive-table tr { padding: 9px; gap: 7px; }
  .responsive-table td { font-size: .9rem; }
  .responsive-table td::before { font-size: .72rem; }
  .mercosul-plate.mini { width: 98px; min-height: 30px; font-size: .76rem; letter-spacing: .5px; }
  .ops-hero { padding: 12px; gap: 10px; }
  .ops-hero h2 { font-size: 1.6rem; }
  .ops-summary { display: none; }
  .ops-board { grid-template-columns: 1fr; overflow: auto; max-height: calc(100vh - 95px); }
  .ops-lane { height: auto; max-height: 58vh; }
  .ops-card { grid-template-columns: 1fr; }
  .sidebar button { min-height: 44px; font-size: .94rem; }
  .menu-icon { width: 30px; height: 30px; }
}
