/* Henley Education - Professional Educational Tool */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Mobile safety tweaks --- */
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { min-height: 100dvh; height: auto; }

:root {
    /* Monochrome Professional Palette */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e5e5e5;
    --color-gray-300: #d4d4d4;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #171717;
    
    /* Zinc 240 4.9% 83.9% */
    --color-zinc-box: hsl(240, 4.9%, 83.9%);
    
    /* Red Logo/Accent - ONLY for logo */
    --color-red: #dc2626;
    --color-red-hover: #b91c1c;
    
    /* Layout Constants */
    --sidebar-width: 280px;
    --header-height: 60px;
    --border-radius: 4px;
    
    /* Light Mode (Primary) */
    --bg-primary: var(--color-white);
    --bg-secondary: var(--color-gray-50);
    --bg-tertiary: var(--color-gray-100);
    --text-primary: var(--color-black);
    --text-secondary: var(--color-gray-600);
    --text-muted: var(--color-gray-500);
    --border-color: var(--color-gray-200);
    --border-subtle: var(--color-gray-100);
    
    /* Shadows - Subtle Depth */
    --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: var(--color-gray-900);
    --bg-secondary: var(--color-gray-800);
    --bg-tertiary: var(--color-gray-700);
    --text-primary: var(--color-white);
    --text-secondary: var(--color-gray-300);
    --text-muted: var(--color-gray-400);
    --border-color: var(--color-gray-700);
    --border-subtle: var(--color-gray-800);
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    line-height: 1.5;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Keep desktop as-is */
.layout {
  display: flex;
  min-height: 100dvh;   /* avoid fixed 100vh on iOS */
  width: 100%;
}

/* Sidebar (desktop) stays visible */
.sidebar { 
    width: var(--sidebar-width, 260px);
    background: var(--bg-secondary, #000);
    color: var(--text-primary, #fff);
    border-right: 1px solid var(--border-color, #333);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    flex-shrink: 0;
    overflow-y: auto;
}

/* Mobile drawer */
@media (max-width: 768px){
  /* make main full-width stack */
  .layout { display: block; }

  /* show the toggle on mobile */
  .menu-toggle { 
    display: inline-flex; 
    align-items:center; 
    justify-content:center; 
    width:44px; 
    height:44px; 
    border:0; 
    background:transparent; 
    color:inherit; 
  }

  /* turn sidebar into slide-in drawer */
  .sidebar{
    position: fixed;
    inset: 0 auto 0 0;
    width: min(85vw, 320px);
    max-width: 90vw;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 1000;
    overflow-y: auto;
    background: var(--bg-secondary, #111);
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.drawer-open .sidebar{ transform: translateX(0); }

  /* scrim appearance */
  .drawer-scrim{
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 999; display: none;
  }
  body.drawer-open .drawer-scrim{ display: block; }

  /* content padding + wrap protection */
  .content{ padding: 16px; min-width: 0; }
  h1,h2,h3,p { overflow-wrap:anywhere; }
}

/* Hide menu toggle by default (desktop) */
.menu-toggle {
    display: none;
}

/* Main Content Area */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex item from overflowing */
    padding: 2rem;
    overflow-x: hidden;
}

/* Minimal Top Header */
.app-header {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    flex-shrink: 0;
}

/* Flexible Main Content */
.app-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
}

/* Typography Hierarchy - Strong Headings, Light Body */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
}

h1 { font-size: 2rem; }     /* 32px */
h2 { font-size: 1.5rem; }   /* 24px */
h3 { font-size: 1.25rem; }  /* 20px */
h4 { font-size: 1.125rem; } /* 18px */
h5 { font-size: 1rem; }     /* 16px */
h6 { font-size: 0.875rem; } /* 14px */

p, span, div {
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Sidebar Navigation */
.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--color-red);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 20px 8px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu-item {
    margin: 0;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 2px solid transparent;
}

.sidebar-menu-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-menu-link.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-left-color: var(--color-black);
    font-weight: 600;
}

.sidebar-menu-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Top Header Components */
.header-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.header-user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.dark-mode-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.dark-mode-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Content Layout - Information Dense */
.content-container {
    padding: 24px;
    max-width: none; /* Full width for information density */
}

.content-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.content-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.content-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Progressive Sections - Summary First */
.section {
    margin-bottom: 32px;
}

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

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    gap: 8px;
}

/* Clean Cards with Minimal Depth */
.card {
    background: var(--color-zinc-box);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--color-zinc-box);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content {
    padding: 20px;
}

.card-compact {
    padding: 12px 16px;
}

/* Information Dense Grid */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Button System - Red for Primary Actions */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-black);
    color: white;
    border-color: var(--color-black);
}

