/* ==========================================
   DESIGN SYSTEM - VARIÁVEIS E ESTILOS GERAIS
   ========================================== */
:root {
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-secondary: 'Outfit', sans-serif;

    /* Cores do Tema Escuro - Preto Predominante */
    --bg-dark: #000000;
    --bg-card: rgba(10, 10, 10, 0.85);
    --bg-card-hover: rgba(18, 18, 18, 0.95);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-focus: rgba(57, 255, 20, 0.5);

    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #666666;

    /* Paleta Amarelo e Verde Neon */
    --neon-green: #39ff14;
    --yellow: #ffd200;
    
    /* Redirecionamento de acentos para compatibilidade automática */
    --neon-cyan: #00a2ff; /* Azul */
    --neon-magenta: #ffd200; /* Amarelo */
    --neon-amber: #ffd200; /* Amarelo */
    --neon-violet: #39ff14; /* Verde Neon */
    --neon-emerald: #39ff14; /* Verde Neon */
    
    /* Cores de Ação */
    --primary: #39ff14;
    --primary-hover: #2ecb0f;
    --primary-glow: rgba(57, 255, 20, 0.35);
    --danger: #ff4757;
    --danger-hover: #e84118;
    --danger-glow: rgba(255, 71, 87, 0.4);
    
    /* Efeitos de Sombra */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
    --neon-glow-cyan: 0 0 10px rgba(57, 255, 20, 0.45);
    --neon-glow-magenta: 0 0 10px rgba(255, 210, 0, 0.45);
    --neon-glow-violet: 0 0 10px rgba(57, 255, 20, 0.3);
}

/* Reset e Configurações Básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 24px 16px;
}

/* Background Glows (Luzes de fundo) */
.bg-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}
.bg-glow-1 {
    top: -100px;
    left: -100px;
    background-color: var(--neon-cyan);
}
.bg-glow-2 {
    bottom: -150px;
    right: -100px;
    background-color: var(--neon-magenta);
}
.bg-glow-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--neon-violet);
    opacity: 0.08;
    width: 600px;
    height: 600px;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(7, 9, 19, 0.8);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Container do App */
.app-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

/* Efeito Glassmorphism nos Cards */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================
   CABECALHO & NAVEGAÇÃO
   ========================================== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    margin-bottom: 32px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.6));
    animation: rotate 12s linear infinite;
}

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 242, 0, 0.25));
}


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

.logo-text h1 {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    line-height: 1.1;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.nav-link i {
    width: 18px;
    height: 18px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #000000;
    background: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.user-status-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--neon-green);
    color: #000000;
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--neon-glow-cyan);
}

.user-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: var(--danger);
}

.hidden {
    display: none !important;
}

/* ==========================================
   BOTÕES E INPUTS MODERNOS
   ========================================== */
.btn {
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: #000000;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(57, 255, 20, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    background: rgba(7, 9, 19, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 12px 16px 12px 42px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.input-wrapper select {
    appearance: none;
    -webkit-appearance: none;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--neon-glow-cyan);
    background: rgba(7, 9, 19, 0.8);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input:focus + .input-icon {
    color: var(--neon-cyan);
}

/* ==========================================
   ESTILOS DE VISTAS (VIEWS)
   ========================================== */
.app-view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.app-view.active {
    display: block;
}

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

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.view-title {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--yellow);
}

.view-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Seletores de Mês */
.month-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
}

.btn-month-nav {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-month-nav:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-month-nav i {
    width: 16px;
    height: 16px;
}

.month-label {
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 1rem;
    min-width: 130px;
    text-align: center;
    color: var(--text-primary);
}

/* ==========================================
   TELA DE ESCALA PÚBLICA (TABELA)
   ========================================== */
.card {
    padding: 24px;
    margin-bottom: 24px;
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.schedule-table th,
.schedule-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glass);
}

.schedule-table th {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.015);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-table tbody tr {
    transition: background-color 0.2s;
}

.schedule-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

.schedule-table tbody tr:last-child td {
    border-bottom: none;
}

