/**
 * DeliveryFlow - Custom Stylesheet
 * Foco em produtividade operacional, legibilidade e elegância moderna
 */

:root {
    --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --primary-gradient: linear-gradient(135deg, #0d6efd 0%, #004ecc 100%);
    --success-gradient: linear-gradient(135deg, #198754 0%, #0f5835 100%);
    --warning-gradient: linear-gradient(135deg, #ffc107 0%, #df9b00 100%);
}

body {
    font-family: var(--bs-font-sans-serif);
    color: #2b3445;
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Brand Icon */
.brand-icon {
    width: 38px;
    height: 38px;
}

/* Cards & Containers */
.card {
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #edf2f7;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

/* Stat Cards */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Balcão Input Styling */
.form-control-lg, .form-select-lg {
    font-size: 1.05rem;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.origem-pill-input {
    display: none;
}

.origem-pill-label {
    cursor: pointer;
    border-radius: 8px;
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    transition: all 0.15s ease;
    user-select: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.origem-pill-input:checked + .origem-pill-label {
    border-color: #0d6efd;
    background-color: #ebf5ff;
    color: #0d6efd;
    box-shadow: 0 0 0 1px #0d6efd;
}

/* Badges de Canais */
.badge-origem-ifood {
    background-color: #ea1d2c !important;
    color: #ffffff;
}

.badge-origem-99 {
    background-color: #ff9900 !important;
    color: #1a1a1a;
}

.badge-origem-whatsapp {
    background-color: #25d366 !important;
    color: #ffffff;
}

.badge-origem-app {
    background-color: #0d6efd !important;
    color: #ffffff;
}

.badge-origem-balcao {
    background-color: #64748b !important;
    color: #ffffff;
}

/* Tabela de Lançamentos Recentes */
.table-entregas thead th {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 12px 14px;
}

.table-entregas tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    font-size: 0.92rem;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Animação de novo item inserido */
@keyframes highlightRow {
    0% { background-color: #dbeafe; }
    100% { background-color: transparent; }
}

.row-newly-added {
    animation: highlightRow 2.5s ease-out;
}

/* ==========================================================
   ESTILOS DE IMPRESSÃO TÉRMICA (CUPOM 80MM / 58MM)
   ========================================================== */
.thermal-receipt-container {
    max-width: 320px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.35;
    color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.thermal-divider {
    border-top: 1px dashed #000000;
    margin: 8px 0;
}

.thermal-double-divider {
    border-top: 2px solid #000000;
    margin: 8px 0;
}

@media print {
    body * {
        visibility: hidden;
    }
    
    .thermal-receipt-container,
    .thermal-receipt-container * {
        visibility: visible;
    }
    
    .thermal-receipt-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 0 !important;
        padding: 4mm !important;
        box-shadow: none !important;
        border: none !important;
    }

    .no-print {
        display: none !important;
    }
}
