/* ==========================================================================
   MEGAFOR SECURITY ACADEMY - DESIGN SYSTEM & STYLESHEET
   Deep Navy & Gold (Police/Institutional) Premium Desktop Theme
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
    /* Fonts */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Theme-independent colors */
    --gold-primary: #d97706; /* Rich Amber-Gold */
    --gold-hover: #b45309;
    --gold-glow: rgba(217, 119, 6, 0.35);
    
    --emerald-primary: #10b981;
    --emerald-bg: rgba(16, 185, 129, 0.15);
    
    --red-primary: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.15);

    /* Dark Mode Defaults */
    --bg-desktop: #040810;
    --bg-panel: rgba(10, 18, 36, 0.85);
    --bg-card: rgba(17, 28, 54, 0.65);
    --bg-active-card: rgba(26, 42, 80, 0.85);
    
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --border-color: rgba(217, 119, 6, 0.2);
    --border-card: rgba(255, 255, 255, 0.08);
    --glow-bg: radial-gradient(circle at 50% 50%, rgba(217, 119, 6, 0.08), transparent 60%);
    
    --glass-blur: blur(16px);
    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* --- Light Mode Overrides --- */
body.theme-light {
    --bg-desktop: #f1f5f9;
    --bg-panel: rgba(255, 255, 255, 0.95);
    --bg-card: #ffffff;
    --bg-active-card: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;
    
    --border-color: rgba(217, 119, 6, 0.35);
    --border-card: rgba(15, 23, 42, 0.08);
    --glow-bg: radial-gradient(circle at 50% 50%, rgba(217, 119, 6, 0.05), transparent 60%);
    
    --shadow-premium: 0 15px 30px rgba(15, 23, 42, 0.1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-desktop);
    color: var(--text-primary);
    overflow: hidden;
    width: 100%;
    height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- Ambient Glow Accents --- */
.glow-accent {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.glow-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--gold-primary), transparent 70%);
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, #3b82f6, transparent 70%);
}

/* --- NATIVE DESKTOP LAYOUT --- */
.desktop-app-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 5;
    overflow: hidden;
}

/* Sidebar Styling */
.app-sidebar {
    width: 300px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 20;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
    transition: background 0.4s ease, border-color 0.4s ease;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Elegant Custom Scrollbar for Sidebar */
.app-sidebar::-webkit-scrollbar {
    width: 6px;
}
.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(217, 119, 6, 0.25);
    border-radius: 10px;
}
.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 119, 6, 0.50);
}

.sidebar-header {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    user-select: none;
}

.logo-area:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.logo-area:active {
    transform: scale(0.98);
}

.logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.logo-area h1 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.1;
    color: var(--text-primary);
}

.logo-area h1 span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Sidebar Profile Card */
.sidebar-profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 16px;
    transition: background 0.4s ease;
    flex-shrink: 0;
}

.profile-avatar-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.avatar-glow {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-primary), transparent 75%);
    z-index: -1;
    opacity: 0.7;
    animation: pulseGlow 3s infinite ease-in-out;
}

.sidebar-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
}

.sidebar-profile-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.badge-gold {
    background: linear-gradient(135deg, #78350f 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.2);
}

/* Sidebar XP Tracker */
.sidebar-xp-tracker {
    width: 100%;
    margin-top: 16px;
}

.xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.xp-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary) 0%, #fbbf24 100%);
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.5);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-text-value {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-primary);
}

/* Navigation tabs menu */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    flex-shrink: 0;
}

.nav-tab {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.nav-tab i {
    font-size: 1.1rem;
    width: 24px;
}

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

.nav-tab.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.15) 0%, rgba(217, 119, 6, 0.03) 100%);
    border-left: 3px solid var(--gold-primary);
    font-weight: 600;
}

.sidebar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--border-card);
    margin-top: 15px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.sidebar-footer {
    border-top: 1px solid var(--border-card);
    padding-top: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.sidebar-footer .small-tag {
    font-size: 0.65rem;
    color: var(--gold-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Main Viewport Container */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Persistent Header */
.main-header {
    height: 70px;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-card);
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 15;
}

.header-logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-area-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    user-select: none;
}

.logo-area-header:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.logo-area-header:active {
    transform: scale(0.98);
}

.logo-img-header {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.logo-area-header h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin: 0;
}

.header-divider {
    width: 1px;
    height: 20px;
    background: var(--border-card);
}

.header-breadcrumbs {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.breadcrumbs-active {
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-selector-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-card);
}

.lang-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    color: #ffffff;
    background: var(--gold-primary);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold-primary);
}

/* Content Dynamic Viewport scrollable container */
.content-viewport {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

/* Hide sidebar completely during login, but keep header visible for controls and logo */
body.body-login .app-sidebar {
    display: none;
}

body.body-login .main-panel .main-header {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: none;
    z-index: 25;
}

body.body-login .main-panel .main-header .header-divider,
body.body-login .main-panel .main-header .header-breadcrumbs {
    display: none;
}

/* Hide redundant header logo when sidebar is visible (logged in) */
body:not(.body-login) .main-panel .main-header .logo-area-header,
body:not(.body-login) .main-panel .main-header .header-divider {
    display: none;
}

/* --- COMMON CARD STYLES --- */
.panel-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s ease;
}

/* Info Alert box */
.info-bubble {
    background: rgba(217, 119, 6, 0.06);
    border: 1px solid rgba(217, 119, 6, 0.25);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.info-bubble p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* --- SCREEN 1: LOGIN / CENTRED AUTH CARD --- */
#screen-login {
    display: none;
    min-height: 100%;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 90px 24px 40px;
}

