/* ===================================================================
   WEBPLAN DESIGN SYSTEM - MAIN.CSS
   Estilo moderno, profissional e de alta fidelidade
   =================================================================== */

:root {
    /* Paleta Principal */
    --bg-app: #0b101b;
    --bg-surface: #111827;
    --bg-surface-alt: #162032;
    --bg-surface-elevated: #1e293b;
    --border-color: #24324a;
    --border-subtle: #334155;
    --header-bg: rgba(17, 24, 39, 0.85);

    /* Cores de Marca & Acentos */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.15);
    --primary-glow: rgba(37, 99, 235, 0.25);
    
    --accent: #06b6d4;
    --accent-light: rgba(6, 182, 212, 0.12);

    /* Textos */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    /* Status Semânticos */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.15);

    /* Grupos Funcionais da Planilha */
    /* Grupos Funcionais da Planilha */
    --grp-impacto-bg: #92400e;
    --grp-impacto-text: #fef3c7;
    --grp-processo-bg: #1e3a8a;
    --grp-processo-text: #dbeafe;
    --grp-problema-bg: #991b1b;
    --grp-problema-text: #fee2e2;
    --grp-tratativa-bg: #065f46;
    --grp-tratativa-text: #d1fae5;
    --grp-recorrencia-bg: #5b21b6;
    --grp-recorrencia-text: #ede9fe;

    --formula-bg: #1c273c;
    --formula-text: #93c5fd;

    --cascade-parent-text: #67e8f9;
    --cascade-child-text: #cbd5e1;

    --table-row-even-bg: rgba(17, 24, 39, 0.4);

    /* Tipografia e Raios */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Variáveis Globais de Card, Input e Tabela */
    --bg-card: #1e293b;
    --bg-card-subtle: #162032;
    --bg-input: #0f172a;
    --border-input: #334155;
    --table-head-bg: #1e293b;
    --table-row-hover: rgba(255, 255, 255, 0.035);
    --table-border: #24324a;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.2);
}

[data-theme="light"] {
    /* Paleta Principal Light - Impeccable Neutral Palette */
    --bg-app: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f8fafc;
    --bg-surface-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-card-subtle: #f8fafc;
    --bg-input: #ffffff;
    --border-input: #cbd5e1;
    --border-color: #cbd5e1;
    --border-subtle: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.95);

    /* Tabelas e Superfícies Light */
    --table-head-bg: #f1f5f9;
    --table-row-hover: #f8fafc;
    --table-border: #e2e8f0;

    /* Cores de Marca Light */
    --primary-light: rgba(37, 99, 235, 0.08);
    --primary-glow: rgba(37, 99, 235, 0.15);
    --accent-light: rgba(6, 182, 212, 0.08);

    /* Textos Light de Alto Contraste */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    /* Sombras Light */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.12);

    /* Grupos Funcionais Light */
    --grp-impacto-bg: #fef3c7;
    --grp-impacto-text: #92400e;
    --grp-processo-bg: #dbeafe;
    --grp-processo-text: #1e3a8a;
    --grp-problema-bg: #fee2e2;
    --grp-problema-text: #991b1b;
    --grp-tratativa-bg: #d1fae5;
    --grp-tratativa-text: #065f46;
    --grp-recorrencia-bg: #ede9fe;
    --grp-recorrencia-text: #5b21b6;

    --formula-bg: #f1f5f9;
    --formula-text: #0f172a;

    --cascade-parent-text: #0284c7;
    --cascade-child-text: #475569;

    --table-row-even-bg: #ffffff;
}

/* Reset básico */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header da Aplicação */
.app-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--accent);
    border-radius: 999px;
    margin-left: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

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

.nav-item.active {
    color: #60a5fa !important;
    background-color: rgba(37, 99, 235, 0.2) !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
    font-weight: 600;
}

[data-theme="light"] .nav-item {
    color: #475569;
}

[data-theme="light"] .nav-item:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

[data-theme="light"] .nav-item.active {
    color: #2563eb !important;
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 600 !important;
}

.header-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 4px 10px;
    border-radius: 999px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Área Principal */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==================== TELA A: DASHBOARD ==================== */
.dashboard-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    width: 100%;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background-color: var(--accent-light);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 720px;
    line-height: 1.6;
}

.dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
    flex-wrap: wrap;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-lg);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    flex: 1;
    max-width: 420px;
    color: var(--text-muted);
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.toolbar-stats {
    display: flex;
    gap: 0.75rem;
}

