/* NeuLMS Prototype Stylesheet
 * Version: 1.0
 * Mobile-first responsive design with NeuLMS branding
 */

/* ============================================================================
   TYPOGRAPHY & FONTS
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* ============================================================================
   CSS VARIABLES - NEULMS BRAND COLOURS
   ============================================================================ */
:root {
    /* NeuLMS Brand Colours (from Amendment) */
    --neulms-coral: #FF7A6A;           /* Primary Colour */
    --neulms-sage: #A7CBBF;            /* Secondary Colour */
    --neulms-cream: #F7F3EF;           /* Background/Light */
    --neulms-warm-taupe: #D0B49F;      /* Accent/Borders */
    --neulms-deep-midnight: #1A1E2B;   /* Text/Dark */
    
    /* Supporting Palette */
    --coral-light: #FFB5AA;
    --coral-dark: #E56952;
    --sage-light: #D4E7DC;
    --sage-dark: #8FB8A7;
    
    /* Typography */
    --font-primary: 'Avenir Next', 'Avenir', system-ui, sans-serif;
    --font-secondary: 'Manrope', system-ui, sans-serif;
    
    /* Spacing & Layout */
    --border-radius: 8px;
    --border-radius-large: 12px;
    --shadow: 0 2px 10px rgba(26, 30, 43, 0.1);
    --shadow-hover: 0 4px 20px rgba(26, 30, 43, 0.15);
    --transition: all 0.3s ease;
    
    /* Breakpoints */
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
    --large: 1200px;
}

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--neulms-deep-midnight);
    background-color: var(--neulms-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--neulms-deep-midnight);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
}

a {
    color: var(--neulms-coral);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--coral-dark);
    text-decoration: underline;
}

/* ============================================================================
   LAYOUT CONTAINERS
   ============================================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-small {
    max-width: 800px;
}

.container-large {
    max-width: 1400px;
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Grid utilities */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

/* ============================================================================
   BUTTONS & FORM ELEMENTS
   ============================================================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-family: var(--font-primary);
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    min-height: 44px; /* Touch-friendly */
    font-size: 1rem;
    line-height: 1.2;
}

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

.btn-primary:hover {
    background: var(--coral-dark);
    border-color: var(--coral-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--neulms-sage);
    color: white;
    border-color: var(--neulms-sage);
}

.btn-secondary:hover {
    background: var(--sage-dark);
    border-color: var(--sage-dark);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--neulms-coral);
    border-color: var(--neulms-coral);
}

.btn-outline:hover {
    background: var(--neulms-coral);
    color: white;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--neulms-deep-midnight);
    font-family: var(--font-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--neulms-warm-taupe);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-secondary);
    transition: var(--transition);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--neulms-coral);
    box-shadow: 0 0 0 3px rgba(255, 122, 106, 0.1);
}

.form-input::placeholder {
    color: #999;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

/* ============================================================================
   CARDS & MODULES
   ============================================================================ */
.card {
    background: white;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.card-header {
    padding: 1.5rem;
    background: var(--neulms-cream);
    border-bottom: 1px solid var(--neulms-warm-taupe);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--neulms-cream);
    border-top: 1px solid var(--neulms-warm-taupe);
}

/* Module Cards */
.module-card {
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--neulms-coral), var(--neulms-sage));
}

.module-progress {
    margin-top: 1rem;
}

.progress-bar {
    height: 6px;
    background: var(--neulms-cream);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neulms-coral), var(--neulms-sage));
    transition: width 0.5s ease;
    border-radius: 3px;
}

.progress-text {
    font-size: 0.875rem;
    color: #666;
    font-family: var(--font-secondary);
}

/* ============================================================================
   NAVIGATION & HEADER
   ============================================================================ */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    max-height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item {
    margin-left: 2rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--neulms-deep-midnight);
    cursor: pointer;
}

.nav-link {
    font-weight: 500;
    color: var(--neulms-deep-midnight);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--neulms-coral);
}

.nav-link.active {
    color: var(--neulms-coral);
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--neulms-deep-midnight);
}

/* ============================================================================
   LOGIN PAGE
   ============================================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F8F3F1 0%, #E8F5F3 40%, #FFE8E5 100%);
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-card {
    background: white;
    border-radius: var(--border-radius-large);
    padding: 2rem;
    box-shadow: var(--shadow-hover);
    text-align: center;
    width: 100%;
}

.logo-section {
    margin-bottom: 2rem;
}

.logo-section h1 {
    color: var(--neulms-coral);
    margin: 1rem 0 0.5rem;
}

.logo-section p {
    color: var(--neulms-sage);
    font-weight: 500;
}

.login-form {
    text-align: left;
    margin: 2rem 0;
}

.demo-credentials {
    background: var(--neulms-cream);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}

.demo-credentials h4 {
    color: var(--neulms-coral);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.demo-account {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    font-family: monospace;
    color: #666;
}

/* ============================================================================
   DASHBOARD & MODULE INTERFACE
   ============================================================================ */
