:root {
  --brand: #0086ff;
  --brand-deep: #006dcc;
  --navy: #071a2d;
  --ink: #102338;
  --muted: #66788b;
  --line: #dfe7ef;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --green: #0aa66f;
  --orange: #f59b23;
  --red: #e94e5d;
  --purple: #9448d8;
  --shadow: 0 14px 42px rgba(12, 39, 65, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px 1fr; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 20px;
  color: #d8e8f7;
  background:
    radial-gradient(circle at 0 100%, rgba(0, 134, 255, .25), transparent 42%),
    var(--navy);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 30px; }
.brand-mark { width: 35px; display: grid; gap: 4px; }
.brand-mark i { height: 4px; display: block; border-radius: 3px; background: var(--brand); }
.brand-mark i:nth-child(1) { width: 30px; background: linear-gradient(90deg,#ffd000,#ff8a00); }
.brand-mark i:nth-child(2) { width: 24px; background: linear-gradient(90deg,#ff253a,#ff37a8); }
.brand-mark i:nth-child(3) { width: 32px; background: linear-gradient(90deg,#00cce4,#00d604); }
.brand-name { color: #fff; font-weight: 800; font-size: 22px; letter-spacing: -.8px; }
.brand-name small { display: block; color: #79bfff; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; }
.nav-label { padding: 10px 12px 8px; color: #7290aa; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.nav-list { display: grid; gap: 5px; }
.nav-item {
  width: 100%; border: 0; border-radius: 12px; padding: 12px 13px;
  display: flex; align-items: center; gap: 12px;
  background: transparent; color: #9db4c8; text-align: left; font-size: 14px; font-weight: 650;
  transition: .2s ease;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { color: #fff; background: var(--brand); box-shadow: 0 10px 24px rgba(0,134,255,.25); }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; }
.nav-icon svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9px; }
.sidebar-bottom { margin-top: auto; }
.sync-tile { margin: 12px 2px 16px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 15px; background: rgba(255,255,255,.04); }
.sync-tile strong { color: #fff; font-size: 12px; }
.sync-tile p { color: #86a0b7; font-size: 10px; line-height: 1.5; margin: 5px 0 10px; }
.sync-tile button { border: 0; color: #76bcff; background: transparent; padding: 0; font-size: 11px; font-weight: 750; }
.profile { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg,#0086ff,#58b4ff); color: #fff; font-size: 11px; font-weight: 800; }
.profile strong { display: block; color: #fff; font-size: 12px; }
.profile span { color: #7e9ab2; font-size: 10px; }
.main { grid-column: 2; min-width: 0; }
.topbar { height: 82px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.eyebrow { margin: 0 0 3px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.65px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.live-pill { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(10,166,111,.11); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(10,166,111,0); } }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8px; }
.primary-btn, .secondary-btn { border: 0; border-radius: 11px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 800; transition: .2s; }
.primary-btn { color: #fff; background: var(--brand); box-shadow: 0 9px 22px rgba(0,134,255,.2); }
.primary-btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.primary-btn svg, .secondary-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.secondary-btn { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.logout-btn { height:38px; border:1px solid #f1cfd3; border-radius:11px; padding:0 13px; display:inline-flex; align-items:center; gap:7px; color:#c73745; background:#fff7f8; font-size:11px; font-weight:800; transition:.2s; }
.logout-btn:hover { color:#fff; border-color:var(--red); background:var(--red); }
.logout-btn svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.9px; }
.page { padding: 30px 34px 50px; }
.mobile-nav { display: none; }

/* Dashboard */
.hero-strip { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 21px; }
.hero-strip h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.5px; }
.hero-strip p { margin: 0; color: var(--muted); font-size: 12px; }
.date-chip { color: var(--muted); font-size: 11px; font-weight: 700; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 13px; }
.kpi-card { min-height: 134px; position: relative; overflow: hidden; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 9px 24px rgba(12,39,65,.035); animation: rise .45s both; }
.kpi-card:nth-child(2) { animation-delay: .05s; } .kpi-card:nth-child(3) { animation-delay: .1s; } .kpi-card:nth-child(4) { animation-delay: .15s; } .kpi-card:nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.kpi-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; }
.kpi-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: #eaf5ff; }
.kpi-icon svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.kpi-value { margin: 14px 0 5px; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -1.3px; }
.kpi-value small { font-size: 14px; letter-spacing: 0; }
.trend { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.trend b { color: var(--green); }
.kpi-card.featured { color: #fff; border-color: var(--brand); background: linear-gradient(145deg,#0086ff,#006fda); }
.kpi-card.featured .kpi-head,.kpi-card.featured .trend { color: #d9edff; }
.kpi-card.featured .kpi-icon { color: #fff; background: rgba(255,255,255,.17); }
.content-grid { margin-top: 14px; display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.65fr); gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 10px 30px rgba(12,39,65,.04); }
.panel-head { min-height: 64px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; }
.panel-head h3 { margin: 0 0 3px; font-size: 14px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 10px; }
.segmented { display: flex; padding: 3px; border-radius: 9px; background: #edf3f8; }
.segmented button { border: 0; border-radius: 7px; padding: 6px 9px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 750; }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(12,39,65,.08); }
.volume-chart { height: 245px; padding: 24px 20px 17px; display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.axis-y { display: flex; flex-direction: column; justify-content: space-between; color: #9aabb9; font-size: 9px; text-align: right; padding-bottom: 22px; }
.chart-field { position: relative; display: flex; align-items: flex-end; justify-content: space-around; gap: 7px; padding: 0 4px 22px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, #fff 0, #fff calc(25% - 1px), #e9eef3 25%); }
.bar-group { height: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; position: relative; }
.bar { width: 11px; min-height: 2px; border-radius: 4px 4px 1px 1px; background: var(--brand); transition: height .5s ease; }
.bar.secondary { background: #b9dbfa; }
.bar-group span { position: absolute; bottom: -18px; color: #7e91a3; font-size: 9px; white-space: nowrap; }
.chart-legend { display: flex; gap: 13px; margin-right: 5px; }
.chart-legend span { color: var(--muted); font-size: 9px; font-weight: 650; }
.chart-legend i { width: 7px; height: 7px; display: inline-block; margin-right: 4px; border-radius: 2px; background: var(--brand); }
.chart-legend span:last-child i { background: #b9dbfa; }
.status-body { padding: 22px 20px; }
.donut-wrap { display: flex; align-items: center; justify-content: center; padding: 6px 0 19px; }
.donut { width: 138px; height: 138px; position: relative; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 34%, var(--brand) 34% 58%, var(--orange) 58% 79%, #dce5ed 79% 100%); }
.donut::after { content:""; position:absolute; inset: 19px; border-radius:50%; background:#fff; }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center strong { display: block; font-size: 25px; letter-spacing: -1px; }
.donut-center span { color: var(--muted); font-size: 9px; }
.status-list { display: grid; gap: 11px; }
.status-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.status-row i { width: 7px; height: 7px; border-radius: 50%; }
.status-row strong { color: var(--ink); font-size: 11px; }

/* Records, forms and dialogs */
.records { margin-top: 14px; overflow: hidden; }
.records-tools { display: flex; align-items: center; gap: 8px; }
.search { min-width: 220px; position: relative; }
.search svg { position: absolute; width: 15px; left: 11px; top: 10px; fill: none; stroke: #8396a7; stroke-width: 2; }
.search input, .filter-select { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #fff; color: var(--ink); font-size: 10px; }
.search input { padding: 0 10px 0 34px; }
.search input:focus, .filter-select:focus, .field input:focus, .field select:focus { border-color: #68b7ff; box-shadow: 0 0 0 3px rgba(0,134,255,.08); }
.filter-select { width: 142px; padding: 0 9px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fafc; color: #8091a2; font-size: 9px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; text-align: left; white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid #edf1f5; font-size: 11px; vertical-align: middle; white-space: nowrap; }
tbody tr { transition: .15s; }
tbody tr:hover { background: #f8fbfe; }
.vehicle { display: flex; align-items: center; gap: 10px; }
.truck-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: #eaf5ff; }
.truck-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.9px; }
.vehicle strong { display:block; font-size: 11px; letter-spacing: .2px; }
.vehicle span, .subtext { color: var(--muted); font-size: 9px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 99px; font-size: 9px; font-weight: 800; }
.status-badge::before { content:""; width: 6px; height: 6px; border-radius:50%; background: currentColor; }
.status-previsto, .status-em-transito, .status-aguardando { color:#a46a09; background:#fff4de; }
.status-em-descarga { color:#087bdc; background:#e9f5ff; }
.status-concluido { color:#08845a; background:#e5f8f1; }
.status-divergencia, .status-em-atraso, .status-atrasado { color:#d13d4b; background:#ffecee; }
.status-disponivel { color:#08845a; background:#e5f8f1; }
.sla { font-weight: 800; }
.sla.good { color: var(--green); } .sla.warn { color: var(--orange); } .sla.bad { color: var(--red); }
.row-action { border: 0; color: var(--brand); background: transparent; font-size: 10px; font-weight: 800; }
.empty { padding: 35px; text-align:center; color:var(--muted); font-size:12px; }
.section-page { display:none; } .section-page.active { display:block; animation: rise .3s both; }
.management-grid { display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
.info-card { padding: 21px; }
.info-card h3 { margin:0 0 6px; font-size:15px; }
.info-card p { color:var(--muted); font-size:11px; line-height:1.55; }
.info-card .primary-btn { margin-top:8px; }
.inbound-grid { width: min(1200px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.inbound-card { aspect-ratio:1; min-width:0; padding:24px; display:flex; flex-direction:column; border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg,#fff,#f9fbfd); box-shadow:0 10px 28px rgba(12,39,65,.05); position:relative; overflow:hidden; }
.inbound-card::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:#d9e4ed; }
.inbound-card.is-active::before { background:var(--brand); }
.inbound-card-head { display:flex; align-items:baseline; justify-content:space-between; padding-bottom:15px; border-bottom:1px solid var(--line); }
.inbound-card-head span { color:var(--muted); font-size:10px; font-weight:850; letter-spacing:1.4px; }
.inbound-card-head strong { color:var(--brand); font-size:30px; letter-spacing:-1px; }
.inbound-card-data { flex:1; display:grid; align-content:center; gap:12px; padding:12px 0; }
.inbound-card-data > div { min-width:0; display:grid; grid-template-columns:86px 1fr; align-items:center; gap:10px; }
.inbound-card-data > div > span { color:var(--muted); font-size:10px; }
.inbound-card-data > div > strong { min-width:0; overflow:hidden; color:var(--ink); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.inbound-start { width:100%; min-height:42px; margin-top:auto; }
.inbound-start:disabled { color:#8b9aa8; background:#e8edf2; box-shadow:none; cursor:not-allowed; transform:none; }
.settings-list { display:grid; gap:10px; margin-top:16px; }
.settings-row { padding:13px; border:1px solid var(--line); border-radius:11px; display:flex; align-items:center; justify-content:space-between; font-size:11px; }
.settings-row span { color:var(--muted); }
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(3,17,30,.64); backdrop-filter: blur(4px); animation: fade .18s both; }
@keyframes fade { from { opacity:0; } }
.modal { width: min(700px,100%); max-height: calc(100vh - 36px); overflow:auto; border-radius: 19px; background:#fff; box-shadow:0 30px 80px rgba(0,0,0,.25); }
.modal.small { width:min(520px,100%); }
.modal-head { padding:20px 22px 16px; display:flex; align-items:flex-start; justify-content:space-between; border-bottom:1px solid var(--line); }
.modal-head h2 { margin:0 0 4px; font-size:18px; }
.modal-head p { margin:0; color:var(--muted); font-size:10px; }
.close-btn { width:31px; height:31px; border:0; border-radius:9px; background:#edf2f6; color:var(--ink); font-size:17px; }
.modal-body { padding:20px 22px; }
.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.field.full { grid-column:1/-1; }
.field label { display:block; margin-bottom:6px; color:#53687a; font-size:9px; font-weight:800; letter-spacing:.35px; text-transform:uppercase; }
.field input, .field select { width:100%; height:42px; border:1px solid var(--line); border-radius:10px; outline:0; padding:0 11px; color:var(--ink); background:#fff; font-size:11px; }
.helper { margin:7px 0 0; color:var(--muted); font-size:9px; line-height:1.5; }
.modal-actions { padding:15px 22px 20px; display:flex; justify-content:flex-end; gap:9px; }
.toast { position:fixed; right:24px; bottom:24px; z-index:200; min-width:270px; padding:14px 16px; border-radius:12px; color:#fff; background:var(--navy); box-shadow:var(--shadow); font-size:11px; animation:toastIn .3s both; }
.toast b { display:block; margin-bottom:2px; font-size:12px; }
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } }

/* Auth */
.auth-page { min-height:100vh; display:grid; grid-template-columns:minmax(420px,1.15fr) minmax(390px,.85fr); background:#fff; }
.auth-visual { min-height:100vh; position:relative; overflow:hidden; padding:46px 54px; display:flex; flex-direction:column; color:#fff; background:
  linear-gradient(125deg,rgba(0,134,255,.13),transparent 45%),
  radial-gradient(circle at 80% 85%,rgba(0,134,255,.42),transparent 37%),
  var(--navy); }
.auth-visual::before { content:""; position:absolute; width:460px; height:460px; right:-180px; top:8%; border:1px solid rgba(255,255,255,.09); border-radius:50%; box-shadow:0 0 0 62px rgba(255,255,255,.025),0 0 0 124px rgba(255,255,255,.018); }
.auth-visual::after { content:""; position:absolute; inset:auto 0 0; height:7px; background:linear-gradient(90deg,#ffd000 0 18%,#ff253a 18% 37%,#ff37a8 37% 52%,#a400e1 52% 68%,#00cce4 68% 82%,#00d604 82%); }
.auth-brand { position:relative; z-index:1; display:flex; align-items:center; gap:12px; }
.auth-brand .brand-name { font-size:25px; }
.auth-copy { position:relative; z-index:1; margin:auto 0; max-width:630px; }
.auth-kicker { display:inline-block; margin-bottom:22px; color:#75bfff; font-size:10px; font-weight:850; letter-spacing:2.2px; }
.auth-copy h1 { margin:0; color:#fff; font-size:clamp(48px,5.2vw,78px); line-height:.98; letter-spacing:-4px; }
.auth-copy h1 em { color:var(--brand); font-style:normal; }
.auth-copy p { max-width:430px; margin:28px 0 0; color:#a9bfd2; font-size:15px; line-height:1.65; }
.auth-stats { position:relative; z-index:1; display:flex; gap:38px; }
.auth-stats span { color:#7591a8; font-size:9px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; }
.auth-stats strong { display:block; margin-bottom:4px; color:#fff; font-size:19px; letter-spacing:-.5px; }
.auth-form-wrap { display:grid; place-items:center; padding:42px; background:linear-gradient(135deg,#fff,#f5f9fc); }
.login-card { width:min(390px,100%); }
.login-card h2 { margin:5px 0 8px; font-size:32px; letter-spacing:-1.3px; }
.login-intro { margin:0 0 28px; color:var(--muted); font-size:12px; line-height:1.6; }
.login-card .field { margin-bottom:16px; }
.login-card .field input { height:48px; font-size:12px; }
.password-field { position:relative; }
.password-field input { padding-right:60px; }
.password-field button { position:absolute; right:8px; top:8px; height:32px; border:0; padding:0 8px; color:var(--brand); background:transparent; font-size:10px; font-weight:800; }
.login-submit { width:100%; height:48px; margin-top:7px; }
.login-submit:disabled { opacity:.7; cursor:wait; }
.security-note { margin:19px 0 0; color:#92a0ad; font-size:9px; text-align:center; }
.auth-loader { margin:auto; display:grid; justify-items:center; gap:12px; color:var(--navy); }
.auth-loader .brand-mark { width:35px; }
.auth-loader strong { font-size:23px; }
.auth-loader p { margin:0; color:var(--muted); font-size:11px; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3,1fr); }
  .kpi-card:nth-child(4),.kpi-card:nth-child(5) { min-height:118px; }
}
@media (max-width: 850px) {
  .auth-page { grid-template-columns:1fr; }
  .auth-visual { min-height:280px; padding:30px 28px; }
  .auth-copy { margin:42px 0 25px; }
  .auth-copy h1 { font-size:43px; letter-spacing:-2.7px; }
  .auth-copy h1 br:nth-child(2) { display:none; }
  .auth-copy p { margin-top:17px; font-size:12px; }
  .auth-stats { display:none; }
  .auth-form-wrap { padding:42px 22px 55px; }
  .app-shell { display:block; padding-bottom:68px; }
  .sidebar { display:none; }
  .main { grid-column:auto; }
  .topbar { height:70px; padding:0 18px; }
  .topbar h1 { font-size:18px; }
  .live-pill { display:none; }
  .page { padding:22px 15px 32px; }
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .kpi-card { min-height:125px; }
  .content-grid { grid-template-columns:1fr; }
  .records .panel-head { align-items:flex-start; flex-direction:column; }
  .records-tools { width:100%; }
  .search { flex:1; min-width:0; }
  .filter-select { width:120px; }
  .management-grid { grid-template-columns:1fr; }
  .mobile-nav { position:fixed; z-index:50; display:grid; grid-template-columns:repeat(4,1fr); inset:auto 0 0; height:66px; padding:7px 8px 8px; border-top:1px solid var(--line); background:rgba(255,255,255,.96); backdrop-filter:blur(12px); }
  .mobile-nav button { border:0; border-radius:10px; background:transparent; color:#788b9d; font-size:8px; font-weight:750; }
  .mobile-nav button.active { color:var(--brand); background:#eaf5ff; }
  .mobile-nav svg { width:18px; height:18px; display:block; margin:0 auto 3px; fill:none; stroke:currentColor; stroke-width:1.9px; }
}
@media (max-width: 520px) {
    .auth-visual {
        min-height: 235px;
        padding: 25px 22px;
    }

    .auth-copy {
        margin: 30px 0 12px;
    }

        .auth-copy h1 {
            font-size: 36px;
        }

        .auth-copy p {
            display: none;
        }

    .auth-form-wrap {
        align-items: start;
        padding-top: 35px;
    }

    .top-actions .secondary-btn {
        display: none;
    }

    .top-actions .primary-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        font-size: 0;
    }

    .logout-btn {
        width: 38px;
        padding: 0;
        justify-content: center;
    }

        .logout-btn span {
            display: none;
        }

    .hero-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .kpi-card {
        min-height: 119px;
        padding: 14px;
    }

    .kpi-value {
        font-size: 25px;
    }

    .kpi-card:last-child {
        grid-column: 1/-1;
        min-height: 104px;
    }

    .volume-chart {
        height: 215px;
        padding-inline: 12px;
    }

    .bar {
        width: 8px;
    }

    .records-tools {
        flex-wrap: wrap;
    }

    .filter-select {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    .inbound-grid {
        gap: 9px;
    }

    .inbound-card {
        padding: 12px;
        border-radius: 13px;
    }

    .inbound-card-head {
        padding-bottom: 8px;
    }

        .inbound-card-head strong {
            font-size: 21px;
        }

    .inbound-card-data {
        gap: 6px;
        padding: 7px 0;
    }

        .inbound-card-data > div {
            grid-template-columns: 52px 1fr;
            gap: 4px;
        }

            .inbound-card-data > div > span {
                font-size: 8px;
            }

            .inbound-card-data > div > strong {
                font-size: 9px;
            }

    .inbound-card .status-badge {
        padding: 4px 6px;
        font-size: 7px;
    }

    .inbound-start {
        min-height: 32px;
        padding: 6px;
        font-size: 8px;
    }

    .modal-body, .modal-head {
        padding-inline: 17px;
    }

    .modal-actions {
        padding-inline: 17px;
    }

        .modal-actions .primary-btn, .modal-actions .secondary-btn {
            flex: 1;
        }
} /* <-- ESTA CHAVE FECHA O MODO MOBILE (520px) */

/* Adicionando estilos para a foto (câmera) na versão mobile */
    .camera-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: #f3f6fa;
        border: 1px dashed var(--brand);
        color: var(--brand);
        padding: 10px;
        border-radius: 8px;
        width: 100%;
        margin-top: 8px;
    }

    @media (min-width: 768px) {
        .camera-btn {
            display: none;
        }
        /* Esconde no desktop */
    }
