/* =====================================================
   BAMYA LEARN - Standalone Design System
   Colors defined in colors_default.css (single source of truth).
   ===================================================== */

/* =====================================================
   SELF-HOSTED INTER FONT (eliminates Google Fonts round-trip)
   ===================================================== */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/static/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =====================================================
   BASE — maps palette tokens from colors_default.css
   to the legacy variable names consumed site-wide.
   To change colors, edit colors_default.css only.
   ===================================================== */

:root {
    /* Surfaces */
    --color-surface:           var(--surface-primary);
    --color-surface-secondary: var(--surface-secondary);
    --color-surface-hover:     var(--surface-hover);
    --color-background:        var(--surface-secondary);
    --white:                   var(--surface-primary);

    /* Text */
    --color-text:              var(--text-primary);
    --color-text-secondary:    var(--text-secondary);
    --color-muted:             var(--text-muted);

    /* Borders */
    --color-border:            var(--border-default);

    /* Status / semantic */
    --color-danger:            var(--status-danger);
    --color-danger-hover:      var(--status-danger-dark);
    --color-success:           var(--status-success);
    --color-warning:           var(--status-warning);

    /* Brand aliases (all consumed elsewhere — keep until migrated) */
    --primary-color:           var(--brand-primary);
    --brand-1:                 var(--brand-primary);
    --brand-2:                 var(--brand-primary-dark);
    --blue:                    var(--brand-primary);
    --blue-dark:               var(--brand-primary-dark);
    --grad-brand:              var(--gradient-brand);

    /* Layout & effects */
    --radius-lg:               12px;
    --shadow-sm:               0 1px 3px rgba(0, 0, 0, 0.1);
    --bs-btn-close-filter:     none;

    /* Chat theming */
    --chat-coach-color:        var(--brand-primary);
    --chat-coach-color-dark:   var(--brand-primary-dark);
    --chat-coach-gradient:     var(--gradient-brand);
    --chat-user-color:         var(--brand-accent);
    --chat-user-color-dark:    var(--brand-accent-dark);
    --chat-user-gradient:      var(--gradient-accent);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--surface-primary);
    color: var(--text-body);
    padding-top: 72px;
}

/* =====================================================
   APP NAVBAR
   ===================================================== */

.app-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-default);
    height: 72px;
    display: flex;
    align-items: center;
    padding-right: calc(100vw - 100%);
}

.app-navbar .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.app-navbar .nav-logo {
    font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--surface-dark);
    text-decoration: none;
    border: 1px solid var(--surface-dark);
    padding: 0.3em 0.5em;
    border-radius: 4px;
    flex-shrink: 0;
}

.app-navbar .nav-logo:hover {
    text-decoration: none;
    color: var(--surface-dark);
}

.app-navbar .logo-bamya {
    color: var(--surface-dark);
    font-weight: 900;
}

.app-navbar .logo-learn {
    background-color: var(--surface-dark);
    color: var(--text-on-dark);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    margin-left: 0.1em;
}

.app-navbar .nav-logo img {
    height: 40px;
    max-width: 200px;
    object-fit: contain;
}

/* =====================================================
   NAV LINKS
   ===================================================== */

.app-nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-nav-links .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-nav);
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-nav-links .nav-link:hover {
    color: var(--brand-primary);
}

.app-nav-links .nav-link.active {
    color: var(--brand-primary);
    font-weight: 600;
}

/* Icon buttons (bell, etc.) */
.nav-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-nav);
    font-size: 1.1rem;
    padding: 0.4rem;
    position: relative;
    transition: color 0.2s ease;
}

.nav-icon-btn:hover {
    color: var(--brand-primary);
}

/* =====================================================
   NOTIFICATION DOT
   ===================================================== */

.notification-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-accent);
    border-radius: 50%;
    position: absolute;
    top: 4px;
    right: 4px;
}

/* =====================================================
   USER MENU BUTTON
   ===================================================== */

.user-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-default);
    background: var(--surface-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.user-menu-btn:hover {
    border-color: var(--brand-primary);
    background: rgba(15, 52, 96, 0.06);
}

.user-menu-btn i {
    font-size: 1.1rem;
    color: var(--text-nav);
}

/* =====================================================
   MOBILE NAV TOGGLE
   ===================================================== */

.app-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.app-nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--surface-dark);
}