.dashboard-header {
    background: linear-gradient(135deg, #FF7A6A 0%, #FF8B7A 30%, #A7CBBF 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    opacity: 0.9;
    font-family: var(--font-secondary);
}

.module-grid {
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.module-player {
    background: white;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
    margin: 2rem 0;
    overflow: hidden;
}

.module-header {
    padding: 1.5rem;
    background: var(--neulms-cream);
    border-bottom: 1px solid var(--neulms-warm-taupe);
}

.section-content {
    padding: 2rem;
    min-height: 400px;
}

.module-footer {
    padding: 1.5rem;
    background: var(--neulms-cream);
    border-top: 1px solid var(--neulms-warm-taupe);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.ai-assistance {
    flex: 1;
    text-align: center;
}

/* ============================================================================
   ASSESSMENT INTERFACE
   ============================================================================ */
.assessment-container {
    max-width: 800px;
    margin: 2rem auto;
}

.question-card {
    background: white;
    border-radius: var(--border-radius-large);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.question-type {
    background: var(--neulms-sage);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.question-number {
    color: #666;
    font-weight: 500;
}

.scenario-context {
    background: var(--coral-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.scenario-context h4 {
    color: var(--coral-dark);
    margin-bottom: 0.75rem;
}

.options-container {
    margin: 1.5rem 0;
}

.option-button {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    border: 2px solid var(--neulms-warm-taupe);
    border-radius: var(--border-radius);
    background: white;
    transition: var(--transition);
    cursor: pointer;
    font-family: var(--font-secondary);
}

.option-button:hover {
    border-color: var(--neulms-coral);
    background: var(--coral-light);
}

.option-button.selected {
    border-color: var(--neulms-coral);
    background: var(--neulms-coral);
    color: white;
}

.confidence-slider {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--neulms-cream);
    border-radius: var(--border-radius);
}

.confidence-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.assessment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================================================
   ALERTS & NOTIFICATIONS
   ============================================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

.alert-info {
    background: var(--sage-light);
    color: var(--sage-dark);
    border-color: var(--neulms-sage);
}

/* ============================================================================
   MODAL & OVERLAY
   ============================================================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 30, 43, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-large);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--neulms-warm-taupe);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--neulms-warm-taupe);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--neulms-coral);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--neulms-coral); }
.text-secondary { color: var(--neulms-sage); }
.text-muted { color: #666; }

.bg-primary { background-color: var(--neulms-coral); }
.bg-secondary { background-color: var(--neulms-sage); }
.bg-light { background-color: var(--neulms-cream); }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* ============================================================================
   MOBILE-SPECIFIC RESPONSIVE STYLES
   ============================================================================ */
@media (max-width: 767px) {
    .login-container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .login-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .logo-section h1 {
        font-size: 1.5rem;
    }
    
    .logo-section h2 {
        font-size: 1rem;
    }
    
    .btn-large {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .demo-credentials {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .card {
        margin: 1rem 0;
    }
    
    .module-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .question-card {
        padding: 1.5rem;
    }
    
    .nav-center h2 {
        font-size: 0.9rem;
    }
    
    /* Mobile Navigation */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--neulms-deep-midnight);
        cursor: pointer;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow);
        flex-direction: column;
        padding: 1rem 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-item {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: none;
    }
    
    /* Grid adjustments */
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - TABLET
   ============================================================================ */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .section-content {
        padding: 2.5rem;
    }
    
    .module-footer {
        flex-wrap: nowrap;
    }
    
    .dashboard-title {
        font-size: 3rem;
    }
    
    .login-container {
        max-width: 500px;
        padding: 1.5rem;
    }
    
    .login-card {
        padding: 2.5rem;
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - DESKTOP
   ============================================================================ */
@media (min-width: 1024px) {
    /* Reset mobile styles */
    .mobile-menu-btn {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        background: none;
        box-shadow: none;
        flex-direction: row;
        padding: 0;
        align-items: center;
    }
    
    .nav-item {
        margin: 0 0 0 2rem;
        border-bottom: none;
    }
    
    .nav-link {
        display: inline;
        padding: 0;
    }
    
    .login-container {
        max-width: 550px;
        padding: 2rem;
    }
    
    .login-card {
        padding: 3rem;
    }
    
    .container {
        padding: 0 2rem;
    }
    
    /* Grid layouts */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Module layouts */
    .module-player {
        max-width: 900px;
        margin: 3rem auto;
    }
    
    .assessment-container {
        margin: 3rem auto;
    }
    
    .module-footer {
        flex-direction: row;
        gap: 2rem;
        text-align: left;
    }
    
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .dashboard-title {
        font-size: 3.5rem;
    }
    
    .logo-section h1 {
        font-size: 2rem;
    }
    
    .logo-section h2 {
        font-size: 1.25rem;
    }
    
    .btn-large {
        padding: 16px 32px;
        font-size: 1.1rem;
    }
    
    .question-card {
        padding: 2rem;
    }
    
    .nav-center h2 {
        font-size: 1.25rem;
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - LARGE SCREENS
   ============================================================================ */
@media (min-width: 1200px) {
    .container {
        padding: 0 3rem;
    }
    
    .module-player {
        max-width: 1000px;
    }
    
    /* Large desktop login improvements */
    .login-container {
        max-width: 580px;
    }
    
    .login-card {
        padding: 3.5rem;
    }
    
    .logo-section h1 {
        font-size: 2.5rem;
    }
    
    .logo-section h2 {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   ACCESSIBILITY & FOCUS STATES
   ============================================================================ */
.btn:focus,
.form-input:focus,
.option-button:focus {
    outline: 2px solid var(--neulms-coral);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================================
   AI HINT COMPONENTS
   ============================================================================ */
.ai-hint-success {
    background: var(--neulms-cream);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--neulms-coral);
    margin: 1rem 0;
}

.ai-hint-title {
    color: var(--neulms-coral);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.ai-hint-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.ai-hint-follow-up {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */
@media print {
    .btn,
    .nav-menu,
    .mobile-menu-btn,
    .modal,
    .module-footer {
        display: none !important;
    }
    
    .card,
    .module-player {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white;
        color: black;
    }
} 