:root {
    --primary: #0b4f8a;
    --primary-dark: #07355e;
    --primary-light: #d0e7f9;
    --accent-green: #159931;
    --accent-green-dark: #0d6e21;
    --accent-red: #d92626;
    --accent-red-dark: #9e1414;
    --accent-yellow: #f59e0b;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.22);
    --radius: 12px;
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOP NAVBAR */
.top-navbar {
    background: linear-gradient(135deg, #07355e 0%, #0b4f8a 60%, #1368b0 100%);
    color: #fff;
    padding: 14px 24px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-crest {
    width: 48px;
    height: 52px;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.brand-text h1 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.brand-text p {
    font-size: 0.82rem;
    opacity: 0.9;
}

/* TABS NAVIGATION */
.nav-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.tab-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.agent-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.82rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.agent-badge strong {
    color: #fde047;
}

/* PERIOD FILTER BAR */
.period-bar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    box-shadow: var(--shadow-sm);
}

.period-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.period-selectors {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.period-selectors label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.select-input, .form-control {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select-input:focus, .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.15);
    background: #fff;
}

.quick-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--accent-green);
    color: #fff;
}
.btn-success:hover {
    background: var(--accent-green-dark);
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}
.btn-danger:hover {
    background: var(--accent-red-dark);
}

.btn-outline {
    background: #fff;
    color: var(--primary-dark);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover {
    background: #f0f7ff;
}

/* MAIN WORKSPACE */
.main-content {
    max-width: 1400px;
    width: 100%;
    margin: 24px auto;
    padding: 0 20px;
    flex: 1;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-pane.active {
    display: block;
}

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

/* ==========================================
   ABA 1: PAINEL GERAL (DASHBOARD)
   ========================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-card.worked { border-left-color: var(--accent-green); }
.kpi-card.not-worked { border-left-color: var(--accent-red); }
.kpi-card.weekend { border-left-color: var(--accent-yellow); }
.kpi-card.houses { border-left-color: #2563eb; }
.kpi-card.blocks { border-left-color: #7c3aed; }

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-main);
}

.kpi-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.dashboard-split {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .dashboard-split {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.panel-card h2 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Detailed metrics grid inside Painel */
.metrics-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
}

.metric-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.metric-box .m-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.metric-box .m-val {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-top: 4px;
}

/* Bar progress list */
.progress-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-item-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-bar-bg {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Lists of worked and non-worked days */
.days-summary-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .days-summary-lists {
        grid-template-columns: 1fr;
    }
}

.day-pill-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.day-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.86rem;
    background: #f8fafc;
    border-left: 4px solid #cbd5e1;
}

.day-pill.worked {
    border-left-color: var(--accent-green);
    background: #f0fdf4;
}

.day-pill.not-worked {
    border-left-color: var(--accent-red);
    background: #fef2f2;
}

.day-pill.weekend {
    border-left-color: var(--accent-yellow);
    background: #fffbeb;
}

/* ==========================================
   ABA 2: CRONOGRAMA DE DIAS (CALENDÁRIO)
   ========================================== */
.calendar-header-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.cal-weekday {
    text-align: center;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 10px;
    background: var(--primary-dark);
    color: #fff;
    border-radius: 8px;
}

.cal-weekday.wknd {
    background: #334155;
    color: #fde047;
}

.cal-day {
    min-height: 115px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
}

.cal-day:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.cal-day.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}

.cal-day.status-worked {
    background: #f0fdf4;
    border-color: #86efac;
}

.cal-day.status-not-worked {
    background: #fef2f2;
    border-color: #fca5a5;
}

.cal-day.status-weekend {
    background: #fffbeb;
    border-color: #fde68a;
}

.cal-day.status-holiday {
    background: #f5f3ff;
    border-color: #c4b5fd;
}

.cal-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cal-day-number {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
}

.cal-day-tag {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 99px;
    text-transform: uppercase;
}

