/* ============================================================
   ✅ v3.73.13 — App do Entregador (Pharus)
   Mobile-first, dark theme, identidade Pharus
   ============================================================ */

:root {
    --dlv-bg:        #1a2332;
    --dlv-bg-2:      #243348;
    --dlv-bg-3:      #2a3a52;
    --dlv-text:      #e8e8e8;
    --dlv-muted:     #9ca3af;
    --dlv-dim:       #6b7280;
    --dlv-gold:      #bda05f;
    --dlv-gold-2:    #d4b97a;
    --dlv-success:   #10b981;
    --dlv-warn:      #f59e0b;
    --dlv-danger:    #ef4444;
    --dlv-info:      #3b82f6;
    --dlv-radius:    14px;
    --dlv-radius-sm: 8px;
    --dlv-shadow:    0 8px 28px rgba(0,0,0,.5);
    --dlv-touch-h:   56px;
}

* { box-sizing: border-box; }

html, body {
    background: var(--dlv-bg) !important;
    color: var(--dlv-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Esconde header/footer do WP nessa página */
body.page-template-page-delivery > header,
body.page-template-page-delivery > footer,
body.page-template-page-delivery-user > header,
body.page-template-page-delivery-user > footer { display: none !important; }
/* Esconder apenas header/footer DIRETOS do tema, não os internos do app */
body.page-template-page-delivery > header:not(.dlv-dash-topbar):not(.dlv-login-hero),
body.page-template-page-delivery > footer:not(.dlv-login-footer),
body.page-template-page-delivery-user > header,
body.page-template-page-delivery-user > footer,
body.page-template-page-delivery main > header:not(.dlv-dash-topbar):not(.dlv-login-hero),
body.page-template-page-delivery main > footer,
body.page-template-page-delivery-user main > header:not(.dlv-dash-topbar),
body.page-template-page-delivery-user main > footer { display: none !important; }

/* Wrapper raiz */
.dlv-app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--dlv-bg);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ─── BANNER OFFLINE ─────────────────────────────────────── */
.dlv-offline-banner {
    position: fixed;
    top: env(safe-area-inset-top);
    left: 0;
    right: 0;
    background: var(--dlv-danger);
    color: #fff;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: dlvSlideDown .25s ease-out;
}
@keyframes dlvSlideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.dlv-login-page {
    background: linear-gradient(180deg, #0f1624 0%, #1a2332 50%, #243348 100%);
}

/* HERO */
.dlv-login-hero {
    text-align: center;
    padding: 48px 24px 32px;
    color: var(--dlv-text);
    position: relative;
}

/* Brand pair: logo da loja ··· ícone moto (parceria) */
.dlv-brand-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto 18px;
}
.dlv-brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255,255,255,.06);
    padding: 8px;
    border: 1px solid rgba(189, 160, 95, .35);
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    flex-shrink: 0;
}
.dlv-brand-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dlv-gold);
    font-size: 28px;
}
.dlv-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dlv-gold), var(--dlv-gold-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a2332;
    font-size: 28px;
    box-shadow: 0 6px 18px rgba(189,160,95,.35);
    flex-shrink: 0;
}
.dlv-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.dlv-brand-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--dlv-gold);
    opacity: .55;
    animation: dlvBrandPulse 1.6s ease-in-out infinite;
}
.dlv-brand-dot:nth-child(2) { animation-delay: .2s; }
.dlv-brand-dot:nth-child(3) { animation-delay: .4s; }
@keyframes dlvBrandPulse {
    0%, 100% { opacity: .35; transform: scale(.85); }
    50%      { opacity: 1;   transform: scale(1.15); }
}
.dlv-login-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--dlv-text);
    letter-spacing: -0.3px;
}
.dlv-login-subtitle {
    font-size: 13px;
    color: var(--dlv-muted);
    margin: 0;
}

/* CARD */
.dlv-login-card {
    background: var(--dlv-bg-2);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border: 1px solid var(--dlv-bg-3);
    border-bottom: none;
    padding: 28px 22px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 -10px 32px rgba(0,0,0,.35);
}

@media (min-width: 768px) {
    .dlv-login-card {
        max-width: 440px;
        margin: -8px auto 0;
        border-radius: var(--dlv-radius);
        border: 1px solid var(--dlv-bg-3);
        flex: 0 0 auto;
    }
}