#screen-login.screen-active {
    display: flex;
}

.login-container {
    width: 100%;
    max-width: 460px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    text-align: center;
    margin: auto;
}

.login-branding {
    margin-bottom: 32px;
}

.emblem-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
}

.emblem-shield {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid var(--gold-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    color: var(--gold-primary);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.3);
}

.emblem-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.login-branding h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.login-branding p {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.input-group {
    text-align: left;
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 14px 18px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px var(--gold-glow);
}

.login-footer {
    margin-top: 32px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.login-footer i {
    margin-right: 4px;
}

.login-disclaimer {
    font-size: 0.65rem;
    color: var(--text-muted, #94a3b8);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin-top: 15px;
    text-align: center;
    line-height: 1.4;
}

.login-disclaimer i {
    color: var(--gold-primary, #d97706);
    margin-bottom: 4px;
    display: block;
    font-size: 0.8rem;
}

/* Buttons System */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary) 0%, #b45309 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
}

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

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

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

.btn-gold:hover:not(:disabled) {
    background: #fbbf24;
    box-shadow: 0 0 15px var(--gold-glow);
}

.btn-outline-gold {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
}

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

.btn-disabled, .btn:disabled {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.25) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

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

/* --- GENERAL VIEWPORT SCREEN ANIMATIONS --- */
.app-screen {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 40px;
    min-height: calc(100vh - 70px);
}

.app-screen.screen-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* --- SCREEN 2: HOME VIEWPORT --- */
.dashboard-greeting {
    margin-bottom: 32px;
}

.dashboard-greeting h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.dashboard-greeting p {
    color: var(--text-muted);
}

/* Main Home Split Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: start;
}

/* Stats Cards block */
.stats-blocks-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* Weekly Streak Tracker styles (Option 1) */
.weekly-streak-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-premium);
}

.weekly-day-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
    position: relative;
}

.weekly-day-cell .day-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weekly-day-cell.today .day-name {
    color: var(--gold-primary);
    font-weight: 800;
}

.weekly-day-cell .day-indicator {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid var(--border-card);
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.weekly-day-cell.active .day-indicator {
    background: rgba(217, 119, 6, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-glow);
}

.weekly-day-cell.active .day-indicator i {
    filter: drop-shadow(0 0 4px var(--gold-primary));
}

.weekly-day-cell.today:not(.active) .day-indicator {
    border: 2px dotted var(--gold-primary);
    background: rgba(217, 119, 6, 0.04);
    color: var(--gold-primary);
    animation: activeDayPulse 1.5s infinite alternate ease-in-out;
}

.weekly-day-cell.future .day-indicator {
    opacity: 0.35;
    border-style: dashed;
}

@keyframes activeDayPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.2); }
    100% { transform: scale(1.05); box-shadow: 0 0 8px rgba(217, 119, 6, 0.4); }
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-premium);
}

.stat-icon {
    font-size: 1.8rem;
    color: var(--gold-primary);
}

.stat-info span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Daily Mission Widget styling */
.daily-mission-card {
    margin-bottom: 24px;
    border: 1px solid rgba(217, 119, 6, 0.4);
    box-shadow: 0 8px 30px rgba(217, 119, 6, 0.05);
}

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

.mission-header .title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mission-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gold-primary);
}

.mission-status-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

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

.badge-unlocked {
    background: var(--emerald-bg);
    color: var(--emerald-primary);
    border: 1px solid var(--emerald-primary);
}

.mission-body h4 {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 8px;
}

.mission-body p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.mission-body p strong {
    color: var(--gold-primary);
}

.mission-action-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.mission-progress-track {
    flex: 1;
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.mission-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
    transition: width 0.5s ease;
}

.btn-pulse {
    animation: buttonPulse 2s infinite;
}

/* Timeline Activity Feed */
.activity-card {
    margin-bottom: 24px;
}

.activity-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    border-left: 3px solid var(--border-color);
    padding-left: 16px;
    padding-bottom: 4px;
}

.timeline-item .time {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-item p {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Connection Status indicator card */
.status-card {
    padding: 20px;
}

.status-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.status-indicator-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.status-indicator-row:last-child {
    margin-bottom: 0;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.indicator-dot.online {
    background: var(--emerald-primary);
    box-shadow: 0 0 10px var(--emerald-primary);
}

/* --- HELP CENTER GRID & FAQ ACCORDION --- */
.help-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.help-grid-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-light .help-grid-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.help-grid-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.theme-light .help-grid-card:hover {
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.help-grid-card.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: #6366f1;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.theme-light .help-grid-card.active {
    background: rgba(99, 102, 241, 0.06);
}

.help-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 12px;
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.help-grid-card:hover .help-card-icon {
    transform: scale(1.1);
}

.tests-color {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}
.gamification-color {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}
.missions-color {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}
.settings-color {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.help-grid-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.help-card-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.help-grid-card.active .help-card-hint {
    color: #6366f1;
    font-weight: 600;
}

.help-faq-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 20px;
    min-height: 180px;
    position: relative;
}

.theme-light .help-faq-container {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.05);
}

.help-faq-content {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.help-faq-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUpHelp 0.3s forwards;
}

.faq-item {
    margin-bottom: 16px;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item h5 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-item h5::before {
    content: "•";
    color: var(--gold-primary);
    font-size: 1.2rem;
}

.faq-item p {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-muted);
    padding-left: 14px;
}

@keyframes fadeInUpHelp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- SCREEN 3: TESTS GRID (MODULES SCREEN) --- */
.section-title {
    margin-bottom: 32px;
}

.section-title h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.section-title p {
    color: var(--text-muted);
}

.modules-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.module-desktop-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-desktop-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold-primary);
    box-shadow: 0 12px 30px rgba(217, 119, 6, 0.15);
}

