/* ==========================================================================
   B2B Dispatcher Academy - Challenges System Styles
   Theme: High-fidelity Cyber-Logistics Glassmorphism & Cyberpunk Neon Dials
   ========================================================================== */

:root {
    --bg-darker: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.75);
    --border-glow: rgba(99, 102, 241, 0.12);
    --neon-blue: #0284c7;
    --neon-purple: #7c3aed;
    --neon-indigo: #4f46e5;
    --neon-green: #15803d;
    --neon-red: #e11d48;
    --neon-amber: #b45309;
    --text-muted: #475569;
    --glass-blur: blur(20px);
    --shadow-glow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* App Shell Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    background-color: var(--bg-darker);
}

/* Sidebar Styles */
.app-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    box-sizing: border-box;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}
.sidebar-logo .logo-icon {
    font-size: 28px;
}
.sidebar-logo .logo-text h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--neon-indigo);
}
.sidebar-logo .logo-text p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}
.sidebar-nav .nav-item .icon {
    width: 24px;
    text-align: center;
    display: inline-block;
    font-size: 1.1rem;
}
.sidebar-nav .nav-item:hover {
    background: rgba(0, 0, 0, 0.02);
    color: #0f172a;
}
.sidebar-nav .nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--neon-indigo);
}

.sidebar-level-widget {
    background: linear-gradient(135deg, var(--neon-indigo), var(--neon-purple));
    border-radius: 16px;
    padding: 20px;
    color: white;
    text-align: center;
    margin-top: auto;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}
.level-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}
.level-title {
    font-weight: 700;
    margin: 5px 0 10px 0;
    font-size: 1.1rem;
}
.level-badge {
    font-size: 3rem;
    margin: 10px 0;
}
.level-text {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.level-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.level-progress-bar .progress {
    height: 100%;
    background: white;
    border-radius: 10px;
}
.level-xp {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Main Content Area */
.app-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-scroll-area {
    padding: 0 40px 40px 40px;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Navigation Header (Now in main content) */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 16px 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.academy-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-indigo));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-radar {
    width: 12px;
    height: 12px;
    background: var(--neon-blue);
    border-radius: 50%;
    position: relative;
}

.logo-radar::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    animation: radarPulse 2s infinite linear;
}

@keyframes radarPulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.academy-tabs {
    display: flex;
    gap: 8px;
}

.academy-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.academy-tab-btn:hover {
    color: var(--neon-indigo);
    background: rgba(99, 102, 241, 0.05);
}

.academy-tab-btn.active {
    color: var(--neon-indigo);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.03));
    border: 1px solid var(--neon-indigo);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

/* Gamified HUD stats */
.academy-hud {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.02);
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.hud-item.streak {
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--neon-amber);
}

.hud-item.xp {
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--neon-blue);
}

.hud-item.rank {
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--neon-purple);
}

/* Daily Challenge Showcase Banner */
.daily-challenge-banner {
    background-color: #1e1b4b; /* Solid dark blue */
    border-radius: 16px;
    margin-bottom: 40px;
    display: flex;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-height: 280px;
}

.daily-image-container {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 55%;
    z-index: 1;
}

.daily-image-border {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: -4px;
    background: linear-gradient(135deg, #4f46e5, rgba(79, 70, 229, 0.2));
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 1;
}

.daily-image-wrapper {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image: url('/images/purple_truck_banner.png');
    background-size: cover;
    background-position: center;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 2;
}

.daily-image-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(30,27,75,0.7) 0%, rgba(30,27,75,0.2) 100%);
    z-index: 3;
    pointer-events: none;
}

.expires-badge {
    position: absolute;
    top: 24px; right: 24px;
    background: rgba(0, 0, 0, 0.5);
    color: #e2e8f0;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 4;
}

.carousel-dots {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 4;
}

.carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.carousel-dots .dot.active {
    background: #ffffff;
}