/* FORM */
#dlvLoginForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#dlvLoginForm.dlv-shake { animation: dlvShake .45s; }
@keyframes dlvShake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-8px); }
    40%     { transform: translateX(8px); }
    60%     { transform: translateX(-5px); }
    80%     { transform: translateX(5px); }
}

.dlv-field { display: flex; flex-direction: column; gap: 6px; }
.dlv-field label {
    font-size: 12px;
    color: var(--dlv-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dlv-field label i { color: var(--dlv-gold); font-size: 13px; }
.dlv-field input {
    height: var(--dlv-touch-h);
    background: var(--dlv-bg-3);
    border: 2px solid transparent;
    border-radius: var(--dlv-radius-sm);
    color: var(--dlv-text);
    padding: 0 16px;
    font-size: 16px;
    transition: border-color .15s, background .15s;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}
.dlv-field input:focus {
    outline: none;
    border-color: var(--dlv-gold);
    background: #2f425e;
}
.dlv-field input::placeholder { color: var(--dlv-dim); }

.dlv-password-wrap { position: relative; }
.dlv-password-wrap input { padding-right: 52px; }
.dlv-password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--dlv-muted);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.dlv-password-toggle:hover { color: var(--dlv-gold); background: rgba(255,255,255,.04); }

/* TOGGLE ROW */
.dlv-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    color: var(--dlv-text);
    font-size: 14px;
}
.dlv-toggle-row span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dlv-toggle-row i { color: var(--dlv-gold); font-size: 14px; }

.dlv-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}
.dlv-switch input { display: none; }
.dlv-switch-slider {
    position: absolute;
    inset: 0;
    background: var(--dlv-bg-3);
    border-radius: 28px;
    cursor: pointer;
    transition: background .25s;
}
.dlv-switch-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform .25s;
    box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.dlv-switch input:checked + .dlv-switch-slider { background: var(--dlv-success); }
.dlv-switch input:checked + .dlv-switch-slider::before { transform: translateX(20px); }

/* ERROR TOAST */
.dlv-error-toast {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .4);
    color: #fca5a5;
    padding: 12px 14px;
    border-radius: var(--dlv-radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* BOTÕES */
.dlv-btn-primary {
    height: var(--dlv-touch-h);
    background: linear-gradient(135deg, var(--dlv-gold), var(--dlv-gold-2));
    color: #1a2332;
    border: none;
    border-radius: var(--dlv-radius-sm);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(189,160,95,.35);
    transition: transform .15s, box-shadow .15s, opacity .15s;
    width: 100%;
}
.dlv-btn-primary:active:not(:disabled) { transform: scale(.98); }
.dlv-btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.dlv-btn-primary.is-loading { pointer-events: none; }
.dlv-btn-primary i { font-size: 14px; }

.dlv-btn-secondary {
    height: 48px;
    background: var(--dlv-bg-3);
    color: var(--dlv-text);
    border: 1px solid rgba(189,160,95,.4);
    border-radius: var(--dlv-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}
.dlv-btn-secondary:hover { background: #2f425e; border-color: var(--dlv-gold); }
.dlv-btn-secondary i { color: var(--dlv-gold); }

/* DIVIDER */
.dlv-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dlv-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.dlv-login-divider::before,
.dlv-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dlv-bg-3);
}

.dlv-help-text {
    font-size: 12px;
    color: var(--dlv-muted);
    text-align: center;
    line-height: 1.6;
}
.dlv-help-text strong { color: var(--dlv-text); }

/* FOOTER */
.dlv-login-footer {
    margin-top: auto;
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--dlv-dim);
    background: var(--dlv-bg-2);
    border-top: 1px solid var(--dlv-bg-3);
}
.dlv-status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.dlv-status-dot .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dlv-dim);
}
.dlv-status-dot .dot.online {
    background: var(--dlv-success);
    box-shadow: 0 0 0 4px rgba(16,185,129,.18);
}
.dlv-status-dot .dot.offline {
    background: var(--dlv-danger);
    box-shadow: 0 0 0 4px rgba(239,68,68,.18);
}

/* ============================================================
   DASHBOARD (legado preservado — refazer em rounds futuros)
   ============================================================ */
.dlv-dashboard { background: var(--dlv-bg); }
.dlv-dash-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dlv-bg-2);
    border-bottom: 1px solid var(--dlv-bg-3);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.dlv-dash-header h2 { margin: 0; color: var(--dlv-text); font-size: 17px; font-weight: 700; }
