/**
 * =========================================================
 * ASSEC - Associação de Estudantes de Curaçá/BA
 * Design System Premium - Gradientes Minimalistas
 * =========================================================
 * LS System - CNPJ: 33.081.565/0001-08
 * CEO e Fundador: Laudinei Santana
 * =========================================================
 */

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

:root {
    /* Cores primárias - gradiente azul premium */
    --primary: #0066CC;
    --primary-light: #3385D6;
    --primary-dark: #004C99;
    --primary-gradient: linear-gradient(135deg, #0066CC 0%, #00A8E8 100%);
    --primary-gradient-soft: linear-gradient(135deg, rgba(0,102,204,0.1) 0%, rgba(0,168,232,0.1) 100%);
    
    /* Cores secundárias - verde água */
    --secondary: #00D4AA;
    --secondary-light: #33E0BF;
    --secondary-gradient: linear-gradient(135deg, #00D4AA 0%, #00B894 100%);
    
    /* Alertas */
    --success: #00C853;
    --success-bg: rgba(0,200,83,0.1);
    --warning: #FFB300;
    --warning-bg: rgba(255,179,0,0.1);
    --danger: #FF3D71;
    --danger-bg: rgba(255,61,113,0.1);
    --info: #00A8E8;
    --info-bg: rgba(0,168,232,0.1);
    
    /* Neutros */
    --bg: #F0F4F8;
    --bg-card: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --text-primary: #0A1628;
    --text-secondary: #5A6A7A;
    --text-muted: #8A9AAA;
    --border: rgba(0,102,204,0.08);
    --border-light: rgba(0,102,204,0.04);
    
    /* Sombras premium */
    --shadow-sm: 0 2px 8px rgba(0,102,204,0.06);
    --shadow: 0 8px 32px rgba(0,102,204,0.1);
    --shadow-lg: 0 16px 48px rgba(0,102,204,0.14);
    --shadow-xl: 0 24px 64px rgba(0,102,204,0.18);
    
    /* Gradientes de fundo */
    --bg-gradient: linear-gradient(145deg, #F0F4F8 0%, #E8F0F8 50%, #F5F8FC 100%);
    --card-gradient: linear-gradient(145deg, #FFFFFF 0%, #FAFCFF 100%);
    --header-gradient: linear-gradient(135deg, #0066CC 0%, #00A8E8 50%, #00D4AA 100%);
    
    /* Bordas */
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    
    /* Tipografia */
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* =========================================================
   SCROLLBAR PREMIUM
   ========================================================= */
/* Barra de rolagem */
::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:#f1f1f1;
    border-radius:var(--radius);
}

::-webkit-scrollbar-thumb{
    background:linear-gradient(
        180deg,
        var(--primary),
        var(--primary-secondary)
    );

    border-radius:var(--radius);
    border:2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover{
    background:linear-gradient(
        180deg,
        var(--primary-secondary),
        var(--primary)
    );
}

/* =========================================================
   LAYOUT PRINCIPAL
   ========================================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar-header {
    padding: 24px 20px;
    background: var(--header-gradient);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius:var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
}

.brand-text h1 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color:var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

/* Perfil na sidebar */
.sidebar-profile {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    border-radius:var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-profile img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.sidebar-profile-info h4 {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color:var(--text-primary);
}

.sidebar-profile-info span {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navegação */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 8px 16px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 2px 8px;
    border-radius:var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--primary-gradient-soft);
    color: var(--primary);
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item.active {
    background: var(--primary-gradient);
    border-radius:var(--radius);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.nav-item.active::before {
    transform: scaleY(1);
    background: rgba(255,255,255,0.5);
}

.nav-item i {
    width: 22px;
    text-align: center;
    font-size: 0.95rem;
}

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.sidebar-footer small {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.sidebar-footer .ls-signature {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================================
   CONTEÚDO PRINCIPAL
   ========================================================= */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 0;
    min-height: 100vh;
    transition: var(--transition);
}

/* Topbar · V29.31.1 FIXO GLOBAL */
:root {
    --assec-topbar-height: 70px;
    --assec-sidebar-width: 280px;
}

.topbar {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: var(--assec-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: var(--assec-sidebar-width);
    right: 0;
    width: auto;
    z-index: 1200;
    box-sizing: border-box;
    isolation: isolate;
    pointer-events: auto;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-gradient-soft);
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--primary-gradient);
    color: #fff;
}

.page-title h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color:var(--text-primary);
    letter-spacing: -0.02em;
}

.page-title span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Botões da topbar */
.topbar-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}

.topbar-btn:hover {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.topbar-btn .pulse {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

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

/* =========================================================
   CONTEÚDO DA PÁGINA
   ========================================================= */
.page-content {
    padding: 32px;
    max-width: 1400px;
    margin-top: var(--assec-topbar-height);
}

/* Grid de stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-gradient);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-card.success::before { background: linear-gradient(90deg, var(--success), var(--secondary)); }
.stat-card.warning::before { background: linear-gradient(90deg, var(--warning), #FF8F00); }
.stat-card.danger::before { background: linear-gradient(90deg, var(--danger), #FF6B8A); }
.stat-card.info::before { background: linear-gradient(90deg, var(--info), var(--primary-light)); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.stat-card.success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-card.danger .stat-icon { background: var(--danger-bg); color: var(--danger); }
.stat-card.info .stat-icon { background: var(--info-bg); color: var(--info); }
.stat-card .stat-icon { background: var(--primary-gradient-soft); color: var(--primary); }

.stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* =========================================================
   CARDS
   ========================================================= */
.card,
.stat-card{
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

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

.card-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color:var(--text-primary);
}

.card-header h3 i {
    color:var(--text-primary);
    margin-right: 10px;
}

.card-body {
    padding: 28px;
}

/* =========================================================
   BOTÕES
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

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

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,102,204,0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(0,102,204,0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,212,170,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #FF6B8A);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,61,113,0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #00E676);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,200,83,0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #FFD54F);
    color: var(--text-primary);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-gradient-soft);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 10px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
}

/* =========================================================
   FLOATING ACTION BUTTON (Mensagens)
   ========================================================= */
.fabi {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
}

.fabi:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: var(--shadow-xl);
}

.fabi-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* =========================================================
   FORMS
   ========================================================= */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label span {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,102,204,0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235A6A7A' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* =========================================================
   UPLOAD COM PROGRESSO
   ========================================================= */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient-soft);
    opacity: 0;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-gradient-soft);
}

.upload-area i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 12px;
    position: relative;
}

.upload-area h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    color:var(--text-primary);
    position: relative;
}

.upload-area p {
    font-size: 0.8rem;
    color: var(--text-muted);
    position: relative;
}

/* Barra de progresso */
.progress-container {
    margin-top: 16px;
    display: none;
}

.progress-container.active {
    display: block;
}

.progress {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 8px;
    text-align: center;
}

/* Preview de upload */
.upload-preview {
    margin-top: 16px;
    padding: 16px;
    background: var(--primary-gradient-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-preview img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.upload-preview-info h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color:var(--text-primary);
}

.upload-preview-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================================
   TABELAS
   ========================================================= */
.table-container {
    overflow-x: auto;
}

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

.table thead th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--primary-gradient-soft);
}

.table tbody td {
    padding: 14px 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table .user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table .user-cell img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.table .user-cell div strong {
    color: var(--text-primary);
    font-weight: 600;
}

.table .user-cell div small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* =========================================================
   BADGES E STATUS
   ========================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #B78103; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: var(--primary-gradient-soft); color: var(--primary); }

/* =========================================================
   ALERTAS E AVISOS
   ========================================================= */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-success { background: var(--success-bg); color: #2E7D32; border-color: rgba(0,200,83,0.2); }
.alert-warning { background: var(--warning-bg); color: #B78103; border-color: rgba(255,179,0,0.2); }
.alert-danger { background: var(--danger-bg); color: #C62828; border-color: rgba(255,61,113,0.2); }
.alert-info { background: var(--info-bg); color: #0277BD; border-color: rgba(0,168,232,0.2); }

.alert-bloqueio {
    background: linear-gradient(135deg, rgba(255,61,113,0.1), rgba(255,61,113,0.05));
    border: 2px solid var(--danger);
    color: var(--danger);
    text-align: center;
    justify-content: center;
    flex-direction: column;
    padding: 32px;
}

.alert-bloqueio i {
    font-size: 3rem;
    margin-bottom: 12px;
}

.alert-bloqueio h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 8px;
    color:var(--text-primary);
}

/* =========================================================
   MODAL
   ========================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,22,40,0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-xl);
}

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

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

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color:var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--bg);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

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

/* =========================================================
   GRID SYSTEM
   ========================================================= */
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

@media (max-width: 768px) {
    .col-6, .col-4, .col-3, .col-8, .col-9 {
        grid-column: span 12;
    }
}

/* =========================================================
   PÁGINA DE LOGIN
   ========================================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-gradient);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 10;
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand .brand-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-gradient);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.login-brand h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color:var(--text-primary);
}

.login-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-container input {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.checkbox-container input:checked {
    background: var(--primary-gradient);
    border-color: var(--primary);
}

.checkbox-container input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.checkbox-container span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =========================================================
   NOTIFICAÇÕES (Sininho)
   ========================================================= */
.notificacoes-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 380px;
    background: var(--bg-card);
    border-radius:var(--radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.notificacoes-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.notif-header h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color:var(--text-primary);
}

.notif-list {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    padding: 14px 20px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
    border-radius:var(--radius);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.notif-item:hover {
    background: var(--primary-gradient-soft);
}

.notif-item.unread {
    background: var(--info-bg);
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon.info { background: var(--info-bg); color: var(--info); }
.notif-icon.success { background: var(--success-bg); color: var(--success); }
.notif-icon.warning { background: var(--warning-bg); color: var(--warning); }
.notif-icon.danger { background: var(--danger-bg); color: var(--danger); }

.notif-content h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color:var(--text-primary);
    margin-bottom: 2px;
}

.notif-content p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-content small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* =========================================================
   CARTÃO VIRTUAL
   ========================================================= */
.virtual-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.virtual-card-header {
    background: var(--header-gradient);
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.virtual-card-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg-card);
    border-radius: 50% 50% 0 0;
}

.virtual-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.virtual-card-body {
    padding: 40px 30px 30px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    transition: var(--transition);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.social-btn.whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.social-btn.instagram { background: linear-gradient(135deg, #833AB4, #E1306C, #F77737); }
.social-btn.facebook { background: linear-gradient(135deg, #1877F2, #0d5cb6); }
.social-btn.tiktok { background: linear-gradient(135deg, #000, #ff0050, #00f2ea); }

/* QR Code */
.qr-container {
    text-align: center;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-top: 20px;
}

.qr-container img {
    border-radius: var(--radius-sm);
    padding: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

/* =========================================================
   CRACHÁ EDITOR
   ========================================================= */
.cracha-preview {
    width: 320px;
    height: 200px;
    border-radius: var(--radius);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.color-picker-wrapper {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.color-option {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: var(--shadow);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 1024px) {
    :root { --assec-topbar-height: 64px; }
    .topbar {
        left: 0;
        right: 0;
        width: 100%;
        height: var(--assec-topbar-height);
    }
    .page-content {
        margin-top: var(--assec-topbar-height);
    }
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 0 16px;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 36px 24px;
        margin: 20px;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
        font-size: 1.2rem;
    }
    
    .notificacoes-dropdown {
        width: calc(100vw - 32px);
        right: -50px;
    }
    
    .cracha-preview {
        width: 280px;
        height: 175px;
    }
}

/* Overlay do menu mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

@media (max-width: 1024px) {
    .sidebar-overlay.active {
        display: block;
    }
}

/* =========================================================
   ANIMAÇÕES
   ========================================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.slide-in {
    animation: slideIn 0.4s ease forwards;
}

/* Stagger animation para listas */
.stagger-item {
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

/* PWA: convite visual existe somente dentro de login.php quando o app não está instalado. */

/* =========================================================
   PRINT STYLES
   ========================================================= */
@media print {
    .sidebar, .topbar, .fab, .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
    }
    .page-content {
        margin-top: 0 !important;
    }
}

*{
    border-radius:inherit;
}

.card,
.btn,
input,
select,
textarea,
.nav-item,
.topbar-btn,
.sidebar-profile,
.modal,
.alert,
table,
.notificacoes-dropdown,
.notif-item,
.brand-icon{
    border-radius:var(--radius)!important;
}

/* TEXTOS NO DARK MODE */
body.dark-mode .card,
body.dark-mode .card *{
    color: var(--text-primary);
}

body.dark-mode .card p,
body.dark-mode .card span,
body.dark-mode .card td,
body.dark-mode .card th,
body.dark-mode .card small{
    color: var(--text-secondary) !important;
}

body.dark-mode .stat-value{
    color:#ffffff !important;
}

body.dark-mode .stat-label{
    color:#cbd5e1 !important;
}

/* =========================================================
   V29.25 · SHELL RESPONSIVO PREMIUM
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}
button,a,input,select,textarea{touch-action:manipulation}
@media(max-width:1024px){
  body.sidebar-mobile-open{overflow:hidden}
  .main-content{width:100%;min-width:0}
  .page-content{min-width:0}
  .sidebar{width:min(88vw,330px)}
  .sidebar-nav{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .sidebar-overlay{backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
}
@media(max-width:768px){
  .page-content{padding:14px}
  .card{max-width:100%}
  .topbar{box-shadow:0 8px 26px rgba(15,23,42,.07)}
}
@media(max-width:480px){
  .page-content{padding:10px}
  .nav-item{min-height:46px}
  .sidebar-profile{padding:13px 15px}
  .sidebar-header{padding:18px 16px}
}

/* =========================================================
   V29.39.2 · MENU MOBILE SEMPRE ACIMA DO CABEÇALHO
   =========================================================
   No mobile/tablet o cabeçalho global é fixo (z-index 1200).
   O menu lateral e seu overlay precisam formar a camada superior
   enquanto estiverem abertos, inclusive sobre topbar, players e cards.
*/
@media (max-width: 1024px) {
    .sidebar-overlay {
        z-index: 2147482990 !important;
    }

    .sidebar {
        z-index: 2147483000 !important;
        isolation: isolate;
    }

    .sidebar.open {
        z-index: 2147483000 !important;
    }

    body.sidebar-mobile-open .sidebar-overlay.active {
        display: block !important;
        z-index: 2147482990 !important;
    }

    body.sidebar-mobile-open .sidebar,
    body.sidebar-mobile-open .sidebar.open {
        z-index: 2147483000 !important;
    }
}