.daily-content {
    flex: 1;
    padding: 40px;
    z-index: 3;
    position: relative;
    max-width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.daily-content h2 {
    margin: 0 0 12px 0;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.daily-content h2 span {
    color: #ffffff !important;
}

.daily-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.2) !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.daily-tag svg {
    opacity: 0.8;
}

.daily-content p {
    margin: 0 0 28px 0;
    color: #cbd5e1 !important;
    font-size: 1.05rem;
    max-width: 500px;
    line-height: 1.6;
}

.daily-challenge-banner .buttons-row {
    display: flex;
    gap: 16px;
}

.btn-modern-accept {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: white !important;
    padding: 12px 28px !important;
    border-radius: 99px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4) !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-modern-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6) !important;
}

.btn-modern-regen {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    padding: 12px 28px !important;
    border-radius: 99px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-modern-regen:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Main Dashboard Layout - sidebar removed, full width */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.dashboard-grid > div:nth-child(2) {
    display: none;
}

/* Category Filter Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.category-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none; /* Firefox */
}

.category-filters::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.filter-chip {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.filter-chip:hover {
    color: var(--neon-indigo);
    background: rgba(99, 102, 241, 0.05);
}

.filter-chip.active {
    background: var(--neon-indigo);
    color: #fff;
    border-color: var(--neon-indigo);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Challenges Cards Grid */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Ultra-Premium Challenge Card */
.challenge-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-indigo));
    opacity: 0.75;
}

.challenge-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08);
}

.card-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.company-type {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.difficulty-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.difficulty-badge.rookie {
    background: rgba(16, 185, 129, 0.1);
    color: var(--neon-green);
}

.difficulty-badge.specialist {
    background: rgba(56, 189, 248, 0.1);
    color: var(--neon-blue);
}

.difficulty-badge.expert {
    background: rgba(245, 158, 11, 0.1);
    color: var(--neon-amber);
}

.difficulty-badge.commander {
    background: rgba(168, 85, 247, 0.1);
    color: var(--neon-purple);
}

.difficulty-badge.master {
    background: rgba(244, 63, 94, 0.1);
    color: var(--neon-red);
}

.challenge-title {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.challenge-desc {
    margin: 0 0 16px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    flex-grow: 1;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.skill-tag {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: #334155;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.card-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding-top: 14px;
    margin-top: auto;
}

.challenge-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stat-row strong {
    color: #1e293b;
}

.stat-icon {
    font-size: 0.85rem;
}

.btn-start-challenge {
    background: linear-gradient(135deg, var(--neon-indigo), var(--neon-purple));
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-start-challenge:hover {
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.4);
    transform: translateY(-1.5px);
}

/* Locked card overlays */
.challenge-card.locked {
    filter: grayscale(0.8) opacity(0.65);
    cursor: not-allowed;
    pointer-events: none;
}

.challenge-card.locked::after {
    content: '🔒 LOCKED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Sidebar Leaderboard & Achievements */
.sidebar-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: clamp(16px, 2.5vw, 24px);
    margin-bottom: 24px;
    box-shadow: var(--shadow-glow);
}

.sidebar-panel h3 {
    margin: 0 0 20px 0;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
}

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

.leaderboard-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: clamp(10px, 1.5vw, 12px) clamp(10px, 2vw, 14px);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 8px;
}

.leaderboard-item.current-user {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.08);
}

.leaderboard-rank-plain {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    width: 20px;
    text-align: center;
}

.leaderboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0 10px;
}

