/* ========================================
   Entrega Fácil - App do Entregador
   Mobile-first | Verde + Laranja
   ======================================== */

:root {
    --green: #1DB954;
    --green-dark: #17a347;
    --green-light: #e8f8ee;
    --orange: #FF6B00;
    --orange-light: #fff3e8;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red: #ef4444;
    --yellow: #f59e0b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--gray-50);
    color: var(--gray-900);
    min-height: 100vh;
    padding-bottom: 80px;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { text-decoration: none; color: inherit; }

/* ========= HEADER ========= */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--white);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
}

.app-header .brand {
    display: flex;
    flex-direction: column;
}

.app-header .brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.app-header .brand-name span {
    font-style: italic;
    color: var(--green);
}

.app-header .brand-stats {
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-header .brand-stats .star {
    color: var(--yellow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Toggle Online/Offline */
.toggle-online {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    transition: all 0.3s ease;
}

.toggle-online.online {
    background: var(--green);
    color: var(--white);
}

.toggle-online.offline {
    background: var(--gray-200);
    color: var(--gray-600);
}

.toggle-online .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white);
}

.toggle-online.offline .dot {
    background: var(--gray-400);
}

.toggle-online .icon-power {
    width: 18px;
    height: 18px;
}

/* Notification bell */
.btn-notification {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-600);
}

.btn-notification .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--orange);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.btn-notification svg {
    width: 22px;
    height: 22px;
}

/* ========= BOTTOM NAV ========= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font);
    transition: color 0.2s;
    position: relative;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.nav-item.active {
    color: var(--green);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--green);
    border-radius: 0 0 3px 3px;
}

/* ========= PAGE SECTIONS ========= */
.page {
    display: none;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
}

/* ========= CARDS ========= */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.card:active {
    box-shadow: var(--shadow-md);
}

/* ========= HOME - Entrega Ativa ========= */
.entrega-ativa-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 16px;
}

.map-placeholder {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--green);
    position: relative;
}

.map-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.map-placeholder .map-label {
    font-size: 13px;
    color: var(--gray-500);
}

.map-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--white);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

/* Status Steps */
.status-steps {
    display: flex;
    justify-content: space-between;
    padding: 20px 16px;
    position: relative;
}

.status-steps::before {
    content: '';
    position: absolute;
    top: 38px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--gray-200);
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 1;
    flex: 1;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-400);
    transition: all 0.3s;
}

.step-icon svg {
    width: 18px;
    height: 18px;
}

.status-step.active .step-icon {
    background: var(--green-light);
    color: var(--green);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
}

.status-step.completed .step-icon {
    background: var(--green);
    color: var(--white);
}

.step-label {
    font-size: 10px;
    color: var(--gray-400);
    text-align: center;
    font-weight: 500;
    max-width: 60px;
}

.status-step.active .step-label,
.status-step.completed .step-label {
    color: var(--green);
    font-weight: 600;
}

/* Action Button */
.btn-action {
    display: block;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--green);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.btn-action:active {
    background: var(--green-dark);
}

/* Detalhes do pedido */
.detalhes-pedido {
    padding: 16px;
    border-top: 1px solid var(--gray-100);
}

.detalhes-pedido h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
}

.rota-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rota-ponto {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 0;
}

.rota-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.rota-dot.coleta { background: var(--green); }
.rota-dot.entrega { background: var(--orange); }

.rota-linha {
    width: 2px;
    height: 20px;
    background: var(--gray-200);
    margin-left: 4px;
}

.rota-ponto .label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
}

