/*
 * Covabra Caixas - Estilos Visuais Premium
 * Design moderno com Glassmorphism, Modo Escuro nativo, Grides fluidos e Layout de Impressão
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(22, 30, 49, 0.7);
    --bg-card-hover: rgba(30, 41, 67, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --success-border: rgba(16, 185, 129, 0.3);
    
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --warning-border: rgba(245, 158, 11, 0.3);
    
    --info: #06b6d4;
    --info-light: rgba(6, 182, 212, 0.15);
    
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-section h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Painel de Parâmetros */
.panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.form-group.small {
    flex: 0 0 120px;
    min-width: 120px;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="date"],
input[type="number"],
select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

input[type="date"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.file-upload-wrapper {
    position: relative;
    display: inline-block;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Indicadores / Dashboard Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.metric-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.metric-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.metric-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Abas / Tabs */
.tabs-navigation {
    display: flex;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.4);
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Tabela de Escala Geral (Horizontal Scrollable) */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    max-height: 700px;
}

.scale-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: center;
}

.scale-table th, 
.scale-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    min-width: 80px;
}

.scale-table th {
    background: rgba(15, 23, 42, 0.85);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Coluna do Nome Fixo à Esquerda */
.scale-table th.sticky-col,
.scale-table td.sticky-col {
    position: sticky;
    left: 0;
    background: #111827;
    z-index: 5;
    min-width: 180px;
    text-align: left;
    font-weight: 600;
    border-right: 2px solid var(--border-color);
}

.scale-table th.sticky-col {
    z-index: 11;
}

.scale-table tr:hover td.sticky-col {
    background: #1f2937;
}

.scale-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Tipos de Células da Escala */
.cell-folga {
    background-color: var(--success-light) !important;
    color: var(--success) !important;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 4px;
}

.cell-apoio {
    background-color: var(--info-light) !important;
    color: var(--info) !important;
    font-weight: 600;
    font-size: 0.75rem;
}

.cell-caixa {
    background-color: rgba(99, 102, 241, 0.08);
    color: #cbd5e1;
    font-weight: 500;
}

.cell-caixa-num {
    background: var(--primary-light);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}

.operator-info-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}

