/**
 * ============================================================
 * SISTEMA MARMITEX - 1ª IBI
 * Visual Premium: Glassmorphism, Degrades, Mobile-First
 * Cores: Azul escuro #1a365d, Vermelho #c53030, Dourado #d69e2e
 * ============================================================
 */

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Paleta Principal */
    --azul-escuro: #1a365d;
    --azul-medio: #2c5282;
    --azul-claro: #4299e1;
    --azul-glass: rgba(26, 54, 93, 0.85);
    --vermelho: #c53030;
    --vermelho-claro: #e53e3e;
    --vermelho-suave: #feb2b2;
    --dourado: #d69e2e;
    --dourado-claro: #f6e05e;
    --branco: #ffffff;
    --branco-gelo: #f8fafc;
    --cinza-claro: #edf2f7;
    --cinza: #e2e8f0;
    --cinza-medio: #a0aec0;
    --cinza-escuro: #4a5568;
    --preto: #1a202c;

    /* Status */
    --status-pendente: #ed8936;
    --status-aguardando: #4299e1;
    --status-confirmado: #48bb78;

    /* Tipografia */
    --fonte: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 4px 20px rgba(26, 54, 93, 0.08);
    --shadow-lg: 0 10px 40px rgba(26, 54, 93, 0.12);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
    --header-height: 64px;
    --max-width: 640px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--fonte);
    background: linear-gradient(180deg, var(--branco-gelo) 0%, var(--cinza-claro) 30%, var(--branco) 100%);
    color: var(--preto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--azul-medio); text-decoration: none; }

/* === HEADER === */
.header {
    background: linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul-medio) 50%, #1e4e8c 100%);
    color: var(--branco);
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.3);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo-img {
    height: 44px;
    width: 44px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--branco);
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.header-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--branco);
}

.header-subtitle {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.header-nav { display: flex; align-items: center; gap: 0.5rem; }

.header-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--branco);
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.header-nav-link:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.35);
}

.header-nav-text { display: none; }
@media (min-width: 640px) { .header-nav-text { display: inline; } }

