/* ============================================================
   LogiPoint Admin — Dark Theme Redesign
   Todas as classes mantidas idênticas para compatibilidade JS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Reset & Tokens ─────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:         #0d0f14;
    --surface:    #13161e;
    --surface-2:  #1a1d28;
    --surface-3:  #21263a;
    --border:     rgba(255,255,255,0.07);
    --border-mid: rgba(255,255,255,0.12);

    --accent:     #6c8cff;
    --accent-dim: rgba(108,140,255,0.15);
    --accent-glow:rgba(108,140,255,0.35);

    --green:      #3ecf8e;
    --green-dim:  rgba(62,207,142,0.14);
    --red:        #ff5f5f;
    --red-dim:    rgba(255,95,95,0.14);
    --amber:      #f5a623;
    --amber-dim:  rgba(245,166,35,0.14);
    --sky:        #48b0f7;
    --sky-dim:    rgba(72,176,247,0.14);

    --text-1:     #e8eaf0;
    --text-2:     #9298ad;
    --text-3:     #555d7a;

    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  16px;

    --shadow:     0 4px 24px rgba(0,0,0,0.45);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);

    --font-body:  'DM Sans', sans-serif;
    --font-mono:  'JetBrains Mono', monospace;

    --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Base ───────────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    background: var(--bg);
    min-height: 100vh;
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.6;
    /* subtle dot grid background */
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 28px 28px;
}

.container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 20px;
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(8px);
}

.header h1 {
    color: var(--text-1);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ── btn-admin (header pill button) ────────────────────────── */
.btn-admin {
    background: transparent;
    color: var(--text-2);
    padding: 8px 18px;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    border: 1px solid var(--border-mid);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-admin:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-admin i { font-size: 12px; }

/* ── Layout ─────────────────────────────────────────────────── */
.main-content {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 20px;
    align-items: start;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 14px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    color: var(--text-3);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding: 0 10px 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar h3 i { margin-right: 6px; }

.nav-menu { list-style: none; }

.nav-menu li { margin-bottom: 3px; }

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    background: var(--surface-2);
    color: var(--text-1);
    transform: none;
}

.nav-menu a.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.nav-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--accent-glow);
}

.nav-menu a i {
    width: 16px;
    text-align: center;
    font-size: 13px;
}

/* ── Content Area ───────────────────────────────────────────── */
.content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    min-height: 600px;
}

.content h2 {
    color: var(--text-1);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.content h2 i { color: var(--accent); font-size: 1rem; }

.content h3 {
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Cards ──────────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}

.card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-1);
    padding: 22px 20px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.6;
}

.card:hover {
    border-color: var(--border-mid);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card h3 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 10px;
    gap: 6px;
}

.card h3 i { color: var(--accent); }

.card .number {
    font-size: 2.4rem;
    font-weight: 300;
    font-family: var(--font-mono);
    color: var(--text-1);
    line-height: 1;
    margin: 6px 0 6px;
    letter-spacing: -0.03em;
}

.card .label {
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 0.04em;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-3);
    font-size: 11px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-3);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 13.5px;
    transition: var(--transition);
    -webkit-appearance: none;
}

.form-control::placeholder { color: var(--text-3); }

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555d7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-mid);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn:hover {
    background: var(--surface-3);
    color: var(--text-1);
    border-color: var(--border-mid);
}

.btn:active { transform: scale(0.98); }

.btn i { font-size: 12px; }

/* Primary — accent ghost */
.btn-primary {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.btn-primary:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 16px var(--accent-glow);
}

/* Success — green ghost */
.btn-success {
    color: var(--green);
    border-color: rgba(62,207,142,0.35);
    background: var(--green-dim);
}

.btn-success:hover {
    background: var(--green);
    color: #0d1a12;
    box-shadow: 0 0 16px rgba(62,207,142,0.35);
    border-color: var(--green);
}

/* Danger — red ghost */
.btn-danger {
    color: var(--red);
    border-color: rgba(255,95,95,0.3);
    background: var(--red-dim);
}

.btn-danger:hover {
    background: var(--red);
    color: #fff;
    box-shadow: 0 0 16px rgba(255,95,95,0.3);
    border-color: var(--red);
}