.stat-pill {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: var(--bg-surface-elevated);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.stat-pill.highlight {
    border-color: rgba(37, 99, 235, 0.35);
    background-color: var(--primary-light);
    color: #93c5fd;
}

/* Grid de Cards */
.sheets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.sheet-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.sheet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sheet-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.sheet-card:hover::before {
    opacity: 1;
}

.sheet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sheet-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.sheet-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex: 1;
}

.sheet-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.metric-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sheet-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
}

.sheet-timestamp {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==================== COMPONENTES GERAIS ==================== */

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #273549;
    border-color: #3b4d68;
}

.btn-outline {
    background: transparent;
    color: #93c5fd;
    border: 1px solid rgba(37, 99, 235, 0.4);
}

.btn-outline:hover {
    background-color: var(--primary-light);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-lg {
    padding: 0.75rem 1.4rem;
    font-size: 0.98rem;
    font-weight: 600;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
}

.badge-category {
    background-color: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-status {
    background-color: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Modais */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 580px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.modal-sm {
    max-width: 440px;
}

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

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.modal-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: #60a5fa;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #ffffff;
}

.modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.btn-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

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

/* Formulários */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.flex-1 {
    flex: 1;
}

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

.form-input, .form-textarea, .form-select {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.info-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background-color: var(--primary-light);
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: #93c5fd;
    line-height: 1.45;
}

/* Utilitários de Texto */
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.25s ease;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==================== AUTENTICAÇÃO / LOGIN ==================== */
.login-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    padding: 2.5rem 2rem;
    animation: slideUp 0.3s ease;
}

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

.login-logo-badge {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 0.35rem;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
}

.login-alert.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 42px;
}

.form-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.btn-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.login-demo-pill {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.demo-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.demo-chips {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.demo-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: monospace;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}

.demo-chip:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--primary);
    color: #ffffff;
}