.rota-ponto .endereco {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.rota-ponto .detalhe {
    font-size: 13px;
    color: var(--gray-500);
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-contact {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-contact:active {
    background: var(--gray-50);
}

.btn-contact svg {
    width: 18px;
    height: 18px;
}

/* ========= HOME - Novo Pedido (Card popup) ========= */
.novo-pedido-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 16px;
    animation: slideUp 0.35s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.novo-pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 16px 8px;
}

.novo-pedido-header .restaurante {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.novo-pedido-header .tempo {
    font-size: 12px;
    color: var(--gray-500);
}

.novo-pedido-header .preco-badge {
    background: var(--green);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
}

.novo-pedido-rota {
    padding: 0 16px 12px;
}

.novo-pedido-meta {
    display: flex;
    gap: 16px;
    padding: 0 16px 12px;
    font-size: 13px;
    color: var(--gray-500);
}

.novo-pedido-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.novo-pedido-meta svg {
    width: 14px;
    height: 14px;
}

.novo-pedido-itens {
    padding: 0 16px 12px;
    font-size: 13px;
    color: var(--gray-500);
}

.novo-pedido-itens span {
    color: var(--gray-700);
    font-weight: 500;
}

.novo-pedido-actions {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
}

.btn-recusar {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-recusar:active {
    background: var(--gray-50);
}

.btn-aceitar {
    flex: 1.5;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--green);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-aceitar:active {
    background: var(--green-dark);
}

/* ========= Estado vazio (sem entregas) ========= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-400);
}

/* ========= PEDIDOS ========= */
.pedido-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    padding: 16px;
    margin-bottom: 12px;
}

.pedido-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.pedido-card-header .info h3 {
    font-size: 16px;
    font-weight: 700;
}

.pedido-card-header .info .tempo {
    font-size: 12px;
    color: var(--gray-500);
}

.pedido-card-header .preco-badge {
    background: var(--orange-light);
    color: var(--orange);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.pedido-card-header .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pedido-rota {
    margin-bottom: 12px;
}

.pedido-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--gray-500);
}

.pedido-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pedido-meta svg {
    width: 14px;
    height: 14px;
}

.pedido-itens {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 8px;
}
.pedido-itens span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pedido-itens-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--gray-400);
}
.pedido-itens:active {
    opacity: 0.7;
}

/* ========= MODAL ITENS DO PEDIDO ========= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
}
.modal-overlay.active .modal-itens {
    transform: translateY(0);
}
.modal-itens {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.modal-itens-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    z-index: 1;
}
.modal-itens-header h3 {
    font-size: 18px;
    font-weight: 700;
}
.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.modal-close svg {
    width: 18px;
    height: 18px;
}
.modal-itens-empresa {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--gray-100);
}
.modal-itens-empresa svg {
    width: 16px;
    height: 16px;
    color: var(--green);
}
.modal-itens-list {
    padding: 8px 20px;
}
.modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-50);
}
.modal-item:last-child {
    border-bottom: none;
}
.modal-item-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.modal-item-qty {
    font-size: 13px;
    font-weight: 700;
    color: var(--orange);
    flex-shrink: 0;
    min-width: 24px;
}
.modal-item-nome {
    font-size: 14px;
    color: var(--gray-800);
    word-break: break-word;
}
.modal-item-valor {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    flex-shrink: 0;
    margin-left: 12px;
}
.modal-item-empty {
    text-align: center;
    padding: 20px 0;
    color: var(--gray-400);
    font-size: 14px;
}
.modal-itens-resumo {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}
.modal-resumo-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--gray-600);
    padding: 4px 0;
}
.modal-resumo-row.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--gray-200);
}
.modal-resumo-row.pagamento {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 13px;
}
.modal-resumo-row.pagamento svg {
    width: 14px;
    height: 14px;
}
.modal-itens-obs {
    padding: 12px 20px 20px;
    font-size: 13px;
    color: var(--orange);
    background: var(--gray-50);
}
.modal-itens-obs strong {
    font-weight: 600;
}

.pedido-actions {
    display: flex;
    gap: 12px;
}

/* ========= GANHOS ========= */
.ganhos-hoje {
    background: linear-gradient(135deg, var(--green) 0%, #15803d 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--white);
    margin-bottom: 16px;
}

.ganhos-hoje .label {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.ganhos-hoje .valor {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
}

.ganhos-hoje .entregas {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 4px;
}

.ganhos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.ganhos-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    padding: 16px;
}

.ganhos-card .card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.ganhos-card .card-icon.trending {
    background: var(--orange-light);
    color: var(--orange);
}

.ganhos-card .card-icon.bike {
    background: var(--orange-light);
    color: var(--orange);
}

.ganhos-card .card-icon.star {
    background: #fef9c3;
    color: var(--yellow);
}

.ganhos-card .card-icon.clock {
    background: var(--green-light);
    color: var(--green);
}

.ganhos-card .card-icon svg {
    width: 20px;
    height: 20px;
}

.ganhos-card .card-valor {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
}

.ganhos-card .card-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ========= HISTÓRICO ========= */
.historico-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.historico-card .info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
}

.historico-card .info .endereco {
    font-size: 13px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.historico-card .info .endereco svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.historico-card .info .data {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 2px;
}

.historico-card .right {
    text-align: right;
    flex-shrink: 0;
}

.historico-card .preco {
    font-size: 15px;
    font-weight: 700;
    color: var(--green);
}

.historico-card .estrelas {
    display: flex;
    gap: 1px;
    justify-content: flex-end;
    margin-top: 4px;
}

.historico-card .estrelas svg {
    width: 14px;
    height: 14px;
    color: var(--yellow);
    fill: var(--yellow);
}

.historico-card .estrelas svg.empty {
    color: var(--gray-200);
    fill: var(--gray-200);
}

/* ========= PERFIL ========= */
.perfil-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    text-align: center;
}

