:root { 

    --primary: #2563eb; 

    --success: #16a34a; 

    --bg: #f8fafc; 

    --card: #ffffff; 

    --text: #1e293b; 

    --gray: #94a3b8; 

    --danger: #ea4335;

    --indigo: #6366f1;

    --orange: #f97316;

}

* { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; margin: 0; padding: 0; }

body { background: var(--bg); color: var(--text); padding-bottom: 80px; }



/* ========== 1. TELA DE LOGIN ========== */

#tela-login { height: 100vh; background: linear-gradient(135deg, var(--primary) 0%, var(--indigo) 100%); display: flex; align-items: center; justify-content: center; position: fixed; width: 100%; top: 0; left: 0; z-index: 2000; }

.login-box { background: white; padding: 40px 30px; border-radius: 20px; width: 90%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }

.login-box h2 { text-align: center; color: var(--primary); margin-bottom: 10px; font-size: 1.8rem; }

.login-box p { text-align: center; color: var(--gray); font-size: 0.9rem; margin-bottom: 25px; }



/* ========== 2. HEADER E NAVEGAÇÃO ========== */

.topbar { background: var(--primary); color: white; padding: 15px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; height: 60px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.topbar h1 { font-size: 1.15rem; font-weight: 600; }

.menu-btn, .back-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 5px; }



#menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 150; }

#menu-opcoes { display: none; position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: white; z-index: 160; flex-direction: column; box-shadow: -4px 0 12px rgba(0,0,0,0.2); }

.menu-header { background: var(--primary); color: white; padding: 20px; font-weight: bold; font-size: 1.2rem; }