.btn-primary:hover {
    background: var(--color-gray-800);
    border-color: var(--color-gray-800);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-gray-400);
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.1);
}

/* Large Modal Overlays */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: calc(var(--border-radius) * 2);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-content {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.assessment-card {
    background: rgb(var(--gray-50));
    border: 1px solid rgb(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.assessment-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Feature Cards - Like Landing Page */
.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.feature-card:hover {
    border-color: rgba(230, 57, 70, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--glass-hover);
}

.icon-container {
    background: rgba(230, 57, 70, 0.15);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: var(--radius);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Clean Button Styles - Black for Primary Actions */
.btn-primary {
    background: var(--color-black);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.75rem;
    box-shadow: var(--shadow-sm);
    letter-spacing: -0.01em;
}

.btn-primary:hover {
    background: var(--color-gray-800);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    transition: all var(--transition-fast);
}

/* Ghost Button - Minimal Gray */
.btn-ghost {
    background: transparent;
    color: rgb(var(--foreground));
    border: 1px solid rgb(var(--border));
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
    height: 2.5rem;
}

.btn-ghost:hover {
    background: rgb(var(--gray-50));
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Outline Button - Clean Gray */
.btn-outline {
    background: rgb(var(--card));
    color: rgb(var(--foreground));
    border: 1px solid rgb(var(--border));
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
    height: 2.5rem;
}

.btn-outline:hover {
    background: rgb(var(--gray-50));
    border-color: rgb(var(--gray-300));
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Clean Input Styles */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgb(var(--card));
    border: 1px solid rgb(var(--border));
    border-radius: var(--radius);
    color: rgb(var(--foreground));
    font-size: 0.875rem;
    height: 2.75rem;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: rgb(var(--gray-400));
    box-shadow: 0 0 0 3px rgba(var(--gray-200), 0.5);
    transform: translateY(-1px);
}

.input-field::placeholder {
    color: rgb(var(--muted));
    transition: opacity var(--transition-normal);
}

.input-field:focus::placeholder {
    opacity: 0.5;
}

/* Input Group with Clean Styling */
.input-group {
    position: relative;
}

.input-group .input-field {
    padding-left: 2.75rem;
}

.input-group .input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgb(var(--muted));
    z-index: 2;
    transition: color var(--transition-normal);
}

.input-group .input-field:focus + .input-icon,
.input-group .input-field:focus ~ .input-icon {
    color: rgb(var(--foreground-secondary));
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--foreground);
}

/* Container Layouts */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-small {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Modern Navigation */
.navigation {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgb(var(--border));
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-normal);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: rgb(var(--foreground));
    text-decoration: none;
    transition: opacity var(--transition-normal);
}

.nav-brand:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: rgb(var(--foreground));
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-normal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-black);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: rgb(var(--foreground-secondary));
}

.nav-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    height: auto;
}

/* Main Content Layout */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* Footer */
.footer {
    background: rgb(var(--card));
    border-top: 1px solid rgb(var(--border));
    margin-top: 4rem;
}

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

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

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: rgb(var(--foreground));
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: rgb(var(--foreground));
    margin-bottom: 1rem;
}

.footer-link {
    display: block;
    color: rgb(var(--muted-foreground));
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color var(--transition-normal);
}