.dlv-dash-header h2 small { display: block; color: var(--dlv-muted); font-size: 11px; font-weight: 400; margin-top: 2px; }
.dlv-status-tabs {
    display: flex;
    background: var(--dlv-bg-2);
    border-bottom: 1px solid var(--dlv-bg-3);
    overflow-x: auto;
}
.dlv-status-tabs button {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--dlv-muted);
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}
.dlv-status-tabs button.active {
    color: var(--dlv-gold);
    border-bottom-color: var(--dlv-gold);
}
.dlv-orders-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dlv-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--dlv-bg-2);
    border-top: 1px solid var(--dlv-bg-3);
    display: flex;
    padding: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
}
.dlv-bottom-nav button {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--dlv-muted);
    padding: 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.dlv-bottom-nav button i { font-size: 18px; }
.dlv-bottom-nav button.active { color: var(--dlv-gold); }

/* ============================================================
   DASHBOARD v2 — App do Entregador (mobile-first PWA)
   ============================================================ */

/* ─── 1. TOPBAR sticky ───────────────────────────────────── */
.dlv-dash-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dlv-bg-2);
    border-bottom: 1px solid var(--dlv-bg-3);
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
}
.dlv-topbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dlv-topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dlv-gold), var(--dlv-gold-2));
    color: #1a2332;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(189,160,95,.35);
}
.dlv-topbar-info {
    flex: 1;
    min-width: 0;
}
.dlv-topbar-greet {
    font-size: 14px;
    font-weight: 700;
    color: var(--dlv-text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dlv-topbar-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 3px;
    background: var(--dlv-bg-3);
    color: var(--dlv-muted);
}
.dlv-topbar-status-chip.is-online {
    background: rgba(16,185,129,.15);
    color: var(--dlv-success);
}
.dlv-topbar-status-chip .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.dlv-topbar-logout {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--dlv-bg-3);
    color: var(--dlv-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    flex-shrink: 0;
}
.dlv-topbar-logout:active { transform: scale(.95); }

/* KPIs do dia */
.dlv-kpi-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.dlv-kpi-card {
    flex: 1;
    background: var(--dlv-bg-3);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dlv-kpi-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--dlv-muted);
}
.dlv-kpi-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--dlv-text);
    line-height: 1.2;
}
.dlv-kpi-value.is-gold { color: var(--dlv-gold); }

/* ─── 2. SWITCH "ESTOU RECEBENDO" ────────────────────────── */
.dlv-receiving-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    margin: 12px 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--dlv-bg-3);
    border: 1px solid var(--dlv-bg-3);
    transition: background .25s, border-color .25s, box-shadow .25s;
}
.dlv-receiving-toggle.is-on {
    background: linear-gradient(135deg, rgba(16,185,129,.22), rgba(16,185,129,.08));
    border-color: rgba(16,185,129,.45);
    box-shadow: 0 4px 18px rgba(16,185,129,.18);
}
.dlv-receiving-toggle.is-off {
    background: linear-gradient(135deg, rgba(107,114,128,.22), rgba(107,114,128,.06));
    border-color: rgba(107,114,128,.35);
}
.dlv-receiving-label {
    flex: 1;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--dlv-text);
}
.dlv-receiving-sub {
    display: block;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--dlv-muted);
    margin-top: 2px;
}

/* ─── 3. TABS segmentados ────────────────────────────────── */
.dlv-tabs {
    display: flex;
    gap: 4px;
    background: var(--dlv-bg-2);
    padding: 4px;
    border-radius: 10px;
    margin: 0 16px 12px;
}
.dlv-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: var(--dlv-muted);
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s, color .15s;
}
.dlv-tab.active {
    background: linear-gradient(135deg, var(--dlv-gold), var(--dlv-gold-2));
    color: #1a2332;
    box-shadow: 0 2px 8px rgba(189,160,95,.3);
}
.dlv-tab-count {
    background: var(--dlv-bg-3);
    color: var(--dlv-text);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}
.dlv-tab.active .dlv-tab-count {
    background: rgba(26,35,50,.25);
    color: #1a2332;
}

