/* =============================================
   CRAI PWA — Design System "Verde Água"
   Apple-Inspired · Mobile-First · Teal/Mint
   ============================================= */

/* ---------- GOOGLE FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ---------- CSS TOKENS ---------- */
:root {
    /* Primary Teal */
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-darker: #115e59;
    --primary-light: #14b8a6;
    --primary-bg: #ccfbf1;
    --primary-bg-subtle: #f0fdfa;

    /* Neutral Palette */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-placeholder: #cbd5e1;

    /* Backgrounds */
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-input: #f1f5f9;

    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows (Ultra-diffused iOS style) */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.03);
    --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.06), 0 12px 48px rgba(0, 0, 0, 0.04);
    --shadow-bottom-nav: 0 -1px 20px rgba(0, 0, 0, 0.06);
    --shadow-btn: 0 2px 8px rgba(13, 148, 136, 0.25);

    /* Radii */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Spacing */
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-nav-h: 72px;
    --spacing-x: 20px;
    --spacing-y: 24px;

    /* Category Gradient Map */
    --grad-aqua: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 50%, #34d399 100%);
    --grad-ocean: linear-gradient(135deg, #a5f3fc 0%, #67e8f9 50%, #22d3ee 100%);
    --grad-peach: linear-gradient(135deg, #fed7aa 0%, #fdba74 50%, #fb923c 100%);
    --grad-rose: linear-gradient(135deg, #fecdd3 0%, #fda4af 50%, #fb7185 100%);
    --grad-lavender: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 50%, #a78bfa 100%);
    --grad-sky: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 50%, #38bdf8 100%);
    --grad-amber: linear-gradient(135deg, #fde68a 0%, #fcd34d 50%, #fbbf24 100%);
    --grad-teal: linear-gradient(135deg, #99f6e4 0%, #5eead4 50%, #2dd4bf 100%);

    /* Status colors */
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100dvh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- APP SHELL ---------- */
.app-content {
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
    min-height: 100dvh;
}

/* ---------- TOP HEADER (Public) ---------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px var(--spacing-x);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
}

.app-header .header-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.app-header .header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition);
}

.app-header .header-icon:hover {
    background: var(--bg-input);
}

/* ---------- BOTTOM NAVIGATION ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-bottom-nav);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 1000;
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-light);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color var(--transition);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav a i {
    font-size: 1.35rem;
    transition: transform var(--transition-spring);
}

.bottom-nav a.active {
    color: var(--primary);
}

.bottom-nav a.active i {
    transform: scale(1.1);
}

.bottom-nav a:active i {
    transform: scale(0.9);
}

/* ---------- DATE PICKER HORIZONTAL ---------- */
.date-picker-strip {
    display: flex;
    gap: 4px;
    padding: 16px var(--spacing-x) 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--bg-card);
}

.date-picker-strip::-webkit-scrollbar {
    display: none;
}

.date-chip {
    scroll-snap-align: center;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 72px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    background: transparent;
}

.date-chip .day-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 4px;
}

.date-chip .day-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-muted);
    line-height: 1;
}

.date-chip.active {
    background: var(--primary);
    box-shadow: var(--shadow-btn);
}

.date-chip.active .day-label,
.date-chip.active .day-number {
    color: #fff;
}

.date-chip.today:not(.active) .day-number {
    color: var(--primary);
}

.date-chip:active {
    transform: scale(0.93);
}

/* ---------- SECTION HEADERS ---------- */
.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 28px var(--spacing-x) 4px;
    letter-spacing: -0.03em;
}

.section-subtitle {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 20px 8px;
}

/* ---------- SESSION CARDS (Apple Style) ---------- */
.session-list {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.session-card {
    display: flex;
    align-items: stretch;
    gap: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 14px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: transform var(--transition-spring), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.session-card:active {
    transform: scale(0.98);
}

.session-thumb {
    width: 72px;
    min-height: 72px;
    border-radius: var(--radius);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: var(--grad-teal);
}

.session-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.session-info .session-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-info .session-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.session-info .session-meta i {
    font-size: 0.8rem;
    margin-right: 3px;
    color: var(--text-light);
}

/* ---------- SESSION DETAIL (SHOW PAGE) ---------- */
.detail-hero {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.detail-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg-app), transparent);
}

.detail-hero .back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    z-index: 5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition);
    text-decoration: none;
}

.detail-hero .back-btn:active {
    transform: scale(0.9);
}

.detail-hero .share-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    z-index: 5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: none;
}