.chip-role {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.chip-role.master {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.chip-role.user {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* ==================== USUÁRIO NO HEADER ==================== */
.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.user-avatar-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #ffffff;
}

.user-avatar-badge.master {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.user-avatar-badge.user {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.user-text-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-name-display {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role-pill {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.user-role-pill.master {
    color: #fbbf24;
}

.user-role-pill.user {
    color: #60a5fa;
}

[data-theme="light"] .user-profile-menu {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .user-name-display {
    color: #0f172a;
}

[data-theme="light"] .user-role-pill.master {
    color: #b45309;
}

[data-theme="light"] .user-role-pill.user {
    color: #0369a1;
}

.btn-logout {
    color: #f87171 !important;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

[data-theme="light"] .btn-logout {
    color: #dc2626 !important;
}

[data-theme="light"] .btn-logout:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}

/* ==================== PORTAL LANDING PAGE & SIDEBAR ==================== */
.portal-container {
    display: flex;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background-color: var(--bg-app);
}

body:has(.portal-container) .app-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.portal-sidebar {
    width: 275px;
    min-width: 275px;
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem 1.15rem;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    z-index: 20;
    overflow-y: auto;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
    animation: sidebarItemEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

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

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-toggle:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--primary);
}

.mobile-nav-toggle:active {
    transform: scale(0.94);
}

.mobile-nav-toggle .hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.2s ease;
}

.portal-sidebar.is-open .mobile-nav-toggle .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.portal-sidebar.is-open .mobile-nav-toggle .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.portal-sidebar.is-open .mobile-nav-toggle .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.sidebar-drawer-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.brand-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.sidebar-brand:hover .brand-logo-icon {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.sidebar-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-brand .brand-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.sidebar-brand .brand-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 0.5rem 0.6rem 0.5rem;
    animation: sidebarItemEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* Menu Items com Cascata Escalonada */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sidebar-menu .sidebar-item:nth-child(1) { animation: sidebarItemEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.14s both; }
.sidebar-menu .sidebar-item:nth-child(2) { animation: sidebarItemEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both; }
.sidebar-menu .sidebar-item:nth-child(3) { animation: sidebarItemEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both; }
.sidebar-menu .sidebar-item:nth-child(4) { animation: sidebarItemEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.26s both; }
.sidebar-menu .sidebar-item:nth-child(5) { animation: sidebarItemEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.30s both; }
.sidebar-menu .sidebar-item:nth-child(6) { animation: sidebarItemEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.34s both; }

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid transparent;
}

.sidebar-item:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.item-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.2s ease,
                color 0.2s ease,
                box-shadow 0.25s ease;
    flex-shrink: 0;
}

.sidebar-item:hover .item-icon-box {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 2px 10px var(--primary-glow);
    transform: scale(1.08);
}

@keyframes sidebarItemEntrance {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.item-icon-box.icon-planilha { color: #60a5fa; }
.item-icon-box.icon-config { color: #34d399; }
.item-icon-box.icon-extrator { color: #38bdf8; }
.item-icon-box.icon-gerencial { color: #fbbf24; }
.item-icon-box.icon-admin { color: #a78bfa; }
.item-icon-box.icon-usuarios { color: #f472b6; }

.sidebar-item .item-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.sidebar-item .item-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item .item-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item:hover .item-desc {
    color: var(--text-secondary);
}

.item-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.item-badge.primary {
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(37, 99, 235, 0.35);
}

.item-badge.master {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Sidebar Bottom */
.sidebar-bottom {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    animation: sidebarItemEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.sidebar-user-card:hover {
    border-color: var(--border-subtle);
}

.user-avatar-badge {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-user-card:hover .user-avatar-badge {
    transform: scale(1.08);
}

.sidebar-actions-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.15s ease;
}

.sidebar-action-btn:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.sidebar-action-btn:active {
    transform: scale(0.97);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-action-btn.theme-toggle:hover .theme-icon {
    transform: rotate(20deg) scale(1.15);
}

.sidebar-action-btn.theme-toggle:active .theme-icon {
    transform: rotate(180deg) scale(0.9);
}

.sidebar-action-btn.btn-sidebar-logout {
    color: #f87171;
}

.sidebar-action-btn.btn-sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Canvas / Restante da tela */
.portal-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    background: radial-gradient(circle at 50% 35%, rgba(37, 99, 235, 0.09) 0%, rgba(6, 182, 212, 0.05) 35%, transparent 70%),
                var(--bg-app);
}

/* Fundo sutil quadriculado / dot pattern */
.portal-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    opacity: 0.75;
    z-index: 2;
}

[data-theme="light"] .portal-main::before {
    background-image: radial-gradient(rgba(37, 99, 235, 0.08) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    opacity: 0.6;
}

/* ==================== APPLE LIQUID TRANSLUCENT GLASS & AMBIENT ORBS ==================== */
.ambient-liquid-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(85px);
    will-change: transform;
    opacity: 0.75;
    transition: opacity 0.5s ease;
}

.ambient-liquid-glow.orb-1 {
    width: 440px;
    height: 440px;
    top: 8%;
    left: 18%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 75%);
    animation: floatAmbientOrb1 18s ease-in-out infinite alternate;
}

.ambient-liquid-glow.orb-2 {
    width: 520px;
    height: 520px;
    bottom: 8%;
    right: 15%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, rgba(37, 99, 235, 0.08) 50%, transparent 75%);
    animation: floatAmbientOrb2 22s ease-in-out infinite alternate;
}

.ambient-liquid-glow.orb-3 {
    width: 360px;
    height: 360px;
    top: 48%;
    left: 55%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(59, 130, 246, 0.06) 50%, transparent 75%);
    animation: floatAmbientOrb3 16s ease-in-out infinite alternate;
}

[data-theme="light"] .ambient-liquid-glow.orb-1 {
    width: 480px;
    height: 480px;
    top: 5%;
    left: 16%;
    background: radial-gradient(circle, rgba(186, 230, 253, 0.85) 0%, rgba(147, 197, 253, 0.45) 50%, transparent 75%);
}

[data-theme="light"] .ambient-liquid-glow.orb-2 {
    width: 560px;
    height: 560px;
    bottom: 5%;
    right: 12%;
    background: radial-gradient(circle, rgba(224, 231, 255, 0.95) 0%, rgba(199, 210, 254, 0.5) 50%, transparent 75%);
}

[data-theme="light"] .ambient-liquid-glow.orb-3 {
    width: 400px;
    height: 400px;
    top: 46%;
    left: 52%;
    background: radial-gradient(circle, rgba(207, 250, 254, 0.75) 0%, rgba(165, 243, 252, 0.35) 55%, transparent 75%);
}

@keyframes floatAmbientOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, 35px) scale(1.08); }
}

@keyframes floatAmbientOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(35px, -30px) scale(1.06); }
}

@keyframes floatAmbientOrb3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20px, -25px) scale(0.95); }
}

.landing-showcase {
    position: relative;
    z-index: 10;
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2rem;
    padding: 3.25rem 2.75rem 2.5rem;
    background: rgba(17, 24, 39, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.65),
                0 0 50px rgba(37, 99, 235, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.09);
    animation: showcaseReveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Light Mode: Apple Liquid Translucent Glass (Efeito Vidro Líquido Apple Vértice) */
[data-theme="light"] .portal-container {
    background: linear-gradient(135deg, #eef5ff 0%, #f8fafc 45%, #eff6ff 100%) !important;
}

[data-theme="light"] .portal-main {
    background: radial-gradient(circle at 18% 18%, rgba(219, 234, 254, 0.7) 0%, transparent 45%),
                radial-gradient(circle at 85% 22%, rgba(224, 231, 255, 0.75) 0%, transparent 48%),
                radial-gradient(circle at 55% 85%, rgba(207, 250, 254, 0.6) 0%, transparent 52%),
                linear-gradient(135deg, #eef5ff 0%, #f8fafc 50%, #eff6ff 100%) !important;
}

[data-theme="light"] .portal-sidebar {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 6px 0 32px rgba(15, 23, 42, 0.04), inset -1px 0 0 rgba(255, 255, 255, 0.85) !important;
}

[data-theme="light"] .sidebar-brand {
    border-bottom: 1px solid rgba(226, 232, 240, 0.65) !important;
}

[data-theme="light"] .brand-logo-icon {
    background: linear-gradient(135deg, #0284c7, #2563eb) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
}

[data-theme="light"] .sidebar-item {
    color: #334155 !important;
    border-radius: 12px !important;
    border: 1px solid transparent !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="light"] .sidebar-item:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    color: #0f172a !important;
    transform: translateX(4px) !important;
}

[data-theme="light"] .sidebar-item:hover .item-desc {
    color: #475569 !important;
}

[data-theme="light"] .item-icon-box {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    border-radius: 10px !important;
}

[data-theme="light"] .sidebar-item:hover .item-icon-box {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

[data-theme="light"] .item-badge.primary {
    background: rgba(37, 99, 235, 0.09) !important;
    color: #1d4ed8 !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
}

[data-theme="light"] .sidebar-bottom {
    border-top: 1px solid rgba(226, 232, 240, 0.65) !important;
}

[data-theme="light"] .sidebar-user-card {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    border-radius: 14px !important;
}

[data-theme="light"] .sidebar-user-card:hover {
    border-color: rgba(37, 99, 235, 0.25) !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08) !important;
}

[data-theme="light"] .sidebar-action-btn {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
    border-radius: 10px !important;
    color: #334155 !important;
}

[data-theme="light"] .sidebar-action-btn:hover {
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
    border-color: rgba(255, 255, 255, 1) !important;
}

[data-theme="light"] .sidebar-action-btn.btn-sidebar-logout {
    color: #ef4444 !important;
}

[data-theme="light"] .sidebar-action-btn.btn-sidebar-logout:hover {
    background: rgba(254, 242, 242, 0.9) !important;
    border-color: rgba(252, 165, 165, 0.6) !important;
    color: #dc2626 !important;
}

[data-theme="light"] .sidebar-submenu {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05) !important;
}

[data-theme="light"] .sidebar-subitem:hover {
    background: rgba(37, 99, 235, 0.06) !important;
    color: #1d4ed8 !important;
}

/* Card Central Hero no Estilo Vidro Líquido Apple */
[data-theme="light"] .landing-showcase {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.58) 100%) !important;
    backdrop-filter: blur(36px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(210%) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 28px !important;
    box-shadow: 0 28px 64px -12px rgba(15, 23, 42, 0.08),
                0 0 1px 1.5px rgba(255, 255, 255, 0.95) inset,
                0 14px 38px -6px rgba(37, 99, 235, 0.07) !important;
    padding: 3.5rem 3rem 2.75rem !important;
}

[data-theme="light"] .landing-showcase::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
    pointer-events: none;
}

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

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

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

/* Logos & Elementos Internos com Cascata de Entrada */
.logo-torre-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.25rem 0;
    animation: heroElementFadeSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.img-logo-torre {
    max-width: 370px;
    width: 88%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.img-logo-torre:hover {
    transform: scale(1.02);
}

[data-theme="light"] .img-logo-torre {
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.12)) brightness(0.12);
}