/* === HERO === */
.hero {
    position: relative;
    background:
        linear-gradient(135deg, rgba(26,54,93,0.78) 0%, rgba(44,82,130,0.70) 40%, rgba(30,58,95,0.78) 100%),
        url('../img/hero-bg.png') center / cover no-repeat;
    color: var(--branco);
    padding: 2.5rem 1rem 3rem;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(214, 158, 46, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(66, 153, 225, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.03em;
    color: var(--dourado-claro);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: #48bb78;
    border-radius: 50%;
    box-shadow: 0 0 8px #48bb78;
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-logo {
    width: 95px;
    height: 95px;
    object-fit: contain;
    background: var(--branco);
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 1.25rem;
    font-weight: 400;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.hero-pix {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, transform 0.15s;
}
.hero-pix:hover { background: rgba(255,255,255,0.18); }
.hero-pix:active { transform: scale(0.97); }
.hero-pix.pix-copied { background: rgba(72,187,120,0.25); border-color: rgba(72,187,120,0.5); }
.hero-pix svg { color: var(--dourado-claro); }
.hero-pix strong { color: #fbbf24; letter-spacing: 0.05em; }
.hero-pix-hint { font-size: 0.7rem; opacity: 0.6; margin-left: 0.25rem; }

/* === CONTAINER === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 1rem;
}

/* === CARDS === */
.card {
    background: linear-gradient(135deg, var(--branco) 0%, #fafbfc 100%);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.6);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--azul-medio), var(--azul-claro), var(--dourado));
    opacity: 0.6;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--azul-escuro);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title svg { color: var(--vermelho); }

/* === GLASS CARD === */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-glass);
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-pag-pendente {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-pag-aguardando {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.badge-pag-confirmado {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

/* === FILTER BAR === */
.pedidos-filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.pedidos-search-wrap {
    position: relative;
    flex: 1;
    min-width: 130px;
    display: flex;
}
.pedidos-search {
    width: 100%;
    padding: 0.45rem 2.25rem 0.45rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
    background: var(--branco);
}
.pedidos-search:focus { border-color: var(--azul-medio); }
.search-clear-btn {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cinza-medio);
    font-size: 1.15rem;
    line-height: 1;
    padding: 0.15rem 0.4rem;
    border-radius: 50%;
    transition: color 0.15s;
    font-family: var(--fonte);
}
.search-clear-btn:hover { color: var(--cinza-escuro); }
.filter-btns { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.filter-btn {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: var(--branco);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--cinza-escuro);
    white-space: nowrap;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--azul-escuro);
    color: var(--branco);
    border-color: var(--azul-escuro);
}

.badge-fechada {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.badge-aberta {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

/* === BOTOES === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-family: var(--fonte);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul-medio) 100%);
    color: var(--branco);
    box-shadow: 0 4px 16px rgba(26, 54, 93, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(26, 54, 93, 0.45);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #38a169 0%, #48bb78 100%);
    color: var(--branco);
    box-shadow: 0 4px 16px rgba(56, 161, 105, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--vermelho) 0%, var(--vermelho-claro) 100%);
    color: var(--branco);
    box-shadow: 0 4px 16px rgba(197, 48, 48, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--cinza), var(--cinza-claro));
    color: var(--cinza-escuro);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--azul-medio);
    color: var(--azul-medio);
}

.btn-outline:hover {
    background: var(--azul-medio);
    color: var(--branco);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* === FORMULARIOS === */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--cinza-escuro);
}

.form-label .required { color: var(--vermelho); }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--cinza);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--fonte);
    transition: all 0.2s;
    background: var(--branco);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--azul-claro);
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.12);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-hint {
    font-size: 0.8rem;
    color: var(--cinza-medio);
    margin-top: 0.35rem;
}

/* === CALCULO DO PEDIDO === */
.calculo-box {
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #c6f6d5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.calculo-label { font-size: 0.875rem; color: var(--cinza-escuro); }
.calculo-valor {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--azul-escuro);
    background: linear-gradient(135deg, var(--azul-escuro), var(--azul-medio));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === PIX FORM BOX (substituiu QR Code) === */
.pix-form-box {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border: 2px solid rgba(66,153,225,0.3);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}
.pix-form-box:hover { border-color: var(--azul-medio); }
.pix-form-box:active { transform: scale(0.99); }
.pix-form-box.pix-form-copied { border-color: #48bb78; background: linear-gradient(135deg, #f0fff4, #e6fffa); }

.pix-form-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--cinza-escuro);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.pix-form-chave {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--azul-escuro);
    letter-spacing: 0.04em;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.4rem;
}
.pix-form-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
}
.pix-form-hint { color: var(--cinza-medio); }
.pix-form-valor { color: var(--cinza-escuro); font-weight: 600; }
.pix-form-valor strong { color: var(--azul-escuro); }

/* === STATUS LEGEND === */
.status-legend {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--branco-gelo);
    border-radius: var(--radius-xs);
    border: 1px solid var(--cinza);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: var(--cinza-escuro);
}
.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* === CAMPAIGN IMAGE PICKER === */
.camp-img-picker {
    width: 100%;
    height: 160px;
    border: 2px dashed var(--cinza);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.2s;
    overflow: hidden;
    position: relative;
}
.camp-img-picker:hover { border-color: var(--azul-medio); }
.camp-img-picker.has-image .camp-img-placeholder {
    background: rgba(0,0,0,0.45);
    border-radius: var(--radius-xs);
    padding: 0.4rem 0.75rem;
}
.camp-img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--cinza-medio);
    font-size: 0.8rem;
    pointer-events: none;
}
.camp-img-picker.has-image .camp-img-placeholder { color: rgba(255,255,255,0.9); }
.camp-img-picker.has-image .camp-img-placeholder svg { stroke: rgba(255,255,255,0.8); }

