:root {
    --bg: #0E1620;
    --panel: #141F2B;
    --panel-alt: #182535;
    --line: #25384A;
    --line-soft: #1C2C3A;
    --text: #E7EDF3;
    --text-dim: #8FA3B5;
    --text-faint: #5A7185;
    --amber: #E8A33D;
    --amber-dim: #8A6528;
    --cyan: #5FB0D9;
    --green: #6FBE8F;
    --red: #D9705F;
}

* { box-sizing: border-box; }

html, body {
    background: var(--bg);
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'IBM Plex Sans', ui-sans-serif, system-ui;
    color: var(--text);
}

.hidden { display: none !important; }

input[type="number"]::-webkit-inner-spin-button { opacity: 1; }

::selection { background: var(--amber-dim); color: var(--text); }

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

.amber { color: var(--amber); }

/* ---------- ícones inline ---------- */
svg-truck, svg-upload, svg-file, svg-alert, svg-check, svg-package, svg-swap,
svg-filecheck, svg-menu, svg-search, svg-x, svg-clipboard, svg-copy, svg-info, svg-rotate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

/* ---------- tela de upload ---------- */
.upload-screen {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

#upload-screen {
    overflow-y: auto;
}

.upload-box { width: 100%; max-width: 560px; }
.upload-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    text-align: center;
}
.icon-badge {
    background: var(--panel-alt);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    display: flex;
}
.upload-header-text .title { font-size: 14px; font-weight: 600; font-family: 'Space Grotesk', sans-serif; color: var(--text); }
.upload-header-text .subtitle { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.dropzone {
    background: var(--panel);
    border: 1.5px dashed var(--line);
    border-radius: 12px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 220px;
}
.dropzone.dragover { border-color: var(--amber); }
.dz-state { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.icon-circle {
    background: var(--panel-alt);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 16px;
    display: flex;
}
.dz-text { text-align: center; }
.dz-main { font-size: 14px; font-weight: 500; color: var(--text); }
.dz-sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

.spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--line);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.upload-error {
    margin-top: 16px;
    background: var(--panel);
    border: 1px solid var(--red);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
}

.upload-footer {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-faint);
}

/* ---------- tela de revisão ---------- */
.review-screen {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .review-screen { flex-direction: row; }
}

.sidebar {
    position: fixed;
    inset: 0;
    z-index: 40;
    width: 100%;
    background: var(--panel);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
}
.sidebar.open { transform: translateX(0); }
@media (min-width: 1024px) {
    .sidebar {
        position: relative;
        inset: auto;
        width: 340px;
        flex-shrink: 0;
        height: 100%;
        transform: none !important;
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    }
}

.sidebar-top { padding: 16px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 640px) { .sidebar-top { padding: 20px; gap: 24px; } }

.sidebar-brand { display: flex; align-items: center; gap: 10px; }
.sidebar-brand .title { font-size: 14px; font-weight: 600; font-family: 'Space Grotesk', sans-serif; color: var(--text); }
.sidebar-brand .subtitle { font-size: 10px; color: var(--text-faint); }

.btn-ghost {
    align-self: flex-start;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--panel-alt);
    border: 1px solid var(--line-soft);
    color: var(--text-dim);
}

.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; align-items: center; gap: 8px; }
.step-dot {
    width: 22px; height: 22px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    border: 1px solid var(--line);
    color: var(--text-faint);
    flex-shrink: 0;
}
.step[data-state="done"] .step-dot { background: var(--green); border-color: var(--green); color: #0E1620; }
.step[data-state="active"] .step-dot { background: var(--amber); border-color: var(--amber); color: #0E1620; }
.step-label { font-size: 13px; font-family: 'Space Grotesk', sans-serif; color: var(--text-faint); }
.step[data-state="active"] .step-label { color: var(--text); }
.step[data-state="done"] .step-label { color: var(--text-dim); }

.field-group {
    display: flex; flex-direction: column; gap: 12px;
    padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.field-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-faint); margin-bottom: 4px;
    display: flex; align-items: center; gap: 6px;
}
.link-padrao {
    font-size: 10px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-faint);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    margin-left: auto;
}
.link-padrao:hover { color: var(--amber); }
.field-input {
    width: 100%;
    background: var(--panel-alt);
    border: 1px solid var(--line-soft);
    color: var(--text);
    outline: none;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 6px;
    font-family: 'IBM Plex Mono', monospace;
}