@media (max-width: 768px) {
    .app-nav-links {
        display: none;
    }
    .app-nav-toggle {
        display: flex;
    }
    .app-nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--surface-primary);
        padding: 1rem;
        border-bottom: 1px solid var(--border-default);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* =====================================================
   DROPDOWN MENUS
   ===================================================== */

.dropdown-menu {
    min-width: 220px;
    border-radius: 12px;
    border: 1px solid var(--border-default);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    background: var(--surface-primary);
}

.dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-nav);
    transition: all 0.15s ease;
    background: none;
    margin: 1px 0;
}

.dropdown-menu .dropdown-item:hover {
    background: rgba(15, 52, 96, 0.06);
    color: var(--brand-primary);
}

.dropdown-menu .dropdown-item i {
    color: inherit;
    width: 1.5rem;
}

.dropdown-menu .dropdown-divider {
    margin: 0.35rem 0;
    border-color: var(--border-default);
}

/* =====================================================
   FLOATING BUTTONS (Admin, Buddy/Mentor)
   ===================================================== */

.floating-btn {
    position: fixed;
    right: 2rem;
    z-index: 1040;
    border: none;
    border-radius: 50px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: white;
}

.floating-admin-btn {
    bottom: 7rem;
    background: var(--gradient-brand);
}

.floating-buddy-btn {
    bottom: 2rem;
    background: var(--gradient-brand);
}

.floating-buddy-btn i {
    margin-right: 0.5rem;
}

.floating-report-btn {
    bottom: 2rem;
}

@keyframes buddy-pulsate-fast {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(15, 52, 96, 0.4); }
    50% { transform: scale(1.15); box-shadow: 0 8px 24px rgba(15, 52, 96, 0.8); }
}

.floating-buddy-btn.buddy-needs-attention {
    animation: buddy-pulsate-fast 0.8s ease-in-out infinite;
}

@media (max-width: 768px) {
    .floating-admin-btn { display: none !important; }
    .floating-buddy-btn { padding: 0.5rem 0.75rem; font-size: 1.5rem; }
    .buddy-btn-text { display: none; }
}

@media print {
    .floating-btn { display: none !important; }
}

/* =====================================================
   ADMIN DROPDOWN - Colorful style
   ===================================================== */

.admin-dropdown-menu .dropdown-item {
    border-radius: 8px;
    margin: 2px auto;
    width: 95%;
    font-weight: 600;
    color: white !important;
    background: var(--gradient-brand) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.admin-dropdown-menu .dropdown-item:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    color: white !important;
}

.admin-dropdown-menu .dropdown-item i {
    color: white !important;
}

/* =====================================================
   CONTENT CONTAINER
   ===================================================== */

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =====================================================
   APP FOOTER
   ===================================================== */

.app-footer {
    background: var(--surface-dark);
    color: var(--text-on-dark);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.app-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.app-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.app-footer .footer-brand .logo-bamya {
    font-family: 'Arial Black', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
}

.app-footer .footer-brand .logo-learn {
    background-color: var(--surface-dark);
    color: var(--text-on-dark);
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

.app-footer .footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.app-footer h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.app-footer .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.app-footer .footer-links ul li {
    margin-bottom: 0.5rem;
}

.app-footer .footer-links ul a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.app-footer .footer-links ul a:hover {
    color: var(--text-on-dark);
}

.app-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.app-footer .footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0;
}

.app-footer .report-issue-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.75rem;
    transition: color 0.2s;
}

.app-footer .report-issue-link:hover {
    color: var(--brand-accent-light);
}

@media (max-width: 768px) {
    .app-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Slim footer variant */
.app-footer-slim {
    background: var(--surface-dark);
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
    margin-top: 4rem;
    font-size: 0.8rem;
}

.app-footer-slim .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.app-footer-slim .footer-slim-brand .logo-bamya {
    font-family: 'Arial Black', sans-serif;
    font-weight: 900;
    font-size: 0.85rem;
    color: var(--text-on-dark);
}

.app-footer-slim .footer-slim-brand .logo-learn {
    color: var(--text-on-dark);
    font-size: 0.85rem;
}

.app-footer-slim .footer-slim-copy {
    color: rgba(255, 255, 255, 0.4);
}

.app-footer-slim .footer-slim-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.app-footer-slim .footer-slim-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.app-footer-slim .footer-slim-links a:hover {
    color: var(--text-on-dark);
}

@media (max-width: 576px) {
    .app-footer-slim .container {
        flex-direction: column;
        text-align: center;
    }
}

/* =====================================================
   BOOTSTRAP MODAL OVERRIDES
   ===================================================== */

.modal-content {
    border-radius: 16px;
    border: 1px solid var(--border-default);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: var(--gradient-brand-full);
    border-bottom: none;
    border-radius: 16px 16px 0 0 !important;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-on-dark);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    opacity: 0.8;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-default);
    padding: 1rem 1.5rem;
    background: var(--surface-primary);
    border-radius: 0 0 16px 16px !important;
}