/* === COMPROVANTE PICKER === */
.comp-img-picker {
    width: 100%;
    min-height: 72px;
    border: 2px dashed var(--cinza);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.75rem;
}
.comp-img-picker:hover { border-color: var(--azul-medio); }
.comp-img-picker.has-file { border-color: #38a169; border-style: solid; background: #f0fff4; }
.comp-img-placeholder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cinza-medio);
    font-size: 0.82rem;
    pointer-events: none;
}
.comp-img-picker.has-file .comp-img-placeholder { color: #38a169; }
.comp-img-picker.has-file .comp-img-placeholder svg { stroke: #38a169; }
.comp-file-name {
    word-break: break-all;
    line-height: 1.3;
}

/* === DEVEDORES SECTION (dashboard) === */
.devedores-section {
    margin-top: 1rem;
    border-top: 1px solid var(--cinza);
    padding-top: 0.75rem;
}
.devedores-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--vermelho);
    margin-bottom: 0.5rem;
}
.devedores-list { display: flex; flex-direction: column; gap: 0.35rem; }
.devedor-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.82rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--cinza);
}
.devedor-nome { flex: 1; color: var(--cinza-escuro); font-weight: 500; }
.devedor-valor { font-weight: 700; color: var(--vermelho); white-space: nowrap; }

/* Botão WhatsApp */
.btn-wpp {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: var(--radius-xs);
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-wpp:hover { background: #1da851; color: #fff; }

/* === STATS CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--branco) 0%, #fafbfc 100%);
    border-radius: var(--radius);
    padding: 1.1rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-left: 4px solid var(--azul-claro);
    position: relative;
    overflow: hidden;
}

.stat-card.danger { border-left-color: var(--vermelho); }
.stat-card.success { border-left-color: #48bb78; }
.stat-card.warning { border-left-color: #ed8936; }
.stat-card.dourado { border-left-color: var(--dourado); }

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--azul-escuro);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--cinza-medio);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.3rem;
    font-weight: 600;
}

/* === PROGRESS BAR === */
.progress-container { margin: 1.25rem 0; }

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--cinza-escuro);
}

.progress-bar {
    height: 28px;
    background: linear-gradient(135deg, #edf2f7, #e2e8f0);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--azul-escuro) 0%, var(--azul-medio) 50%, var(--azul-claro) 100%);
    border-radius: 999px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--branco);
    min-width: 40px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #ed8936 0%, #f6ad55 100%);
}

.progress-fill.danger {
    background: linear-gradient(90deg, var(--vermelho) 0%, var(--vermelho-claro) 100%);
}

.progress-fill.success {
    background: linear-gradient(90deg, #38a169 0%, #48bb78 100%);
}

/* === CARDAPIO === */
.cardapio-box {
    background: linear-gradient(135deg, #fffaf0 0%, #fff7ed 100%);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-left: 4px solid var(--dourado);
    position: relative;
}

.cardapio-title {
    color: var(--azul-escuro);
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cardapio-text {
    white-space: pre-line;
    margin: 0;
    color: var(--cinza-escuro);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* === CAPA MARMITA === */
.capa-marmita {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

@media (min-width: 640px) {
    .capa-marmita { height: 280px; }
}

/* === LISTA PEDIDOS PUBLICO - SCROLL === */
#lista-pedidos-publico {
    max-height: 460px;
    overflow-y: auto;
    padding-right: 2px;
    scroll-behavior: smooth;
}
#lista-pedidos-publico::-webkit-scrollbar { width: 5px; }
#lista-pedidos-publico::-webkit-scrollbar-track { background: transparent; }
#lista-pedidos-publico::-webkit-scrollbar-thumb { background: rgba(44,82,130,0.25); border-radius: 3px; }

/* === PEDIDO CARD === */
.pedido-card {
    background: linear-gradient(135deg, var(--branco) 0%, #fafbfc 100%);
    border-radius: var(--radius-sm);
    padding: 1.1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-left: 4px solid var(--azul-claro);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-left: 4px solid var(--azul-claro);
    transition: all 0.2s;
}

.pedido-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(2px);
}

.pedido-card.pendente { border-left-color: var(--status-pendente); }
.pedido-card.aguardando { border-left-color: var(--status-aguardando); }
.pedido-card.confirmado { border-left-color: var(--status-confirmado); }

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pedido-nome {
    font-weight: 700;
    color: var(--azul-escuro);
    font-size: 1rem;
}

.pedido-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.875rem;
    color: var(--cinza-escuro);
}

.pedido-info span { display: inline-flex; align-items: center; gap: 0.25rem; }

.pedido-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* === MODAL === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 54, 93, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: linear-gradient(135deg, var(--branco) 0%, #fafbfc 100%);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--cinza);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--branco) 0%, #fafbfc 100%);
    z-index: 1;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--azul-escuro);
}

.modal-close {
    cursor: pointer;
}

/* Icon × button — only applies when NOT a .btn (footer buttons stay as buttons) */
button.modal-close:not(.btn) {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--cinza-medio);
    line-height: 1;
    padding: 0.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

button.modal-close:not(.btn):hover {
    color: var(--vermelho);
    background: rgba(197, 48, 48, 0.08);
}

.modal-body { padding: 1.5rem; }

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--cinza);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* === CONFIRMACAO PEDIDO MODAL === */
.pedido-sucesso {
    text-align: center;
    padding: 0.5rem 0 0.75rem;
}

.pedido-sucesso-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--branco);
    box-shadow: 0 4px 16px rgba(56, 161, 105, 0.3);
}