.footer-link:hover {
    color: var(--color-black);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgb(var(--border));
    text-align: center;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.nav-logo {
    width: 48px;
    height: 30px;
    background: url('../images/henley-logo.svg') no-repeat center center;
    background-size: contain;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Large Logo - For Headers */
.logo-large {
    width: 120px;
    height: auto;
    background: url('../images/henley-logo.svg') no-repeat center center;
    background-size: contain;
    display: block;
    margin: 20px auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    min-height: 75px;
    background-position: center center;
}

/* Page Headers - Landing Page Style */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Brand Name Styling */
.brand-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--foreground);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.brand-tagline {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-black);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Modern Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--foreground);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
}

.flash-message {
    background: var(--card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    animation: slideIn 0.3s ease;
}

.flash-success {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.flash-error {
    border-color: var(--color-black);
    background: rgba(0, 0, 0, 0.1);
}

.flash-info {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* Enhanced Animations - Landing Page Style */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes progressFill {
    from {
        width: 0%;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

.animate-progress {
    animation: progressFill 1s ease-out;
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Star Rating System */
.star-rating {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    justify-content: center;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input[type="radio"]:checked ~ label {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    transform: scale(1.1);
}

.star-rating input[type="radio"]:checked ~ label {
    color: #fbbf24;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-black);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .glass-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .star-rating label {
        font-size: 1.5rem;
    }
}

/* Clean Card Variants */
.card-elevated {
    background: rgb(var(--card));
    border: 1px solid rgb(var(--border));
    box-shadow: var(--shadow-lg);
}

/* Clean Subject Cards */
.subject-card {
    background: rgb(var(--gray-50));
    border: 1px solid rgb(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-black);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.subject-card:hover::before {
    transform: scaleX(1);
}

.subject-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Keep logos working */
.nav-logo, .logo-large {
    background: url('../images/henley-logo.svg') no-repeat center center !important;
    background-size: contain !important;
    background-color: transparent !important;
    border: none !important;
}

/* Ensure proper text colors */
.text-muted {
    color: rgb(var(--muted-foreground)) !important;
}

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

.text-success {
    color: var(--color-black) !important;
}

.text-warning {
    color: var(--color-black) !important;
}

.text-danger {
    color: var(--color-black) !important;
}

/* Advanced Glass Effects */
.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 0 rgba(255, 255, 255, 0.1);
}

.glass-morphism-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* Gradient Overlays */
.gradient-overlay-blue {
    position: relative;
}

.gradient-overlay-blue::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-black);
    opacity: 0.1;
    border-radius: inherit;
    pointer-events: none;
}

.gradient-overlay-green {
    position: relative;
}

.gradient-overlay-green::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-secondary);
    opacity: 0.1;
    border-radius: inherit;
    pointer-events: none;
}

/* Interactive Elements */
.interactive-card {
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.interactive-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1) 0%, transparent 70%);
    transition: all var(--transition-slow);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.interactive-card:hover::after {
    width: 300px;
    height: 300px;
}

.interactive-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Modern Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-gray-200);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--color-black);
    border-radius: 4px;
    transition: width var(--transition-slow);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-success { background: var(--color-black); }
.status-warning { background: var(--color-gray-600); }
.status-error { background: var(--color-black); }
.status-info { background: var(--color-gray-600); }

/* Floating Elements */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-delayed {
    animation: floating 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* === MOBILE HEADER + DRAWER SYSTEM === */
.mobile-header {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-tertiary);
}

.drawer-scrim {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
}

.drawer-scrim.show {
    display: block;
}

/* Mobile-only styles */
@media (max-width: 768px) {
    .mobile-header {
        display: flex !important;
    }
    
    .app-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        height: 100vh;
        width: 280px;
        transition: left 0.3s ease;
        z-index: 101;
    }
    
    .app-sidebar.open {
        left: 0;
    }
    
    .app-main {
        margin-left: 0 !important;
    }
    
    .drawer-scrim.show {
        display: block;
    }
}

/* Desktop-only styles */
@media (min-width: 769px) {
    .mobile-header,
    .drawer-scrim {
        display: none !important;
    }
    
    .app-sidebar {
        position: sticky;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
    }
    
    .app-main {
        margin-left: 280px;
    }
}