.modal-body {
    background: var(--surface-primary);
}

.modal-backdrop {
    display: none !important;
}

.btn-close {
    opacity: 0.8;
    transition: opacity 0.2s;
}

.btn-close:hover {
    opacity: 1;
}

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
    border-radius: 12px;
}

/* =====================================================
   VIEW AS GROUP BANNER
   ===================================================== */

.view-as-group-banner {
    position: sticky;
    top: 72px;
    z-index: 999;
    background: var(--brand-highlight);
    color: var(--surface-dark);
    padding: 0.5rem 0;
}

/* =====================================================
   SKIP LINK
   ===================================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand-primary);
    color: var(--text-on-dark);
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* =====================================================
   BUTTON PRIMARY
   ===================================================== */

.btn-primary {
    background: var(--gradient-brand);
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary-darker));
}

/* =====================================================
   SESSIONS MANAGER
   ===================================================== */

/* Page header */
.sessions-header {
    background: var(--gradient-brand-full);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-on-dark);
}

.sessions-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-on-dark);
}

.sessions-header p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.95rem;
}

.sessions-header .combos-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.sessions-header .combos-badge strong {
    color: var(--brand-highlight);
}

/* Section cards */
.section-card {
    background: var(--surface-primary);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-default);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.section-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-card-title h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-card-title .view-all-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--brand-primary);
    transition: all 0.2s ease;
}

.section-card-title .view-all-link:hover {
    background: var(--brand-primary);
    color: var(--text-on-dark);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: -0.75rem 0 1.5rem 0;
}

/* =====================================================
   CATEGORY TILES
   ===================================================== */

.category-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 576px) {
    .category-tiles-grid {
        grid-template-columns: 1fr;
    }
}

.category-tile {
    background: var(--surface-primary);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 180px;
    position: relative;
    overflow: hidden;
    color: var(--surface-dark);
    width: 100%;
}

.category-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-tile:hover {
    border-color: var(--brand-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 52, 96, 0.15);
}

.category-tile:hover::before {
    opacity: 1;
}

.category-tile-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    color: var(--text-on-dark);
    transition: all 0.3s ease;
}

.category-tile:hover .category-tile-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.3);
}

.category-tile-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
}

.category-tile-count {
    font-size: 0.85rem;
    color: var(--brand-primary);
    background: rgba(15, 52, 96, 0.08);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* =====================================================
   LEARNING PATH TILES
   ===================================================== */

.lp-path-tile {
    text-decoration: none;
    color: inherit;
    flex-direction: row;
    align-items: center;
    text-align: left;
    min-height: auto;
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.lp-path-tile .category-tile-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    margin-bottom: 0;
    flex-shrink: 0;
}

.lp-path-tile .category-tile-title {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.lp-path-tile .category-tile-count {
    margin-top: 0;
    flex-shrink: 0;
}

.lp-path-tile .d-flex.align-items-center.gap-2 {
    flex: 1;
    min-width: 80px;
    max-width: 160px;
}

.lp-path-tile p {
    display: none;
}

.lp-paths-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* =====================================================
   LEARNING PATH DETAIL LEVELS
   ===================================================== */

.lp-detail-levels-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lp-detail-level-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.lp-detail-level-row:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.lp-detail-level-row.lp-detail-completed {
    border-left: 3px solid var(--status-success);
}

.lp-detail-level-row.lp-detail-active {
    border-left: 3px solid var(--brand-highlight);
    background: rgba(253, 182, 20, 0.08);
}

.lp-detail-level-row.lp-detail-locked {
    opacity: 0.45;
}

.lp-detail-circle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--gradient-brand);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark);
    font-weight: 700;
    font-size: 0.85rem;
}