.avatar-purple { background: linear-gradient(135deg, #a855f7, #c084fc); }
.avatar-indigo { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.avatar-teal { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.avatar-green { background: linear-gradient(135deg, #059669, #34d399); }
.avatar-default { background: linear-gradient(135deg, #64748b, #94a3b8); }

.leaderboard-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
}

.user-rank-title {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.leaderboard-xp {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--neon-blue);
}

/* Badges Showcase Grid */
.badges-showcase {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.badge-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    position: relative;
    cursor: pointer;
}

.badge-icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition-smooth);
}

.badge-cell:hover .badge-icon-wrap {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.25);
}

.badge-cell.unlocked .badge-icon-wrap {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(99, 102, 241, 0.1));
    border-color: rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.05);
}

.badge-cell.locked {
    filter: opacity(0.25) grayscale(0.8);
}

.badge-cell span {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
}

.badge-cell.unlocked span {
    color: #0f172a;
}

/* Active Scenario Briefing Modal Overlay */
.briefing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.25s ease-out forwards;
}

.briefing-card {
    background: #ffffff;
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    width: 100%;
    max-width: 650px;
    padding: 30px;
    box-sizing: border-box;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.briefing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

.briefing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
}

.briefing-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.briefing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.briefing-panel {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 16px;
}

.briefing-panel h4 {
    margin: 0 0 10px 0;
    font-size: 0.8rem;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.briefing-panel p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #334155;
}

.char-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.char-avatar-box {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-indigo), var(--neon-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.char-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.char-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
}

.char-role-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.briefing-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-cancel:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.03);
}

/* Fullscreen Immersive Simulation Cockpit HUD */
.cockpit-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-darker);
    z-index: 90;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    animation: fadeIn 0.4s ease-out forwards;
}

.cockpit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.cockpit-title-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cockpit-title-info h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

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

.cockpit-hud-meters {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hud-pill {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
}

/* Immersive Grid Layout */
.cockpit-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr 1fr;
    gap: 20px;
    flex-grow: 1;
    overflow: hidden;
    margin-bottom: 15px;
}

/* Side Info Panel - Scenario Log */
.cockpit-side-panel {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cockpit-side-panel h3, .scoring-hud-panel h3 {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--neon-indigo);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 8px;
}

.dossier-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dossier-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dossier-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.dossier-val {
    font-size: 0.8rem;
    color: #0f172a;
    line-height: 1.4;
}

/* Central Calling Cockpit */
.cockpit-center-station {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.08) 0%, rgba(9, 13, 22, 0) 80%);
    position: relative;
}

.cockpit-phone-frame {
    width: 320px;
    height: 520px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: var(--glass-blur);
    border-radius: 36px;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 15px 50px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.cockpit-phone-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 36px;
    border: 2px solid rgba(0, 0, 0, 0.02);
    pointer-events: none;
}

/* Glowing Dynamic Waves for Call Status */
.cockpit-avatar-station {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

.cockpit-avatar-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-indigo), var(--neon-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
    margin-bottom: 16px;
    position: relative;
}

.cockpit-avatar-ring.pulsing::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    animation: avatarPulse 1.5s infinite ease-out;
}

