/* Kursmanus Studio - Design System (Academic Elite / Intellectual Precision) */
:root {
    --primary: #031635;
    --primary-container: #1a2b4b;
    --on-primary: #ffffff;
    --on-primary-container: #8293b8;
    --primary-fixed: #d8e2ff;
    --primary-fixed-dim: #b6c6ef;

    --secondary: #00677e;
    --secondary-container: #00d2fd;
    --on-secondary: #ffffff;
    --on-secondary-container: #005669;
    --secondary-fixed: #b4ebff;
    --secondary-fixed-dim: #3cd7ff;

    --surface: #ffffff;
    --surface-bright: #f8f9ff;
    --surface-dim: #cbdbf5;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #eff4ff;
    --surface-container: #e5eeff;
    --surface-container-high: #dce9ff;
    --surface-container-highest: #d3e4fe;
    --background: #f1f5f9;

    --on-surface: #0b1c30;
    --on-surface-variant: #44474e;
    --outline: #75777f;
    --outline-variant: #c5c6cf;
    --error: #ba1a1a;
    --error-container: #ffdad6;
    --on-error: #ffffff;
    --success: #137333;
    --success-bg: #e6f4ea;

    --font-headline: 'Hanken Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-level-1: 0px 4px 20px rgba(26, 43, 75, 0.05);
    --shadow-level-2: 0px 12px 30px rgba(26, 43, 75, 0.1);
    --shadow-level-3: 0px 20px 40px rgba(26, 43, 75, 0.15);
    
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--on-surface);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Material Symbols configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}
.material-symbols-outlined.fill {
    font-variation-settings: 'FILL' 1;
}

/* Glass and elevation effects */
.glass-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-level-1);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-level-2);
    border-color: rgba(0, 210, 253, 0.4);
}

/* Minimal input fields from design spec */
.minimal-input {
    background-color: #f8fafc;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--on-surface);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.minimal-input:focus {
    background-color: #ffffff;
    border-color: transparent;
    border-left: 3px solid var(--secondary-container);
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 210, 253, 0.2);
}

/* Pressable buttons */
.btn-primary {
    background-color: var(--secondary);
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--radius-md);
    border-bottom: 2px solid #004e5f;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #005669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 103, 126, 0.2);
}

.btn-primary:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
}

.btn-accent {
    background-color: var(--secondary-container);
    color: var(--on-secondary-container);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-accent:hover {
    background-color: var(--secondary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 210, 253, 0.35);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline:hover {
    background-color: rgba(3, 22, 53, 0.05);
}

/* Toast notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    color: var(--on-surface);
    border-left: 4px solid var(--secondary-container);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    box-shadow: var(--shadow-level-3);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ==========================================================================
   Course Manuscript Builder (Steg 2 & Steg 3)
   ========================================================================== */

.step3-lesson-card {
    border-left: 5px solid var(--primary-container) !important;
}

.structure-module {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 18px;
    transition: all 0.2s ease;
}

.structure-module:hover {
    border-color: #94a3b8;
    box-shadow: var(--shadow-level-1);
}

.structure-module-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.structure-lesson-list {
    padding-left: 28px;
    border-left: 2px solid #e2e8f0;
    margin-left: 12px;
}

.structure-lesson-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.structure-lesson-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    width: 24px;
    height: 2px;
    background: #e2e8f0;
}

/* Radio Buttons and Pill Toggles */
.toggle-group {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-lg);
    gap: 4px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.toggle-group label {
    margin: 0;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}

.toggle-group input[type="radio"] {
    display: none;
}

.toggle-group input[type="radio"]:checked + span {
    background: var(--primary-container);
    color: white;
    box-shadow: 0 2px 6px rgba(26, 43, 75, 0.2);
}

.toggle-option {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

/* Conditional Section Wrapper */
.conditional-box {
    display: none;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

.conditional-box.active {
    display: block;
}

/* File Upload Dropzone */
.upload-dropzone {
    border: 2px dashed #94a3b8;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 26px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-dropzone:hover {
    border-color: var(--secondary-container);
    background: #f0f7ff;
}

.upload-dropzone input[type="file"] {
    display: none;
}

.btn-upload-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary);
    color: white;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload-trigger:hover {
    background: #005669;
}

.file-list {
    margin-top: 15px;
    list-style: none;
    padding: 0;
}

.file-list li {
    background: #edf2f7;
    padding: 9px 15px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #334155;
    border: 1px solid #e2e8f0;
}

/* Checkbox & Option Groups */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 12px 0 18px 0;
}

.custom-option {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
    transition: all 0.2s ease;
}

.custom-option:hover {
    border-color: var(--secondary-container);
    background: #f8fafc;
}

.custom-option input {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: var(--secondary);
}

/* Quiz Styling */
.quiz-card {
    background: #fffdfa;
    border: 1.5px solid #fed7aa;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 15px;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 2px 8px rgba(254, 215, 170, 0.15);
}

.quiz-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.quiz-header-bar h3 {
    margin: 0;
    color: #9a3412;
    font-size: 16px;
    font-weight: 700;
}

.card-header-bar {
    background: #e9f2fa; 
    padding: 16px 20px; 
    border-radius: var(--radius-md); 
    margin-bottom: 24px; 
    border-left: 4px solid var(--primary-container);
}

.btn-delete {
    background: transparent;
    color: var(--error);
    border: 1px solid #fca5a5;
    padding: 5px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: #fee2e2;
}

.quiz-grid {
    display: grid;
    grid-template-columns: 1.2fr 80px 1.5fr 30px; 
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.quiz-grid-header {
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.quiz-grid input[type="radio"], .quiz-grid input[type="checkbox"] {
    width: 20px;
    height: 20px;
    justify-self: center;
    cursor: pointer;
    accent-color: var(--success);
}

.btn-remove-alt {
    background: none;
    border: none;
    color: var(--error);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-remove-alt:hover {
    background: #fee2e2;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--primary-container);
    border: 2px dashed var(--primary-container);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 10px;
    margin-bottom: 20px;
}

.btn-add:hover {
    background: #e5eeff;
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-add-small {
    font-size: 13px;
    padding: 8px 16px;
    width: auto;
    border-width: 1px;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* ==========================================================================
   Auth & User Profile Dropdown Styles
   ========================================================================== */

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-scaleUp {
    animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.user-profile-dropdown-wrapper {
    position: relative;
}

#userProfileDropdown {
    box-shadow: 0 14px 34px -4px rgba(3, 22, 53, 0.18), 0 6px 14px -3px rgba(3, 22, 53, 0.1);
}

#admin-login-modal {
    transition: opacity 0.25s ease;
}