/* Warning — amber ghost */
.btn-warning {
    color: var(--amber);
    border-color: rgba(245,166,35,0.3);
    background: var(--amber-dim);
}

.btn-warning:hover {
    background: var(--amber);
    color: #1a0e00;
    box-shadow: 0 0 16px rgba(245,166,35,0.3);
    border-color: var(--amber);
}

/* Secondary */
.btn-secondary {
    color: var(--text-3);
    border-color: var(--border);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

/* ── Tables ─────────────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
    margin-top: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: var(--surface-2);
    padding: 12px 16px;
    text-align: left;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13.5px;
}

table tr:last-child td { border-bottom: none; }

table tr:hover td {
    background: var(--surface-2);
    color: var(--text-1);
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.alert i { font-size: 14px; margin-top: 1px; flex-shrink: 0; }

.alert-info {
    background: var(--sky-dim);
    color: var(--sky);
    border: 1px solid rgba(72,176,247,0.2);
}

.alert-success {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(62,207,142,0.2);
}

.alert-warning {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid rgba(245,166,35,0.2);
}

.alert-danger {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(255,95,95,0.2);
}

/* ── Barcode scanner ────────────────────────────────────────── */
.barcode-scanner {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.barcode-scanner h4 {
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.barcode-scanner h4 i { color: var(--accent); }

.scanner-input {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.scanner-input input { flex: 1; }

.packages-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
}

.package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    background: var(--surface-3);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    border-left: 3px solid var(--green);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-2);
    transition: var(--transition);
}

.package-item:hover { background: var(--surface-2); color: var(--text-1); }

.package-item.missing { border-left-color: var(--red); }
.package-item.extra   { border-left-color: var(--amber); }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    gap: 2px;
}

.tab {
    padding: 11px 20px;
    background: none;
    border: none;
    color: var(--text-3);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab:hover { color: var(--text-1); background: var(--surface-2); }

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Modals ─────────────────────────────────────────────────── */
.modal-detalhes {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-detalhes .modal-dialog {
    background: var(--surface);
    border: 1px solid var(--border-mid);
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    animation: modalPop 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

/* Inline modal divs (not .modal-dialog) */
.modal-detalhes > div,
#modal-driver > div,
#modal-designar-driver-lote > div {
    background: var(--surface) !important;
    border: 1px solid var(--border-mid) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6) !important;
    animation: modalPop 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

/* Modal overlays inline */
#modal-driver,
#modal-designar-driver-lote {
    background: rgba(0,0,0,0.7) !important;
    backdrop-filter: blur(4px);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Drive welcome ──────────────────────────────────────────── */
.drive-welcome {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.drive-welcome h2 {
    color: var(--text-1);
    margin-bottom: 18px;
    font-weight: 600;
}

.drive-welcome ul {
    list-style: none;
    margin: 20px auto;
    max-width: 480px;
    text-align: left;
}

.drive-welcome li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13.5px;
}

.drive-welcome li i {
    color: var(--accent);
    margin-right: 10px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    text-align: center;
    margin-top: 28px;
    padding: 18px;
    color: var(--text-3);
    font-size: 12px;
    letter-spacing: 0.06em;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-mid); }

/* ── Responsividade ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }

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

    .scanner-input {
        flex-direction: column;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr; }
    .content { padding: 20px 16px; }
}

/* ── Remessa Cards ──────────────────────────────────────────── */

/* Grid 2 por linha */
#lista-remessas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
}

/* Card individual de remessa */
.remessa-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.remessa-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent 70%);
    opacity: 0.5;
}

.remessa-card:hover {
    border-color: var(--border-mid);
    background: var(--surface-3);
}

/* Título da remessa */
.remessa-card .remessa-nome {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-1);
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

/* Badge de status */
.remessa-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 99px;
    margin-bottom: 14px;
    width: fit-content;
}

.remessa-status.concluida,
.remessa-status.status-concluida {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(62,207,142,0.2);
}

.remessa-status.em-andamento,
.remessa-status.status-andamento,
.remessa-status.conferencia {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(108,140,255,0.2);
}