@keyframes avatarPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.cockpit-caller-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.cockpit-call-status {
    font-size: 0.75rem;
    color: var(--neon-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot-blink {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: blink 1.2s infinite ease-in-out;
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.live-emotion-console {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 8px 16px;
    margin-top: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.live-emotion-console strong {
    color: var(--neon-blue);
    animation: textPulse 1.5s infinite ease-in-out;
}

@keyframes textPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
    }
}

.cockpit-wave-pulse {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    margin-top: 12px;
}

.cockpit-wave-pulse span {
    width: 3px;
    height: 6px;
    background: var(--neon-blue);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

.cockpit-avatar-ring.speaking+.cockpit-caller-name+.cockpit-call-status+.live-emotion-console+.cockpit-wave-pulse span {
    animation: speechWave 1s infinite alternate ease-in-out;
}

.cockpit-wave-pulse span:nth-child(2) {
    animation-delay: 0.15s;
}

.cockpit-wave-pulse span:nth-child(3) {
    animation-delay: 0.3s;
}

.cockpit-wave-pulse span:nth-child(4) {
    animation-delay: 0.45s;
}

.cockpit-wave-pulse span:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes speechWave {
    0% {
        height: 6px;
    }

    100% {
        height: 24px;
        background: var(--neon-indigo);
    }
}

/* Dynamic Performance Dials (Real-Time scoring telemetry) */
.scoring-hud-panel {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.meter-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meter-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.meter-name {
    color: #334155;
}

.meter-value {
    color: var(--neon-blue);
    font-weight: 700;
}

.meter-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.meter-bar-fill {
    height: 100%;
    width: 50%;
    /* Live computed percentage */
    background: linear-gradient(90deg, var(--neon-indigo), var(--neon-blue));
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
}

.meter-row:nth-child(2) .meter-bar-fill {
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
}

.meter-row:nth-child(3) .meter-bar-fill {
    background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
}

.meter-row:nth-child(4) .meter-bar-fill {
    background: linear-gradient(90deg, var(--neon-amber), var(--neon-blue));
}

/* Subtitle/Transcript console inside calling HUD */
.cockpit-transcript-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 10px 14px;
    box-sizing: border-box;
    font-size: 0.78rem;
    color: var(--text-muted);
    min-height: 54px;
    max-height: 180px;
    overflow-y: auto;
    text-align: center;
    line-height: 1.45;
    border-left: 4px solid var(--neon-indigo);
}

.cockpit-transcript-bar strong {
    color: #0f172a;
}

/* Call Actions buttons positioning */
.cockpit-call-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 12px;
    margin-top: 8px;
}

/* Unified Call Control Panel Styling (Horizontal Single-Row Layout) */
.cockpit-control-panel {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: auto !important;
    padding: 10px 4px 4px 4px !important;
    box-sizing: border-box !important;
}

/* Speak Button Styles - Pill shaped capsule that fills remaining horizontal width */
.cockpit-speak-btn {
    flex: 1 !important;
    height: 48px !important;
    border-radius: 24px !important;
    border: none !important;
    background: linear-gradient(135deg, var(--neon-indigo), var(--neon-blue)) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.cockpit-speak-btn:hover:not(:disabled) {
    transform: translateY(-1.5px) !important;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35) !important;
    background: linear-gradient(135deg, #4f46e5, #0284c7) !important;
}

.cockpit-speak-btn:active:not(:disabled) {
    transform: translateY(0) !important;
}

.cockpit-speak-btn .speak-btn-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    z-index: 2 !important;
    white-space: nowrap !important;
}

.cockpit-speak-btn .speak-btn-icon {
    font-size: 1.2rem !important;
    line-height: 1 !important;
}

/* Speak Button - Recording State (Pulsing Red) */
.cockpit-speak-btn.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
    animation: buttonPulse 1.2s infinite ease-in-out !important;
}

/* Speak Button - Disabled / Broker Speaking State */
.cockpit-speak-btn:disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.85 !important;
}

@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.55);
    }
}

/* Mute Button Styles - Sleek Circle button on the left */
.cockpit-mute-btn {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #334155 !important;
    font-size: 1.05rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.cockpit-mute-btn:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

.cockpit-mute-btn.active {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #ef4444 !important;
}

/* End Call Hangup Button Styles - Sleek Circle button on the right */
.cockpit-hangup-btn {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    border: none !important;
    background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2) !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.cockpit-hangup-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.3) !important;
    background: linear-gradient(135deg, #e11d48, #be123c) !important;
}

.cockpit-hangup-btn:active {
    transform: translateY(0) !important;
}