[data-theme="light"] .img-logo-torre:hover {
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.16)) brightness(0.08);
    transform: scale(1.02);
}

.landing-divider-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 7px 18px;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: heroElementFadeSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.landing-divider-badge:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(30, 41, 59, 0.9);
}

[data-theme="light"] .landing-divider-badge {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 1);
    color: #334155;
    font-weight: 600;
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 0.82rem;
}

[data-theme="light"] .landing-divider-badge:hover {
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Radar Ping Operacional */
.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--success);
    position: relative;
    box-shadow: 0 0 8px var(--success);
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background-color: var(--success);
    opacity: 0.7;
    animation: radarPing 2.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes radarPing {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    70% {
        transform: scale(2.6);
        opacity: 0;
    }
    100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

/* Logo Grupo Cosampa - Canto Inferior Direito */
.portal-corner-logo {
    position: absolute;
    bottom: 2rem;
    right: 2.5rem;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: auto;
    user-select: none;
    animation: cornerLogoEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.48s both;
}

.img-corner-cosampa {
    max-width: 210px;
    width: auto;
    max-height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35)) brightness(0) invert(1) opacity(0.85);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease;
}

[data-theme="light"] .portal-corner-logo {
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 8px 18px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .portal-corner-logo:hover {
    background: rgba(255, 255, 255, 0.88);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);
}