.menu-item { padding: 18px 20px; border-bottom: 1px solid #f1f5f9; cursor: pointer; font-weight: 500; display: flex; align-items: center; gap: 12px; color: var(--text); transition: background 0.2s; }

.menu-item:hover { background: #f8fafc; }



.nav-bottom { position: fixed; bottom: 0; left: 0; width: 100%; background: white; display: flex; border-top: 1px solid #e2e8f0; z-index: 100; height: 70px; justify-content: space-around; align-items: center; box-shadow: 0 -2px 8px rgba(0,0,0,0.05); }

.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--gray); font-size: 0.7rem; font-weight: 600; padding: 8px 0; gap: 4px; }

.nav-item.active { color: var(--primary); border-top: 3px solid var(--primary); }

.nav-item span { font-size: 0.75rem; }



/* ========== 3. CALENDÁRIO E FILTROS ========== */

.calendar-strip { background: white; padding: 12px 10px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0; margin: -15px -15px 15px -15px; }

.calendar-days { display: flex; overflow-x: auto; gap: 8px; flex: 1; justify-content: space-around; scroll-behavior: smooth; }

.calendar-days::-webkit-scrollbar { display: none; }

.day-box { display: flex; flex-direction: column; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; min-width: 50px; color: var(--gray); transition: all 0.2s; }

.day-box:hover { background: #f1f5f9; }

.day-box.active { background: var(--primary); color: white; font-weight: bold; box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3); }

.day-name { font-size: 0.7rem; text-transform: uppercase; margin-bottom: 4px; }

.day-number { font-size: 1.3rem; font-weight: 600; }

.nav-arrow { background: none; border: none; font-size: 1.4rem; color: var(--primary); cursor: pointer; padding: 5px 12px; }



.filtros-bar { background: #e2e8f0; display: flex; flex-direction: column; gap: 10px; padding: 12px 15px; margin: -15px -15px 15px -15px; }

.filtros-row { display: flex; gap: 10px; }

.filtro-select, .mes-picker { flex: 1; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.9rem; background: white; color: var(--text); font-weight: 500; }



/* ========== 4. CARDS DE ENTREGAS ========== */

.tela { display: none; padding: 15px; }

.tela.ativa { display: block; }

.lista-container { padding: 0 15px 15px 15px; }

.card-tele { background: var(--card); border-radius: 12px; padding: 15px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-left: 5px solid var(--gray); position: relative; transition: transform 0.2s; }

.card-tele:active { transform: scale(0.98); }

.card-tele.concluido { border-left-color: var(--success); opacity: 0.95; }



.tele-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }

.tele-hora { font-weight: bold; font-size: 1.1rem; color: var(--primary); white-space: nowrap; }

.tele-cliente { font-weight: 600; font-size: 1rem; margin-left: 10px; flex: 1; }

.btn-edit-card { background: none; border: none; color: var(--gray); cursor: pointer; font-size: 1.2rem; padding: 0 8px; }

.tele-body p { margin: 6px 0; font-size: 0.9rem; color: #475569; line-height: 1.4; }

.info-pedido { background: #f1f5f9; padding: 10px; border-radius: 8px; margin-top: 8px; font-size: 0.85rem; border-left: 3px solid var(--primary); }



.tags-lucro { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; }

.tag-item { padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: bold; }



.action-row { display: flex; gap: 8px; margin-top: 12px; }

.btn-acao { flex: 1; padding: 11px 8px; border: none; border-radius: 8px; font-weight: 600; color: white; cursor: pointer; text-align: center; text-decoration: none; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 6px; transition: opacity 0.2s; }

.btn-acao:active { opacity: 0.7; }

.btn-rota-coleta { background: var(--orange); }

.btn-rota-entrega { background: var(--danger); }

.btn-concluir { background: var(--success); }

.btn-pendente { background: var(--gray); }

.btn-pagamento { background: #eab308; }

.btn-pagamento.pago { background: var(--success); }

.btn-recibo { background: #334155; }



/* ========== 5. FORMULÁRIOS ========== */

.form-group { margin-bottom: 15px; }

label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; color: #334155; }

input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 1rem; font-family: inherit; transition: border-color 0.2s; }

input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

.btn-salvar { width: 100%; padding: 15px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 1.05rem; font-weight: bold; margin-top: 10px; cursor: pointer; transition: background 0.2s; }

.btn-salvar:active { background: #1d4ed8; }

.btn-auto { background: #e0e7ff; color: var(--primary); border: 1px solid #c7d2fe; padding: 6px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: bold; cursor: pointer; margin-left: 10px; }



.fab { position: fixed; bottom: 90px; right: 20px; width: 60px; height: 60px; background: var(--primary); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 2.2rem; box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); border: none; cursor: pointer; z-index: 90; transition: transform 0.2s; }

.fab:active { transform: scale(0.9); }



/* ========== 6. FINANCEIRO ========== */

.card-fin { background: white; padding: 18px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center; margin-bottom: 12px; border: 1px solid #e2e8f0; }

.card-fin h3 { margin: 0 0 8px 0; font-size: 0.85rem; color: #64748b; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }

.card-fin .valor { font-size: 2rem; font-weight: bold; }

.val-receita { color: var(--success); } .val-despesa { color: var(--danger); } .val-saldo { color: var(--primary); }



.item-despesa { display: flex; justify-content: space-between; align-items: center; padding: 14px; background: white; border-bottom: 1px solid #f1f5f9; transition: background 0.2s; }

.item-despesa:hover { background: #fafafa; }

.item-despesa div { display: flex; flex-direction: column; gap: 4px; }

.btn-del-desp { background: #fee2e2; color: var(--danger); border: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 0.8rem; }



/* ========== 7. EXTRAS, RECIBO E SIMULADOR ========== */

.alerta-info { background: #dbeafe; border-left: 4px solid var(--primary); padding: 12px 15px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; color: #1e40af; }

.resultado-simulacao { background: white; border-radius: 12px; padding: 20px; margin-top: 15px; border-left: 5px solid var(--success); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.resultado-simulacao.ruim { border-left-color: var(--danger); }



.relatorio-tabela { width: 100%; border-collapse: collapse; margin-top: 15px; background: white; border-radius: 8px; overflow: hidden; }

.relatorio-tabela th { background: var(--primary); color: white; padding: 12px; text-align: left; font-size: 0.9rem; }

.relatorio-tabela td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; }



#area-recibo { display: none; background: white; padding: 30px; font-family: monospace; color: black; }

.linha-pontilhada { border-top: 1px dashed #000; margin: 20px 0; }

@media print { body * { visibility: hidden; } body { background: white; margin: 0; padding: 0; } #area-recibo, #area-recibo * { visibility: visible; } #area-recibo { display: block; position: absolute; left: 0; top: 0; width: 100%; padding: 20px; } .no-print { display: none !important; } }