.card-icon-banner {
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.8rem;
    color: #ffffff;
}

/* Module themed backgrounds */
.area-juridica .card-icon-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}
.area-socioprofesional .card-icon-banner {
    background: linear-gradient(135deg, #312e81 0%, #3730a3 100%);
}
.area-tecnicoprofesional .card-icon-banner {
    background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
}
.area-instrumental .card-icon-banner {
    background: linear-gradient(135deg, #881337 0%, #701a75 100%);
}

.card-body {
    padding: 24px;
}

.card-body h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-body p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    height: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 16px;
}

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

.badge-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 600;
}

.badge-card i {
    margin-right: 4px;
}

/* --- SCREEN 4: TEST SELECTOR LIST --- */
.selector-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.selector-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.tests-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.test-select-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 260px;
    transition: all 0.3s ease;
}

.test-select-card:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.1);
}

.test-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.test-number-badge {
    width: 44px;
    height: 44px;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid var(--gold-primary);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gold-primary);
}

.test-card-header h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.test-select-card p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-grow: 1;
}

/* --- SCREEN 5: SPLIT DESKTOP QUIZ RUNNER --- */
.quiz-desktop-split-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.quiz-content-pane {
    background: var(--bg-panel);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
}

.quiz-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.quiz-header-bar h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
}

.quiz-timer {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-progress-wrapper {
    margin-bottom: 32px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.quiz-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary) 0%, #fbbf24 100%);
    width: 0%;
    transition: width 0.4s ease;
}

.quiz-question-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.quiz-question-box p {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-primary);
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.25s ease;
}

.option-btn:hover:not(.option-disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--gold-primary);
    transform: translateX(4px);
}

.opt-letter {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.option-btn:hover:not(.option-disabled) .opt-letter {
    background: var(--gold-primary);
    color: #ffffff;
}

.opt-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Option disabled & correction states */
.option-disabled {
    cursor: not-allowed;
}

.option-correct {
    background: rgba(34, 197, 94, 0.18) !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 1px #22c55e, 0 2px 8px rgba(34, 197, 94, 0.15);
}

.option-correct .opt-letter {
    background: #22c55e !important;
    color: #ffffff !important;
}

.option-incorrect {
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444, 0 2px 8px rgba(239, 68, 68, 0.15);
}

.option-incorrect .opt-letter {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* Explanation Panel */
.explanation-box {
    background: rgba(217, 119, 6, 0.05);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    animation: slideDown 0.3s ease;
}

.explanation-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--gold-primary);
}

.explanation-title h5 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
}

.explanation-box p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Quiz Controls Bar */
.quiz-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-card);
    padding-top: 24px;
}

.flagged-active {
    background: rgba(168, 85, 247, 0.12) !important;
    border-color: #a855f7 !important;
    color: #a855f7 !important;
}

/* Quiz Right Index Sidebar */
.quiz-grid-sidebar {
    background: var(--bg-panel);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.sidebar-grid-header {
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.sidebar-grid-header h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.btn-finish {
    background: linear-gradient(135deg, var(--emerald-primary) 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.btn-finish-pulse {
    animation: finishButtonPulse 2.0s infinite;
}

@keyframes finishButtonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.sidebar-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 16px;
}

.sidebar-grid-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-grid-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
}

.grid-badge {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.badge-unanswered {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-color: var(--border-card);
}

.badge-unanswered:hover {
    border-color: var(--gold-primary);
    color: var(--text-primary);
}

.badge-current {
    box-shadow: 0 0 0 2px var(--gold-primary);
    color: #ffffff !important;
}

.badge-correct {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #22c55e !important;
    border-color: #22c55e !important;
}

.badge-incorrect {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.badge-flagged {
    background: rgba(168, 85, 247, 0.15) !important;
    color: #a855f7 !important;
    border-color: #a855f7 !important;
}

/* Exam Mode: Selected option (gold highlight, no right/wrong reveal) */
.option-selected {
    background: rgba(217, 119, 6, 0.08) !important;
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 2px var(--gold-primary), 0 4px 12px rgba(217, 119, 6, 0.15);
}

.option-selected .opt-letter {
    background: var(--gold-primary) !important;
    color: #ffffff !important;
}

/* Exam Mode: Neutral badge for answered questions in grid */
.badge-answered {
    background: rgba(217, 119, 6, 0.12) !important;
    color: var(--gold-primary) !important;
    border-color: rgba(217, 119, 6, 0.5) !important;
}

/* Exam Card in Test Selector */
.test-select-card.card-exam {
    border: 1px solid var(--gold-primary);
    background: linear-gradient(145deg, rgba(217, 119, 6, 0.06), var(--bg-panel));
    position: relative;
    overflow: hidden;
}

.test-select-card.card-exam::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08), transparent 70%);
    pointer-events: none;
}

.test-select-card.card-exam:hover {
    border-color: #f59e0b;
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.2);
}

.badge-exam {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--gold-primary), #f59e0b);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

/* Review mode button */
.btn-review {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.btn-exit-review {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    display: none;
}

.btn-exit-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

/* Review Mode Banner */
.review-mode-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 12px;
    padding: 12px 18px;
    margin-top: 16px;
    gap: 12px;
    animation: fadeInSlide 0.4s ease-out;
}