[data-theme="light"] .img-corner-cosampa {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06)) opacity(0.9);
}

[data-theme="light"] .img-corner-cosampa:hover {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12)) opacity(1);
}

/* Botão de Acesso Direto com Efeito de Luz / Sheen */
.landing-action-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
    animation: heroElementFadeSlide 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
}

.btn-access-sheet {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 600;
    padding: 0.95rem 2.25rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 28px -4px rgba(37, 99, 235, 0.48),
                inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.25s ease;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

/* Reflexo de luz dinâmico (Light Sheen Sweep) */
.btn-access-sheet::before {
    content: '';
    position: absolute;
    top: 0;
    left: -130%;
    width: 75%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.26),
        transparent
    );
    transform: skewX(-22deg);
    pointer-events: none;
    transition: none;
}

.btn-access-sheet:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -4px rgba(37, 99, 235, 0.62),
                inset 0 1px 0 rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.btn-access-sheet:hover::before {
    left: 170%;
    transition: left 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-access-sheet:hover .btn-arrow-icon {
    transform: translateX(5px);
}

.btn-arrow-icon {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-access-sheet:active {
    transform: scale(0.975);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: transform 0.08s ease;
}

.btn-access-sheet:focus-visible,
.sidebar-item:focus-visible,
.sidebar-action-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.landing-footer-note {
    font-size: 0.76rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    margin-top: -0.25rem;
    animation: heroElementFadeSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.46s both;
}

[data-theme="light"] .btn-access-sheet {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    border-radius: 14px !important;
    padding: 13px 28px !important;
    font-size: 0.95rem !important;
}

[data-theme="light"] .btn-access-sheet:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 16px 34px -4px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

[data-theme="light"] .btn-access-sheet:active {
    transform: translateY(0) scale(0.99) !important;
    box-shadow: 0 6px 16px -2px rgba(37, 99, 235, 0.4) !important;
}

[data-theme="light"] .landing-footer-note {
    color: #64748b !important;
    font-size: 0.76rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
}

/* Responsividade Adaptativa (Workflows /adapt - Impeccable Design) */

/* 1. Tablets e Telas Médias (769px a 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .portal-sidebar {
        width: 240px;
        min-width: 240px;
        padding: 1.25rem 0.85rem;
    }
    .portal-main {
        padding: 1.75rem 1.5rem;
    }
    .landing-showcase {
        max-width: 500px;
        padding: 2.5rem 2rem 2.25rem;
        gap: 1.75rem;
    }
    .portal-corner-logo {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    .img-corner-cosampa {
        max-width: 165px;
        max-height: 40px;
    }
}

/* 2. Dispositivos Móveis (< 768px) com Padrão Drawer e Acessibilidade Touch */
@media (max-width: 768px) {
    .portal-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Topbar Fixo e Compacto (revela o conteúdo hero imediatamente) */
    .portal-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.75rem 1.25rem;
        position: sticky;
        top: 0;
        z-index: 100;
        background: rgba(15, 23, 42, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
        overflow-y: visible;
    }

    [data-theme="light"] .portal-sidebar {
        background: rgba(255, 255, 255, 0.85) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.8) !important;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
    }

    .sidebar-brand {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        width: 100%;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    /* Drawer de Navegação Expansível */
    .sidebar-drawer-body {
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity 0.25s ease,
                    visibility 0.25s ease;
        padding: 0;
    }

    .portal-sidebar.is-open .sidebar-drawer-body {
        max-height: 80vh;
        max-height: 80dvh;
        opacity: 1;
        visibility: visible;
        padding-top: 1rem;
        padding-bottom: 0.75rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-top: 1px solid var(--border-color);
        margin-top: 0.85rem;
    }

    /* Touch Targets Acessíveis (Mínimo 44px - WCAG 2.1 AAA) */
    .sidebar-item {
        min-height: 48px;
        padding: 0.75rem 1rem;
    }

    .sidebar-logout {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    /* Área Central - Hero Front and Center */
    .portal-main {
        flex: 1;
        height: auto;
        min-height: calc(100dvh - 65px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1rem, 4vw, 1.5rem);
    }

    .landing-showcase {
        width: 100%;
        max-width: 520px;
        padding: clamp(1.75rem, 6vw, 2.5rem) clamp(1.25rem, 5vw, 2rem);
        gap: clamp(1.25rem, 4vw, 1.75rem);
        border-radius: var(--radius-lg);
        margin: auto 0;
    }

    .portal-btn-primary {
        width: 100%;
        min-height: 52px;
        padding: 0.95rem 1.5rem;
        font-size: 1rem;
        justify-content: center;
    }

    .portal-corner-logo {
        position: static;
        margin-top: clamp(1.5rem, 4vw, 2.5rem);
        margin-bottom: 0.5rem;
        justify-content: center;
        width: 100%;
    }

    .img-corner-cosampa {
        max-width: 160px;
        max-height: 40px;
    }
}

/* 3. Telas Pequenas (< 420px) - Ajustes Finos de Tipografia e Margens */
@media (max-width: 420px) {
    .portal-sidebar {
        padding: 0.65rem 0.95rem;
    }
    .brand-logo-icon {
        width: 36px;
        height: 36px;
    }
    .brand-logo-icon svg {
        width: 18px;
        height: 18px;
    }
    .brand-title {
        font-size: 0.95rem;
    }
    .brand-sub {
        font-size: 0.68rem;
    }
    .showcase-title {
        font-size: 1.6rem;
    }
    .landing-showcase {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-md);
    }
    .showcase-badge {
        font-size: 0.72rem;
        padding: 4px 10px;
    }
    .portal-btn-primary {
        font-size: 0.95rem;
        gap: 0.5rem;
    }
    .portal-main {
        padding: 1rem 0.75rem 1.5rem;
    }
}

/* Acessibilidade: Movimento Reduzido */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   MENU SUSPENSO / DROPDOWN DE ADMINISTRAÇÃO (HEADER GLOBAL & SIDEBAR)
   ========================================================================== */

/* ==========================================================================
   MENU SUSPENSO / DROPDOWN DE ADMINISTRAÇÃO (HEADER GLOBAL & SIDEBAR)
   ========================================================================== */

/* 1. Header Global Dropdown (base.html) */
.admin-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

button.nav-item.admin-dropdown-trigger {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary, #94a3b8);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    outline: none;
    transition: all 0.2s ease;
}

button.nav-item.admin-dropdown-trigger:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

button.nav-item.admin-dropdown-trigger.active {
    color: #60a5fa !important;
    background-color: rgba(37, 99, 235, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    font-weight: 600 !important;
}

.admin-dropdown-wrap:hover button.nav-item.admin-dropdown-trigger {
    color: #60a5fa;
    background-color: rgba(37, 99, 235, 0.12);
}

/* Light Mode Overrides para o Trigger do Admin */
[data-theme="light"] button.nav-item.admin-dropdown-trigger {
    color: #475569;
}

[data-theme="light"] button.nav-item.admin-dropdown-trigger:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

[data-theme="light"] button.nav-item.admin-dropdown-trigger.active {
    color: #2563eb !important;
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 600 !important;
}

[data-theme="light"] .admin-dropdown-wrap:hover button.nav-item.admin-dropdown-trigger {
    color: #2563eb;
    background-color: #eff6ff;
}

/* Menu Dropdown Flutuante */
.admin-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 250px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    padding: 8px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-dropdown-wrap:hover .admin-dropdown-menu,
.admin-dropdown-wrap:focus-within .admin-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-dropdown-header {
    padding: 8px 12px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 4px;
}

.admin-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    transition: all 0.15s ease;
    background: transparent;
}

.admin-dropdown-item:hover {
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
    transform: translateX(3px);
}

.admin-dropdown-item.active {
    background: rgba(37, 99, 235, 0.25);
    color: #60a5fa;
    font-weight: 600;
}

.admin-dropdown-subitem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 28px;
    margin: 1px 0 3px 0;
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.81rem;
    font-weight: 500;
    transition: all 0.15s ease;
    background: transparent;
    border-left: 2px solid rgba(56, 189, 248, 0.25);
}

.admin-dropdown-subitem:hover {
    background: rgba(37, 99, 235, 0.18);
    color: #38bdf8;
    border-left-color: #38bdf8;
    transform: translateX(3px);
}

.admin-dropdown-subitem.active {
    background: rgba(37, 99, 235, 0.25);
    color: #38bdf8;
    border-left-color: #38bdf8;
    font-weight: 600;
}

/* Light Mode Overrides para o Menu Dropdown */
[data-theme="light"] .admin-dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .admin-dropdown-header {
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .admin-dropdown-item {
    color: #334155 !important;
}

[data-theme="light"] .admin-dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

[data-theme="light"] .admin-dropdown-item.active {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}

[data-theme="light"] .admin-dropdown-subitem {
    color: #64748b !important;
    border-left-color: #cbd5e1 !important;
}

[data-theme="light"] .admin-dropdown-subitem:hover {
    background: #f8fafc !important;
    color: #0284c7 !important;
    border-left-color: #0284c7 !important;
}

[data-theme="light"] .admin-dropdown-subitem.active {
    background: #eff6ff !important;
    color: #0284c7 !important;
    border-left-color: #0284c7 !important;
    font-weight: 600 !important;
}

/* 2. Sidebar Dropdown no Dashboard (dashboard.html) */
.sidebar-admin-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
}

button.sidebar-item.sidebar-admin-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md, 10px);
    color: var(--text-secondary, #cbd5e1);
    outline: none;
    transition: all 0.2s ease;
}