/* Interactive Suggestions drawer HUD */
.suggestions-hud-panel {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-hint-item {
    font-size: 0.75rem;
    color: #78350f;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.suggestion-hint-item::before {
    content: '💡';
}

/* Feedback Assessment Debrief Modal Portal */
.debrief-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(15px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out forwards;
}

.debrief-card {
    background: #ffffff;
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 28px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    padding: 35px;
    box-sizing: border-box;
    box-shadow: var(--shadow-glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.debrief-body {
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 25px;
}

.debrief-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.01) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 25px;
}

.debrief-score-wheel {
    text-align: center;
}

.score-number {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 0.05em;
}

.debrief-rewards-hud {
    display: flex;
    gap: 15px;
}

.reward-pill {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 10px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reward-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.reward-val.xp-val {
    color: var(--neon-blue);
}

.reward-val.streak-val {
    color: var(--neon-amber);
}

.reward-lbl {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.debrief-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.debrief-section {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 14px;
    padding: 18px;
}

.debrief-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.debrief-section h4.strengths-title {
    color: var(--neon-green);
}

.debrief-section h4.mistakes-title {
    color: var(--neon-red);
}

.debrief-section h4.suggestions-title {
    color: var(--neon-blue);
}

.debrief-section h4.practices-title {
    color: var(--neon-amber);
}

.debrief-section ul {
    margin: 0;
    padding-left: 20px;
}

.debrief-section li {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #334155;
    margin-bottom: 8px;
}

/* Badges unlock overlay popup */
.badge-unlock-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.02) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.badge-unlock-icon {
    font-size: 2.2rem;
    animation: scaleBlink 1.5s infinite alternate ease-in-out;
}

@keyframes scaleBlink {
    0% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 8px var(--neon-amber));
    }
}

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

.badge-unlock-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--neon-amber);
}

.badge-unlock-desc {
    font-size: 0.75rem;
    color: #475569;
}

.debrief-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-primary-debrief {
    background: linear-gradient(135deg, var(--neon-indigo), #4f46e5);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.15);
    transition: var(--transition-smooth);
}

.btn-primary-debrief:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.25);
}

/* Custom analytics heatmap bar display */
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.heatmap-cell {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}

.heatmap-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--neon-blue);
}

.heatmap-lbl {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-grid > div:nth-child(2) {
        position: static;
    }
}