.stat-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 2px; }
.stat-value { font-size: 17px; font-weight: 600; font-family: 'Space Grotesk', sans-serif; color: var(--text); }
.stat-value.accent { color: var(--amber); }

.sidebar-bottom { padding: 16px; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .sidebar-bottom { padding: 20px; } }

.btn-primary {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--amber);
    color: #1A1206;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary:not(:disabled):hover { filter: brightness(1.08); box-shadow: 0 6px 16px rgba(232,163,61,0.25); }
.btn-primary:not(:disabled):active { transform: translateY(1px); }

.hint { margin-top: 8px; font-size: 10px; color: var(--amber-dim); }

.overlay {
    position: fixed; inset: 0; z-index: 30;
    background: rgba(6,10,15,0.4);
}
@media (min-width: 1024px) { .overlay { display: none !important; } }

.main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.header-mobile {
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
@media (min-width: 1024px) { .header-mobile { display: none; } }
.header-mobile .title { font-size: 14px; font-weight: 600; font-family: 'Space Grotesk', sans-serif; }
.header-mobile-left { display: flex; align-items: center; gap: 10px; }

.icon-btn {
    background: var(--panel-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text);
}

.main-inner {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 16px;
}
@media (min-width: 640px) { .main-inner { padding: 24px; } }

.alerta {
    margin-bottom: 16px;
    display: flex; align-items: flex-start; gap: 10px;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    background: var(--panel);
    border: 1px solid var(--amber);
    color: var(--text-dim);
}

.search-bar {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px;
    border-radius: 8px;
    padding: 0 12px;
    background: var(--panel);
    border: 1px solid var(--line);
}
.search-bar input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    padding: 10px 0;
}

.table-wrap {
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--line);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
thead tr { background: var(--panel-alt); }
th {
    text-align: left;
    padding: 10px 12px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    font-weight: 500;
}
th.ta-right { text-align: right; }
td { padding: 10px 12px; vertical-align: top; border-top: 1px solid var(--line-soft); }
td.ta-right { text-align: right; }
tr.row-excluded { opacity: 0.45; }
tbody tr { transition: background .15s ease; }
tbody tr:hover:not(.row-excluded) { background: var(--panel-alt); }
@media (min-width: 1024px) {
    table { font-size: 13.5px; }
    th, td { padding: 13px 16px; }
}

.cell-sku { font-family: 'IBM Plex Mono', monospace; color: var(--text); font-size: 11px; }
.cell-sku-sub { font-family: 'IBM Plex Mono', monospace; color: var(--text-faint); font-size: 9px; margin-top: 2px; }
.cell-produto { color: var(--text); font-size: 13px; }
.cell-instrucoes { color: var(--text-dim); font-size: 11px; display: flex; align-items: flex-start; gap: 4px; }
.cell-pdf { color: var(--text-faint); font-family: 'IBM Plex Mono', monospace; font-size: 12px; }

.qty-input {
    width: 56px;
    text-align: right;
    font-size: 13px;
    border-radius: 6px;
    padding: 4px 8px;
    outline: none;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    font-family: 'IBM Plex Mono', monospace;
}
.qty-input.edited { border-color: var(--amber); color: var(--amber); }
.qty-cell { display: flex; justify-content: flex-end; }

.reset-btn { background: none; border: none; display: flex; padding: 0; }

.sem-resultado { text-align: center; padding: 40px 0; font-size: 13px; color: var(--text-faint); }