/* ─── 4. ORDER CARD ──────────────────────────────────────── */
.dlv-order-card {
    background: var(--dlv-bg-2);
    border: 1px solid var(--dlv-bg-3);
    border-radius: 12px;
    padding: 14px;
    margin: 0 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dlv-order-card.dlv-order-new {
    border-left: 3px solid var(--dlv-gold);
    box-shadow: 0 0 0 1px rgba(189,160,95,.35), 0 6px 22px rgba(189,160,95,.22);
    animation: dlvPulse 1.8s ease-in-out infinite;
}
@keyframes dlvPulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(189,160,95,.35), 0 6px 22px rgba(189,160,95,.22); }
    50%      { box-shadow: 0 0 0 2px rgba(189,160,95,.55), 0 8px 28px rgba(189,160,95,.35); }
}
.dlv-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.dlv-card-number {
    font-size: 15px;
    font-weight: 800;
    color: var(--dlv-gold);
    letter-spacing: 0.3px;
}
.dlv-card-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--dlv-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.dlv-card-meta i { font-size: 11px; }
.dlv-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dlv-card-customer {
    font-size: 14px;
    font-weight: 700;
    color: var(--dlv-text);
}
.dlv-card-address {
    font-size: 12px;
    color: var(--dlv-muted);
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}
.dlv-card-address i { color: var(--dlv-gold); font-size: 11px; margin-top: 3px; }
.dlv-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--dlv-bg-3);
    color: var(--dlv-muted);
    align-self: flex-start;
}
.dlv-card-chip.is-pix     { background: rgba(16,185,129,.15); color: var(--dlv-success); }
.dlv-card-chip.is-cash    { background: rgba(245,158,11,.15); color: var(--dlv-warn); }
.dlv-card-chip.is-card    { background: rgba(59,130,246,.15); color: var(--dlv-info); }
.dlv-card-divider {
    border: none;
    border-top: 1px dashed var(--dlv-bg-3);
    margin: 2px 0;
}
.dlv-card-prices {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dlv-card-prices-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--dlv-muted);
}
.dlv-card-prices-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--dlv-gold);
    letter-spacing: -0.3px;
}
.dlv-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.dlv-card-actions > * { flex: 1; }

/* ─── 5. BOTÕES (complementares ao login) ────────────────── */
.dlv-btn-success {
    height: var(--dlv-touch-h);
    background: linear-gradient(135deg, var(--dlv-success), #059669);
    color: #fff;
    border: none;
    border-radius: var(--dlv-radius-sm);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(16,185,129,.35);
    width: 100%;
    transition: transform .15s;
}
.dlv-btn-success:active:not(:disabled) { transform: scale(.98); }
.dlv-btn-success:disabled { opacity: .55; cursor: not-allowed; }

.dlv-btn-outline {
    height: 48px;
    background: transparent;
    border: 1.5px solid var(--dlv-gold);
    color: var(--dlv-gold);
    border-radius: var(--dlv-radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.dlv-btn-outline:active { background: rgba(189,160,95,.1); }

.dlv-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--dlv-bg-3);
    color: var(--dlv-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}
.dlv-btn-icon:active { transform: scale(.93); }
.dlv-btn-icon.is-whatsapp { color: #25d366; }
.dlv-btn-icon.is-call     { color: var(--dlv-info); }

/* ─── 6. EMPTY STATE ─────────────────────────────────────── */
.dlv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    gap: 12px;
}
.dlv-empty-icon {
    font-size: 64px;
    color: var(--dlv-bg-3);
    line-height: 1;
}
.dlv-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dlv-muted);
    margin: 0;
}
.dlv-empty-sub {
    font-size: 13px;
    color: var(--dlv-dim);
    margin: 0;
    max-width: 260px;
    line-height: 1.5;
}

/* ─── 7. BOTTOM NAV (tabbar) ─────────────────────────────── */
.dlv-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--dlv-bg-2);
    border-top: 1px solid var(--dlv-bg-3);
    padding: 8px 4px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -4px 16px rgba(0,0,0,.35);
}
.dlv-tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    background: transparent;
    border: none;
    color: var(--dlv-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: color .15s;
}
.dlv-tabbar-item i { font-size: 22px; }
.dlv-tabbar-item.active { color: var(--dlv-gold); }
.dlv-tabbar-item:active { background: rgba(255,255,255,.03); }

/* body padding para não esconder conteúdo atrás da tabbar */
.dlv-dashboard-body { padding-bottom: 80px; }