.pedido-protocolo {
    display: inline-block;
    background: linear-gradient(135deg, var(--azul-escuro), var(--azul-medio));
    color: var(--branco);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
}

/* PIX dentro do modal de confirmação */
.pix-instrucao-modal {
    background: linear-gradient(135deg, #ebf8ff, #e6fffa);
    border: 1px solid rgba(66,153,225,0.2);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    margin: 0.75rem 0;
}
.pix-instrucao-label {
    font-size: 0.8rem;
    color: var(--cinza-escuro);
    margin-bottom: 0.6rem;
    font-weight: 600;
}
.pix-chave-modal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--branco);
    border: 1.5px solid rgba(66,153,225,0.35);
    border-radius: var(--radius-xs);
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.pix-chave-modal:hover { border-color: var(--azul-medio); background: #f0f8ff; }
.pix-chave-modal:active { transform: scale(0.98); }
.pix-chave-modal-num { font-weight: 700; color: var(--azul-escuro); font-size: 1rem; flex: 1; }
.pix-chave-modal-hint { font-size: 0.7rem; color: var(--cinza-medio); white-space: nowrap; }

/* Upload comprovante dentro do modal */
.comp-upload-modal {
    background: var(--branco-gelo);
    border: 1px dashed var(--cinza);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin: 0.75rem 0 0;
}
.comp-upload-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cinza-escuro);
    margin-bottom: 0.6rem;
}
.comp-upload-row {
    /* display: flex; */
    gap: 0.5rem;
    align-items: center;
}
.comp-file-input {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    border: 1.5px solid var(--cinza);
    border-radius: var(--radius-xs);
    background: var(--branco);
    color: var(--cinza-escuro);
    cursor: pointer;
}
.comp-file-input:focus { outline: none; border-color: var(--azul-medio); }

/* Botão "Enviar Comprovante" no card do pedido pendente */
.pedido-comp-action {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(226,232,240,0.7);
}
.btn-comp-enviar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1.5px solid var(--azul-medio);
    color: var(--azul-medio);
    border-radius: var(--radius-xs);
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-comp-enviar:hover { background: var(--azul-medio); color: var(--branco); }

/* === TABS === */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--cinza);
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1px;
}

.tab {
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--cinza-medio);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--fonte);
}

.tab:hover { color: var(--azul-medio); }

.tab.active {
    color: var(--azul-escuro);
    border-bottom-color: var(--vermelho);
}

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

/* === ALERTS === */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #c6f6d5);
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-color: #f5c6cb;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-color: #f6e05e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-color: #93c5fd;
    display: block;
}

/* === CHARTS === */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.chart-item { position: relative; min-height: 200px; }

@media (min-width: 640px) {
    .charts-grid { grid-template-columns: 1fr 1fr; }
    .chart-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: 380px;
        margin: 0 auto;
    }
}

/* === BOTÃO FAZER PEDIDO === */
.btn-fazer-pedido {
    font-size: 1.05rem;
    padding: 1rem;
    letter-spacing: 0.02em;
    gap: 0.6rem;
}

