/* ============================================
   GR2 Quiz Platform - Global Styles
   Clean Institutional Style
   ============================================ */

/* CSS Variables for Brand Colors (calmer palette) */
:root {
    --primary-blue: #1d4ed8;
    --primary-hover: #1e40af;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --success-green: #16a34a;
    --success-light: #dcfce7;
    --warning-yellow: #eab308;
    --warning-light: #fef9c3;
    --error-red: #dc2626;
    --error-light: #fee2e2;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: #f3f4f6;
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header - Sticky Top Bar */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
}

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

.header-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

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

.header-nav a {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.header-nav a:hover {
    background-color: var(--bg-light);
    color: var(--primary-blue);
}


.header-nav .btn-link {
    color: var(--text-medium);
    background: none;
    border: 0;
    font: inherit;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.header-nav .btn-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-blue);
}

/* Main Content Container */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Learn Page Specific */
.learn-container {
    max-width: 1200px;
}

.learn-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.learn-intro {
    font-size: 16px;
    color: var(--text-medium);
    line-height: 1.7;
    margin: 24px 0 32px 0;
    max-width: 900px;
}

.learn-seo-intro {
    font-size: 16px;
    color: var(--text-medium);
    line-height: 1.7;
    margin: 24px 0 32px 0;
    max-width: 900px;
}

.learn-question-card {
    background: var(--bg-light);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.question-permalink {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.question-permalink:hover {
    color: var(--primary-blue);
}

.question-permalink-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.learn-login-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.learn-login-text {
    font-size: 14px;
    color: var(--text-medium);
}

.learn-login-text-muted {
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
}

.learn-login-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.learn-login-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.learn-login-separator {
    color: var(--text-light);
    font-size: 14px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-medium);
}

.breadcrumb a {
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-blue);
}

.breadcrumb-separator {
    color: var(--text-light);
    margin: 0 4px;
}

.breadcrumb-current {
    color: var(--text-dark);
    font-weight: 500;
}

