/* ==================== */
/* CPV Digital Web - Styles */
/* ==================== */

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

:root {
    --primary: #FFC107;
    --primary-dark: #FFA000;
    --primary-light: #FFECB3;
    --success: #4CAF50;
    --success-light: #E8F5E9;
    --error: #F44336;
    --error-light: #FFEBEE;
    --warning: #FF9800;
    --warning-light: #FFF3E0;
    --info: #2196F3;
    --info-light: #E3F2FD;
    --purple: #9C27B0;
    --purple-light: #F3E5F5;
    --cyan: #00BCD4;
    --cyan-light: #E0F7FA;
    --gray: #607D8B;
    --gray-light: #ECEFF1;
    --text: #212121;
    --text-secondary: #757575;
    --text-light: #9E9E9E;
    --background: #F5F5F5;
    --white: #FFFFFF;
    --border: #E0E0E0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-lg: 20px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Pages */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== */
/* LOGIN PAGE */
/* ==================== */

.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo-icon {
    background: var(--text);
    color: var(--primary);
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-text {
    text-align: left;
}

.logo-title {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.logo-subtitle {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.login-tabs {
    display: flex;
    background: var(--background);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label i {
    color: var(--primary-dark);
    margin-right: 4px;
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: all 0.3s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
}

.btn-primary {
    padding: 16px 24px;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

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

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

.btn-full {
    width: 100%;
}

.error-message {
    color: var(--error);
    font-size: 13px;
    text-align: center;
    padding: 10px;
    background: var(--error-light);
    border-radius: 8px;
    display: none;
}

.error-message.show {
    display: block;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-divider span {
    padding: 0 16px;
    color: var(--text-light);
    font-size: 12px;
}

.btn-validate {
    width: 100%;
    padding: 14px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

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

.login-footer {
    margin-top: 32px;
    text-align: center;
}

.stats-mini {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text);
}

.stat-mini i {
    font-size: 20px;
    margin-bottom: 4px;
    opacity: 0.8;
}

.stat-mini span {
    font-size: 20px;
    font-weight: 700;
}

.stat-mini small {
    font-size: 11px;
    opacity: 0.7;
}

.copyright {
    font-size: 11px;
    color: var(--text);
    opacity: 0.6;
}

/* ==================== */
/* VALIDAÇÃO PAGE */
/* ==================== */

.validar-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--info) 0%, #1565C0 100%);
    position: relative;
}

.btn-back-float {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.validar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.validar-icon {
    width: 80px;
    height: 80px;
    background: var(--info-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--info);
}

.validar-card h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.validar-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.input-validar {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    text-align: center;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.input-validar:focus {
    outline: none;
    border-color: var(--info);
}

.resultado-validacao {
    margin-top: 24px;
    text-align: left;
}

.resultado-valido {
    background: var(--success-light);
    border: 2px solid var(--success);
    border-radius: var(--radius);
    padding: 20px;
}

.resultado-valido .resultado-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.resultado-valido .resultado-icon {
    width: 48px;
    height: 48px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
}

.resultado-valido h4 {
    color: var(--success);
    font-size: 16px;
}

.resultado-valido p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

.resultado-dados {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resultado-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.resultado-row .label {
    color: var(--text-secondary);
}

.resultado-row .value {
    font-weight: 600;
}

.resultado-invalido {
    background: var(--error-light);
    border: 2px solid var(--error);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.resultado-invalido i {
    font-size: 48px;
    color: var(--error);
    margin-bottom: 12px;
}

.resultado-invalido h4 {
    color: var(--error);
    margin-bottom: 8px;
}

.resultado-invalido p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

/* ==================== */
/* HEADER */
/* ==================== */

.header {
    background: var(--primary);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-admin {
    background: var(--text);
}

.header-admin .logo-small {
    background: var(--primary);
    color: var(--text);
}

.header-admin .header-title {
    color: var(--white);
}

.header-admin .btn-back,
.header-admin .btn-icon,
.header-admin .btn-logout {
    color: var(--white);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-small {
    background: var(--text);
    color: var(--primary);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
}

.header-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.btn-back {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    font-size: 16px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
}

.btn-logout {
    background: rgba(0,0,0,0.1);
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
}

/* ==================== */
/* MAIN CONTENT */
/* ==================== */

.main-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* User Card */
.user-card-full {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.user-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text);
    overflow: hidden;
    flex-shrink: 0;
}

.user-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-details h2 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-cpf {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.user-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--success);
    color: var(--white);
}

.badge.ativa { background: var(--success); }
.badge.vencida { background: var(--error); }
.badge.inativa { background: var(--gray); }
.badge.proxima { background: var(--warning); }
.badge-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Alert */
.alert-danger {
    background: var(--error-light);
    border: 1px solid var(--error);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.alert-danger i {
    color: var(--error);
    font-size: 20px;
    margin-top: 2px;
}

.alert-danger strong {
    display: block;
    color: var(--error);
    margin-bottom: 4px;
}

.alert-danger p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
}

.stat-icon.blue { background: var(--info); }
.stat-icon.green { background: var(--success); }
.stat-icon.yellow { background: var(--primary); color: var(--text); }
.stat-icon.purple { background: var(--purple); }
.stat-icon.orange { background: var(--warning); }
.stat-icon.red { background: var(--error); }
.stat-icon.cyan { background: var(--cyan); }
.stat-icon.gray { background: var(--gray); }

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Section Title */
.section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.menu-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.menu-card:active {
    transform: scale(0.98);
}

.menu-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
    flex-shrink: 0;
}

.menu-icon.yellow { background: var(--primary); color: var(--text); }
.menu-icon.green { background: var(--success); }
.menu-icon.blue { background: var(--info); }
.menu-icon.purple { background: var(--purple); }

.menu-text {
    flex: 1;
}

.menu-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.menu-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

.menu-card > i {
    color: var(--text-light);
    font-size: 12px;
}

/* Info Card */
.info-card {
    background: var(--info-light);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-card > i {
    color: var(--info);
    font-size: 18px;
    margin-top: 2px;
}

.info-card strong {
    display: block;
    margin-bottom: 4px;
}

.info-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.info-card a {
    color: var(--info);
    text-decoration: none;
    font-weight: 500;
}

/* ==================== */
/* CARTEIRA CARD */
/* ==================== */

.carteira-card {
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    color: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.carteira-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.carteira-logo {
    background: var(--primary);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
}

.carteira-title h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.carteira-title p {
    font-size: 11px;
    opacity: 0.7;
}

.carteira-photo {
    width: 100px;
    height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: rgba(255,255,255,0.5);
    overflow: hidden;
}

.carteira-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carteira-info {
    margin-bottom: 20px;
}

.carteira-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}

.carteira-row:last-child {
    border-bottom: none;
}

.carteira-row .label {
    opacity: 0.7;
}

.carteira-row .value {
    font-weight: 500;
}

.carteira-status {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    background: var(--success);
}

.carteira-status.vencida { background: var(--error); }
.carteira-status.inativa { background: var(--gray); }
.carteira-status.proxima { background: var(--warning); }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-action {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
}

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

.btn-action.primary {
    background: var(--primary);
    color: var(--text);
}

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

/* ==================== */
/* CERTIFICADO */
/* ==================== */

.certificado-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 3px solid var(--primary);
}

.certificado-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--text);
}

.certificado-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.certificado-curso {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.certificado-details {
    background: var(--background);
    border-radius: var(--radius);
    padding: 16px;
}

.cert-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
}

.cert-row i {
    color: var(--primary-dark);
    width: 20px;
}

/* ==================== */
/* CURSOS LIST */
/* ==================== */

.cursos-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.summary-item {
    text-align: center;
}

.summary-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.summary-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.summary-divider {
    width: 1px;
    height: 50px;
    background: var(--border);
}

.cursos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.curso-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.curso-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.curso-nome {
    font-size: 15px;
    font-weight: 600;
}

.curso-registro {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.curso-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.curso-badge.concluido {
    background: var(--success-light);
    color: var(--success);
}

.curso-badge.pendente {
    background: var(--warning-light);
    color: var(--warning);
}

.curso-info {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.curso-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== */
/* QR CODE */
/* ==================== */

.qrcode-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.qrcode-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius);
}

.qrcode-container canvas {
    border-radius: 8px;
}

.qrcode-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.qrcode-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

.qrcode-hint {
    font-size: 12px !important;
    color: var(--text-light) !important;
    margin-top: 12px;
}

/* ==================== */
/* ADMIN */
/* ==================== */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
}

.admin-stat-icon.blue { background: var(--info); }
.admin-stat-icon.green { background: var(--success); }
.admin-stat-icon.orange { background: var(--warning); }
.admin-stat-icon.red { background: var(--error); }

.admin-stat-info {
    display: flex;
    flex-direction: column;
}

.admin-stat-number {
    font-size: 22px;
    font-weight: 700;
}

.admin-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.search-box i {
    color: var(--text-light);
    margin-right: 12px;
}

.search-box input {
    flex: 1;
    border: none;
    font-size: 14px;
    outline: none;
}

.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.admin-menu-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.admin-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.admin-menu-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
}

.admin-menu-icon.blue { background: var(--info); }
.admin-menu-icon.green { background: var(--success); }
.admin-menu-icon.purple { background: var(--purple); }
.admin-menu-icon.orange { background: var(--warning); }
.admin-menu-icon.cyan { background: var(--cyan); }
.admin-menu-icon.gray { background: var(--gray); }

.admin-menu-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.admin-menu-text p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Alunos List */
.alunos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aluno-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.aluno-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.aluno-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
}

.aluno-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aluno-info {
    flex: 1;
}

.aluno-nome {
    font-size: 15px;
    font-weight: 600;
}

.aluno-cpf {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.btn-aluno {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    transition: all 0.3s;
}

.btn-aluno.edit {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-aluno.add {
    background: var(--success-light);
    color: var(--success);
}

.btn-aluno.negative {
    background: var(--error-light);
    color: var(--error);
}

.btn-aluno.reactivate {
    background: var(--success-light);
    color: var(--success);
}

.btn-aluno.trace {
    background: var(--info-light);
    color: var(--info);
}

.btn-aluno.reemit {
    background: var(--purple-light);
    color: var(--purple);
}

/* Form Cadastrar */
.form-cadastrar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.form-section h4 {
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h4 i {
    color: var(--primary-dark);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.form-group small {
    font-size: 11px;
    color: var(--text-light);
}

/* Backup */
.backup-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.backup-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: var(--white);
}

.backup-icon.green { background: var(--success); }
.backup-icon.orange { background: var(--warning); }

.backup-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.backup-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.backup-warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.backup-warning i {
    color: var(--warning);
    font-size: 18px;
}

.backup-warning strong {
    display: block;
    color: var(--warning);
    margin-bottom: 4px;
}

.backup-warning p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ==================== */
/* LOADING & MODAL */
/* ==================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    margin-top: 16px;
    color: var(--text-secondary);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    max-width: 350px;
    width: 100%;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}

.modal-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.modal-icon.error {
    background: var(--error-light);
    color: var(--error);
}

.modal-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.modal-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.modal-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.btn-modal-primary,
.btn-modal-secondary {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-primary {
    background: var(--primary);
    color: var(--text);
    border: none;
}

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

/* ==================== */
/* RESPONSIVE */
/* ==================== */

@media (max-width: 480px) {
    .login-card {
        padding: 24px 20px;
    }
    
    .user-card-full {
        flex-direction: column;
        text-align: center;
    }
    
    .user-badges {
        justify-content: center;
    }
    
    .menu-grid,
    .admin-menu-grid,
    .stats-row,
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (min-width: 768px) {
    .admin-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