.remessa-status.pendente,
.remessa-status.status-pendente {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid rgba(245,166,35,0.2);
}

/* Metadados (Arquivo, Total, Extras…) */
.remessa-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-bottom: 16px;
}

.remessa-info p,
.remessa-card p {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
    margin: 0;
}

.remessa-info p strong,
.remessa-card p strong {
    color: var(--text-2);
    font-weight: 600;
}

/* Valores destacados (faltantes/extras com cor) */
.remessa-card .valor-alerta { color: var(--red); font-weight: 600; }
.remessa-card .valor-ok     { color: var(--green); font-weight: 600; }
.remessa-card .valor-info   { color: var(--amber); font-weight: 600; }

/* Linha de botões */
.remessa-acoes {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* Botão Detalhes — fantasma neutro */
.remessa-acoes .btn-detalhes,
.btn-detalhes {
    background: transparent;
    color: var(--text-3);
    border: 1px solid var(--border-mid);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    white-space: nowrap;
}

.remessa-acoes .btn-detalhes:hover,
.btn-detalhes:hover {
    background: var(--surface-3);
    color: var(--text-1);
    border-color: var(--border-mid);
}

/* Botão Continuar Conferência — accent ghost */
.remessa-acoes .btn-continuar,
.btn-continuar {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(108,140,255,0.3);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    white-space: nowrap;
}

.remessa-acoes .btn-continuar:hover,
.btn-continuar:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 14px var(--accent-glow);
    border-color: var(--accent);
}

/* Botão Apagar — red ghost pequenininho */
.remessa-acoes .btn-apagar,
.btn-apagar {
    background: transparent;
    color: var(--red);
    border: 1px solid rgba(255,95,95,0.25);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-body);
    margin-left: auto; /* empurra para a direita */
    white-space: nowrap;
}

.remessa-acoes .btn-apagar:hover,
.btn-apagar:hover {
    background: var(--red-dim);
    border-color: var(--red);
}

/* Fallback: caso o JS use .btn.btn-danger direto dentro de .remessa-acoes */
.remessa-acoes .btn.btn-danger {
    padding: 7px 12px;
    font-size: 12px;
    margin-left: auto;
}

.remessa-acoes .btn.btn-primary,
.remessa-acoes .btn.btn-success {
    padding: 7px 14px;
    font-size: 12px;
}

/* Grid responsivo */
@media (max-width: 900px) {
    #lista-remessas {
        grid-template-columns: 1fr;
    }
}

/* ── Ações topo (acima das tabelas de lotes etc.) ───────────── */
.acoes-topo {
    margin-bottom: 18px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ============================================================
   LogiPoint Driver — index.html
   Adicionado aqui para não poluir o HTML com <style> inline.
   NÃO altera nada do admin acima.
   ============================================================ */

/* ── Variáveis extras do driver ─────────────────────────────── */
:root {
  --primary:       #6c8cff;
  --primary-dim:   rgba(108,140,255,0.15);
  --success:       #3ecf8e;
  --warning:       #f5a623;
  --danger:        #ff5f5f;
  --bg:            #0d0f17;
  --bg-card:       #13161e;
  --bg-surface:    #1a1d28;
  --bg-light:      #21263a;
  --border-light:  rgba(255,255,255,0.12);
  --text:          #e8eaf0;
  --text-muted:    #555d7a;
  --font-display:  'Plus Jakarta Sans', 'Syne', sans-serif;
  --font-mono:     'DM Mono', monospace;
  --radius-driver: 14px;
  --nav-h:         64px;
}

/* ── DRIVER HEADER ──────────────────────────────────────────── */
.driver-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,15,23,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
}
.logo span { color: var(--primary); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
}
.user-chip-dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
}

/* ── LAYOUT DRIVER ──────────────────────────────────────────── */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 80px; }
.p-3  { padding: 12px; }
.p-4  { padding: 16px; }