/* Visão Diária */
.daily-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .daily-layout {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.day-selector-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.day-item {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.day-item.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

.day-item-date {
    font-weight: 600;
    font-size: 0.9rem;
}

.day-item-weekday {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Timeline Diária e Cobertura */
.coverage-timeline {
    margin-bottom: 2rem;
}

.timeline-chart-container {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.timeline-bars {
    display: flex;
    height: 180px;
    align-items: flex-end;
    gap: 4px;
    padding-top: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.timeline-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.timeline-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--info));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.5s ease-in-out;
    min-height: 2px;
}

.timeline-bar:hover {
    filter: brightness(1.2);
}

.timeline-bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-bar-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    transform: rotate(-45deg);
    transform-origin: top left;
    white-space: nowrap;
    height: 25px;
}

.timeline-bar.selected {
    background: linear-gradient(to top, #818cf8, #22d3ee) !important;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
    filter: brightness(1.2);
}

#active-registers-detail {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    animation: fadeIn 0.25s ease-in-out;
}

.active-register-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.active-register-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.active-register-cx-num {
    background: var(--primary-light);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
}

.active-register-info {
    display: flex;
    flex-direction: column;
}

.active-register-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.active-register-shift {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.register-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.register-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
}

.register-btn.selected {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: #a5b4fc;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.register-timeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.01);
}

.register-timeline-item.closed {
    border-left-color: var(--text-muted);
    opacity: 0.65;
    background: transparent;
}

.register-timeline-time {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 110px;
}

.register-timeline-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.register-timeline-status.trabalhando {
    color: #a5b4fc;
}

.register-timeline-status.fechado {
    color: var(--text-secondary);
}

.register-timeline-item.interval-fiscal {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.register-timeline-status.fiscal {
    color: #f87171;
}


.register-timeline-op {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Lista detalhada do dia */
.daily-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.daily-details-table th,
.daily-details-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.daily-details-table th {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.segments-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.segment-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.segment-badge.caixa {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.segment-badge.apoio {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.segment-badge.intervalo {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.segment-badge.intervalo-fiscal {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.2);
}


/* Ficha do Operador */
.profile-search {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.operator-profile-card {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

@media (max-width: 800px) {
    .operator-profile-card {
        grid-template-columns: 1fr;
    }
}

.profile-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.profile-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.profile-meta-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.profile-meta-val {
    font-weight: 600;
    font-size: 0.9rem;
}

.operator-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    text-transform: uppercase;
}

.calendar-day-cell {
    aspect-ratio: 1.2;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.calendar-day-cell:hover {
    background: rgba(255, 255, 255, 0.05);
}

.calendar-day-num {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.calendar-day-role {
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    padding: 0.15rem;
    border-radius: 3px;
}

.calendar-day-cell.folga {
    background: var(--success-light);
    border-color: var(--success-border);
}

.calendar-day-cell.folga .calendar-day-role {
    color: var(--success);
}

.calendar-day-cell.trabalha {
    border-color: rgba(99, 102, 241, 0.15);
}

/* Responsividade Geral */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

/* ==========================================================================
   LAYOUT DE IMPRESSÃO - OTIMIZADO PARA O CONTRATANTE
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-size: 8pt !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Oculta elementos não essenciais para a impressão da escala */
    header, 
    .panel, 
    .metrics-grid, 
    .tabs-navigation, 
    .action-buttons,
    .day-selector-card,
    .profile-search-card,
    #operator-profile-view,
    #tab-grid-content,
    #tab-profile,
    .coverage-timeline,
    #active-registers-detail,
    .register-occupancy-card,
    #btn-print-escala,
    footer {
        display: none !important;
    }
    
    /* Força exibição da aba de cobertura diária com largura total */
    #tab-daily {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .daily-layout {
        display: block !important;
        width: 100% !important;
    }
    
    .card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #daily-selected-header {
        font-size: 14pt !important;
        color: #000000 !important;
        border-bottom: 2px solid #000000 !important;
        padding-bottom: 5px !important;
        margin-bottom: 15px !important;
        margin-top: 0 !important;
        text-align: center !important;
    }
    
    h4 {
        color: #000000 !important;
        font-size: 10pt !important;
        margin-top: 15px !important;
        margin-bottom: 5px !important;
        font-weight: bold !important;
    }
    
    /* Estilização Light da Tabela de Distribuição */
    .daily-details-table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-top: 5px !important;
    }
    
    .daily-details-table th,
    .daily-details-table td {
        border: 1px solid #666666 !important;
        padding: 6px 8px !important;
        font-size: 7.5pt !important;
        color: #000000 !important;
        background: transparent !important;
        text-align: left !important;
    }
    
    .daily-details-table th {
        font-weight: bold !important;
        background-color: #f3f4f6 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .daily-details-table td span,
    .daily-details-table td strong {
        color: #000000 !important;
    }
    
    /* Linha do tempo visual no papel (badges leves em preto e branco) */
    .segments-flow {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    
    .segment-badge {
        padding: 4px 8px !important;
        font-size: 7.5pt !important;
        font-weight: 600 !important;
        border-radius: 4px !important;
        display: inline-block !important;
        margin: 2px !important;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .segment-badge.caixa {
        background-color: #e0e7ff !important; 
        color: #3730a3 !important; 
        border: 1px solid #a5b4fc !important;
    }
    
    .segment-badge.apoio {
        background-color: #ecfeff !important; 
        color: #0891b2 !important; 
        border: 1px solid #22d3ee !important;
    }
    
    .segment-badge.intervalo {
        background-color: #fef3c7 !important; 
        color: #b45309 !important; 
        border: 1px solid #fcd34d !important;
    }
    
    .segment-badge.intervalo-fiscal {
        background-color: #fee2e2 !important; 
        color: #b91c1c !important; 
        border: 1px solid #fca5a5 !important;
    }
}

/* Oculto no navegador, visível na impressão */
.print-header {
    display: none;
}

/* Interface de Autenticação */
#login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at top right, #111827, #030712);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.login-card {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-logo img {
    height: 48px;
    object-fit: contain;
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.login-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-form-group {
    text-align: left;
    margin-bottom: 1.25rem;
}

.login-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.login-form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-login {
    width: 100%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 1rem;
}

.btn-login:hover {
    background: var(--primary-hover);
}

.btn-login:active {
    transform: scale(0.98);
}

.login-error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 1rem;
    min-height: 20px;
    font-weight: 500;
}

/* Modal de Operador (CRUD) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    padding: 1.75rem;
    position: relative;
    animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

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

.modal-body label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.modal-body input,
.modal-body select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.modal-body input:focus,
.modal-body select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
}

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

/* Botões de Ações de Tabela */
.btn-action-edit,
.btn-action-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 0.2rem;
}

.btn-action-edit {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

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

.btn-action-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-action-delete:hover {
    background: var(--danger);
    color: #fff;
}

/* Corrigir visibilidade de textos em dropdowns do Chrome/Edge/Windows */
select option {
    color: #1e293b !important;
    background-color: #ffffff !important;
}

/* Custom Actions Dropdown Menu */
.actions-dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: #151a28;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 999;
    padding: 0.5rem;
    backdrop-filter: blur(16px);
}

.dropdown-menu.show {
    display: block;
    animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.dropdown-item-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #ffffff;
}

.dropdown-item-btn.danger {
    color: #f87171;
}

.dropdown-item-btn.danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.35rem 0;
}