.review-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a5b4fc;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.review-banner-content i {
    font-size: 1.1rem;
    color: #818cf8;
}

.btn-exit-review-main {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.btn-exit-review-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

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

/* Exam Mode legend item */
.legend-item.legend-exam-answered {
    display: none;
}

.sidebar-grid-legend {
    border-top: 1px solid var(--border-card);
    padding-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-dot.unanswered { background: rgba(255, 255, 255, 0.1); }
.legend-dot.correct { background: #22c55e; }
.legend-dot.incorrect { background: #ef4444; }
.legend-dot.flagged { background: #a855f7; }

/* --- SCREEN 6: RESULTS CONTAINER --- */
.results-layout-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.results-header {
    margin-bottom: 32px;
}

.results-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-top: 16px;
    margin-bottom: 4px;
}

.results-details-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
    align-items: stretch;
}

.results-stats-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-badge-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-badge-block .value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
}

.stat-badge-block .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

.verdict-bar {
    border-radius: 10px;
    padding: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verdict-pass {
    background: var(--emerald-bg);
    color: var(--emerald-primary);
    border: 1px solid var(--emerald-primary);
}

.verdict-fail {
    background: var(--red-bg);
    color: var(--red-primary);
    border: 1px solid var(--red-primary);
}

.reward-xp-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.reward-xp-card i {
    font-size: 3rem;
}

.reward-meta h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.results-actions-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* --- SCREEN 7: RANKS CAREER LADDER --- */
.ranks-tree-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-panel);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
}

.rank-ladder-tree {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rank-ladder-tree::before {
    content: '';
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 24px;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.rank-node {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 2;
}

.node-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.node-content {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.node-content h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.node-level {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--gold-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.node-content p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.node-status {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Active Completed node states */
.node-completed .node-icon {
    background: rgba(217, 119, 6, 0.1);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
}

.node-completed .node-content {
    border-color: rgba(217, 119, 6, 0.25);
    background: rgba(217, 119, 6, 0.02);
}

.node-completed .node-content h4 {
    color: #ffffff;
}

.node-completed .node-content p {
    color: var(--text-primary);
}

/* --- SCREEN 8: PROFILE & AVATAR EDITOR --- */
.profile-layout-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
}

.profile-settings-card h3, .dev-settings-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 12px;
}

.avatar-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.gallery-avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
}

.gallery-avatar:hover {
    transform: scale(1.05);
    border-color: var(--border-color);
}

.gallery-avatar.active {
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-glow);
}

/* Right column layout stacking TIP Card + Console */
.profile-right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* Premium Simulated TIP License Card */
.tip-license-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 275px;
    border-radius: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #0e1e38 0%, #060c16 100%);
    border: 2px solid rgba(217, 119, 6, 0.45);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(217, 119, 6, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tip-license-card:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(-5deg);
    box-shadow: 0 25px 45px rgba(217, 119, 6, 0.2), 0 0 30px rgba(217, 119, 6, 0.1);
}

.tip-card-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        115deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.08) 45%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 55%,
        transparent 60%,
        transparent 100%
    );
    transform: translate(-50%, -50%) rotate(-30deg) translateX(-100%);
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    z-index: 5;
}

.tip-license-card:hover .tip-card-shine {
    transform: translate(-50%, -50%) rotate(-30deg) translateX(100%);
}

.tip-card-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    background-image: url('../images/logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.035;
    transform: translate(-50%, -50%) rotate(-15deg);
    pointer-events: none;
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
}

.tip-license-card:hover .tip-card-watermark {
    transform: translate(-50%, -50%) rotate(0deg) scale(1.05);
}

.tip-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
    border-bottom: 1px dashed rgba(217, 119, 6, 0.2);
    padding-bottom: 10px;
}

.tip-card-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.tip-card-header-text {
    display: flex;
    flex-direction: column;
}

.tip-card-header-text h4 {
    font-family: var(--font-heading);
    color: var(--gold-primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    margin: 0;
    text-transform: uppercase;
}

.tip-card-header-text span {
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 1px;
}

.tip-card-body {
    display: grid;
    grid-template-columns: 85px 1fr;
    gap: 16px;
    margin-top: 12px;
    align-items: center;
    z-index: 2;
}

.tip-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tip-card-avatar-wrapper {
    width: 75px;
    height: 95px;
    border-radius: 6px;
    overflow: hidden;
    border: 1.5px solid rgba(217, 119, 6, 0.4);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.tip-card-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tip-card-chip {
    width: 36px;
    height: 26px;
    background: linear-gradient(135deg, #e5c07b 0%, #b3862b 50%, #e5c07b 100%);
    border-radius: 5px;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 26, 0.4);
    overflow: hidden;
}

.tip-card-chip .chip-line {
    position: absolute;
    background: rgba(0, 0, 0, 0.25);
}

.tip-card-chip .chip-line:nth-child(1) {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
}

.tip-card-chip .chip-line:nth-child(2) {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
}

.tip-card-chip .chip-line:nth-child(3) {
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    width: 12px;
    height: 12px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.tip-card-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tip-field {
    display: flex;
    flex-direction: column;
}

.tip-field label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
    font-weight: 700;
}

.tip-value {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

#tip-card-name {
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tip-card-number {
    font-family: 'Courier New', Courier, monospace;
    color: var(--gold-primary);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-shadow: 0 0 4px var(--gold-glow);
}

.tip-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tip-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 2;
    margin-top: 8px;
}

.tip-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tip-status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Pending Status - Yellow */
.tip-status-badge.badge-pending {
    background: rgba(217, 119, 6, 0.12);
    border: 1px solid rgba(217, 119, 6, 0.35);
    color: var(--gold-primary);
}

.tip-status-badge.badge-pending .status-dot {
    background-color: var(--gold-primary);
    box-shadow: 0 0 8px var(--gold-glow);
    animation: statusPulseYellow 1.5s infinite ease-in-out;
}

/* Active Status - Emerald Green */
.tip-status-badge.badge-active {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.1);
}

.tip-status-badge.badge-active .status-dot {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    animation: statusPulseGreen 1.5s infinite ease-in-out;
}

@keyframes statusPulseYellow {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 10px var(--gold-glow); }
}