/* ---------- drawer do payload ---------- */
.payload-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(6,10,15,0.6);
    display: flex; justify-content: flex-end;
}
.payload-drawer {
    height: 100%; width: 100%;
    background: var(--panel);
    border-left: 1px solid var(--line);
    display: flex; flex-direction: column;
}
@media (min-width: 640px) { .payload-drawer { width: 520px; } }

.payload-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.payload-note {
    padding: 12px 20px;
    font-size: 12px;
    color: var(--text-faint);
    border-bottom: 1px solid var(--line-soft);
}
.payload-body { flex: 1; overflow: auto; padding: 16px 20px; }
.payload-body pre {
    font-size: 11.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text-dim);
    font-family: 'IBM Plex Mono', monospace;
    margin: 0;
}
.payload-footer { padding: 16px 20px; border-top: 1px solid var(--line); }
.payload-footer .btn-primary.copied { background: var(--green); }

/* ---------- botão de fechar o menu (mobile) ---------- */
.sidebar-brand-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.btn-close-menu {
    display: flex;
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    .btn-close-menu { display: none; } /* sidebar deixa de ser tela cheia a partir daqui */
}

/* ---------- autenticação ---------- */
.auth-screen {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg);
}
.auth-box {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
@media (min-width: 1024px) {
    .auth-box { max-width: 440px; padding: 36px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
    .auth-title { font-size: 20px; }
}

.auth-brand { display:flex; align-items:center; gap:12px; margin-bottom:24px; }
.auth-title { font: 700 18px 'Space Grotesk', sans-serif; }
.auth-subtitle { font-size:12px; color:var(--text-faint); margin-top:3px; }
.auth-form { display:flex; flex-direction:column; gap:14px; }
.auth-form label { display:flex; flex-direction:column; gap:6px; font-size:11px; color:var(--text-dim); }
.auth-form input {
    width:100%; padding:10px 11px; border-radius:7px; border:1px solid var(--line);
    background:var(--panel-alt); color:var(--text); outline:none; font-size:13px;
}
.auth-form input:focus { border-color:var(--amber); }
.auth-submit { width:100%; justify-content:center; padding:10px 14px; margin-top:2px; }
.auth-error {
    border:1px solid var(--red); background:rgba(217,112,95,.08); color:#e9aaa0;
    border-radius:7px; padding:9px 11px; font-size:12px; line-height:1.4;
}
.password-hint { color:var(--text-faint); font-size:10px; margin-top:-5px; }
.auth-footer { margin-top:18px; text-align:center; color:var(--text-faint); font-size:10px; }
.auth-link { color:var(--amber); text-decoration:none; }
.sidebar-user {
    margin:0 16px 12px; padding:12px; border:1px solid var(--line-soft);
    border-radius:10px; background:var(--panel-alt); display:flex; align-items:center;
    justify-content:space-between; gap:10px;
}
.sidebar-user-info { display:flex; align-items:center; gap:10px; min-width:0; }
.sidebar-user-avatar {
    width:32px; height:32px; border-radius:999px; flex-shrink:0;
    background:linear-gradient(135deg, var(--amber), var(--amber-dim));
    color:#1A1206; font:600 13px 'Space Grotesk', sans-serif;
    display:flex; align-items:center; justify-content:center;
}
.sidebar-user-text { min-width:0; }
.sidebar-user-email { font-size:11px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:150px; }
.sidebar-user-role {
    display:inline-block; margin-top:3px; font-size:8px; color:var(--text-faint);
    text-transform:uppercase; letter-spacing:.05em; background:var(--panel);
    border:1px solid var(--line-soft); border-radius:999px; padding:1px 6px;
}
.sidebar-user-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sidebar-user-actions .btn-ghost { text-decoration: none; display: inline-flex; align-items: center; }
.btn-logout { font-size: 10px; white-space: nowrap; }
.account-panel { display:flex; flex-direction:column; gap:10px; }
.account-row {
    display:flex; flex-direction:column; gap:3px;
    padding:10px 11px; border:1px solid var(--line-soft); border-radius:7px;
    background:var(--panel-alt); font-size:10px; color:var(--text-faint);
}
.account-row strong { color:var(--text); font-size:12px; font-weight:500; word-break:break-word; }
.account-logout { width:100%; justify-content:center; }
.invite-panel {
    margin-top:2px; padding:12px; border:1px solid var(--line-soft);
    border-radius:8px; background:var(--panel-alt);
}
.account-section-title { font-size:12px; color:var(--text); font-weight:600; }
.invite-panel p { margin:5px 0 10px; color:var(--text-faint); font-size:10px; line-height:1.45; }
.invite-result { margin-top:10px; display:flex; flex-direction:column; gap:8px; }
.invite-url { padding:9px; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--text-dim); font-size:10px; line-height:1.35; word-break:break-all; }

/* ---------- navegação (dashboard e demais telas com menu) ---------- */
.app-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background: rgba(20, 31, 43, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    position: sticky;
    top: 0;
    z-index: 20;
}
@media (min-width: 1024px) { .app-nav { padding: 12px 32px; } }

.app-nav-brand { display: flex; align-items: center; gap: 10px; }
.app-nav-title { font: 600 13px 'Space Grotesk', sans-serif; color: var(--text); white-space: nowrap; }
.app-nav-links { display: none; align-items: center; gap: 4px; flex: 1; }
@media (min-width: 800px) { .app-nav-links { display: flex; } }
.app-nav-link {
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 12px;
    color: var(--text-dim);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.app-nav-link:hover { background: var(--panel-alt); color: var(--text); }
.app-nav-link.active { background: var(--panel-alt); color: var(--amber); }
.app-nav-user { display: none; align-items: center; gap: 10px; margin-left: auto; }
@media (min-width: 800px) { .app-nav-user { display: flex; } }
.app-nav-user-info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.app-nav-email { font-size: 11px; color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-nav-role { font-size: 9px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.app-nav-toggle { margin-left: auto; }
@media (min-width: 800px) { .app-nav-toggle { display: none; } }
.app-nav-links-mobile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px 12px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}
@media (min-width: 800px) { .app-nav-links-mobile { display: none !important; } }
.app-nav-links-mobile .app-nav-link { padding: 10px 12px; }

/* ---------- dashboard ---------- */
.dash-screen { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.dash-main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
.dash-inner { max-width: 1320px; margin: 0 auto; width: 100%; padding: 24px 20px 40px; }
.dash-header { margin-bottom: 20px; }
.dash-title { font: 700 20px 'Space Grotesk', sans-serif; color: var(--text); }
@media (min-width: 1024px) {
    .dash-inner { padding: 40px 40px 56px; }
    .dash-title { font-size: 26px; }
    .dash-subtitle { font-size: 13px; }
}
.dash-subtitle { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 720px)  { .dash-grid { grid-template-columns: 1fr 1fr; gap: 18px; } }
@media (min-width: 1280px) { .dash-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.dash-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
@media (min-width: 1024px) {
    .dash-card { padding: 20px 22px; }
    .dash-card:not(.dash-card-placeholder):hover {
        border-color: var(--line-soft);
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(0,0,0,0.28);
    }
}

.dash-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dash-card-title { font: 600 13px 'Space Grotesk', sans-serif; color: var(--text); }
.dash-badge {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-faint);
    background: var(--panel-alt);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 3px 8px;
    white-space: nowrap;
}
.dash-card-placeholder { opacity: .75; }
.dash-card-empty { font-size: 12px; color: var(--text-faint); line-height: 1.5; }
.dash-card-loading { font-size: 12px; color: var(--text-faint); }
.dash-card-body { display: flex; flex-direction: column; gap: 6px; }
.dash-status-row { display: flex; align-items: center; gap: 8px; }
.dash-status-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--text-faint); flex-shrink: 0; }
.dash-status-dot.ok { background: var(--green); }
.dash-status-dot.warn { background: var(--amber); }
.dash-status-row span:last-child { font-size: 13px; color: var(--text); font-weight: 500; }
.dash-card-detail { font-size: 11px; color: var(--text-faint); }
.dash-card-action {
    align-self: flex-start;
    margin-top: 4px;
    font-size: 11px;
    color: var(--amber);
    text-decoration: none;
    border: 1px solid var(--line);
    padding: 6px 10px;
    border-radius: 6px;
}
.dash-card-action:hover { border-color: var(--amber); }
.dash-card-error { font-size: 12px; color: #e9aaa0; }

.dash-mini-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 24px; }
.dash-mini-card {
    flex: 0 0 auto;
    min-width: 150px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dash-mini-placeholder { opacity: .6; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.dash-mini-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dash-mini-title { font: 600 11px 'Space Grotesk', sans-serif; color: var(--text); white-space: nowrap; }
.dash-mini-body { display: flex; flex-direction: column; gap: 4px; }

.dash-section { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.dash-section-header { margin-bottom: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-historico-btn { flex-shrink: 0; opacity: .6; cursor: not-allowed; }
.app-nav-link-em-breve { opacity: .5; pointer-events: none; }
@media (max-width: 719px) { .dash-historico-btn { display: none; } }
.dash-section-title { font: 600 14px 'Space Grotesk', sans-serif; color: var(--text); }

.dash-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}
.field-group-inline { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }

.preco-cell { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.preco-editar-btn { background: none; border: none; padding: 0; display: flex; flex-shrink: 0; }
.preco-input {
    width: 76px;
    text-align: right;
    font-size: 13px;
    border-radius: 6px;
    padding: 4px 8px;
    outline: none;
    background: var(--bg);
    border: 1px solid var(--amber);
    color: var(--amber);
    font-family: 'IBM Plex Mono', monospace;
}
.preco-salvar-btn, .preco-cancelar-btn {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--line-soft);
    background: var(--panel-alt);
    color: var(--text-dim);
    white-space: nowrap;
    flex-shrink: 0;
}
.preco-salvar-btn { border-color: var(--amber); color: var(--amber); }

.th-sortavel { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.th-sortavel.ativo { color: var(--amber); }

.spinner-sm {
    width: 14px; height: 14px;
    border: 2px solid var(--line);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
.cell-bling { font-size: 12px; }
.bling-status { display: flex; align-items: center; gap: 6px; }
.bling-status.ok { color: var(--green); }
.bling-status.insuficiente { color: var(--amber); }
.bling-status.nao-encontrado { color: var(--red); }
.bling-status.erro { color: var(--text-faint); }
.bling-actions { display: flex; gap: 6px; margin-top: 4px; }
.bling-actions button {
    font-size: 11px; padding: 2px 8px; border-radius: 6px;
    border: 1px solid var(--line); background: var(--panel);
    color: var(--text); cursor: pointer;
}
.bling-actions button:hover { border-color: var(--amber); color: var(--amber); }
.bling-resolvido { font-size: 11px; color: var(--text-faint); font-style: italic; }
.bling-cell-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.bling-cell-conteudo { flex: 1; min-width: 0; }
.btn-refresh-bling {
    flex-shrink: 0;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    opacity: .6;
}
.btn-refresh-bling:hover { opacity: 1; border-color: var(--amber); }

.btn-trocar-deposito {
    flex-shrink: 0;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    opacity: .6;
}
.btn-trocar-deposito:hover { opacity: 1; border-color: var(--amber); }

/* ---------- confirmação de reinicialização ---------- */

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 10, 15, 0.72);
}

.confirm-box {
    width: min(420px, 100%);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.confirm-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.confirm-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.confirm-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-faint);
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.confirm-actions button {
    min-width: 100px;
}

@media (min-width: 1024px) {
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--panel); }
    ::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
}