/* === PEDIDO FORM CARD === */
.pedido-form-card {
    border: 2px solid var(--azul-claro);
    background: linear-gradient(135deg, var(--branco) 0%, #f7fafc 100%);
}

.pedido-form-card::before {
    background: linear-gradient(90deg, var(--azul-claro), #63b3ed, var(--dourado));
}

.pedido-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.btn-fechar-form {
    background: none;
    border: none;
    color: var(--cinza-medio);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-fechar-form:hover { color: var(--vermelho); background: rgba(197,48,48,0.08); }

/* === SHARE BUTTON === */
.share-bar {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: var(--fonte);
    color: var(--branco);
}

.share-btn-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.share-btn-link { background: linear-gradient(135deg, var(--azul-medio), var(--azul-claro)); }
.share-btn-native { background: linear-gradient(135deg, var(--cinza-escuro), var(--cinza-medio)); }

.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--cinza-medio);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cinza-escuro);
    margin-bottom: 0.5rem;
}

/* === LOGIN === */
.login-body {
    background: linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul-medio) 50%, #1e4e8c 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: linear-gradient(135deg, var(--branco) 0%, #fafbfc 100%);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-header h1 {
    color: var(--azul-escuro);
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.login-header p {
    color: var(--cinza-medio);
    font-size: 0.875rem;
}

/* === LOADING === */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    gap: 0.75rem;
    color: var(--cinza-medio);
    font-size: 0.95rem;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--cinza);
    border-top-color: var(--azul-claro);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === TABELAS === */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--cinza);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead {
    background: linear-gradient(135deg, var(--azul-escuro), var(--azul-medio));
    color: var(--branco);
}

.table th {
    padding: 0.85rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.table td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--cinza);
}

.table tbody tr:hover { background: #f7fafc; }
.table tbody tr:last-child td { border-bottom: none; }

/* === CAMPANHA GRID === */
.campanha-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }

.campanha-card {
    background: linear-gradient(135deg, var(--branco) 0%, #fafbfc 100%);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.campanha-card-img {
    height: 160px;
    background: linear-gradient(135deg, var(--azul-escuro), var(--azul-medio));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--branco);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.campanha-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.campanha-card-body { padding: 1.25rem; }

.campanha-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--azul-escuro);
    margin-bottom: 0.25rem;
}

.campanha-card-date {
    font-size: 0.8rem;
    color: var(--cinza-medio);
    margin-bottom: 0.75rem;
}

.campanha-card-stats { display: flex; gap: 1rem; font-size: 0.875rem; margin-bottom: 0.75rem; }

/* === FOOTER === */
.footer {
    background:
        linear-gradient(135deg, rgba(15,39,68,0.82) 0%, rgba(26,54,93,0.78) 50%, rgba(21,45,77,0.82) 100%),
        url('../img/footer-bg.png') center / cover no-repeat;
    color: rgba(255,255,255,0.8);
    padding: 3rem 1rem 1.5rem;
    margin-top: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(214, 158, 46, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(66, 153, 225, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    background: var(--branco);
    border-radius: 50%;
    padding: 5px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.footer-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--branco);
    margin-bottom: 0.3rem;
}

.footer-address {
    font-size: 0.875rem;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.footer-slogan {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--dourado-claro);
    opacity: 0.9;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.12);
    max-width: 240px;
    margin: 0 auto 1.25rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-nav a:hover { color: var(--dourado-claro); }

.footer-copy {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 0.75rem;
}

.footer-dev {
    display: none;
}

.footer-credits {
    border-top: 1px solid rgba(255,255,255,0.05);
    /* background: rgba(0,0,0,0.25); */
    margin-top: 1.25rem;
}

.footer-credits-inner {
    display: flex;
    justify-content: center;
    padding: 0.9rem 1rem;
}

.credits-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    transition: color 0.5s;
}

.credits-link:hover { color: #00d4ff; }
.credits-link strong { font-weight: 600; }

.credits-link .credits-ext {
    opacity: 0;
    transition: opacity 0.3s;
}

.credits-link:hover .credits-ext { opacity: 1; }

/* === UTILITARIOS === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.8rem; }
.text-lg { font-size: 1.2rem; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* === ANIMACOES === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.45s ease forwards;
}

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

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* === NUMBER INPUT SPINNERS === */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--cinza-claro); }
::-webkit-scrollbar-thumb { background: var(--cinza-medio); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--cinza-escuro); }