.lp-detail-completed .lp-detail-circle {
    background: var(--gradient-success);
    border-color: rgba(34, 197, 94, 0.4);
}

.lp-detail-active .lp-detail-circle {
    background: var(--gradient-highlight);
    border-color: rgba(253, 182, 20, 0.4);
    color: var(--surface-dark);
}

.lp-detail-locked .lp-detail-circle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.lp-detail-info {
    flex: 1;
    min-width: 0;
}

.lp-detail-tool-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-on-dark);
    line-height: 1.3;
}

.lp-detail-level-name {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.1rem;
}

.lp-detail-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.25rem;
}

.lp-detail-completed .lp-detail-date {
    color: rgba(34, 197, 94, 0.7);
}

.lp-detail-active .lp-detail-date {
    color: rgba(253, 182, 20, 0.7);
}

.lp-detail-action {
    flex-shrink: 0;
}

.lp-detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.lp-badge-done {
    background: rgba(34, 197, 94, 0.15);
    color: var(--status-success);
}

.lp-badge-locked {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 576px) {
    .lp-detail-level-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .lp-detail-action {
        margin-left: auto;
    }
}

/* =====================================================
   lp-detail-level rows (rendered by learning_paths.js
   inside dark tool-tile-in-modal cards)
   ===================================================== */

.lp-progress-detail .lp-detail-level {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}

.lp-progress-detail .lp-detail-level:last-child {
    border-bottom: none;
}

.lp-progress-detail .lp-detail-level strong {
    color: var(--text-on-dark);
}

.lp-progress-detail .lp-detail-level.completed {
    color: var(--text-on-dark-success);
}

.lp-progress-detail .lp-detail-level.completed .bi {
    color: var(--text-on-dark-success) !important;
}

.lp-progress-detail .lp-detail-level.in_progress {
    color: var(--text-on-dark-info);
}

.lp-progress-detail .lp-detail-level.in_progress .bi {
    color: var(--text-on-dark-info) !important;
}

.lp-progress-detail .lp-detail-level.locked {
    opacity: 0.45;
}

.lp-progress-detail .lp-detail-level small.text-success {
    color: var(--text-on-dark-success) !important;
}

.lp-progress-detail .lp-detail-level small.text-primary {
    color: var(--text-on-dark-info) !important;
}

.lp-progress-detail .lp-detail-level .bi-circle,
.lp-progress-detail .lp-detail-level .text-muted,
.lp-progress-detail .lp-detail-level .text-secondary {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* =====================================================
   DARK SECTION CARD (Learning Paths)
   ===================================================== */

.section-card-dark {
    background: var(--gradient-brand-full);
    border: none;
    box-shadow: 0 8px 24px rgba(15, 52, 96, 0.3);
}

.section-card-dark .section-card-title h2 {
    color: var(--text-on-dark);
}

.section-card-dark .section-card-title .view-all-link {
    color: var(--text-on-dark);
    border-color: rgba(255, 255, 255, 0.4);
}

.section-card-dark .section-card-title .view-all-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-on-dark);
}