/* ─── 8. BOTTOM SHEET confirmar entrega ──────────────────── */
.dlv-bottomsheet {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: dlvFadeIn .2s ease-out;
}
@keyframes dlvFadeIn { from { opacity: 0; } to { opacity: 1; } }
.dlv-bottomsheet-panel {
    width: 100%;
    max-width: 520px;
    background: var(--dlv-bg-2);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-top: 1px solid var(--dlv-bg-3);
    padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: dlvSlideUp .28s cubic-bezier(.2,.9,.3,1.2);
    box-shadow: 0 -10px 40px rgba(0,0,0,.6);
}
@keyframes dlvSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.dlv-bottomsheet-handle {
    width: 40px;
    height: 4px;
    background: var(--dlv-bg-3);
    border-radius: 2px;
    margin: -8px auto 4px;
}
.dlv-bottomsheet-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--dlv-text);
    text-align: center;
    margin: 0;
}
.dlv-bottomsheet-sub {
    font-size: 13px;
    color: var(--dlv-muted);
    text-align: center;
    margin: 0;
    line-height: 1.5;
}
.dlv-pin-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 8px 0;
}
.dlv-pin-input {
    width: 60px;
    height: 60px;
    background: var(--dlv-bg-3);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--dlv-text);
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    -moz-appearance: textfield;
    transition: border-color .15s, background .15s;
}
.dlv-pin-input::-webkit-outer-spin-button,
.dlv-pin-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dlv-pin-input:focus {
    outline: none;
    border-color: var(--dlv-gold);
    background: #2f425e;
}
.dlv-bottomsheet-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.dlv-bottomsheet-actions > * { flex: 1; }

/* ─── 9. DETAIL PAGE (tela cheia) ────────────────────────── */
.dlv-detail-page {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: var(--dlv-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: dlvSlideLeft .25s ease-out;
}
@keyframes dlvSlideLeft {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
.dlv-detail-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--dlv-bg-2);
    border-bottom: 1px solid var(--dlv-bg-3);
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
    display: flex;
    align-items: center;
    gap: 12px;
}
.dlv-detail-back {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--dlv-bg-3);
    color: var(--dlv-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.dlv-detail-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--dlv-text);
    margin: 0;
    flex: 1;
}
.dlv-detail-map {
    width: 100%;
    height: 200px;
    background: var(--dlv-bg-2);
}
.dlv-detail-section {
    padding: 16px;
    border-bottom: 1px solid var(--dlv-bg-3);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dlv-detail-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dlv-muted);
    margin: 0;
}
.dlv-detail-customer {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dlv-detail-customer-info { flex: 1; min-width: 0; }
.dlv-detail-customer-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--dlv-text);
}
.dlv-detail-customer-phone {
    font-size: 12px;
    color: var(--dlv-muted);
    margin-top: 2px;
}
.dlv-detail-customer-actions {
    display: flex;
    gap: 8px;
}
.dlv-detail-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dlv-detail-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--dlv-text);
    padding: 8px 0;
    border-bottom: 1px dashed var(--dlv-bg-3);
}
.dlv-detail-item:last-child { border-bottom: none; }
.dlv-detail-item-qty { color: var(--dlv-muted); font-weight: 600; }
.dlv-detail-item-price { color: var(--dlv-gold); font-weight: 700; }
.dlv-detail-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dlv-detail-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--dlv-muted);
}
.dlv-detail-total-row.is-final {
    font-size: 15px;
    font-weight: 800;
    color: var(--dlv-text);
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--dlv-bg-3);
}
.dlv-detail-total-row.is-fee strong { color: var(--dlv-gold); }
.dlv-detail-footer {
    position: sticky;
    bottom: 0;
    background: var(--dlv-bg-2);
    border-top: 1px solid var(--dlv-bg-3);
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(0,0,0,.35);
}

/* ─── 11. PERMISSIONS BANNER ─────────────────────────────── */
.dlv-permissions-banner {
    position: sticky;
    top: 0;
    z-index: 90;
    background: linear-gradient(135deg, rgba(189,160,95,.18), rgba(189,160,95,.08));
    border-bottom: 1px solid rgba(189,160,95,.35);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--dlv-text);
}
.dlv-permissions-banner i {
    color: var(--dlv-gold);
    font-size: 16px;
    flex-shrink: 0;
}
.dlv-permissions-banner-text { flex: 1; line-height: 1.4; }
.dlv-permissions-banner-btn {
    background: var(--dlv-gold);
    color: #1a2332;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
}