/* === RESPONSIVIDADE === */
@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .campanha-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 3rem 1rem 3.5rem; }
    .hero-title { font-size: 2.2rem; }
    .hero-logo { width: 110px; height: 110px; }
}

@media (min-width: 768px) {
    .container { padding: 1.5rem; }
    .campanha-grid { grid-template-columns: repeat(2, 1fr); }
    .card { padding: 1.75rem; }
}

@media (max-width: 380px) {
    .header-title { font-size: 0.85rem; }
    .header-subtitle { font-size: 0.6rem; }
    .header-logo-img { height: 38px; width: 38px; }
    .hero-title { font-size: 1.5rem; }
}

/* === ADMIN LAYOUT WIDE === */
body[data-page="admin"] .container { max-width: 1100px; }

/* === REPORT NAV === */
.report-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 600px) {
    .report-nav { grid-template-columns: repeat(5, auto); justify-content: start; }
}
.report-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--cinza);
    background: var(--branco);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--cinza-escuro);
    font-family: var(--fonte);
    transition: all 0.2s;
}
.report-tab:hover { border-color: var(--azul-medio); color: var(--azul-medio); }
.report-tab.active { background: var(--azul-escuro); color: var(--branco); border-color: var(--azul-escuro); }

/* === BALANCE CARD === */
.balance-card {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(226,232,240,0.8);
}
.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--cinza-escuro);
    gap: 1rem;
}
.balance-divider { height: 1px; background: rgba(0,0,0,0.09); margin: 0.5rem 0; }
.balance-total { font-size: 0.95rem; font-weight: 700; }
.balance-total.success strong { color: #065f46; }
.balance-total.danger  strong { color: #991b1b; }

/* === BTN PRINT === */
.btn-print {
    background: linear-gradient(135deg, #4a5568, #718096);
    color: var(--branco);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-print:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.2); transform: translateY(-1px); }

/* === PRINT === */
@media print {
    .header, .tabs, .report-nav, .modal-overlay, .hero, .footer,
    .footer-credits, .btn-group, .pedido-actions, button, .no-print, .btn-wpp { display: none !important; }
    .card { box-shadow: none !important; border: 1px solid #ccc !important; page-break-inside: avoid; margin-bottom: 0.75rem; }
    .tab-content, .report-section { display: block !important; }
    body { background: white; font-size: 12pt; }
    .stats-grid { grid-template-columns: repeat(4,1fr) !important; }
    .campanha-grid { grid-template-columns: repeat(2,1fr) !important; }
    @page { margin: 1.5cm; }
}

/* === DASHBOARD — HEADER DA CAMPANHA ATIVA === */
.camp-dash-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    align-items: flex-start;
}

.camp-dash-img {
    width: 120px;
    min-width: 120px;
    height: 100px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    background-color: var(--cinza-fundo);
    flex-shrink: 0;
}

.camp-dash-info { flex: 1; min-width: 0; }

@media (max-width: 480px) {
    .camp-dash-header { flex-direction: column; }
    .camp-dash-img { width: 100%; height: 140px; }
}

/* === DASHBOARD — SEÇÃO DE PEDIDOS === */
.dash-pedidos-section {
    border-top: 1px solid var(--cinza);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.dash-pedidos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

/* === CAMPANHAS — BALANÇO NO CARD === */
.camp-balance-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--cinza-fundo);
    border-radius: var(--radius-sm);
    border: 1px solid var(--cinza);
}

.camp-balance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 60px;
}

.camp-balance-label {
    font-size: 0.65rem;
    color: var(--cinza-medio);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.camp-balance-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cinza-escuro);
}

.camp-balance-val.success { color: var(--status-confirmado); }
.camp-balance-val.danger  { color: var(--vermelho); }

/* === DASHBOARD — GRÁFICOS === */
.dash-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.dash-chart-card {
    background: var(--cinza-fundo);
    border: 1px solid var(--cinza);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
}

.dash-chart-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cinza-escuro);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.65rem;
}

.dash-chart-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.dash-chart-legend-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
}