@keyframes statusPulseGreen {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 10px rgba(16, 185, 129, 0.9); }
}

/* --- LIGHT THEME ADAPTATIONS --- */
body.theme-light .tip-license-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid rgba(217, 119, 6, 0.45);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08), inset 0 0 15px rgba(217, 119, 6, 0.02);
}

body.theme-light .tip-card-watermark {
    opacity: 0.045;
}

body.theme-light .tip-card-header {
    border-bottom-color: rgba(217, 119, 6, 0.25);
}

body.theme-light .tip-card-header-text span {
    color: #475569;
}

body.theme-light .tip-field label {
    color: #64748b;
}

body.theme-light .tip-value {
    color: #0f172a;
    text-shadow: none;
}

body.theme-light .tip-card-avatar-wrapper {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(217, 119, 6, 0.5);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive columns */
@media (max-width: 992px) {
    .profile-layout-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.dev-settings-card {
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.dev-settings-card h3 {
    border-bottom-color: rgba(239, 68, 68, 0.15);
}

.dev-settings-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

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

.btn-panel {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
    justify-content: flex-start;
    padding-left: 20px;
}

.btn-panel:hover {
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.06);
}

.btn-reset {
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.btn-reset:hover {
    background: var(--red-bg) !important;
    border-color: var(--red-primary) !important;
    color: var(--red-primary) !important;
}

/* --- STUDENT MANAGEMENT PANEL STYLES --- */
.student-mgmt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.student-mgmt-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-card);
}

.student-mgmt-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s ease;
}

.student-mgmt-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.student-mgmt-row td {
    padding: 10px 12px;
    vertical-align: middle;
}

.student-mgmt-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-mgmt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.student-mgmt-name {
    font-weight: 500;
    color: var(--text-primary);
}

.current-user-tag {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--gold-primary);
    margin-left: 5px;
}

.student-mgmt-level {
    font-weight: 600;
    color: var(--gold-primary);
    margin-right: 5px;
}

.student-mgmt-rank {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.btn-mgmt {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    border-radius: 4px;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 6px;
    font-size: 0.8rem;
}

.btn-mgmt-reset:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #f59e0b;
}

.btn-mgmt-lvlup:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.btn-mgmt-delete:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* --- CELEBRATION MODAL OVERLAY --- */
.level-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 8, 16, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.level-up-card {
    background: linear-gradient(135deg, #091325 0%, #11203d 100%);
    border: 2px solid var(--gold-primary);
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(217, 119, 6, 0.25);
    position: relative;
    overflow: hidden;
    animation: zoomInModal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animated-circle-glow {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.25), transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.animated-shield {
    font-size: 3.5rem;
    color: var(--gold-primary);
    margin-bottom: 20px;
    animation: rotateScaleShield 1.5s infinite alternate ease-in-out;
}

.level-up-card h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.level-up-card .subtitle-ascenso {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.level-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 28px;
}

.level-old {
    color: var(--text-muted);
    text-decoration: line-through;
}

.level-new {
    color: var(--gold-primary);
    text-shadow: 0 0 15px rgba(217, 119, 6, 0.4);
}

.promotion-detail {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.promotion-detail p {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.promotion-detail h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--gold-primary);
    margin-top: 4px;
    margin-bottom: 8px;
}

.tip-badge {
    background: var(--emerald-bg);
    color: var(--emerald-primary);
    border: 1px solid var(--emerald-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.unlocked-message {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 32px;
}

.unlocked-message i {
    margin-right: 4px;
}

/* Confetti System */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 1500;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 12px;
    opacity: 0.8;
    animation: confettiFall 3s infinite linear;
}

/* --- MICR-ANIMATIONS & KEYFRAMES --- */
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.08); opacity: 0.8; }
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

@keyframes slideDown {
    0% { transform: translateY(-10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes zoomInModal {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes rotateScaleShield {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* Scrollbars Overrides for Desktop Viewport */
.content-viewport::-webkit-scrollbar {
    width: 8px;
}

.content-viewport::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.content-viewport::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.content-viewport::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 119, 6, 0.2);
}

/* ==========================================================================
   ROLE SELECTORS & BADGES
   ========================================================================== */
.role-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.badge-role-alumno {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-role-admin {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.role-selector-group {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-card);
    max-width: 360px;
    margin-top: 8px;
}

.role-btn {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.role-btn.active#btn-role-alumno {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.role-btn.active#btn-role-admin {
    background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
    border: 1px solid rgba(217, 119, 6, 0.3);
}

/* ==========================================================================
   FORMACIÓN PRESENCIAL (ON-SITE TRAINING)
   ========================================================================== */
.presencial-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: start;
}

.presencial-contacts-card {
    border: 1px solid var(--border-card);
}

.presencial-contacts-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 12px;
    color: var(--text-primary);
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold-primary);
    transform: translateX(4px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid var(--gold-primary);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-glow);
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.contact-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--gold-primary);
}

.contact-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.presencial-map-card {
    border: 1px solid var(--border-card);
    transition: all 0.3s ease;
}

.presencial-map-card:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px var(--gold-glow);
}