/* ─── 12. SKELETON LOADER ────────────────────────────────── */
.dlv-skel-card {
    background: var(--dlv-bg-2);
    border: 1px solid var(--dlv-bg-3);
    border-radius: 12px;
    padding: 14px;
    margin: 0 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    position: relative;
}
.dlv-skel-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--dlv-bg-3) 0%, #31445f 50%, var(--dlv-bg-3) 100%);
    background-size: 200% 100%;
    animation: dlvShimmer 1.4s ease-in-out infinite;
}
.dlv-skel-line.is-sm { height: 10px; width: 40%; }
.dlv-skel-line.is-md { width: 65%; }
.dlv-skel-line.is-lg { height: 18px; width: 80%; }
@keyframes dlvShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ✅ v3.73.15 — Perfil + Histórico (classes que faltavam) */
.dlv-route { padding: 0; }

.dlv-profile-card {
    background: var(--dlv-bg-2);
    border: 1px solid var(--dlv-bg-3);
    border-radius: 14px;
    padding: 24px;
    margin: 16px;
    text-align: center;
}
.dlv-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dlv-gold), var(--dlv-gold-2));
    color: #1a2332;
    font-size: 32px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 6px 18px rgba(189,160,95,.35);
}
.dlv-profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--dlv-text);
    margin: 0 0 4px;
}
.dlv-profile-id {
    font-size: 12px;
    color: var(--dlv-muted);
    margin: 0;
}

.dlv-profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 16px 16px;
}
.dlv-stat-card {
    background: var(--dlv-bg-2);
    border: 1px solid var(--dlv-bg-3);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.dlv-stat-label {
    font-size: 11px;
    color: var(--dlv-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.dlv-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--dlv-gold);
}

.dlv-profile-section {
    background: var(--dlv-bg-2);
    border: 1px solid var(--dlv-bg-3);
    border-radius: 12px;
    margin: 0 16px 14px;
    padding: 14px 16px;
}
.dlv-profile-section h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--dlv-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--dlv-bg-3);
}
.dlv-perm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--dlv-text);
    font-size: 14px;
}
.dlv-perm-row + .dlv-perm-row { border-top: 1px solid var(--dlv-bg-3); }
.dlv-perm-row span:first-child { display: flex; align-items: center; gap: 8px; }
.dlv-perm-row i { color: var(--dlv-gold); }
.dlv-perm-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--dlv-muted);
}
.dlv-perm-status.ok { color: var(--dlv-success); }
.dlv-perm-status.bad { color: var(--dlv-danger); }

.dlv-btn-outline-danger {
    width: 100%;
    height: 48px;
    background: transparent;
    border: 1px solid rgba(239,68,68,.5);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.dlv-btn-outline-danger:hover {
    background: rgba(239,68,68,.1);
    color: #fff;
    border-color: var(--dlv-danger);
}

.dlv-profile-version {
    text-align: center;
    font-size: 11px;
    color: var(--dlv-dim);
    margin: 20px 0 12px;
}

/* Histórico */
.dlv-period-tabs {
    display: flex;
    gap: 6px;
    background: var(--dlv-bg-2);
    border-radius: 10px;
    padding: 4px;
    margin: 16px;
}
.dlv-period-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--dlv-muted);
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}
.dlv-period-tab.active {
    background: var(--dlv-gold);
    color: #1a2332;
}

.dlv-history-summary { padding: 0 16px; margin-bottom: 14px; }
.dlv-history-card {
    background: var(--dlv-bg-2);
    border: 1px solid var(--dlv-bg-3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-around;
    text-align: center;
}
.dlv-history-label {
    font-size: 11px;
    color: var(--dlv-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.dlv-history-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--dlv-gold);
}

.dlv-history-list { padding: 0 16px; }
.dlv-history-item {
    background: var(--dlv-bg-2);
    border: 1px solid var(--dlv-bg-3);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.dlv-history-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(16,185,129,.12);
    color: var(--dlv-success);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dlv-history-info { flex: 1; min-width: 0; }
.dlv-history-num {
    font-size: 13px;
    color: var(--dlv-text);
    font-weight: 600;
}
.dlv-history-meta {
    font-size: 11px;
    color: var(--dlv-muted);
    margin-top: 2px;
}
.dlv-history-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--dlv-gold);
}

/* Toast */
.dlv-flash-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--dlv-bg-2);
    border: 1px solid var(--dlv-bg-3);
    color: var(--dlv-text);
    padding: 12px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
    z-index: 9999;
    max-width: 90%;
    text-align: center;
}
.dlv-flash-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.dlv-flash-success { border-color: var(--dlv-success); }
.dlv-flash-error   { border-color: var(--dlv-danger); }
.dlv-flash-warn    { border-color: var(--dlv-warn); }