.dash-chart-legend-label {
    flex: 1;
    color: var(--cinza-escuro);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-chart-legend-val {
    font-weight: 700;
    color: var(--azul-escuro);
    white-space: nowrap;
    font-size: 0.7rem;
}

/* Barras de distribuição (doação × retirada) */
.dash-dist-bars { padding: 0.25rem 0; }

.dash-dist-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.dash-dist-label {
    font-size: 0.72rem;
    color: var(--cinza-escuro);
    width: 56px;
    flex-shrink: 0;
}

.dash-dist-bar-wrap {
    flex: 1;
    height: 12px;
    background: var(--cinza);
    border-radius: 999px;
    overflow: hidden;
}

.dash-dist-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s ease;
    min-width: 4px;
}

.dash-dist-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cinza-escuro);
    min-width: 22px;
    text-align: right;
}

@media (max-width: 500px) {
    .dash-charts-grid { grid-template-columns: 1fr; }
}

/* === HISTÓRICO DE CAMPANHAS — LISTA EM LINHAS === */
.hist-camp-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hist-camp-row {
    display: flex;
    gap: 0;
    background: var(--branco);
    border: 1px solid var(--cinza);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.hist-camp-row:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

.hist-camp-thumb {
    width: 300px;
    min-width: 300px;
    background: linear-gradient(135deg, var(--azul-escuro), var(--azul-medio));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.hist-camp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hist-camp-body {
    flex: 1;
    padding: 0.75rem;
    min-width: 0;
}

/* hist-camp-row: empilha no mobile */
@media (max-width: 540px) {
    .hist-camp-row { flex-direction: column; }
    .hist-camp-thumb {
        width: 100% !important;
        min-width: unset !important;
        height: 120px;
    }
    .hist-camp-thumb img { width: 100%; height: 120px; object-fit: cover; }
}

/* Relatório por campanha — grid responsivo (gráfico acima, balanço abaixo no mobile) */
.rel-camp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}
@media (min-width: 640px) {
    .rel-camp-grid { grid-template-columns: 1fr 1fr; }
    .rel-camp-chart-col  { order: 2; }
    .rel-camp-balance-col { order: 1; }
}

/* Lista de pedidos com scroll — modal histórico */
#pedidos-list-modal {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 2px;
}

/* ============================================================
   ICON ACTION BUTTONS + TOOLTIP BALLOON
   ============================================================ */