@media (max-width: 1024px) {
    /* Lock layout strictly to device width to prevent horizontal stretching or shifting */
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .academy-wrapper {
        padding: 12px 12px 100px 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Academy Navigation & Header HUD Centering & Scaling */
    .academy-nav {
        position: fixed !important;
        top: 0;
        left: -300px;
        width: 260px !important;
        height: 100vh;
        background: var(--bg-dark);
        z-index: 1000;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
        padding: 20px !important;
        gap: 15px !important;
        transition: left 0.3s ease;
        margin: 0 !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }
    .academy-nav.open {
        left: 0;
    }
    .mobile-header {
        display: flex !important;
        align-items: center;
        padding: 15px;
        background: var(--bg-dark);
        color: white;
        font-size: 20px;
        z-index: 999;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    .academy-wrapper {
        padding-top: 70px !important;
    }
    .hamburger {
        cursor: pointer;
        margin-right: 15px;
        padding: 5px;
    }
    .academy-nav .hamburger {
        display: block !important;
        align-self: flex-end;
    }
    
    .academy-logo {
        width: 100% !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
        margin-bottom: 4px !important;
    }
    
    .academy-tabs {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    
    .academy-tab-btn {
        flex: 1 1 45% !important;
        min-width: 110px !important;
        padding: 8px 10px !important;
        font-size: 0.75rem !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    
    .academy-hud {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important; /* Allow stats badges to wrap dynamically on narrow screens */
        justify-content: center !important;
        gap: 6px !important;
        margin-top: 6px !important;
    }
    
    .hud-item {
        flex: 1 1 auto !important;
        justify-content: center !important;
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    /* Daily Challenge Banner Full Scaling (Prevents Button & Content Clipping) */
    .daily-challenge-banner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
        padding: 20px 16px !important;
        margin-bottom: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .daily-content h2 {
        font-size: 1.15rem !important;
        line-height: 1.4 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    
    .daily-content p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        font-weight: 500 !important;
    }
    
    /* Centered, full-width actions block for Daily Challenge Buttons */
    .daily-challenge-banner > div:last-child {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        margin-top: 8px !important;
    }
    
    .daily-challenge-banner > div:last-child button {
        width: 100% !important;
        margin: 0 !important;
        padding: 12px !important;
        font-size: 0.8rem !important;
        box-sizing: border-box !important;
    }

    /* Section Header and Horizontal Scrolling Filters */
    .section-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .section-header h3 {
        font-size: 1.15rem !important;
        text-align: center !important;
    }
    

    .category-filters {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 4px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    


    /* Challenge Cards Grid & Footers */
    .challenges-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .challenge-card {
        min-height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px !important;
    }

    /* Completed achievements and activity lists */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .sidebar-panel {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px !important;
    }

    .badges-showcase {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    
    .badge-icon-wrap {
        width: 42px !important;
        height: 42px !important;
        font-size: 1.1rem !important;
    }
    
    .badge-cell span {
        font-size: 0.6rem !important;
    }

    /* Dynamic Immersive Simulation Cockpit HUD */
    .cockpit-wrapper {
        padding: 10px;
        overflow-y: auto;
    }
    .cockpit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    .cockpit-hud-meters {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    .cockpit-hud-meters .hud-pill {
        flex: 1;
        text-align: center;
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    .cockpit-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        overflow-y: visible;
        display: flex;
        flex-direction: column;
    }
    .cockpit-side-panel {
        order: 2;
        max-height: none;
    }
    .cockpit-center-station {
        order: 1;
        padding: 10px 0;
    }
    .scoring-hud-panel {
        order: 3;
        max-height: none;
    }
    .cockpit-phone-frame {
        width: 100%;
        max-width: 350px;
        height: 480px;
        border-radius: 24px;
        padding: 12px;
    }
    .cockpit-avatar-station {
        margin-top: 10px;
    }
    .cockpit-avatar-ring {
        width: 70px;
        height: 70px;
        font-size: 2.2rem;
    }
    .cockpit-wave-pulse {
        margin-top: 5px;
    }
    .cockpit-transcript-bar {
        font-size: 0.75rem;
        padding: 8px 12px;
        margin: 10px 0;
    }

    /* Briefing Modals */
    .briefing-card {
        padding: 20px;
        border-radius: 16px;
        max-height: 95vh;
        overflow-y: auto;
    }
    .briefing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .briefing-header h2 {
        font-size: 1.25rem;
    }
    .briefing-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .briefing-actions {
        flex-direction: column;
        gap: 10px;
    }
    .briefing-actions button {
        width: 100%;
    }

    /* Debrief Assessment Modals */
    .debrief-card {
        padding: 20px;
        border-radius: 20px;
        max-height: 95vh;
    }
    .debrief-hero {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        text-align: center;
    }
    .debrief-rewards-hud {
        width: 100%;
        justify-content: center;
    }
    .debrief-sections-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .debrief-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .badges-showcase {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .cockpit-phone-frame {
        max-width: 100%;
        height: 460px;
    }
    .cockpit-control-panel {
        padding: 4px 6px 8px 6px;
        gap: 8px;
    }
    .cockpit-speak-btn {
        height: 44px;
        font-size: 0.85rem;
        border-radius: 12px;
    }
    .cockpit-secondary-actions {
        gap: 8px;
    }
    .cockpit-mute-btn, .cockpit-hangup-btn {
        height: 38px;
        font-size: 0.8rem;
        border-radius: 10px;
    }
}

/* Premium Glassmorphic cadet profile registration modal */
.profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out forwards;
}

.profile-modal-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15), 0 0 30px rgba(99, 102, 241, 0.1);
    animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

.profile-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
}

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

.profile-modal-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--neon-indigo);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 99px;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 10px;
}

.profile-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.profile-modal-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

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

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

.profile-form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.profile-form-group input {
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 0.9rem;
    color: #0f172a;
    transition: var(--transition-smooth);
    width: 100%;
    box-sizing: border-box;
}

.profile-form-group input:focus {
    outline: none;
    border-color: var(--neon-indigo);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.btn-profile-submit {
    background: linear-gradient(135deg, var(--neon-indigo), #4f46e5);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-profile-submit:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}