/* Subjects Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.subject-card {
    background: var(--bg-light);
    border-radius: 14px;
    padding: 32px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-blue);
}

.subject-card-title {
    font-size: 1.5rem;
    margin: 0 0 16px 0;
    color: var(--text-dark);
    font-weight: 600;
}

.subject-card-link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.subject-card-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.subject-card-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--text-medium);
    font-size: 15px;
}

.subject-stat {
    display: block;
}

.subject-stat strong {
    color: var(--text-dark);
    font-weight: 600;
}

.subject-card-cta {
    margin-top: auto;
    width: 100%;
    text-align: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
}

/* Responsive Subjects Grid */
@media (max-width: 900px) {
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .subject-card {
        padding: 24px;
    }
    
    .learn-intro {
        font-size: 15px;
        margin: 20px 0 24px 0;
    }
    
    .learn-login-note {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .learn-login-separator {
        display: none;
    }
}

/* Card Component - Base Style */
.card {
    background: var(--bg-white);
    border-radius: 18px;
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* Typography */
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    font-weight: 400;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.instruction-text {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 1.5px solid var(--border-color);
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-medium);
    color: var(--text-dark);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background-color: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Error Messages */
.error-message {
    background-color: var(--error-light);
    color: #991b1b;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--error-red);
    font-size: 0.95rem;
}

/* Links */
.text-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.text-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ============================================
   AUTHENTICATION PAGES
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.auth-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.auth-instructions {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* ============================================
   MODERN SAAS LOGIN PAGE (Two-Column)
   ============================================ */

.saas-login-page {
    background: #F7F9FC;
    background-image: radial-gradient(circle at 20% 50%, rgba(29, 78, 216, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(29, 78, 216, 0.02) 0%, transparent 50%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.saas-login-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px 32px;
}

.saas-login-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saas-login-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.saas-login-logo img {
    height: 32px;
    width: auto;
}

.saas-login-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.saas-login-nav-link {
    color: var(--text-medium);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.saas-login-nav-link:hover {
    color: var(--primary-blue);
    background: rgba(29, 78, 216, 0.05);
}

/* Main Content */
.saas-login-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    gap: 32px;
}

/* Hero Section */
.saas-login-hero {
    max-width: 960px;
    width: 100%;
    text-align: center;
    padding: 0 24px;
}

.saas-login-hero__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.saas-login-hero__subtitle {
    font-size: 16px;
    color: var(--text-medium);
    margin: 0 0 8px 0;
    line-height: 1.6;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.saas-login-hero__note {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.saas-login-card {
    background: var(--bg-white);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    max-width: 960px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    overflow: hidden;
}

/* Columns */
.saas-login-column {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
}

.saas-login-column-left {
    background: var(--bg-white);
}

.saas-login-column-right {
    background: var(--bg-white);
}

.saas-login-column-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.saas-login-column-subtitle {
    font-size: 15px;
    color: var(--text-medium);
    margin: 0 0 32px 0;
    line-height: 1.5;
}

/* Benefits List */
.saas-login-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.saas-login-benefits li {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.6;
    padding-left: 24px;
    position: relative;
}

.saas-login-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: 600;
    font-size: 16px;
}

/* Buttons */
.saas-login-cta-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.saas-login-submit-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 8px;
}

/* Note */
.saas-login-note {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    margin: 0;
    font-style: italic;
}

/* Divider */
.saas-login-divider {
    width: 1px;
    background: rgba(15, 23, 42, 0.08);
    margin: 24px 0;
}

/* Form */
.saas-login-form {
    margin-top: 24px;
}

.saas-login-input {
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    padding: 0 16px;
    font-size: 15px;
    transition: all 0.2s;
}

.saas-login-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

/* Error Message */
.saas-login-error {
    background-color: var(--error-light);
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 4px solid var(--error-red);
    font-size: 14px;
    line-height: 1.5;
}

/* Register Link */
.saas-login-register-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-medium);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 899px) {
    .saas-login-card {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    
    .saas-login-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }
    
    .saas-login-column {
        padding: 32px 24px;
    }
    
    .saas-login-column-title {
        font-size: 24px;
    }
    
    .saas-login-header {
        padding: 16px 24px;
    }
    
    .saas-login-main {
        padding: 24px 16px;
        gap: 24px;
    }
}

/* Trust Box */
.saas-login-trust-box {
    background: #F7F9FC;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 24px;
    margin-bottom: 16px;
}

.saas-login-trust-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.saas-login-trust-text {
    font-size: 13px;
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
}

/* SEO Text Block (inside card) */
.saas-login-seo-text-inside {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px 20px;
    margin-top: 24px;
    text-align: center;
}

.saas-login-seo-text-inside p {
    max-width: 720px;
    margin: 0 auto;
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.7;
}

.saas-login-seo-text-inside strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Footer (Legal / About) */
.saas-login-footer {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding: 20px 24px;
    margin-top: 24px;
    text-align: center;
}

.saas-login-footer-content {
    max-width: 720px;
    margin: 0 auto;
}

.saas-login-footer-copyright {
    font-size: 13px;
    color: var(--text-medium);
    margin: 0 0 8px 0;
    font-weight: 500;
}

.saas-login-footer-company {
    font-size: 13px;
    color: var(--text-medium);
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.saas-login-footer-company strong {
    color: var(--text-dark);
    font-weight: 600;
}

.saas-login-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}

.saas-login-footer-link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.saas-login-footer-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.saas-login-footer-link-disabled {
    color: var(--text-light);
    cursor: not-allowed;
    text-decoration: none;
}

.saas-login-footer-separator {
    color: var(--text-light);
    margin: 0 4px;
}

/* Source Note Section (ANRE Disclaimer) */
.source-note {
    margin-top: 32px;
    padding: 20px 24px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-medium);
}

.source-note__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.source-note__intro {
    margin: 0 0 16px 0;
    color: var(--text-medium);
}

.source-note__files {
    margin: 0 0 16px 0;
}

.source-note__files-label {
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    font-size: 13px;
}

.source-note__files-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
}

.source-note__files-list li {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: var(--text-dark);
    padding: 4px 0;
    margin: 0;
}

.source-note__files-list li:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.source-note__disclaimer {
    margin: 0;
    color: var(--text-medium);
    font-size: 13px;
}

.source-note__link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.source-note__link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Source Note in Learn Pages */
.learn-container .source-note {
    margin-top: 24px;
    margin-bottom: 24px;
}

/* Source Note in Login Card */
.saas-login-card .source-note {
    grid-column: 1 / -1;
    margin-top: 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0;
    border-left: none;
    border-right: none;
    background: transparent;
    padding-top: 24px;
}

@media (max-width: 480px) {
    .source-note {
        padding: 16px 20px;
        font-size: 13px;
    }
    
    .source-note__title {
        font-size: 15px;
    }
    
    .source-note__files-list {
        padding: 10px 12px;
    }
    
    .source-note__files-list li {
        font-size: 12px;
    }
    
    .source-note__disclaimer {
        font-size: 12px;
    }
}

/* Register Info Section */
.saas-register-info {
    background: var(--bg-light);
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 3px solid var(--primary-blue);
}

.saas-register-simple {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.saas-register-simple:last-child {
    margin-bottom: 0;
}

.saas-register-simple strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Form Field Styling for Register */
.saas-login-form .form-group input[type="text"],
.saas-login-form .form-group input[type="password"],
.saas-login-form input[type="text"],
.saas-login-form input[type="password"] {
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    padding: 0 16px;
    font-size: 15px;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.saas-login-form .form-group input[type="text"]:focus,
.saas-login-form .form-group input[type="password"]:focus,
.saas-login-form input[type="text"]:focus,
.saas-login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

@media (max-width: 480px) {
    .saas-login-main {
        padding: 24px 16px;
        gap: 24px;
    }
    
    .saas-login-hero {
        padding: 0 16px;
    }
    
    .saas-login-hero__title {
        font-size: 24px;
    }
    
    .saas-login-hero__subtitle {
        font-size: 15px;
    }
    
    .saas-login-hero__note {
        font-size: 13px;
    }
    
    .saas-login-column {
        padding: 24px 20px;
    }
    
    .saas-login-column-title {
        font-size: 22px;
    }
    
    .saas-login-column-subtitle {
        font-size: 14px;
    }
    
    .saas-login-benefits li {
        font-size: 14px;
    }
    
    .saas-login-seo-text-inside {
        padding: 16px 20px;
        margin-top: 16px;
    }
    
    .saas-login-seo-text-inside p {
        font-size: 13px;
    }
    
    .saas-login-footer {
        padding: 16px 20px;
        margin-top: 20px;
    }
    
    .saas-login-footer-copyright,
    .saas-login-footer-company,
    .saas-login-footer-links {
        font-size: 12px;
    }
    
    .saas-login-footer-links {
        gap: 6px;
    }
    
    .saas-login-trust-box {
        margin-top: 20px;
        padding: 12px 14px;
    }
    
    .saas-login-trust-title {
        font-size: 13px;
    }
    
    .saas-login-trust-text {
        font-size: 12px;
    }
}

/* ============================================
   DASHBOARD
   ============================================ */

.instructions-card {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.instructions-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions-card ul {
    list-style: none;
    padding: 0;
}

.instructions-card li {
    padding: 0.75rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.6;
}

.instructions-card li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
}

.subject-section {
    margin-bottom: 3rem;
}

.subject-section h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

/* Block Tiles */
.block-tile {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

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

.block-number {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.block-score {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-medium);
}

.block-note-indicator {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-blue);
    background-color: #eff6ff;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.block-note-text {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
}

/* Block Color Classes */
.block-white {
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

.block-green {
    background-color: var(--success-light);
    border-color: var(--success-green);
}

.block-yellow {
    background-color: var(--warning-light);
    border-color: var(--warning-yellow);
}

.block-red {
    background-color: var(--error-light);
    border-color: var(--error-red);
}

/* ============================================
   QUIZ TAKING PAGE
   ============================================ */

.quiz-header {
    margin-bottom: 2rem;
}

.quiz-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.question-card {
    background: var(--bg-light);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

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

.question-header strong {
    font-size: 1.125rem;
    color: var(--text-dark);
    font-weight: 600;
}

.edit-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--primary-blue);
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.edit-link:hover {
    background-color: var(--primary-blue);
    color: white;
}

.question-image {
    margin-bottom: 1.5rem;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.question-text {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 500;
}

.question-meta {
    margin-bottom: 0.75rem;
}

.missing-tag {
    display: inline-block;
    margin-right: 0.5rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background-color: #fef2f2;
    color: var(--error-red);
    font-size: 0.8rem;
    font-weight: 500;
}

.status-ok-tag {
    display: inline-block;
    margin-right: 0.5rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background-color: #ecfdf3;
    color: var(--success-green);
    font-size: 0.8rem;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-white);
}

.option-label:hover {
    border-color: var(--primary-blue);
    background: #f8faff;
}

.option-label input[type="radio"]:checked + .option-letter {
    color: var(--primary-blue);
    font-weight: 700;
}

.option-label input[type="radio"]:checked ~ .option-text {
    color: var(--text-dark);
    font-weight: 500;
}

.option-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-blue);
    background: #f0f4ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.option-label input[type="radio"] {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.option-letter {
    font-weight: 600;
    margin-right: 0.75rem;
    color: var(--text-medium);
    font-size: 1.1rem;
    min-width: 24px;
}

.option-image {
    max-width: 200px;
    max-height: 150px;
    margin: 0 0.75rem;
    vertical-align: middle;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.option-text {
    flex: 1;
    color: var(--text-medium);
    line-height: 1.6;
}

/* Option Item (for learn pages) */
.option-item {
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-white);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0;
}

.option-item strong {
    color: var(--text-medium);
    font-weight: 600;
    min-width: 24px;
}

.option-item.correct-option {
    border-color: var(--success-green);
    background: var(--success-light);
}

.option-item.correct-option strong {
    color: var(--success-green);
    font-weight: 700;
}

.option-item .option-text {
    flex: 1;
    color: var(--text-medium);
}

.option-item.correct-option .option-text {
    color: var(--text-dark);
    font-weight: 500;
}

.submit-container {
    text-align: center;
    margin: 3rem 0 2rem;
}

/* ============================================
   RESULTS PAGE
   ============================================ */

.result-summary {
    text-align: center;
    margin-bottom: 2.5rem;
}

.score-badge {
    display: inline-block;
    background: #0f172a;
    color: white;
    padding: 1.5rem 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1rem;
}

.score-badge h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.score-badge p {
    font-size: 1.25rem;
    opacity: 0.95;
}

.results-list {
    margin-bottom: 2rem;
}

.question-result {
    background: var(--bg-white);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.result-correct {
    border-left-color: var(--success-green);
    background: linear-gradient(to right, var(--success-light) 0%, var(--bg-white) 2%);
}

.result-incorrect {
    border-left-color: var(--error-red);
    background: linear-gradient(to right, var(--error-light) 0%, var(--bg-white) 2%);
}

.result-ungradable {
    border-left-color: var(--text-light);
    background: var(--bg-light);
}

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

.result-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.correct-badge {
    background-color: var(--success-green);
    color: white;
}

.incorrect-badge {
    background-color: var(--error-red);
    color: white;
}

.ungradable-badge {
    background-color: var(--text-light);
    color: white;
}

.answer-details {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.answer-details p {
    margin-bottom: 0.75rem;
    color: var(--text-medium);
}

.correct-answer {
    color: var(--success-green);
    font-weight: 600;
}

.explanation {
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 3px solid var(--primary-blue);
    color: var(--text-medium);
    line-height: 1.7;
}

.back-link {
    text-align: center;
    margin: 2.5rem 0;
}

/* ============================================
   EDIT FORM
   ============================================ */

.question-display {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.question-display p {
    margin-bottom: 0.75rem;
    color: var(--text-medium);
}

.question-display strong {
    color: var(--text-dark);
}

.edit-form {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    flex: 1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .header-logo-text {
        font-size: 1.25rem;
    }

    .main-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .card {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .blocks-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .question-card {
        padding: 1.5rem;
    }

    .option-image {
        max-width: 150px;
        max-height: 120px;
    }
}