.act-btns {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.act-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: var(--cinza-claro);
    color: var(--cinza-escuro);
    transition: background 0.15s, transform 0.12s;
    flex-shrink: 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.act-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.act-btn svg { pointer-events: none; display: block; }

.act-confirm { background: #d1fae5; color: #065f46; }
.act-confirm:hover { background: #a7f3d0; }

.act-unmark { background: #e2e8f0; color: #4a5568; }
.act-unmark:hover { background: #cbd5e0; }

.act-wpp { background: #dcfce7; color: #15803d; }
.act-wpp:hover { background: #bbf7d0; }

.act-edit { background: #dbeafe; color: #1e40af; }
.act-edit:hover { background: #bfdbfe; }

.act-delete { background: #fee2e2; color: #991b1b; }
.act-delete:hover { background: #fecaca; }

.act-receipt { background: #ede9fe; color: #6d28d9; }
.act-receipt:hover { background: #ddd6fe; }

.act-list   { background: #e0f2fe; color: #0369a1; }
.act-list:hover   { background: #bae6fd; }

.act-report { background: #fef9c3; color: #854d0e; }
.act-report:hover { background: #fef08a; }

.act-reopen { background: #d1fae5; color: #065f46; }
.act-reopen:hover { background: #a7f3d0; }

/* Tooltip balloon — dark box with downward arrow */
[data-tip] { position: relative; }
[data-tip]::before,
[data-tip]::after {
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s, transform 0.15s;
    z-index: 9999;
}
[data-tip]::before {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #1a202c;
    color: #fff;
    font-size: 0.63rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 0.28rem 0.55rem;
    border-radius: 5px;
    line-height: 1.3;
}
[data-tip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    border: 5px solid transparent;
    border-top-color: #1a202c;
}
[data-tip]:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }
[data-tip]:hover::after  { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Hide action buttons in print */
@media print {
    .act-btns, .act-btn, .no-print { display: none !important; }
}

/* ============================================================
   MONTHLY REPORT — campaign sections
   ============================================================ */
.mes-camp-section {
    border: 1px solid var(--cinza);
    border-radius: var(--radius);
    overflow: hidden;
}

.mes-camp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    background: linear-gradient(90deg, var(--azul-escuro), var(--azul-medio));
    color: #fff;
    flex-wrap: wrap;
}

.mes-camp-title {
    font-weight: 700;
    font-size: 0.9rem;
}

.mes-camp-body {
    padding: 0.75rem 0.9rem;
}

/* Grid interno do relatório mensal: 1 coluna no mobile, 2 no desktop */
.mes-camp-body-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 560px) {
    .mes-camp-body-grid { grid-template-columns: 1fr 1fr; }
}

/* Botões do dashboard: flex auto no desktop, grid 100% no mobile */
.dash-camp-btns {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.dash-camp-btns .btn { flex: 0 0 auto; }

@media (max-width: 540px) {
    .dash-camp-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .dash-camp-btns .btn-full { grid-column: 1 / -1; }
}

/* ============================================================
   DEVEDORES LIST — zebra rows + print campaign headers
   ============================================================ */
.devedores-section .devedor-row:nth-child(even) {
    background: #f7fafc;
    border-radius: 4px;
}

.dev-camp-block {
    border: 1px solid var(--cinza);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.dev-camp-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: var(--azul-escuro);
    color: #fff;
    flex-wrap: wrap;
}

.dev-camp-block-header .title {
    font-weight: 700;
    font-size: 0.88rem;
}

.dev-camp-block-body {
    padding: 0.25rem 0.5rem;
}

/* ============================================================
   ANNUAL REPORT
   ============================================================ */

/* KPI grid: 2 cols mobile → 4 cols desktop */
.anual-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 560px) {
    .anual-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.anual-kpi-card {
    background: var(--cinza-fundo);
    border: 1px solid var(--cinza);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.6rem;
    text-align: center;
}
.anual-kpi-card.success { background: #f0fdf4; border-color: #86efac; }
.anual-kpi-card.danger  { background: #fff1f2; border-color: #fca5a5; }
.anual-kpi-card.dourado { background: #fffbeb; border-color: #fde68a; }

.anual-kpi-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--azul-escuro);
    line-height: 1.2;
}
.anual-kpi-card.success .anual-kpi-val { color: #065f46; }
.anual-kpi-card.danger  .anual-kpi-val { color: #991b1b; }
.anual-kpi-card.dourado .anual-kpi-val { color: #92400e; }

.anual-kpi-label {
    font-size: 0.65rem;
    color: var(--cinza-medio);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

/* Chart container */
.anual-chart-wrap {
    position: relative;
    height: 260px;
    margin-bottom: 1.25rem;
}
@media (max-width: 540px) {
    .anual-chart-wrap { height: 200px; }
}

/* Monthly block */
.anual-mes-block {
    border: 1px solid var(--cinza);
    border-radius: var(--radius);
    overflow: hidden;
}

.anual-mes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: linear-gradient(90deg, #2d3748, #4a5568);
    color: #fff;
    flex-wrap: wrap;
}

.anual-mes-title {
    font-weight: 700;
    font-size: 0.92rem;
}

.anual-mes-financials {
    display: flex;
    gap: 0.6rem;
    font-size: 0.76rem;
    flex-wrap: wrap;
}

.anual-mes-body {
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ============================================================
   COMPARTILHAMENTO — Admin dashboard & modal usuário
   ============================================================ */

/* Card admin: compartilhar progresso */
.dash-share-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.dash-share-card-body {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.dash-share-icon-wrap {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.dash-share-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 0.2rem;
}
.dash-share-desc {
    font-size: 0.78rem;
    color: #15803d;
    line-height: 1.45;
}
.dash-share-btn {
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: var(--radius-xs);
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s, opacity 0.2s;
    width: 100%;
}
.dash-share-btn:hover  { background: #22c55e; }
.dash-share-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.modal-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: var(--radius-xs);
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.modal-share-btn:hover { background: #22c55e; }