.detail-body {
    padding: 0 var(--spacing-x) 40px;
    margin-top: -20px;
    position: relative;
    z-index: 2;
}

.detail-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    line-height: 1.15;
}

/* Pills / Badges */
.detail-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.pill i {
    font-size: 0.85rem;
}

.pill.pill-primary {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.pill.pill-warning {
    background: #fef3c7;
    color: #92400e;
}

/* About Section */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.detail-section p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Instructor Card */
.instructor-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.instructor-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--grad-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    font-weight: 800;
}

.instructor-info .instructor-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.instructor-info .instructor-role {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.instructor-info .instructor-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
}

.instructor-info .instructor-rating i {
    font-size: 0.75rem;
    color: #fbbf24;
}

.instructor-info .instructor-rating span {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-left: 4px;
    font-weight: 600;
}

/* Info Items (Location, What to Bring) */
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: var(--primary-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.info-item-text h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.info-item-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ---------- HOME: QUICK ACCESS BUTTONS ---------- */
.quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: var(--text-secondary);
    transition: transform var(--transition-spring), box-shadow var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    color: var(--primary);
}

.quick-btn:active {
    transform: scale(0.95);
}

.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    transition: background var(--transition);
}

.quick-btn:hover .quick-icon {
    background: var(--primary-bg);
}

.quick-btn span {
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

/* ---------- HOME: HIGHLIGHT CARDS ---------- */
.highlight-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-spring), box-shadow var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.highlight-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.highlight-card:active {
    transform: scale(0.98);
}

.highlight-img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.highlight-info {
    flex: 1;
    min-width: 0;
}