.section-card-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.section-card-dark .category-tile {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.section-card-dark .category-tile:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.section-card-dark .category-tile::before {
    background: linear-gradient(180deg, var(--brand-highlight), var(--brand-accent));
}

.section-card-dark .category-tile-title {
    color: var(--text-on-dark);
}

.section-card-dark .category-tile p {
    color: rgba(255, 255, 255, 0.6) !important;
}

.section-card-dark .category-tile-count {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.section-card-dark .progress {
    background: rgba(255, 255, 255, 0.15);
}

.section-card-dark .category-tile small {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Category containers - group type tiles under category headings */
.category-container {
    margin-bottom: 1.5rem;
}

.category-container:last-child {
    margin-bottom: 0;
}

.category-container-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.section-card-dark .empty-state i {
    color: rgba(255, 255, 255, 0.3);
}

.section-card-dark .empty-state h3 {
    color: var(--text-on-dark);
}

.section-card-dark .empty-state p {
    color: rgba(255, 255, 255, 0.6);
}

.lp-path-card {
    border: 1px solid var(--border-default);
    transition: transform 0.15s, box-shadow 0.15s;
}

.lp-path-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */

.progress {
    background: var(--border-default);
    border-radius: 4px;
}

.progress-bar.bg-success {
    background: var(--gradient-success) !important;
}

/* =====================================================
   TOOL TILES IN MODAL
   ===================================================== */

.tools-grid-in-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.tool-tile-in-modal {
    background: var(--gradient-brand-full);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.25rem;
    padding-right: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
}

.tool-tile-in-modal:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.tool-tile-in-modal.in-progress {
    border-left: 4px solid var(--brand-highlight);
}

.tool-tile-in-modal.completed {
    border-left: 4px solid var(--status-success);
}

.tool-tile-in-modal.disabled-tile {
    opacity: 0.5;
    cursor: not-allowed;
}

.tool-tile-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tool-tile-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.tool-tile-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.tool-tile-info {
    flex: 1;
    min-width: 0;
}

.tool-tile-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-on-dark);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.tool-tile-level {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Level List */
.tool-tile-levels-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.tool-tile-level-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    gap: 0.5rem;
}

.tool-tile-level-item .level-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-tile-level-item .level-icon {
    flex-shrink: 0;
    font-size: 0.9rem;
}

.tool-tile-level-item .level-icon.completed {
    color: var(--status-success);
}

.tool-tile-level-item .level-icon.in-progress {
    color: var(--brand-highlight);
}

.tool-tile-status {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tool-tile-status .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Favorite star */
.tool-tile-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.5rem;
    color: var(--brand-highlight);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-tile-favorite.not-favorite {
    opacity: 0.3;
}

.tool-tile-favorite.is-favorite {
    opacity: 1;
}

.tool-tile-favorite:hover {
    transform: scale(1.15);
    opacity: 1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Play indicator */
.tool-tile-play-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: var(--gradient-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

/* =====================================================
   CANCEL SESSION X BUTTON
   ===================================================== */

.cancel-session-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 5;
}

.cancel-session-x:hover {
    background: rgba(233, 69, 96, 0.8);
    color: var(--text-on-dark);
    transform: scale(1.15);
}

/* =====================================================
   LOADING OVERLAY
   ===================================================== */

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

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

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.loading-spinner .spinner-border {
    color: var(--brand-primary);
}

.loading-spinner p {
    color: var(--surface-dark);
    font-weight: 500;
}

/* =====================================================
   SESSION DETAILS & CANCEL MODALS
   ===================================================== */

#sessionDetailsModal .modal-title,
#sessionCancelModal .modal-title {
    color: var(--brand-primary);
}

#sessionDetailsModal .btn-primary {
    background: var(--gradient-brand);
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

#sessionDetailsModal .btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary-darker));
}

#sessionTitle {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--brand-primary);
}

/* =====================================================
   ADMIN VIEW ALERT
   ===================================================== */

.admin-view-alert {
    background: var(--gradient-brand);
    color: var(--text-on-dark);
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

.admin-view-alert strong {
    color: var(--brand-highlight);
}

/* =====================================================
   EMPTY STATE
   ===================================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-disabled);
}

.empty-state h3 {
    font-family: 'Inter', sans-serif;
    color: var(--brand-primary);
    margin-top: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
}

/* =====================================================
   TOOLBOX (Completed Sessions Library)
   ===================================================== */

.toolbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .toolbox-grid {
        grid-template-columns: 1fr;
    }
}

.toolbox-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toolbox-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.toolbox-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toolbox-card-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 12px;
    transition: transform 0.3s ease;
}

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

.toolbox-card-info h3 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-on-dark);
}

.toolbox-card-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.toolbox-card-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.toolbox-levels {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.toolbox-level {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toolbox-level:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toolbox-level-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.toolbox-level-badge {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: var(--text-on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.toolbox-level-info strong {
    color: var(--text-on-dark);
}

.toolbox-level-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

.toolbox-level-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.toolbox-level-actions .btn {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.toolbox-level-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-on-dark);
}

.toolbox-level-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-on-dark);
}

.toolbox-level-actions .discuss-buddy-btn {
    flex-basis: 100%;
    width: 100%;
}

/* Pulsating highlight for new cheat sheets */
@keyframes pulse-button {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(15, 52, 96, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(15, 52, 96, 0); }
}

.pulse-new {
    animation: pulse-button 1.5s ease-in-out infinite;
}