.perfil-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.perfil-header .nome {
    font-size: 20px;
    font-weight: 700;
}

.perfil-header .veiculo {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

.perfil-header .avaliacao {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 8px;
}

.perfil-header .avaliacao svg {
    width: 16px;
    height: 16px;
    color: var(--yellow);
    fill: var(--yellow);
}

.perfil-header .avaliacao span {
    color: var(--gray-400);
}

.perfil-menu {
    margin-top: 8px;
}

.perfil-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.perfil-menu-item:active {
    background: var(--gray-50);
}

.perfil-menu-item .menu-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-800);
}

.perfil-menu-item svg {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

/* ========= OFFLINE STATE ========= */
.offline-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 32px;
    text-align: center;
    min-height: calc(100vh - 200px);
}

.offline-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 36px;
}

.offline-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.offline-state p {
    font-size: 15px;
    color: var(--green);
    line-height: 1.5;
    max-width: 260px;
}

/* ========= PROGRESS BAR (preparo) ========= */
.progress-bar-wrap {
    width: calc(100% - 32px);
    margin: 0 16px 8px;
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s linear;
}

.btn-action.disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    pointer-events: none;
}

/* ========= TOAST NOTIFICATION ========= */
.toast {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    color: var(--gray-900);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90%;
    white-space: nowrap;
}

.toast.show {
    top: 20px;
}

.toast.warning {
    border-color: var(--orange);
    background: var(--orange-light);
}

/* ========= ONLINE TIMER ========= */
.online-timer {
    color: var(--green);
    font-weight: 600;
}

/* ========= NOTIFICATION SHAKE ========= */
@keyframes bellShake {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(5deg); }
}

.btn-notification.shake svg {
    animation: bellShake 0.6s ease;
}

.btn-notification .badge-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    background: var(--orange);
    border-radius: var(--radius-full);
    border: 2px solid var(--white);
    font-size: 9px;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ========= MAPA LEAFLET ========= */
.map-container {
    height: 200px;
    position: relative;
}

.map-container #deliveryMap {
    height: 100%;
    width: 100%;
    z-index: 1;
}

.map-container .map-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 400;
    background: var(--white);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: var(--shadow-md);
}

.btn-navegar {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 400;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-md);
}

.btn-navegar:active { background: var(--green-dark); }
.btn-navegar svg { width: 14px; height: 14px; }

/* ========= SAQUE ========= */
.saque-section {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    padding: 20px;
}

.saque-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.saque-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
}

.saque-saldo {
    font-size: 20px;
    font-weight: 800;
    color: var(--green);
}

.btn-saque {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--orange);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-saque:active { background: #e55d00; }
.btn-saque svg { width: 18px; height: 18px; }

.saque-info {
    text-align: center;
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 10px;
}

/* ========= CADASTRO ========= */
.cadastro-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 32px 20px;
    min-height: 100vh;
}

.cadastro-logo { text-align: center; margin-bottom: 32px; }

.cadastro-subtitle {
    font-size: 15px;
    color: var(--gray-500);
    margin-top: 4px;
}

.cadastro-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s;
}

.progress-step.active,
.progress-step.completed {
    background: var(--green);
    color: var(--white);
}

.progress-line {
    width: 48px;
    height: 2px;
    background: var(--gray-200);
}

.cadastro-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 8px;
}

.cadastro-progress-labels span {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 500;
}

.cadastro-progress-labels span.active {
    color: var(--green);
    font-weight: 600;
}

.cadastro-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.cadastro-step.active { display: block; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

.form-group input::placeholder { color: var(--gray-400); }

.veiculo-options { display: flex; gap: 10px; }
.veiculo-option { flex: 1; cursor: pointer; }
.veiculo-option input { display: none; }

.veiculo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s;
}

.veiculo-icon { font-size: 28px; }

.veiculo-option.active .veiculo-card {
    border-color: var(--green);
    background: var(--green-light);
    color: var(--green-dark);
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s;
}

.upload-area:active { border-color: var(--green); }