.highlight-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.highlight-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---------- HOME: EVENTS CAROUSEL ---------- */
.events-scroll {
    display: flex;
    gap: 12px;
    padding: 0 var(--spacing-x) var(--spacing-y);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.events-scroll::-webkit-scrollbar {
    display: none;
}

.event-card {
    scroll-snap-align: start;
    flex: 0 0 180px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-spring), box-shadow var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.event-card:active {
    transform: scale(0.97);
}

.event-thumb {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.event-emoji {
    font-size: 2rem;
}

.event-time {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.event-info {
    padding: 10px 12px;
}

.event-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-location {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.event-location i {
    font-size: 0.7rem;
}

/* ---------- DESKTOP PUBLIC TOP NAV ---------- */
.desktop-topnav {
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 992px) {
    .desktop-topnav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--border-light);
        height: 60px;
    }

    .desktop-topnav-inner {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 32px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .desktop-topnav-brand {
        font-size: 1.2rem;
        font-weight: 900;
        color: var(--primary-dark);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        letter-spacing: -0.03em;
    }

    .desktop-topnav-brand span {
        font-size: 1.4rem;
    }

    .desktop-topnav-links {
        display: flex;
        gap: 4px;
    }

    .desktop-topnav-links a {
        padding: 8px 18px;
        border-radius: var(--radius-sm);
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--text-muted);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all var(--transition);
    }

    .desktop-topnav-links a:hover {
        color: var(--primary);
        background: var(--primary-bg-subtle);
    }

    .desktop-topnav-links a.active {
        color: var(--primary);
        background: var(--primary-bg);
    }

    .desktop-topnav-links a i {
        font-size: 1rem;
    }

    .desktop-topnav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .btn-topnav {
        padding: 8px 20px;
        border-radius: var(--radius-sm);
        font-size: 0.85rem;
        font-weight: 700;
        color: #fff;
        background: var(--primary);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        box-shadow: var(--shadow-btn);
        transition: all var(--transition);
    }

    .btn-topnav:hover {
        background: var(--primary-dark);
        color: #fff;
        transform: translateY(-1px);
    }

    /* Push content below fixed nav */
    body:not(.admin-layout) .app-content {
        padding-top: 60px;
    }

    /* Container max-width for public content */
    body:not(.admin-layout) .app-content>*:not(.detail-hero) {
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
    }

    body:not(.admin-layout) .detail-hero {
        height: 400px;
        border-radius: 0 0 var(--radius-xl) var(--radius-xl);
        max-width: 960px;
        margin: 0 auto;
    }

    /* Bottom nav hidden on desktop */
    .bottom-nav {
        display: none;
    }

    .app-content {
        padding-bottom: 24px;
    }

    /* Quick access: 4 columns on desktop */
    .quick-btn {
        padding: 20px;
    }

    .quick-icon {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    /* Events: wider cards on desktop */
    .event-card {
        flex: 0 0 220px;
    }

    .event-thumb {
        height: 120px;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .session-list {
        max-width: 680px;
        margin: 0 auto;
        padding: 0 24px;
    }

    .date-picker-strip {
        justify-content: center;
    }

    .date-chip {
        width: 64px;
        height: 80px;
    }

    .detail-hero {
        height: 360px;
    }

    .detail-body {
        max-width: 680px;
        margin: -20px auto 0;
    }
}


.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-placeholder);
    margin-bottom: 16px;
    display: block;
}

.empty-state h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ====================================================
   ADMIN PANEL STYLES
   ==================================================== */

/* Admin uses Bootstrap's navbar, no bottom nav */
.admin-layout .bottom-nav {
    display: none;
}

.admin-layout .app-content {
    padding-bottom: 0;
}

/* Navbar (Admin only) */
.navbar-admin {
    background: var(--primary-darker);
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.navbar-admin .navbar-brand {
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.navbar-admin .navbar-brand span {
    margin-right: 6px;
    font-size: 1.25rem;
}

.navbar-admin .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
}

.navbar-admin .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-admin .nav-link i {
    margin-right: 4px;
}

/* Admin Sidebar */
.admin-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 80px;
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.admin-sidebar .nav-link:hover {
    background: var(--primary-bg-subtle);
    color: var(--primary-dark);
}

.admin-sidebar .nav-link.active {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.admin-sidebar .nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Admin Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.page-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.page-header h3 i {
    color: var(--primary);
}

/* Admin Table */
.table-crai {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table-crai .table {
    margin: 0;
}

.table-crai .table thead th {
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
}

.table-crai .table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    vertical-align: middle;
    color: var(--text-secondary);
}

.table-crai .table tbody tr:last-child td {
    border-bottom: none;
}

.table-crai .table tbody tr:hover td {
    background: var(--primary-bg-subtle);
}

/* Admin Stats Cards */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Buttons */
.btn-primary-crai {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: var(--shadow-btn);
    transition: all var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary-crai:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-primary-crai:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline-crai {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    transition: all var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline-crai:hover {
    background: var(--primary-bg-subtle);
    color: var(--primary-dark);
}

/* Forms */
.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-bg);
    outline: none;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Filter Bar */
.filter-bar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-card);
}

/* Alerts / Flash Messages */
.alert-crai {
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    animation: slideDown 0.3s ease;
}

/* Badge overrides */
.badge {
    font-weight: 700;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 24px;
    background: var(--bg-app);
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-card);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-circle {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--primary-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 12px;
}

.login-logo h2 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -0.03em;
}

.login-logo p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-crai {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    animation: toastIn 0.35s var(--transition-spring);
    max-width: 340px;
    border-left: 4px solid var(--primary);
}

.toast-crai.toast-success {
    border-left-color: var(--success);
}

.toast-crai.toast-error {
    border-left-color: var(--danger);
}

.toast-crai.toast-warning {
    border-left-color: var(--warning);
}

.toast-crai i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Print */
@media print {

    .bottom-nav,
    .navbar-admin,
    .admin-sidebar,
    .app-header,
    .btn,
    .filter-bar,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
        font-size: 12pt;
    }

    .app-content {
        padding-bottom: 0;
    }

    .table-crai {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ============ ANIMATIONS ============ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn 0.4s ease both;
}

/* Small phones */
@media (max-width: 375px) {
    .date-chip {
        width: 48px;
        height: 64px;
    }

    .date-chip .day-number {
        font-size: 1.1rem;
    }

    .session-card {
        padding: 12px;
        gap: 10px;
    }

    .session-thumb {
        width: 60px;
        min-height: 60px;
    }

    .session-info .session-name {
        font-size: 0.88rem;
    }

    .quick-btn {
        padding: 12px 6px;
    }

    .quick-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .quick-btn span {
        font-size: 0.62rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-placeholder);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---------- ADMIN MOBILE FIXES ---------- */
@media (max-width: 767.98px) {
    .offcanvas-md.admin-sidebar {
        background: var(--bg-card);
        padding: 0;
        width: 280px;
    }

    .offcanvas-md .nav-link {
        padding: 16px 20px;
        font-size: 1.05rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-light);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-header h3 {
        margin-bottom: 0;
    }

    .page-header .btn {
        width: 100%;
        justify-content: center;
    }

    .table-crai th,
    .table-crai td {
        white-space: nowrap;
    }

    .navbar-admin {
        padding: 12px;
    }
}