/* ==========================================================================
   COLOR UTILITY CLASSES
   ========================================================================== */
.text-gold {
    color: var(--gold-primary) !important;
}

.text-emerald {
    color: var(--emerald-primary) !important;
}

.text-red {
    color: var(--red-primary) !important;
}

.text-orange {
    color: #f97316 !important;
}

.text-purple {
    color: #a855f7 !important;
}

.text-blue {
    color: #3b82f6 !important;
}

/* ==========================================================================
   FIREBASE AUTH STYLES (Tabs, Demo badge, Logout button)
   ========================================================================== */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

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

.auth-tab.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
    text-shadow: 0 0 10px var(--gold-glow);
}

.auth-toggle-link {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-toggle-link:hover {
    color: var(--gold-primary);
    text-decoration: underline;
}

.demo-mode-badge {
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
    justify-content: center;
    box-shadow: 0 0 10px var(--gold-glow);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--gold-primary);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 var(--gold-glow);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(217, 119, 6, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
    }
}

.btn-logout {
    margin-top: 16px;
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.btn-logout i {
    font-size: 0.95rem;
}

/* Google Sign-in & Divider Styles */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider::before {
    margin-right: .75em;
}

.auth-divider::after {
    margin-left: .75em;
}

.auth-divider span {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.btn-google {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.15);
    color: #ffffff;
}

.btn-google i {
    font-size: 0.95rem;
}

/* Theme Light overrides for Google Sign-In */
body.theme-light .auth-divider {
    color: #4b5563;
}

body.theme-light .auth-divider::before,
body.theme-light .auth-divider::after {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .btn-google {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.theme-light .btn-google:hover {
    background: #f9fafb;
    border-color: var(--gold-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #000000;
}

/* ==========================================================================
   RESPONSIVE DESIGN LAYER (MOBILE & TABLET OPTIMIZATIONS)
   ========================================================================== */

/* --- TABLET AND SMALL LAPTOPS (<= 992px) --- */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .quiz-desktop-split-container {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .presencial-grid-layout {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .results-details-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .stats-blocks-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

/* --- MOBILE DEVICES (<= 768px) --- */
@media (max-width: 768px) {
    /* Main Layout Adaptations */
    .desktop-app-container {
        flex-direction: column !important;
    }

    /* Hide standard desktop elements inside sidebar, convert to bottom nav */
    .app-sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 65px !important;
        max-height: 65px !important;
        min-height: 65px !important;
        flex-direction: row !important;
        background: rgba(15, 23, 42, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-right: none !important;
        border-top: 1px solid var(--border-color) !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 9999 !important;
        overflow: hidden !important;
        border-radius: 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
    }

    body.body-login .app-sidebar {
        display: none !important;
    }

    body.theme-light .app-sidebar {
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
        border-top-color: rgba(0, 0, 0, 0.08) !important;
    }

    .sidebar-header,
    .sidebar-profile-card,
    .sidebar-footer {
        display: none !important;
    }

    /* Bottom Nav Bar alignment */
    .sidebar-nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Vertical tab icon / label design */
    .nav-tab {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        height: 100% !important;
        padding: 6px 2px !important;
        margin: 0 !important;
        border-left: none !important;
        border-top: 3px solid transparent !important;
        background: transparent !important;
        border-radius: 0 !important;
        font-family: var(--font-heading) !important;
    }

    .nav-tab span {
        font-size: 0.65rem !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        max-width: 100% !important;
    }

    .nav-tab i {
        font-size: 1.1rem !important;
        margin: 0 !important;
        width: auto !important;
    }

    .nav-tab.active {
        color: var(--gold-primary) !important;
        border-top: 3px solid var(--gold-primary) !important;
        background: rgba(217, 119, 6, 0.06) !important;
        font-weight: 600 !important;
        border-left: none !important;
    }

    body.theme-light .nav-tab.active {
        background: rgba(217, 119, 6, 0.04) !important;
    }

    /* Main viewport size adjustments */
    .main-panel {
        height: 100% !important;
        width: 100% !important;
    }

    /* Content wrapper adjustments - padding bottom prevents bottom nav overlapping */
    .content-viewport {
        padding-bottom: 80px !important;
    }

    .app-screen {
        padding: 20px 16px !important;
    }

    /* Show academy logo in the persistent header on mobile */
    body:not(.body-login) .main-panel .main-header .logo-area-header {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    body:not(.body-login) .main-panel .main-header .header-divider {
        display: block !important;
    }

    /* Quiz grids optimizations */
    .questions-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 8px !important;
    }

    /* Table responsiveness wrapper */
    table, 
    .table-container, 
    .student-mgmt-table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Additional layout alignment fixes for premium feel */
    .main-header {
        padding: 0 16px !important;
        height: 60px !important;
    }

    /* Review mode banner responsive */
    .review-mode-banner {
        flex-direction: column;
        text-align: center;
        padding: 10px 14px;
        gap: 10px;
    }

    .review-banner-content {
        font-size: 0.82rem;
    }

    .btn-exit-review-main {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.88rem;
    }
}

/* --- EXTREMELY SMALL MOBILE PHONES (<= 480px) --- */
@media (max-width: 480px) {
    /* Header layout optimization */
    .logo-area-header h2 {
        font-size: 0.9rem !important;
    }

    .header-breadcrumbs,
    .header-divider {
        display: none !important;
    }

    .stats-blocks-container {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Adjust Login Shield scale to look balanced */
    .emblem-wrapper {
        transform: scale(0.85) !important;
        margin-bottom: 10px !important;
    }

    .login-container {
        padding: 20px 16px !important;
        margin: 10px auto !important;
        width: 92% !important;
        max-width: 380px !important;
    }

    .login-branding h2 {
        font-size: 1.4rem !important;
    }

    /* Help grid mobile responsive stacking */
    .help-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* ==========================================================================
   GAMIFICATION UPGRADES: PROGRESS RING, HONOR MODAL, NEON MISSION BORDER
   ========================================================================== */

/* 1. Circular progress ring on Dashboard level card */
.level-circle-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.circular-progress-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.circular-progress-svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg); /* Start at the top */
}

.circular-progress-svg circle {
    fill: none;
    stroke-width: 6px;
}

.circular-progress-svg .progress-bg {
    stroke: var(--border-card, rgba(255, 255, 255, 0.08));
}

.circular-progress-svg .progress-bar {
    stroke: var(--gold-primary, #d97706);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary, #f8fafc);
    text-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

.stat-xp-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-primary, #fbbf24);
    background: rgba(217, 119, 6, 0.1);
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* 2. Honor Modal & Diploma Celebration Styling */
.honor-card {
    max-width: 620px;
    background: linear-gradient(135deg, #070e1b 0%, #0d1a30 100%) !important;
    border: 2px solid #fbbf24 !important;
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.25), 0 15px 50px rgba(0, 0, 0, 0.6) !important;
}

.honor-medal-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    perspective: 1000px;
}

.honor-medal {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, #ffe082 0%, #fbbf24 70%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.5);
    animation: rotateMedal 6s infinite linear;
    transform-style: preserve-3d;
}

.honor-medal-front i {
    font-size: 2.2rem;
    color: #78350f;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

@keyframes rotateMedal {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.honor-diploma {
    background: #faf8f5; /* Elegant cream parchment color */
    color: #1e293b;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

body.theme-light .honor-diploma {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.diploma-border {
    border: 3px double #d97706;
    padding: 20px;
    border-radius: 8px;
}

.diploma-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.diploma-logo {
    height: 45px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.diploma-header h5 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #0f172a;
    margin: 0;
}

.diploma-body {
    text-align: center;
    margin-bottom: 20px;
}

.diploma-text-1 {
    font-size: 0.85rem;
    color: #475569;
    font-style: italic;
    margin-bottom: 8px;
}

#honor-student-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #b45309 !important; /* Premium dark gold for diploma readability */
    margin: 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.diploma-text-2 {
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.5;
    max-width: 90%;
    margin: 0 auto;
}

.diploma-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.diploma-signature {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.sig-line {
    border-top: 1px solid #94a3b8;
    padding-top: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    min-width: 140px;
    text-align: center;
}

.sig-title {
    font-size: 0.65rem;
    color: #64748b;
    text-align: center;
}

.diploma-stamp {
    font-size: 2.2rem;
    color: #d97706;
    opacity: 0.8;
    animation: stampPulse 2s infinite alternate ease-in-out;
}

@keyframes stampPulse {
    0% { transform: scale(1) rotate(-5deg); }
    100% { transform: scale(1.05) rotate(5deg); }
}

/* 3. Neon Border & Pulsing Animation for Daily Mission (Ready to Claim) */
.daily-mission-card.ready-to-claim {
    border-color: transparent !important;
    animation: neon-pulse-border 1.5s infinite alternate ease-in-out;
}

@keyframes neon-pulse-border {
    0% {
        border-color: rgba(217, 119, 6, 0.6);
        box-shadow: 0 8px 30px rgba(217, 119, 6, 0.05), 0 0 8px rgba(217, 119, 6, 0.3), inset 0 0 6px rgba(217, 119, 6, 0.15);
    }
    100% {
        border-color: #fbbf24;
        box-shadow: 0 8px 30px rgba(217, 119, 6, 0.15), 0 0 20px rgba(251, 191, 36, 0.7), inset 0 0 12px rgba(251, 191, 36, 0.4);
    }
}

/* ==========================================================================
   PREMIUM UPGRADES: AUDIOPANEL, REVIEW FILTERS, TACTICAL SCANNER OVERLAY
   ========================================================================== */

/* 1. Mute/Audio toggle button styling */
#btn-audio-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#btn-audio-toggle:hover {
    transform: scale(1.1);
}

#btn-audio-toggle:active {
    transform: scale(0.95);
}

/* 2. Review Mode Filters Bar & Tab buttons */
.review-filters-bar {
    display: flex;
    gap: 4px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 3px;
}

.filter-tab {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    padding: 6px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.filter-tab:hover {
    color: var(--text-primary, #f8fafc);
    background: rgba(255, 255, 255, 0.05);
}

.filter-tab.active {
    color: #ffffff !important;
    background: var(--gold-primary, #d97706);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

body.theme-light .filter-tab.active {
    color: #ffffff !important;
    background: var(--gold-primary, #d97706);
}

/* 3. Tactical Loading Scanner Screen overlay */
.scanner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #020617; /* Deepest blue/black */
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.scanner-content {
    text-align: center;
    width: 90%;
    max-width: 320px;
}

.scanner-shield {
    position: relative;
    font-size: 4.5rem;
    color: var(--gold-primary, #d97706);
    margin-bottom: 24px;
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(217, 119, 6, 0.4));
}

.scanner-laser {
    position: absolute;
    top: 10%;
    left: -10%;
    width: 120%;
    height: 4px;
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24, 0 0 15px #d97706;
    animation: laserScan 2.0s infinite ease-in-out;
}

@keyframes laserScan {
    0%, 100% { top: 10%; }
    50% { top: 90%; }
}

.scanner-content h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #ffffff;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.scanner-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.scanner-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary, #d97706) 0%, #fbbf24 100%);
    transition: width 0.1s linear;
}

.scanner-content p {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-muted, #94a3b8);
}

/* --- TACTICAL ADVERTISING BANNER (ACADEMY CAMPAIGNS) --- */
.academy-ads-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(15, 20, 30, 0.95));
    border: 1px solid rgba(217, 119, 6, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-top: 10px;
    margin-bottom: 24px;
    overflow: hidden;
    padding: 20px 24px;
    height: 180px;
}

.ad-slides-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.ad-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
}

.ad-slide.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.ad-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    text-transform: uppercase;
    background: rgba(217, 119, 6, 0.15);
    color: #fbbf24;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    border: 1px solid rgba(217, 119, 6, 0.3);
    letter-spacing: 1px;
}

.ad-slide h3 {
    font-size: 1.25rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.ad-slide p {
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.5;
    margin-bottom: 0;
    max-width: calc(100% - 200px);
}

.btn-ad {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 10px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.ad-controls {
    position: absolute;
    right: 24px;
    top: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.ad-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.ad-dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.ad-dot.active {
    background: #d97706;
    transform: scale(1.25);
    box-shadow: 0 0 8px #d97706;
}

/* --- LEVEL UP COURSE AD CONTAINER --- */
.level-up-course-ad {
    margin-top: 20px;
    margin-bottom: 15px;
    background: rgba(217, 119, 6, 0.05);
    border: 1px dashed rgba(217, 119, 6, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    text-align: left;
}

.level-up-course-ad h4 {
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-up-course-ad p {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.4;
    margin-bottom: 8px;
}

.btn-level-ad {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #fff;
    background: var(--gold-primary, #d97706);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-level-ad:hover {
    background: #fbbf24;
    color: #020617;
}

.btn-level-more-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-level-more-info:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- PROFILE SPECIALTIES / CREDENTIALS PANEL --- */
.specialties-section {
    margin-top: 32px;
    width: 100%;
}

.specialties-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.specialty-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.specialty-card.status-locked {
    border-color: rgba(255, 255, 255, 0.03);
    background: rgba(255, 255, 255, 0.01);
}

.status-locked .specialty-header,
.status-locked h5,
.status-locked p {
    opacity: 0.45;
}

.specialty-card.status-pending {
    border-color: rgba(217, 119, 6, 0.3);
    background: rgba(217, 119, 6, 0.02);
}

.specialty-card.status-unlocked {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.03);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.05);
}

.specialty-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.specialty-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: var(--text-muted, #94a3b8);
}

.status-unlocked .specialty-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-pending .specialty-icon {
    background: rgba(217, 119, 6, 0.15);
    color: #f59e0b;
}

.specialty-status-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.specialty-card h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.specialty-card p {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.4;
    margin-bottom: 12px;
    flex-grow: 1;
}

.specialty-challenge {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    color: var(--text-muted, #94a3b8);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.status-unlocked .specialty-challenge {
    border-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    background: rgba(16, 185, 129, 0.05);
}

.status-pending .specialty-challenge,
.status-locked .specialty-challenge {
    border-color: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
    background: rgba(217, 119, 6, 0.05);
}

.specialty-card .btn-info-course {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.3s;
}

.specialty-card .btn-info-course:hover {
    background: rgba(217, 119, 6, 0.2);
    border-color: #d97706;
}

.status-unlocked .btn-info-course {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.status-unlocked .btn-info-course:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

/* Insignias flotantes en la TIP */
.tip-badges-container {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
}

.tip-floating-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle, #fbbf24 0%, #d97706 100%);
    border: 2px solid #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    color: #020617;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 12px rgba(217, 119, 6, 0.4);
    animation: badgeFloat 3s ease-in-out infinite alternate;
}

@keyframes badgeFloat {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-4px) rotate(5deg); }
}

@media (max-width: 768px) {
    .academy-ads-banner {
        height: auto;
        padding-bottom: 20px;
    }
    
    .ad-slides-container {
        height: auto;
        display: flex;
        flex-direction: column;
    }
    
    .ad-slide {
        position: relative;
        opacity: 0;
        display: none;
        height: auto;
    }
    
    .ad-slide.active {
        display: block;
        opacity: 1;
    }
    
    .ad-slide p {
        max-width: 100%;
        margin-bottom: 16px;
    }
    
    .btn-ad {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 12px;
    }
    
    .specialties-grid {
        grid-template-columns: 1fr;
    }
}

/* TACTICAL NEON PULSE FOR ADVERTISING CTA BUTTONS */
@keyframes ctaBreathingPulse {
    0% {
        box-shadow: 0 0 3px rgba(217, 119, 6, 0.3), inset 0 0 0px rgba(217, 119, 6, 0);
    }
    50% {
        box-shadow: 0 0 12px rgba(217, 119, 6, 0.7), inset 0 0 2px rgba(255, 255, 255, 0.2);
    }
    100% {
        box-shadow: 0 0 3px rgba(217, 119, 6, 0.3), inset 0 0 0px rgba(217, 119, 6, 0);
    }
}

.btn-level-ad,
.btn-level-ad:hover,
.specialty-card .btn-info-course,
.ad-slide .btn-ad {
    animation: ctaBreathingPulse 2.5s infinite ease-in-out;
}