.d-flex                  { display: flex; }
.align-items-center      { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2                   { gap: 8px; }
.w-100                   { width: 100%; }
.text-center             { text-align: center; }
.overflow-auto           { overflow-x: auto; }

/* ── TYPOGRAPHY DRIVER ──────────────────────────────────────── */
.display-1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.display-2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.body-1      { font-size: 15px; font-weight: 500; }
.body-2      { font-size: 13px; }
.caption     { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.text-muted  { color: var(--text-muted); }
.text-success { color: var(--success); }
.mono        { font-family: var(--font-mono); }
.accent-text { color: var(--primary); }
.link-primary { color: var(--primary); text-decoration: none; font-weight: 600; }

/* ── VIEWS ──────────────────────────────────────────────────── */
.view-lotes {
  padding-bottom: calc(var(--nav-h) + 16px);
}
.view-perfil {
  padding: 20px 16px calc(var(--nav-h) + 16px);
}
.view-perfil-inner {
  max-width: 480px;
  margin: 0 auto;
}

/* ── CHIP / FILTRO ──────────────────────────────────────────── */
.chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  user-select: none;
}
.chip.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary);
}
.filter-scroll { scrollbar-width: none; padding-bottom: 4px; }
.filter-scroll::-webkit-scrollbar { display: none; }

/* ── TAGS ───────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tag-open    { background: rgba(62,207,142,0.12); color: #3ecf8e; border: 1px solid rgba(62,207,142,0.25); }
.tag-active  { background: rgba(108,140,255,0.12); color: #6c8cff; border: 1px solid rgba(108,140,255,0.25); }
.tag-pending { background: rgba(245,166,35,0.12);  color: #f5a623; border: 1px solid rgba(245,166,35,0.25); }
.tag-done    { background: rgba(255,255,255,0.06); color: #555d7a; border: 1px solid rgba(255,255,255,0.1); }

/* ── BUTTONS DRIVER ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .18s;
  user-select: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #5a7aee; }

.btn-success {
  background: rgba(62,207,142,0.15);
  color: #3ecf8e;
  border: 1px solid rgba(62,207,142,0.3);
}
.btn-success:hover:not(:disabled) { background: rgba(62,207,142,0.25); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border-light);
}
.btn-outline:hover:not(:disabled) { color: var(--text); border-color: rgba(255,255,255,0.25); }

.btn-sm { padding: 7px 12px; font-size: 12px; }

/* ── BOTTOM NAV ─────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(19,22,30,0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  transition: color .15s;
  padding: 8px 0;
}
.nav-btn.active { color: var(--primary); }
.nav-icon { font-size: 22px; line-height: 1; }

/* ── MODAL DRIVER ───────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px 20px 28px;
  width: 100%;
  max-width: 440px;
  animation: driverSlideUp .25s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-scroll { max-height: 92vh; overflow-y: auto; }

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin: 0 auto 20px;
}

/* ── ACEITAR LOTE ───────────────────────────────────────────── */
.aceitar-info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
}
.aceitar-warning-box {
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #c78a00;
  line-height: 1.5;
}

/* ── FORM DRIVER ────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  z-index: 9999;
  opacity: 0;
  transition: all .3s;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { border-color: rgba(62,207,142,0.4);  color: #3ecf8e; }
.toast-error   { border-color: rgba(255,95,95,0.4);   color: #ff5f5f; }
.toast-info    { border-color: rgba(108,140,255,0.4); color: #6c8cff; }

/* ── ANIMATIONS DRIVER ──────────────────────────────────────── */
@keyframes driverSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.slide-up {
  animation: driverSlideUp .35s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ── LOTE CARDS ─────────────────────────────────────────────── */
.lote-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.lote-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.lote-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lote-card-left {
  flex: 1;
  min-width: 0;
}
.lote-nome {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 6px;
}
.lote-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.lote-meta-regiao { color: var(--text-muted); }
.lote-meta-sep    { color: var(--border-light); }
.lote-meta-pkts   { color: var(--text-muted); }
.lote-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
/* Botão de ação full-width abaixo do card */
.lote-card-action {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.lote-card-action .btn {
  width: 100%;
  justify-content: center;
}
/* Badge de valor total da rota */
.lote-valor-badge {
  font-size: 15px;
  font-weight: 800;
  color: var(--success);
  background: rgba(62,207,142,0.1);
  border: 1px solid rgba(62,207,142,0.25);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
}