.upload-icon {
    width: 40px;
    height: 40px;
    background: var(--green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.upload-icon svg { width: 20px; height: 20px; color: var(--green); }
.upload-area span { font-size: 13px; color: var(--gray-500); }

.btn-cadastro {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--green);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.btn-cadastro:active { background: var(--green-dark); }

.btn-cadastro-outline {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    margin-top: 8px;
}

.cadastro-btns { display: flex; gap: 12px; margin-top: 8px; }
.cadastro-btns .btn-cadastro-outline { flex: 1; }
.cadastro-btns .btn-cadastro { flex: 1.5; }

.cadastro-login-link {
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 24px;
}

.cadastro-login-link a {
    color: var(--green);
    font-weight: 600;
}

/* ========= DARK MODE ========= */
[data-theme="dark"] {
    --white: #1a1a2e;
    --gray-50: #16213e;
    --gray-100: #1a1a2e;
    --gray-200: #2d2d44;
    --gray-300: #404060;
    --gray-400: #8888a0;
    --gray-500: #a0a0b8;
    --gray-600: #c0c0d0;
    --gray-700: #d0d0e0;
    --gray-800: #e0e0ef;
    --gray-900: #f0f0ff;
    --green-light: #1a3a2a;
    --orange-light: #3a2a1a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
}

[data-theme="dark"] .ganhos-hoje {
    background: linear-gradient(135deg, #15803d 0%, #0f5132 100%);
}

[data-theme="dark"] .leaflet-tile {
    filter: brightness(0.7) contrast(1.1);
}

[data-theme="dark"] .toast {
    background: #2d2d44;
    border-color: #404060;
}

/* Dark mode toggle switch */
.dark-mode-toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--gray-200);
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.dark-mode-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.dark-mode-toggle.active {
    background: var(--green);
}

.dark-mode-toggle.active::after {
    transform: translateX(20px);
}

/* ========= COUNTDOWN TIMER (pedido) ========= */
.countdown-ring {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.countdown-ring svg {
    width: 44px;
    height: 44px;
    transform: rotate(-90deg);
}

.countdown-ring .ring-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 3;
}

.countdown-ring .ring-progress {
    fill: none;
    stroke: var(--orange);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.countdown-ring .countdown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--orange);
}

/* ========= LOADING SPINNER ========= */
.pedidos-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}
.pedidos-loading p {
    margin-top: 12px;
    font-size: 14px;
}
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--green);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========= SLIDE TO CONFIRM ========= */
.slide-confirm {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    height: 56px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.slide-confirm-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(29, 185, 84, 0.15);
    border-radius: var(--radius-full);
    transition: width 0.05s linear;
}

.slide-confirm-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-400);
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.2s;
}

.slide-confirm-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: grab;
    touch-action: none;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(29,185,84,0.3);
    transition: left 0.3s ease;
}

.slide-confirm-thumb.dragging {
    transition: none;
    cursor: grabbing;
}

.slide-confirm-thumb svg {
    width: 22px;
    height: 22px;
}

/* ========= WEEKLY CHART ========= */
.chart-section {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    padding: 16px;
    margin-bottom: 16px;
}

.chart-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 16px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 120px;
    gap: 6px;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar-value {
    font-size: 9px;
    font-weight: 600;
    color: var(--gray-500);
}

.chart-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 4px 4px 0 0;
    background: var(--gray-200);
    transition: height 0.5s ease;
}

.chart-bar.today {
    background: var(--green);
}

.chart-day {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-400);
}

.chart-day.today {
    color: var(--green);
    font-weight: 700;
}

/* ========= NAV BADGE ========= */
.nav-badge {
    position: absolute;
    top: 0;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: var(--orange);
    border-radius: var(--radius-full);
    border: 2px solid var(--white);
    font-size: 10px;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ========= PWA INSTALL BANNER ========= */
.pwa-install-banner {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background: var(--green);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 60;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s ease;
}

.pwa-install-banner .pwa-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
}

.pwa-install-banner .pwa-info {
    flex: 1;
}

.pwa-install-banner .pwa-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.pwa-install-banner .pwa-info span {
    font-size: 12px;
    opacity: 0.85;
}

.pwa-install-btn {
    background: var(--white);
    color: var(--green);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    flex-shrink: 0;
}

.pwa-install-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
}

/* iOS Install Overlay */
.ios-install-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px 20px 32px;
    z-index: 200;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    animation: slideUp 0.4s ease;
    text-align: center;
}

.ios-install-overlay .ios-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gray-100);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    color: var(--gray-500);
}

.ios-install-overlay h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.ios-install-overlay .ios-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.ios-install-overlay .ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--gray-700);
}

.ios-install-overlay .ios-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.ios-install-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
}

/* ========= UTILITIES ========= */
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-gray { color: var(--gray-500); }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mb-16 { margin-bottom: 16px; }