button.sidebar-item.sidebar-admin-btn:hover,
.sidebar-admin-dropdown.is-open button.sidebar-item.sidebar-admin-btn {
    background: var(--bg-surface-elevated, #1e293b) !important;
    color: var(--text-primary, #ffffff) !important;
    border-color: var(--border-color, rgba(255, 255, 255, 0.1)) !important;
}

button.sidebar-item.sidebar-admin-btn:hover .item-icon-box,
.sidebar-admin-dropdown.is-open button.sidebar-item.sidebar-admin-btn .item-icon-box {
    color: #ffffff;
    background: var(--primary, #2563eb);
    box-shadow: 0 2px 10px var(--primary-glow, rgba(37, 99, 235, 0.3));
    transform: scale(1.08);
}

.admin-chevron-icon {
    margin-left: auto;
    color: var(--text-muted, #94a3b8);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.sidebar-admin-dropdown.is-open .admin-chevron-icon {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    flex-direction: column;
    padding: 6px 0 6px 36px;
    gap: 4px;
    animation: fadeInSubmenu 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-admin-dropdown.is-open .sidebar-submenu {
    display: flex;
}

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

.sidebar-subitem {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
    background: transparent !important;
    border: 1px solid transparent !important;
}

.sidebar-subitem:hover {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #93c5fd !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    transform: translateX(4px);
}

.subitem-pill-new {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Light Mode Overrides para o Sidebar Dropdown */
[data-theme="light"] button.sidebar-item.sidebar-admin-btn {
    color: #475569;
}

[data-theme="light"] button.sidebar-item.sidebar-admin-btn:hover,
[data-theme="light"] .sidebar-admin-dropdown.is-open button.sidebar-item.sidebar-admin-btn {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .sidebar-subitem {
    color: #475569 !important;
}

[data-theme="light"] .sidebar-subitem:hover {
    background: #f1f5f9 !important;
    color: #2563eb !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .subitem-pill-new {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}