/* Estilos de Headers e Colunas de Departamentos */
.dept-th {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dept-icon {
    width: 16px;
    height: 16px;
}

.text-cyan { color: var(--neon-cyan); text-shadow: 0 0 6px rgba(0, 242, 254, 0.3); }
.text-magenta { color: var(--neon-magenta); text-shadow: 0 0 6px rgba(243, 85, 136, 0.3); }
.text-amber { color: var(--neon-amber); text-shadow: 0 0 6px rgba(255, 159, 67, 0.3); }
.text-violet { color: var(--neon-violet); text-shadow: 0 0 6px rgba(156, 136, 255, 0.3); }
.text-teal { color: var(--neon-emerald); text-shadow: 0 0 6px rgba(46, 213, 115, 0.3); } /* Letras teal/green */
.text-emerald { color: #20bf6b; text-shadow: 0 0 6px rgba(32, 191, 107, 0.3); }

/* Célula de Dia */
.day-cell {
    display: flex;
    flex-direction: column;
}

.day-num {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 700;
}

.day-week {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.scheduled-names {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scheduled-names span {
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: inline-block;
    width: 100%;
}

.empty-day-cell {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px !important;
    color: var(--text-muted);
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ==========================================
   TELA DE AUTH (LOGIN / CADASTRO)
   ========================================== */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    width: 100%;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 36px 32px;
    text-align: center;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.auth-header h2 {
    font-family: var(--font-secondary);
    font-size: 1.6rem;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 6px;
}

.auth-actions {
    margin-top: 24px;
}

.auth-footer {
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ==========================================
   PAINEL DO INTEGRANTE (DISPONIBILIDADE)
   ========================================== */
.grid-2col {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
}

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

.calendar-card {
    padding: 24px;
}

.calendar-header-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

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

.calendar-day-btn {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-day-btn:hover:not(.other-month):not(.disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.calendar-day-btn.other-month {
    opacity: 0.25;
    cursor: default;
    background: transparent;
    border-color: transparent;
}

.calendar-day-btn.selected {
    background: rgba(0, 242, 254, 0.06);
    border-color: var(--neon-cyan);
    color: #fff;
    font-weight: 700;
    box-shadow: var(--neon-glow-cyan), inset 0 0 10px rgba(0, 242, 254, 0.1);
}

.period-dots-container {
    display: flex;
    gap: 4px;
    position: absolute;
    bottom: 6px;
    justify-content: center;
    align-items: center;
}

.period-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.period-dot.manha {
    background-color: var(--neon-amber);
    box-shadow: 0 0 4px var(--neon-amber);
}

.period-dot.tarde {
    background-color: var(--neon-magenta);
    box-shadow: 0 0 4px var(--neon-magenta);
}

.period-dot.noite {
    background-color: var(--neon-violet);
    box-shadow: 0 0 4px var(--neon-violet);
}


.calendar-day-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.details-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.details-card h3 {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 700;
}

.status-box {
    padding: 16px;
    border-radius: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.status-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-val {
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 1.1rem;
}

.alert-box {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.alert-box.info {
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    color: #a29bfe;
}

.alert-box.info i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #8172ff;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 8px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-glass);
}

.divider span {
    padding: 0 10px;
}

.action-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sync-code-area {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sync-code-area label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.sync-code-area textarea {
    background: rgba(7, 9, 19, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px;
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.75rem;
    resize: none;
    height: 60px;
}

/* ==========================================
   PAINEL DO ADMINISTRADOR (ESCALA & MEMBROS)
   ========================================== */
.admin-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 28px;
}

@media (max-width: 1050px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-scale-card {
    padding: 24px;
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    margin-bottom: 20px;
}

.admin-builder-table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
}

.admin-builder-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-builder-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0f132b;
    padding: 12px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    border-bottom: 2px solid var(--border-glass);
    text-transform: uppercase;
}

.admin-builder-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-glass);
    vertical-align: middle;
}

.admin-builder-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.admin-day-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.admin-day-num {
    font-family: var(--font-secondary);
    font-size: 1.15rem;
    font-weight: 800;
}

.admin-day-week {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Custom Select in Table */
.admin-builder-table select {
    width: 100%;
    background: rgba(7, 9, 19, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
}

.admin-builder-table select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(108, 92, 231, 0.3);
}

/* Opções de Disponibilidade Destacadas */
.admin-builder-table select option.opt-available {
    color: #00a2ff !important;
    font-weight: 600 !important;
    background: #000000 !important;
}

.admin-builder-table select option.opt-unavailable {
    color: var(--text-muted) !important;
    background: #000000 !important;
}

.admin-builder-table select.user-assigned-ok {
    border-color: rgba(0, 162, 255, 0.4) !important;
    color: #00a2ff !important;
    background: rgba(0, 162, 255, 0.05) !important;
}

/* Sidebar de Membros */
.admin-sidebar-card {
    padding: 24px;
    max-height: 700px;
    display: flex;
    flex-direction: column;
}

.members-status-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex-grow: 1;
    margin-top: 10px;
    padding-right: 4px;
}

.member-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    transition: all 0.2s;
}

.member-status-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.member-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.member-name-tag {
    font-weight: 600;
    font-size: 0.9rem;
}

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

.member-avail-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-cyan {
    background: rgba(0, 242, 254, 0.1);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.badge-muted {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.btn-delete-member {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    margin-left: 6px;
}

.btn-delete-member:hover {
    color: var(--danger);
    background: rgba(255, 71, 87, 0.1);
}

.btn-delete-member i {
    width: 14px;
    height: 14px;
}


/* ==========================================
   MODAIS (IMPORT E CONFIGURAÇÕES)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

.modal {
    width: 100%;
    max-width: 500px;
    padding: 0 !important;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    max-height: 450px;
    overflow-y: auto;
}

.modal-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.modal-body textarea {
    width: 100%;
    height: 150px;
    background: rgba(7, 9, 19, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 12px;
    font-size: 0.85rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.modal-body textarea:focus {
    border-color: var(--neon-cyan);
}

.import-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.import-status.success {
    background: rgba(46, 213, 115, 0.1);
    color: var(--neon-emerald);
    border: 1px solid rgba(46, 213, 115, 0.2);
}

.import-status.error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Seções das Configurações */
.settings-section {
    width: 100%;
}

.settings-section h4 {
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.backup-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.custom-file-upload {
    cursor: pointer;
}

.text-danger {
    color: var(--danger);
}

.text-cyan {
    color: #00a2ff !important;
}

.text-blue {
    color: #00a2ff !important;
}

/* ==========================================
   CLASSES DIVERSAS E ANIMAÇÕES
   ========================================== */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Cabeçalho exclusivo para o PDF */
.hidden-screen {
    display: none;
}

/* ==========================================
   SUPORTE DE RESPONSIVIDADE PARA CELULARES (MOBILE)
   ========================================== */
@media (max-width: 768px) {
    body {
        padding: 12px 8px;
    }
    
    .app-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 16px !important;
        padding: 16px !important;
    }
    
    .logo-container {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .logo-text {
        text-align: center !important;
    }
    
    .nav-links {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .nav-link {
        flex: 1 1 100px !important;
        justify-content: center !important;
        padding: 10px 8px !important;
        font-size: 0.85rem !important;
    }
    
    .user-status-area {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .view-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 14px !important;
        margin-bottom: 20px !important;
    }
    
    .header-actions {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .month-selector-wrapper {
        width: 100% !important;
        justify-content: space-between !important;
    }
    
    .month-label {
        min-width: unset !important;
        flex-grow: 1 !important;
    }
    
    .header-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Tabelas com rolagem horizontal suave */
    .table-responsive,
    .admin-builder-table-wrapper {
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .schedule-table th,
    .schedule-table td,
    .admin-builder-table th,
    .admin-builder-table td {
        white-space: nowrap !important;
    }
}

@media (max-width: 480px) {
    .calendar-card, 
    .details-card,
    .admin-scale-card,
    .admin-sidebar-card {
        padding: 16px !important;
    }
    
    .calendar-day-btn {
        aspect-ratio: 1/1 !important;
        padding: 4px !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
    }
    
    .calendar-header-days {
        font-size: 0.7rem !important;
        letter-spacing: 0px !important;
        margin-bottom: 10px !important;
    }
    
    .day-num {
        font-size: 0.95rem !important;
    }
    
    .period-dots-container {
        bottom: 3px !important;
        gap: 3px !important;
    }
    
    .period-dot {
        width: 4px !important;
        height: 4px !important;
    }
    
    .modal {
        margin: 10px !important;
        border-radius: 12px !important;
    }
    
    .modal-body {
        padding: 16px !important;
    }
    
    .modal-footer {
        padding: 12px 16px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .modal-footer .btn {
        width: 100% !important;
    }
    
    .backup-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .backup-actions button,
    .backup-actions label {
        width: 100% !important;
        text-align: center !important;
    }
}

/* ==========================================
   ESTILOS DE IMPRESSÃO (PDF GENERATION)
   ========================================== */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        padding: 0;
        margin: 0;
    }
    
    .bg-glow, 
    .app-header, 
    .view-header, 
    .nav-links, 
    .header-actions,
    .btn,
    .divider,
    .status-box,
    .alert-box,
    .modal-overlay {
        display: none !important;
    }
    
    .app-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .card.glass {
        background: #fff !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        color: #000 !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .schedule-table {
        border-collapse: collapse !important;
        border: 2px solid #000000 !important;
        width: 100% !important;
        background: #ffffff !important;
    }
    .schedule-table th, 
    .schedule-table td {
        border: 1px solid #000000 !important;
        color: #000000 !important;
        padding: 10px 8px !important;
        background: #ffffff !important;
        font-size: 0.78rem !important;
        text-align: center !important;
        vertical-align: middle !important;
    }
    .schedule-table th {
        background: #f2f2f2 !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
    }
    .dept-th {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        color: #000000 !important;
    }
    .dept-icon {
        display: inline-block !important;
        color: #0066cc !important;
        width: 16px !important;
        height: 16px !important;
        margin-right: 4px !important;
    }
    .scheduled-names {
        color: #000000 !important;
        font-weight: 600 !important;
        text-align: center !important;
    }
    .scheduled-names span {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        color: #000000 !important;
    }
    .day-cell {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
    }
    .day-num {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: #000000 !important;
    }
    .day-week {
        font-size: 0.75rem !important;
        color: #555555 !important;
    }
    .day-time-badge {
        background: #e6f0fa !important;
        color: #0066cc !important;
        border: 1px solid #b3d1ff !important;
        font-size: 0.7rem !important;
        padding: 1px 4px !important;
        margin-top: 3px !important;
        display: inline-block !important;
    }
    .period-badge {
        padding: 2px 5px !important;
        font-size: 0.7rem !important;
        border-radius: 4px !important;
        font-weight: 700 !important;
    }
    .period-badge.manha {
        background: #fff8e1 !important;
        color: #b78103 !important;
        border: 1px solid #ffe082 !important;
    }
    .period-badge.tarde {
        background: #fce4ec !important;
        color: #c2185b !important;
        border: 1px solid #f8bbd0 !important;
    }
    .period-badge.noite {
        background: #e8eaf6 !important;
        color: #3f51b5 !important;
        border: 1px solid #c5cae9 !important;
    }
    .empty-day-cell {
        color: #999999 !important;
    }
    .hidden-screen {
        display: block !important;
    }
    .pdf-header {
        text-align: center !important;
        margin-bottom: 24px !important;
        background: #000000 !important;
        padding: 24px !important;
        border-radius: 8px !important;
    }
    .pdf-header h2 {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        color: var(--yellow) !important;
    }
    .pdf-header p {
        font-size: 0.9rem !important;
        color: #ffffff !important;
    }
    .pdf-logo-wrapper {
        text-align: center !important;
        margin-bottom: 12px !important;
    }
    .pdf-logo-img {
        height: 50px !important;
        width: auto !important;
        object-fit: contain !important;
        filter: brightness(0) invert(1) !important;
    }
}

/* Estilos de PDF aplicados no elemento ativo na tela quando exportando */
.printing-active {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 20px !important;
}
.printing-active .schedule-table {
    border-collapse: collapse !important;
    border: 2px solid #000000 !important;
    width: 100% !important;
    background: #ffffff !important;
}
.printing-active .schedule-table th, 
.printing-active .schedule-table td {
    border: 1px solid #000000 !important;
    color: #000000 !important;
    padding: 10px 8px !important;
    background: #ffffff !important;
    font-size: 0.78rem !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.printing-active .schedule-table th {
    background: #f2f2f2 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}
.printing-active .dept-th {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    color: #000000 !important;
}
.printing-active .dept-icon {
    display: inline-block !important;
    color: #0066cc !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
}
.printing-active .scheduled-names {
    color: #000000 !important;
    font-weight: 600 !important;
    text-align: center !important;
}
.printing-active .scheduled-names span {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: #000000 !important;
}
.printing-active .day-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
}
.printing-active .day-num {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #000000 !important;
}
.printing-active .day-week {
    font-size: 0.75rem !important;
    color: #555555 !important;
}
.printing-active .day-time-badge {
    background: #e6f0fa !important;
    color: #0066cc !important;
    border: 1px solid #b3d1ff !important;
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
    margin-top: 3px !important;
    display: inline-block !important;
}
.printing-active .period-badge {
    padding: 2px 5px !important;
    font-size: 0.7rem !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
}
.printing-active .period-badge.manha {
    background: #fff8e1 !important;
    color: #b78103 !important;
    border: 1px solid #ffe082 !important;
}
.printing-active .period-badge.tarde {
    background: #fce4ec !important;
    color: #c2185b !important;
    border: 1px solid #f8bbd0 !important;
}
.printing-active .period-badge.noite {
    background: #e8eaf6 !important;
    color: #3f51b5 !important;
    border: 1px solid #c5cae9 !important;
}
.printing-active .empty-day-cell {
    color: #999999 !important;
}
.printing-active .hidden-screen {
    display: block !important;
}
.printing-active .pdf-header {
    display: block !important;
    text-align: center !important;
    margin-bottom: 24px !important;
    background: #000000 !important;
    padding: 24px !important;
    border-radius: 8px !important;
}
.printing-active .pdf-header h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--yellow) !important;
}
.printing-active .pdf-header p {
    font-size: 0.9rem !important;
    color: #ffffff !important;
}
.printing-active .pdf-logo-wrapper {
    text-align: center !important;
    margin-bottom: 12px !important;
}
.printing-active .pdf-logo-img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) !important;
}

/* Estilos para Seleção de Períodos */
.periods-checkboxes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.period-checkbox-label {
    display: block;
    position: relative;
    cursor: pointer;
    padding: 14px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    transition: all 0.2s;
}

.period-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.period-checkbox-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.period-checkbox-custom i {
    width: 20px;
    height: 20px;
}

.period-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.period-checkbox-label input:checked ~ .period-checkbox-custom {
    color: #fff;
}

.period-checkbox-label:has(input:checked) {
    background: rgba(0, 242, 254, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: var(--neon-glow-cyan);
}

/* Estilos de Horário da Escala */
.day-time-badge {
    background: rgba(108, 92, 231, 0.15);
    color: #a29bfe;
    border: 1px solid rgba(108, 92, 231, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 5px;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.admin-time-input {
    width: 100%;
    max-width: 65px;
    background: rgba(7, 9, 19, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px 6px;
    color: var(--text-primary);
    font-size: 0.75rem;
    text-align: center;
    margin-top: 6px;
    outline: none;
    transition: all 0.2s;
}

.admin-time-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: var(--neon-glow-cyan);
}

/* Etiquetas coloridas para os períodos da escala pública */
.period-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.5px;
}

.period-badge.manha {
    background: rgba(255, 159, 67, 0.15);
    color: var(--neon-amber);
    border: 1px solid rgba(255, 159, 67, 0.25);
    box-shadow: 0 0 5px rgba(255, 159, 67, 0.1);
}

.period-badge.tarde {
    background: rgba(243, 85, 136, 0.15);
    color: var(--neon-magenta);
    border: 1px solid rgba(243, 85, 136, 0.25);
    box-shadow: 0 0 5px rgba(243, 85, 136, 0.1);
}

.period-badge.noite {
    background: rgba(156, 136, 255, 0.15);
    color: var(--neon-violet);
    border: 1px solid rgba(156, 136, 255, 0.25);
    box-shadow: 0 0 5px rgba(156, 136, 255, 0.1);
}

/* Custom Amarelo & Verde Neon Headings */
.card h3, 
.modal-header h3, 
.settings-section h4,
.auth-header h2 {
    color: var(--yellow) !important;
    text-shadow: 0 0 10px rgba(255, 210, 0, 0.2);
    font-family: var(--font-secondary);
}

.card h3 i, 
.modal-header h3 i, 
.auth-header i {
    color: var(--yellow) !important;
    filter: drop-shadow(0 0 6px rgba(255, 210, 0, 0.3));
}

/* Estilos do Overlay de Bloqueio do Calendário de Integrantes */
.calendar-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
    border-radius: 16px;
    animation: fadeIn 0.3s ease;
}

.calendar-lock-overlay i.lock-icon {
    width: 48px;
    height: 48px;
    color: var(--yellow);
    filter: drop-shadow(0 0 10px rgba(255, 210, 0, 0.4));
}

.calendar-lock-overlay h4 {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: none !important;
}

.calendar-lock-overlay p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.5;
}