.tag-worked { background: #16a34a; color: #fff; }
.tag-not-worked { background: #dc2626; color: #fff; }
.tag-weekend { background: #d97706; color: #fff; }
.tag-holiday { background: #7c3aed; color: #fff; }
.tag-pending { background: #e2e8f0; color: #475569; }

.cal-day-body {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #334155;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-day-actions {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}

.cal-mini-btn {
    flex: 1;
    border: none;
    padding: 4px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    color: #fff;
}

.cal-mini-btn.green { background: var(--accent-green); }
.cal-mini-btn.red { background: var(--accent-red); }

@media (max-width: 860px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cal-weekday {
        display: none;
    }
    .cal-day.empty {
        display: none;
    }
}

/* ==========================================
   ABA 3: CONTROLE DE VISITA (PLANILHA OFICIAL)
   ========================================== */
.sheet-toolbar {
    background: #fff;
    padding: 14px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid #e2e8f0;
}

.sheet-wrapper {
    background: #fff;
    padding: 28px 32px;
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    border: 1px solid #cbd5e1;
}

.official-sheet {
    min-width: 1020px;
    width: 100%;
    background: #fff;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
}

/* Sheet Header identical to PDF */
.sheet-header {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.sheet-crest-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet-crest-box svg {
    width: 86px;
    height: 96px;
}

.sheet-title-area {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sheet-prefeitura {
    font-size: 1.25rem;
    font-weight: 800;
    color: #163e6c;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sheet-secretaria {
    font-size: 1.02rem;
    font-weight: 800;
    color: #111;
    margin-top: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.sheet-banner-pill {
    width: 100%;
    background: #cde4f7;
    border-radius: 16px;
    padding: 10px 20px;
    text-align: center;
    margin-bottom: 6px;
}

.sheet-banner-pill h2 {
    font-size: 1.95rem;
    font-weight: 900;
    color: #163e6c;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.sheet-subtitle {
    font-size: 0.9rem;
    color: #163e6c;
    font-weight: 600;
}

/* Official Table */
.sheet-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #222;
    margin-top: 8px;
}

.sheet-table thead th {
    background-color: #0b5394;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    text-align: center;
    vertical-align: middle;
    padding: 8px 4px;
    border: 1.5px solid #222;
    text-transform: uppercase;
    line-height: 1.2;
}

.sheet-table tbody td {
    border: 1px solid #333;
    height: 31px;
    padding: 4px 6px;
    font-size: 0.86rem;
    text-align: center;
    vertical-align: middle;
    color: #111;
    font-weight: 600;
}

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

.sheet-table tbody tr.row-weekend {
    background-color: #f8fafc;
}

.sheet-table tbody tr.row-holiday {
    background-color: #fef9c3;
}

.sheet-table tbody tr.row-not-worked {
    background-color: #fff1f2;
}

.sheet-table tfoot td {
    border: 1.5px solid #222;
    background: #e2e8f0;
    font-weight: 800;
    font-size: 0.85rem;
    text-align: center;
    padding: 6px 4px;
}

.col-data { width: 95px; }
.col-quart { width: 105px; }
.col-num { width: 62px; }
.col-total { width: 88px; }
.col-obs { width: 220px; text-align: left !important; padding-left: 10px !important; }

/* Sheet Footer identical to PDF */
.sheet-footer {
    margin-top: 12px;
    border: 1.5px solid #333;
    display: grid;
    grid-template-columns: 105px 1.2fr 105px 1.5fr;
    align-items: stretch;
    min-height: 38px;
}

.sheet-footer-label {
    background: #d9eaf7;
    color: #163e6c;
    font-weight: 800;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    padding-left: 12px;
    border-right: 1px solid #333;
}

.sheet-footer-label.mid {
    border-left: 1.5px solid #333;
}

.sheet-footer-val {
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    background: #fff;
}

.sheet-footer-val input {
    border: none;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    background: transparent;
    outline: none;
}

/* ==========================================
   JANELA DE ESCOLHA (IGUAL À 2ª FOTO)
   ========================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    overflow-y: auto;
}

.modal-backdrop.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

/* Choice Window styled after the 2nd image */
.launcher-modal-card {
    position: relative;
    max-width: 820px;
    width: 100%;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    border: 4px solid #ffffff;
}

.launcher-close-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0b4f8a;
    color: #fff;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.92rem;
}

.launcher-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.launcher-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Interactive Banner Wrapper using the exact uploaded image + clickable hotspot buttons */
.banner-interactive-container {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #bae6fd 0%, #fef9c3 65%, #dcfce7 100%);
    user-select: none;
}

.banner-interactive-container img.banner-bg-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Overlay clickable buttons matching the exact positions of "Registrar Visita" and "Não Registrar Visita" in the 2nd photo */
.banner-hotspot-btn {
    position: absolute;
    top: 38.5%;
    height: 27%;
    border-radius: 18px;
    cursor: pointer;
    border: 3px solid transparent;
    background: rgba(255, 255, 255, 0);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-hotspot-btn.hotspot-green {
    left: 1.8%;
    width: 47%;
}

.banner-hotspot-btn.hotspot-red {
    right: 1.6%;
    width: 47.5%;
}

.banner-hotspot-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: scale(1.02);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.85);
}

.banner-hotspot-btn:active {
    transform: scale(0.99);
}

/* Fallback / Action Footer below image so user also has clear buttons on any screen size */
.launcher-action-bar {
    background: #f8fafc;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.big-choice-btn {
    flex: 1;
    min-width: 220px;
    padding: 14px 22px;
    border-radius: 14px;
    border: none;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    transition: transform 0.15s, box-shadow 0.15s;
}

.big-choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

.big-choice-btn.green {
    background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
    border: 2px solid #86efac;
}

.big-choice-btn.red {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    border: 2px solid #fca5a5;
}

/* ==========================================
   JANELAS FLUTUANTES DE FORMULÁRIO (MODAIS)
   ========================================== */
.form-modal-card {
    background: #fff;
    max-width: 650px;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.2s ease;
}

.form-modal-header {
    padding: 18px 24px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-modal-header.green {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
}

.form-modal-header.red {
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
}

.form-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-x-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
}

.form-modal-body {
    padding: 22px 24px;
    max-height: 78vh;
    overflow-y: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group.span-2 {
    grid-column: span 2;
}

.form-group.span-3 {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
}

.form-group input, .form-group textarea, .form-group select {
    padding: 10px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.15);
}

.form-group input.total-highlight {
    background: #dcfce7;
    border-color: #16a34a;
    color: #14532d;
    font-size: 1.15rem;
}

/* Quick reason chips in "Não Registrar Visita" modal */
.reason-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 12px;
}

.reason-chip {
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 99px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
}

.reason-chip:hover, .reason-chip.active {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
}

.form-modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* TOAST NOTIFICATION */
.toast-msg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #fff;
    padding: 14px 22px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    display: none;
    align-items: center;
    gap: 10px;
}

.toast-msg.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

/* ==========================================
   PRINT MEDIA (IMPRESSÃO IDÊNTICA AO PDF)
   ========================================== */
@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    body {
        background: #fff !important;
    }

    .top-navbar,
    .period-bar,
    .sheet-toolbar,
    .modal-backdrop,
    .toast-msg,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .tab-pane {
        display: none !important;
    }

    #tab-planilha {
        display: block !important;
    }

    .sheet-wrapper {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .official-sheet {
        min-width: 100% !important;
        width: 100% !important;
    }

    .sheet-table thead th {
        background-color: #0b5394 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sheet-banner-pill,
    .sheet-footer-label,
    .sheet-table tbody tr.row-weekend,
    .sheet-table tbody tr.row-holiday,
    .sheet-table tfoot td {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sheet-table tbody td {
        height: 22px !important;
        font-size: 0.78rem !important;
        padding: 2px 4px !important;
    }
}
