/* ScriptForge - 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;
}

/* Stitch Dark Mode Tokens */
html.dark, :root.dark {
    --primary: #89ceff;
    --primary-container: #0ea5e9;
    --on-primary: #00344d;
    --on-primary-container: #003751;
    --primary-fixed: #c9e6ff;
    --primary-fixed-dim: #89ceff;

    --secondary: #4cd7f6;
    --secondary-container: #03b5d3;
    --on-secondary: #003640;
    --on-secondary-container: #00424e;
    --secondary-fixed: #acedff;
    --secondary-fixed-dim: #4cd7f6;

    --surface: #0d1320;
    --surface-bright: #333948;
    --surface-dim: #0d1320;
    --surface-container-lowest: #080e1b;
    --surface-container-low: #161b29;
    --surface-container: #151f32;
    --surface-container-high: #242a38;
    --surface-container-highest: #2f3543;
    --background: #0b111e;

    --on-surface: #f8fafc;
    --on-surface-variant: #e2e8f0;
    --outline: #94a3b8;
    --outline-variant: #334155;
    --error: #ffb4ab;
    --error-container: #93000a;
    --on-error: #690005;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);

    --shadow-level-1: 0px 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-level-2: 0px 12px 30px rgba(0, 0, 0, 0.6);
    --shadow-level-3: 0px 20px 40px rgba(0, 0, 0, 0.8);
}

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

html.dark body {
    background-color: #0b111e;
    color: #dde2f5;
}

/* 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,
.animate-fadeIn {
    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:has(input:checked) {
    border-color: var(--secondary);
    background: #f0f9ff;
}

.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: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(254, 215, 170, 0.7);
    gap: 12px;
}

html.dark .quiz-header-bar {
    border-bottom-color: rgba(217, 119, 6, 0.3);
}

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

.quiz-drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    touch-action: none;
    color: var(--outline);
    border-radius: var(--radius-sm);
    padding: 3px;
    transition: all 0.2s ease;
}

.quiz-drag-handle:hover {
    color: #9a3412;
    background: rgba(254, 215, 170, 0.4);
}

html.dark .quiz-drag-handle:hover {
    color: #fde68a;
    background: rgba(217, 119, 6, 0.25);
}

.quiz-drag-handle:active {
    cursor: grabbing;
}

.quiz-card {
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease;
}

.quiz-sortable-ghost {
    opacity: 0.35 !important;
    background: rgba(254, 215, 170, 0.3) !important;
    border: 2px dashed #f59e0b !important;
}

html.dark .quiz-sortable-ghost {
    background: rgba(217, 119, 6, 0.18) !important;
    border-color: #d97706 !important;
}

.quiz-sortable-chosen {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    cursor: grabbing !important;
}

.quiz-sortable-drag {
    opacity: 0.98 !important;
    transform: scale(1.015) !important;
    cursor: grabbing !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.15) !important;
}

.quiz-sortable-fallback {
    opacity: 0.95 !important;
    background: #ffffff !important;
    border: 2px solid var(--secondary) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.35), 0 10px 15px -5px rgba(0, 0, 0, 0.2) !important;
    pointer-events: none !important;
    z-index: 9999 !important;
    transform: scale(1.01) !important;
}

html.dark .quiz-sortable-fallback {
    background: #1e293b !important;
    border-color: #f59e0b !important;
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.6), 0 10px 15px -5px rgba(0, 0, 0, 0.4) !important;
}

.quiz-card.quiz-card-highlight {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
    transition: outline-color 0.5s ease;
}

.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-matching {
    display: grid;
    grid-template-columns: 1.2fr 28px 1.5fr 30px;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.quiz-grid-sequence {
    display: grid;
    grid-template-columns: 36px 1fr 64px 30px;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.quiz-seq-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.dark .quiz-seq-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.btn-seq-move {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: #ffffff;
    color: #475569;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dark .btn-seq-move {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

.btn-seq-move:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

.dark .btn-seq-move:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.btn-seq-move:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.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;
}

/* ==========================================================================
   Rich Text Editor & Floating Word Toolbar
   ========================================================================== */

.step3-content-input[contenteditable="true"] {
    background-color: #ffffff;
    min-height: 180px;
    outline: none;
    line-height: 1.65;
    font-size: 0.95rem;
    color: #1e293b;
    padding: 1rem;
    border: 1px solid rgba(197, 198, 207, 0.6);
    border-radius: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.step3-content-input[contenteditable="true"]:focus {
    border-color: #00677e;
    box-shadow: 0 0 0 3px rgba(0, 103, 126, 0.15);
}

.step3-content-input:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.step3-content-input ul {
    list-style-type: disc !important;
    padding-left: 1.75rem !important;
    margin: 0.5rem 0 !important;
}

.step3-content-input ol {
    list-style-type: decimal !important;
    padding-left: 1.75rem !important;
    margin: 0.5rem 0 !important;
}

.step3-content-input li {
    margin: 0.25rem 0 !important;
}

.step3-content-input h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #031635;
    margin: 1.25rem 0 0.5rem 0;
    line-height: 1.3;
}

.step3-content-input h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #031635;
    margin: 1rem 0 0.4rem 0;
}

.step3-content-input h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #031635;
    margin: 0.75rem 0 0.35rem 0;
}

.step3-content-input p {
    margin: 0.4rem 0;
}

#wordMiniToolbar {
    position: absolute;
    transform: translate(-50%, -100%);
    margin-top: -8px;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3));
    user-select: none;
    pointer-events: auto;
}

#wordMiniToolbar.toolbar-below {
    transform: translate(-50%, 0);
    margin-top: 8px;
}

#wordMiniToolbar::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1e293b;
}

#wordMiniToolbar.toolbar-below::after {
    top: -6px;
    bottom: auto;
    border-top: none;
    border-bottom: 6px solid #1e293b;
}

.btn-float-fmt {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

/* Word Mini Toolbar Color Switch for Light/Dark Mode */
#wmtColorDefault {
    background-color: #0f172a;
    transition: transform 0.15s ease, background-color 0.2s ease;
}
html.dark #wmtColorDefault {
    background-color: #ffffff !important;
    border: 1.5px solid #ffffff !important;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.75) !important;
}

.btn-float-fmt:hover {
    background-color: rgba(51, 65, 85, 0.9);
}

.btn-float-fmt:active {
    transform: scale(0.95);
}

/* Custom smooth scrollbar for modals and dropdowns */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   Pedagogical Callout Blocks
   ========================================================================== */

.callout-box {
    margin: 1.25rem 0;
    padding: 0.85rem 1.1rem 1rem 1.1rem;
    border-radius: 0.75rem;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 5px solid;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    user-select: text;
}

.callout-box:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
}

.callout-box .callout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    user-select: none;
}

.callout-box .callout-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.callout-box .callout-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.375rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.2;
}

.callout-box .callout-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.15);
}

.callout-box .callout-body {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 0.5rem;
    padding: 0.75rem 0.95rem;
    min-height: 52px;
    font-size: 0.95rem;
    line-height: 1.6;
    outline: none;
    cursor: text;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.callout-box .callout-body:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.callout-box .callout-body:empty::before,
.callout-box .callout-body[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
    font-style: italic;
}

/* Callout variants */
.callout-tip {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    border-left-color: #16a34a;
    color: #14532d;
}
.callout-tip .callout-title-wrap {
    color: #15803d;
}
.callout-tip .callout-body {
    color: #14532d;
}

.callout-important {
    background-color: #fffbeb;
    border-color: #fde68a;
    border-left-color: #d97706;
    color: #78350f;
}
.callout-important .callout-title-wrap {
    color: #b45309;
}
.callout-important .callout-body {
    color: #78350f;
}

.callout-case {
    background-color: #f0f9ff;
    border-color: #bae6fd;
    border-left-color: #0284c7;
    color: #0c4a6e;
}
.callout-case .callout-title-wrap {
    color: #0369a1;
}
.callout-case .callout-body {
    color: #0c4a6e;
}

.callout-reflection {
    background-color: #faf5ff;
    border-color: #e9d5ff;
    border-left-color: #9333ea;
    color: #581c87;
}
.callout-reflection .callout-title-wrap {
    color: #7e22ce;
}
.callout-reflection .callout-body {
    color: #581c87;
}

/* Callout insertion toolbar buttons */
.callout-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.15s ease;
    background: #ffffff;
}
.callout-toolbar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.btn-insert-tip {
    border-color: #bbf7d0;
    color: #15803d;
}
.btn-insert-tip:hover {
    background: #f0fdf4;
}
.btn-insert-important {
    border-color: #fde68a;
    color: #b45309;
}
.btn-insert-important:hover {
    background: #fffbeb;
}
.btn-insert-case {
    border-color: #bae6fd;
    color: #0369a1;
}
.btn-insert-case:hover {
    background: #f0f9ff;
}
.btn-insert-reflection {
    border-color: #e9d5ff;
    color: #7e22ce;
}
.btn-insert-reflection:hover {
    background: #faf5ff;
}

/* ==========================================================================
   Course Outline & Quick Navigation Panel
   ========================================================================== */

#courseOutlinePanel {
    position: fixed;
    right: 24px;
    top: 96px;
    bottom: 24px;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(197, 198, 207, 0.6);
    border-radius: 1rem;
    box-shadow: 0 10px 30px -5px rgba(3, 22, 53, 0.15);
    z-index: 40;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#courseOutlinePanel.collapsed {
    transform: translateX(360px);
    opacity: 0;
    pointer-events: none;
}

.outline-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.outline-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
}

.outline-mod-item {
    margin-bottom: 0.85rem;
}

.outline-mod-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--on-surface, #031635);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    border-radius: 0.35rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.outline-mod-title:hover {
    background-color: #f1f5f9;
}

.outline-les-item {
    font-size: 0.825rem;
    color: #475569;
    padding: 0.4rem 0.65rem 0.4rem 1.5rem;
    margin: 0.15rem 0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.outline-les-item:hover {
    background-color: #f8fafc;
    color: #00677e;
}

.outline-les-item.active {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
    border-left-color: #0284c7;
}

.outline-les-badges {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

/* Floating toggle button for Outline on screens */
#btnToggleOutline {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 45;
    background: #031635;
    color: #ffffff;
    box-shadow: 0 8px 20px -4px rgba(3, 22, 53, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#btnToggleOutline:hover {
    background: #00677e;
    transform: scale(1.05);
}

/* Step 2 Up/Down reorder buttons */
.btn-reorder-les {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-reorder-les:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}
.btn-reorder-les:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==========================================================================
   STITCH DARK MODE OVERRIDES & COMPONENT STYLING
   ========================================================================== */

html.dark .glass-card {
    background: #151f32;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.4);
}

html.dark .glass-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.6), 0 0 16px rgba(14, 165, 233, 0.15);
}

html.dark .minimal-input {
    background-color: #161b29;
    color: #ffffff;
    border: 1px solid #2a3850;
}

html.dark .minimal-input:focus {
    background-color: #1a2235;
    border-color: #2a3850;
    border-left: 3px solid #00d2fd;
    box-shadow: 0 0 0 1px rgba(0, 210, 253, 0.25);
}

html.dark select.minimal-input option {
    background-color: #151f32;
    color: #dde2f5;
}

html.dark .toast {
    background: #151f32;
    color: #dde2f5;
    border: 1px solid #2a3850;
    border-left-width: 4px;
    border-left-color: #00d2fd;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

html.dark #course-action-floating-menu {
    background-color: #151f32;
    border-color: #2a3850;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7);
}

html.dark #course-action-floating-menu a,
html.dark #course-action-floating-menu button {
    color: #dde2f5;
}

html.dark #course-action-floating-menu a:hover,
html.dark #course-action-floating-menu button:hover {
    background-color: #1c263c;
    color: #89ceff;
}

/* Modals & Dialogs */
html.dark #collaborators-modal > div,
html.dark #admin-login-modal > div,
html.dark #delete-confirm-modal > div,
html.dark #export-dialog-modal > div,
html.dark #inactivity-warning-modal > div,
html.dark #modal-create-user > div {
    background-color: #151f32 !important;
    color: #dde2f5 !important;
    border-color: #2a3850 !important;
}

html.dark #collaborators-modal .bg-surface-container-low,
html.dark #collaborators-modal .bg-surface-container-lowest,
html.dark #collaborators-modal .bg-white {
    background-color: #161b29 !important;
    border-color: #2a3850 !important;
    color: #dde2f5 !important;
}

/* Global Dark Mode Structural Elements */
html.dark header:not(.login-header),
html.dark header.bg-white,
html.dark header.bg-white\/90 {
    background-color: rgba(13, 19, 32, 0.95) !important;
    border-color: #2a3850 !important;
}

html.dark footer:not(.login-footer),
html.dark footer.bg-white {
    background-color: #0d1320 !important;
    border-color: #2a3850 !important;
    color: #94a3b8 !important;
}

/* Sømløs gradient på innloggingssiden (unngå bokser rundt header og footer) */
body.login-bg header,
body.login-bg footer,
html.dark body.login-bg header,
html.dark body.login-bg footer {
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

html.dark aside,
html.dark aside.bg-surface-container-low {
    background-color: #0d1320 !important;
    border-color: #2a3850 !important;
}

/* Card and Container Backgrounds in Dark Mode */
html.dark .bg-white {
    background-color: #151f32 !important;
    color: #dde2f5;
    border-color: #2a3850 !important;
}

html.dark .bg-surface-container,
html.dark .dark\:bg-surface-container {
    background-color: #151f32 !important;
}

html.dark .bg-surface-container-low,
html.dark .dark\:bg-surface-container-low,
html.dark [class*="bg-surface-container-low"]:not([class*="hover:"]):not([class*="focus:"]) {
    background-color: #161b29 !important;
}

html.dark .bg-surface-container-lowest,
html.dark .dark\:bg-surface-container-lowest,
html.dark [class*="bg-surface-container-lowest"]:not([class*="hover:"]):not([class*="focus:"]) {
    background-color: #080e1b !important;
}

html.dark .bg-surface-container-high,
html.dark .dark\:bg-surface-container-high,
html.dark [class*="bg-surface-container-high"]:not([class*="hover:"]):not([class*="focus:"]) {
    background-color: #242a38 !important;
}

html.dark .bg-slate-50,
html.dark .bg-slate-100 {
    background-color: #161b29 !important;
    border-color: #2a3850 !important;
}

/* Kursmetrikk-pille på kurskort (moduler, leksjoner, lesetid) */
.course-metrics-pill {
    background-color: rgba(239, 244, 255, 0.75);
    border-color: rgba(197, 198, 207, 0.5);
    color: #44474e;
}
.course-metrics-pill .metrics-icon {
    color: #00677e;
}
.course-metrics-pill .metrics-val {
    color: #1e293b;
    font-weight: 500;
}
.course-metrics-pill .metrics-time {
    color: #00677e;
}
.course-metrics-pill .metrics-divider {
    color: #cbd5e1;
}

html.dark .course-metrics-pill {
    background-color: #121824 !important;
    border-color: #2a3850 !important;
    color: #dde2f5 !important;
}
html.dark .course-metrics-pill .metrics-icon {
    color: #4cd7f6 !important;
}
html.dark .course-metrics-pill .metrics-val {
    color: #dde2f5 !important;
    font-weight: 500 !important;
}
html.dark .course-metrics-pill .metrics-time {
    color: #89ceff !important;
}
html.dark .course-metrics-pill .metrics-divider {
    color: #475569 !important;
}

/* Statusmerker i Dark Mode (Under arbeid og Ferdig) */
html.dark .status-badge-under-arbeid,
html.dark #status-badge-display .status-badge-under-arbeid,
html.dark #filmStatusBadgeDisplay .status-badge-under-arbeid {
    background-color: rgba(14, 165, 233, 0.18) !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
    color: #38bdf8 !important;
}
html.dark .status-badge-under-arbeid .material-symbols-outlined,
html.dark #status-badge-display .status-badge-under-arbeid .material-symbols-outlined,
html.dark #filmStatusBadgeDisplay .status-badge-under-arbeid .material-symbols-outlined {
    color: #38bdf8 !important;
}

html.dark .status-badge-ferdig,
html.dark #status-badge-display .status-badge-ferdig,
html.dark #filmStatusBadgeDisplay .status-badge-ferdig {
    background-color: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(52, 211, 153, 0.5) !important;
    color: #34d399 !important;
}
html.dark .status-badge-ferdig .material-symbols-outlined,
html.dark #status-badge-display .status-badge-ferdig .material-symbols-outlined,
html.dark #filmStatusBadgeDisplay .status-badge-ferdig .material-symbols-outlined {
    color: #34d399 !important;
}

/* Text and Headings in Dark Mode */
html.dark .text-primary {
    color: #89ceff !important;
}

html.dark .text-on-surface {
    color: #dde2f5 !important;
}

html.dark .text-on-surface-variant {
    color: #94a3b8 !important;
}

html.dark .text-outline {
    color: #728299 !important;
}

/* Secondary Text, Border and Icons in Dark Mode - crisp, high-contrast cyan */
html.dark .text-secondary {
    color: #38bdf8 !important;
}

html.dark .border-secondary {
    border-color: #38bdf8 !important;
}

html.dark .hover\:text-secondary:hover {
    color: #38bdf8 !important;
}

html.dark .border-b-2.border-secondary {
    border-bottom-color: #38bdf8 !important;
}

html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4 {
    color: #dde2f5;
}

html.dark .text-white {
    color: #ffffff !important;
}

/* Buttons with bg-primary or bg-secondary keep white/appropriate text */
html.dark button.bg-primary,
html.dark a.btn.bg-primary,
html.dark .btn.bg-primary,
html.dark .btn-primary {
    background-color: #00677e !important;
    color: #ffffff !important;
}

html.dark button.bg-primary:hover,
html.dark a.btn.bg-primary:hover,
html.dark .btn.bg-primary:hover,
html.dark .btn-primary:hover {
    background-color: #005669 !important;
}

/* Header banner in mal.html - ingen hover fargeendring */
#course-header-banner,
#course-header-banner:hover,
header.bg-primary:hover {
    cursor: default;
}
html.dark #course-header-banner,
html.dark #course-header-banner:hover {
    background-color: #151f32 !important;
}

html.dark .bg-secondary,
html.dark button.bg-secondary {
    background-color: #007d99 !important;
    color: #ffffff !important;
}

/* Inputs, Textareas, and Selects in Dark Mode */
html.dark input:not([type="checkbox"]):not([type="radio"]),
html.dark textarea,
html.dark select {
    background-color: #161b29 !important;
    border-color: #2a3850 !important;
    color: #dde2f5 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: rgba(148, 163, 184, 0.6) !important;
}

/* Tables in Dark Mode */
html.dark table thead tr,
html.dark table thead th {
    background-color: #0d1320 !important;
    border-color: #2a3850 !important;
    color: #94a3b8 !important;
}

html.dark table tbody tr {
    border-color: #2a3850 !important;
}

html.dark table tbody tr:hover {
    background-color: #161b29 !important;
}

/* Floating Menus and Dropdowns */
html.dark #course-action-floating-menu,
html.dark #userProfileDropdown,
html.dark #notifDropdown {
    background-color: #151f32 !important;
    border-color: #2a3850 !important;
    color: #dde2f5 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
}

html.dark #course-action-floating-menu a,
html.dark #course-action-floating-menu button,
html.dark #userProfileDropdown a,
html.dark #userProfileDropdown button {
    color: #dde2f5 !important;
}

html.dark #course-action-floating-menu a:hover,
html.dark #course-action-floating-menu button:hover,
html.dark #userProfileDropdown a:hover,
html.dark #userProfileDropdown button:hover {
    background-color: #1c263c !important;
    color: #89ceff !important;
}

/* Hero / Special Banners */
html.dark .from-blue-50,
html.dark [class*="from-blue-50"] {
    --tw-gradient-from: #151f32 !important;
    --tw-gradient-to: #161b29 !important;
    --tw-gradient-stops: #151f32, #161b29 !important;
    border-color: #2a3850 !important;
}

/* Steg 2 & 3 Builder Elements in Dark Mode */
html.dark .structure-module {
    background: #151f32 !important;
    border-color: #2a3850 !important;
}
html.dark .structure-module:hover {
    border-color: #4cd7f6 !important;
}
html.dark .structure-lesson-list {
    border-left-color: #2a3850 !important;
}
html.dark .structure-lesson-item::before {
    background: #2a3850 !important;
}

html.dark .card-header-bar {
    background: #161b29 !important;
    border-left-color: #89ceff !important;
    color: #dde2f5 !important;
}

html.dark .btn-add {
    background: #151f32 !important;
    color: #89ceff !important;
    border-color: #2a3850 !important;
}
html.dark .btn-add:hover {
    background: #1c263c !important;
    border-color: #4cd7f6 !important;
    color: #4cd7f6 !important;
}

/* Radio / Toggle Group Dark Mode (Ja / Nei) */
html.dark .toggle-group {
    background: #121824 !important;
    border: 1px solid #2a3850 !important;
}

html.dark .toggle-group .toggle-option {
    color: #94a3b8 !important;
    font-weight: 500 !important;
    background: transparent !important;
}

html.dark .toggle-group .toggle-option:hover {
    color: #dde2f5 !important;
}

html.dark .toggle-group input[type="radio"]:checked + span,
html.dark .toggle-group input[type="radio"]:checked + .toggle-option,
html.dark .toggle-group .toggle-option.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4) !important;
}

/* Conditional Section Boxes in Dark Mode */
html.dark .conditional-box {
    background: #0f172a !important;
    border: 1px solid #2a3850 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    border-radius: var(--radius-lg) !important;
}

html.dark .conditional-box label,
html.dark .conditional-box .form-group label {
    color: #89ceff !important;
}

html.dark .conditional-box .text-primary {
    color: #89ceff !important;
}

html.dark .conditional-box .text-on-surface-variant {
    color: #94a3b8 !important;
}

/* Upload Dropzone in Dark Mode */
html.dark .upload-dropzone {
    background: #161b29 !important;
    border: 2px dashed #2a3850 !important;
    color: #dde2f5 !important;
}

html.dark .upload-dropzone:hover {
    background: #1c263c !important;
    border-color: #38bdf8 !important;
}

html.dark .upload-dropzone .font-semibold,
html.dark .upload-dropzone .text-primary {
    color: #dde2f5 !important;
}

html.dark .btn-upload-trigger {
    background: #00677e !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 103, 126, 0.3) !important;
}

html.dark .btn-upload-trigger:hover {
    background: #005669 !important;
}

/* Textareas and inputs inside conditional boxes */
html.dark .conditional-box textarea,
html.dark .conditional-box input[type="text"] {
    background-color: #161b29 !important;
    border-color: #2a3850 !important;
    color: #dde2f5 !important;
}

html.dark .conditional-box textarea:focus,
html.dark .conditional-box input[type="text"]:focus {
    background-color: #1a2235 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25) !important;
}

/* Custom Radio Option Cards in Video / Quiz */
html.dark .custom-option {
    background: #161b29 !important;
    border: 1px solid #2a3850 !important;
    color: #dde2f5 !important;
}

html.dark .custom-option:hover {
    background: #1c263c !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

html.dark .custom-option input:checked + span,
html.dark .custom-option:has(input:checked) {
    background: #1c263c !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

/* Quiz Card in Dark Mode */
html.dark .quiz-card {
    background: #161b29 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

html.dark .conditional-box .text-amber-800,
html.dark [id^="quizBox_"] .text-amber-800,
html.dark .quiz-card .text-amber-800,
html.dark .text-amber-800 {
    color: #fde68a !important;
}

html.dark .conditional-box .text-amber-900,
html.dark [id^="quizBox_"] .text-amber-900,
html.dark .quiz-header-bar h3,
html.dark .quiz-card .text-amber-900,
html.dark .text-amber-900 {
    color: #fde68a !important;
}

html.dark .btn-delete {
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    background: transparent !important;
}

html.dark .btn-delete:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

html.dark .btn-remove-alt {
    color: #f87171 !important;
}

html.dark .btn-remove-alt:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5 !important;
}

html.dark .structure-module .btn-add,
html.dark .quiz-card .btn-add {
    background: #161b29 !important;
    border: 1px dashed #2a3850 !important;
    color: #89ceff !important;
}

html.dark .structure-module .btn-add:hover,
html.dark .quiz-card .btn-add:hover {
    background: #1c263c !important;
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
}

html.dark .btn-secondary {
    background: #161b29 !important;
    border-color: #2a3850 !important;
    color: #89ceff !important;
}

html.dark .btn-secondary:hover {
    background: #1c263c !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

/* Button with bg-secondary-container in Dark Mode (e.g. Ferdigstill) */
html.dark .bg-secondary-container,
html.dark button.bg-secondary-container {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}
html.dark .bg-secondary-container:hover,
html.dark button.bg-secondary-container:hover {
    background-color: #0369a1 !important;
    color: #ffffff !important;
}

/* Callout blocks in Dark Mode */
html.dark .callout-tip {
    background-color: rgba(20, 83, 45, 0.25) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    border-left-color: #22c55e !important;
    color: #bbf7d0 !important;
}
html.dark .callout-tip .callout-title-wrap {
    color: #4ade80 !important;
}
html.dark .callout-tip .callout-body {
    color: #dcfce7 !important;
}

html.dark .callout-important {
    background-color: rgba(120, 53, 15, 0.25) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    border-left-color: #f59e0b !important;
    color: #fde68a !important;
}
html.dark .callout-important .callout-title-wrap {
    color: #fbbf24 !important;
}
html.dark .callout-important .callout-body {
    color: #fef3c7 !important;
}

html.dark .callout-case {
    background-color: rgba(12, 74, 110, 0.25) !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
    border-left-color: #0ea5e9 !important;
    color: #bae6fd !important;
}
html.dark .callout-case .callout-title-wrap {
    color: #38bdf8 !important;
}
html.dark .callout-case .callout-body {
    color: #e0f2fe !important;
}

html.dark .callout-reflection {
    background-color: rgba(88, 28, 135, 0.25) !important;
    border-color: rgba(168, 85, 247, 0.4) !important;
    border-left-color: #a855f7 !important;
    color: #e9d5ff !important;
}
html.dark .callout-reflection .callout-title-wrap {
    color: #c084fc !important;
}
html.dark .callout-reflection .callout-body {
    color: #f3e8ff !important;
}

/* Fargerike toolbar-knapper for callouts i Dark Mode */
html.dark .callout-toolbar-btn {
    background-color: #161b29;
    border-color: #2a3850;
    color: #dde2f5;
}

html.dark .btn-insert-tip {
    background-color: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(74, 222, 128, 0.45) !important;
    color: #4ade80 !important;
}
html.dark .btn-insert-tip:hover {
    background-color: rgba(34, 197, 94, 0.25) !important;
    border-color: #22c55e !important;
    color: #86efac !important;
}

html.dark .btn-insert-important {
    background-color: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
    color: #fbbf24 !important;
}
html.dark .btn-insert-important:hover {
    background-color: rgba(245, 158, 11, 0.25) !important;
    border-color: #f59e0b !important;
    color: #fde68a !important;
}

html.dark .btn-insert-case {
    background-color: rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    color: #38bdf8 !important;
}
html.dark .btn-insert-case:hover {
    background-color: rgba(14, 165, 233, 0.25) !important;
    border-color: #0ea5e9 !important;
    color: #7dd3fc !important;
}

html.dark .btn-insert-reflection {
    background-color: rgba(168, 85, 247, 0.12) !important;
    border-color: rgba(192, 132, 252, 0.45) !important;
    color: #c084fc !important;
}
html.dark .btn-insert-reflection:hover {
    background-color: rgba(168, 85, 247, 0.25) !important;
    border-color: #a855f7 !important;
    color: #e9d5ff !important;
}

/* Outline Drawer in Mal */
/* Inaktiv leksjon har ingen synlig kantlinje eller halvmåne */
html.dark .outline-les-item {
    background-color: transparent !important;
    color: #94a3b8 !important;
    border: none !important;
    border-left: 2px solid transparent !important;
    box-shadow: none !important;
}

html.dark .outline-les-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #dde2f5 !important;
    border: none !important;
    border-left: 2px solid transparent !important;
}

html.dark .outline-les-item.active {
    background-color: rgba(0, 210, 253, 0.12) !important;
    color: #89ceff !important;
    font-weight: 600 !important;
    border: none !important;
    border-left: 3px solid #00d2fd !important;
    box-shadow: none !important;
}

html.dark #btnToggleOutline {
    background: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 8px 20px -4px rgba(14, 165, 233, 0.4);
}

html.dark #btnToggleOutline:hover {
    background: #0284c7;
}

html.dark .btn-reorder-les {
    color: #94a3b8;
    border-color: #2a3850;
    background: #161b29;
}

html.dark .btn-reorder-les:hover:not(:disabled) {
    background: #242a38;
    color: #dde2f5;
    border-color: #89ceff;
}

/* Callout Boxes in Dark Mode */
html.dark .callout-box {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
html.dark .callout-box:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}
html.dark .callout-box .callout-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
html.dark .callout-box .callout-delete-btn {
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
html.dark .callout-box .callout-delete-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
}
html.dark .callout-box .callout-body {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}
html.dark .callout-box .callout-body:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}
html.dark .callout-box .callout-body:empty::before,
html.dark .callout-box .callout-body[data-placeholder]:empty::before {
    color: #64748b;
}

/* Callout Variants in Dark Mode */
html.dark .callout-tip {
    background-color: rgba(22, 101, 52, 0.15);
    border-color: rgba(74, 222, 128, 0.25);
    border-left-color: #22c55e;
}
html.dark .callout-tip .callout-title-wrap {
    color: #4ade80;
}

html.dark .callout-important {
    background-color: rgba(180, 83, 9, 0.15);
    border-color: rgba(251, 191, 36, 0.25);
    border-left-color: #f59e0b;
}
html.dark .callout-important .callout-title-wrap {
    color: #fbbf24;
}

html.dark .callout-case {
    background-color: rgba(3, 105, 161, 0.15);
    border-color: rgba(56, 189, 248, 0.25);
    border-left-color: #0ea5e9;
}
html.dark .callout-case .callout-title-wrap {
    color: #38bdf8;
}

html.dark .callout-reflection {
    background-color: rgba(126, 34, 206, 0.15);
    border-color: rgba(192, 132, 252, 0.25);
    border-left-color: #a855f7;
}
html.dark .callout-reflection .callout-title-wrap {
    color: #c084fc;
}

/* Outline Panel (Innholdsfortegnelse) in Dark Mode */
html.dark #courseOutlinePanel {
    background: rgba(21, 31, 50, 0.96) !important;
    backdrop-filter: blur(16px);
    border: 1px solid #2a3850 !important;
    box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.7) !important;
}
html.dark #courseOutlinePanel .outline-header {
    border-bottom: 1px solid #2a3850 !important;
}
html.dark #courseOutlinePanel .outline-header span {
    color: #89ceff !important;
}
html.dark #courseOutlinePanel .outline-mod-item,
html.dark .outline-mod-item {
    border: none !important;
}
html.dark #courseOutlinePanel .outline-mod-title,
html.dark .outline-mod-title {
    color: #e2e8f0 !important;
    border: none !important;
}
html.dark #courseOutlinePanel .outline-mod-title:hover,
html.dark .outline-mod-title:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}
/* Punktmerker foran moduler i innholdsfortegnelse i mørk modus */
html.dark .outline-mod-dot {
    background-color: #38bdf8 !important;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.6) !important;
}
/* Leksjonselementer i innholdsfortegnelse i mørk modus */
html.dark #courseOutlinePanel .outline-les-item,
html.dark .outline-les-item {
    background-color: transparent !important;
    color: #94a3b8 !important;
    border: none !important;
    border-left: 3px solid transparent !important;
    box-shadow: none !important;
    outline: none !important;
}
html.dark #courseOutlinePanel .outline-les-item:hover,
html.dark .outline-les-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #dde2f5 !important;
    border: none !important;
    border-left: 3px solid transparent !important;
}
html.dark #courseOutlinePanel .outline-les-item.active,
html.dark .outline-les-item.active {
    background-color: rgba(0, 210, 253, 0.12) !important;
    color: #89ceff !important;
    font-weight: 600 !important;
    border: none !important;
    border-left: 3px solid #00d2fd !important;
    box-shadow: none !important;
}
html.dark #courseOutlinePanel .btn-remove-alt {
    color: #94a3b8 !important;
}
html.dark #courseOutlinePanel .btn-remove-alt:hover {
    color: #f87171 !important;
}

/* Universal Role Badges (Admin Panel, Profile & Header) */
.badge-role-admin {
    background-color: #fef3c7 !important;
    color: #78350f !important;
    border: 1px solid #fcd34d !important;
}
.badge-role-producer {
    background-color: #dbeafe !important;
    color: #1e3a8a !important;
    border: 1px solid #93c5fd !important;
}
.badge-role-user {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
}

/* Course Card Action Buttons in Dark Mode (Duplicate, Export, Collaborators, Delete) */
html.dark .course-card-action-btn {
    background-color: rgba(56, 189, 248, 0.1) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    color: #38bdf8 !important;
}
html.dark .course-card-action-btn:hover {
    background-color: rgba(56, 189, 248, 0.22) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}
html.dark .course-card-delete-btn {
    background-color: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.5) !important;
    color: #f87171 !important;
}
html.dark .course-card-delete-btn:hover {
    background-color: rgba(239, 68, 68, 0.28) !important;
    border-color: #f87171 !important;
    color: #ffffff !important;
}

/* Stats Bento Grid Icon Boxes in Dark Mode */
html.dark #card-stat-total .w-14,
html.dark #card-stat-middle .w-14 {
    background-color: rgba(56, 189, 248, 0.14) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    color: #38bdf8 !important;
}
html.dark #card-stat-completed .w-14 {
    background-color: rgba(52, 211, 153, 0.15) !important;
    border: 1px solid rgba(52, 211, 153, 0.4) !important;
    color: #34d399 !important;
}

/* Top Navigation Mode Buttons */
.btn-nav-mode-admin {
    background-color: rgba(254, 243, 199, 0.8) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    color: #78350f !important;
}
html.dark .btn-nav-mode-admin {
    background-color: rgba(180, 83, 9, 0.2) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    color: #fbbf24 !important;
}
.btn-nav-mode-producer {
    background-color: rgba(219, 234, 254, 0.8) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    color: #1e3a8a !important;
}
html.dark .btn-nav-mode-producer {
    background-color: rgba(30, 58, 138, 0.25) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
    color: #93c5fd !important;
}
.btn-nav-mode-user {
    background-color: rgba(241, 245, 249, 0.8) !important;
    border-color: rgba(203, 213, 225, 0.6) !important;
    color: #334155 !important;
}
html.dark .btn-nav-mode-user {
    background-color: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #cbd5e1 !important;
}

/* ==========================================================================
   Dynamisk Tekstfarge-arkitektur (Mørk / Lys Modus & Manuelle Farger)
   ========================================================================== */

/* 1. MØRK MODUS (html.dark) - Standard tekst er hvit (#ffffff) */
html.dark .step3-content-input[contenteditable="true"] {
    background-color: #161b29 !important;
    color: #ffffff !important;
    border-color: #2a3850 !important;
}

html.dark .step3-content-input h1,
html.dark .step3-content-input h2,
html.dark .step3-content-input h3,
html.dark .step3-content-input p,
html.dark .step3-content-input li,
html.dark .step3-content-input div,
html.dark .step3-content-input blockquote {
    color: #ffffff !important;
}

/* Pedagogiske infobokser (Tips, Viktig, Eksempel, Refleksjon) i mørk modus */
html.dark .callout-box .callout-body,
html.dark .callout-box .callout-body p,
html.dark .callout-box .callout-body div,
html.dark .callout-box .callout-body li {
    color: #ffffff !important;
}

/* Kunnskapskontroll (Quiz) i mørk modus */
html.dark .quiz-card,
html.dark .quiz-card .quiz-question-text,
html.dark .quiz-card .quiz-alt-text,
html.dark .quiz-card .quiz-alt-feedback {
    color: #ffffff !important;
}

/* Alle inndatafelter og tekstområder i mørk modus */
html.dark .minimal-input,
html.dark input[type="text"].minimal-input,
html.dark textarea.minimal-input,
html.dark select.minimal-input,
html.dark .step3-intro-input,
html.dark .step3-notes-input,
html.dark .step3-video-speak,
html.dark .mod-name-input,
html.dark .les-name-input,
html.dark #kursTittel,
html.dark #malgruppe,
html.dark #laeringsmal,
html.dark #kursbeskrivelse {
    color: #ffffff !important;
}

/* 2. LYS MODUS (html:not(.dark)) - Standard tekst er sort (#0f172a) */
html:not(.dark) .step3-content-input[contenteditable="true"] {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(197, 198, 207, 0.6) !important;
}

html:not(.dark) .step3-content-input h1,
html:not(.dark) .step3-content-input h2,
html:not(.dark) .step3-content-input h3 {
    color: #031635 !important;
}

html:not(.dark) .step3-content-input p,
html:not(.dark) .step3-content-input li,
html:not(.dark) .step3-content-input div,
html:not(.dark) .step3-content-input blockquote {
    color: #0f172a !important;
}

/* Pedagogiske infobokser i lys modus */
html:not(.dark) .callout-box .callout-body,
html:not(.dark) .callout-box .callout-body p,
html:not(.dark) .callout-box .callout-body div,
html:not(.dark) .callout-box .callout-body li {
    color: #0f172a !important;
}

/* Kunnskapskontroll i lys modus */
html:not(.dark) .quiz-card .quiz-question-text,
html:not(.dark) .quiz-card .quiz-alt-text,
html:not(.dark) .quiz-card .quiz-alt-feedback {
    color: #0f172a !important;
}

/* Alle inndatafelter og tekstområder i lys modus */
html:not(.dark) .minimal-input,
html:not(.dark) input[type="text"].minimal-input,
html:not(.dark) textarea.minimal-input,
html:not(.dark) select.minimal-input,
html:not(.dark) .step3-intro-input,
html:not(.dark) .step3-notes-input,
html:not(.dark) .step3-video-speak,
html:not(.dark) .mod-name-input,
html:not(.dark) .les-name-input,
html:not(.dark) #kursTittel,
html:not(.dark) #malgruppe,
html:not(.dark) #laeringsmal,
html:not(.dark) #kursbeskrivelse {
    color: #0f172a !important;
}

/* 3. RESIPROK OVERSTYRING AV HARDKODET HVIT / SORT VED MODUSVEKSLING
      (Sikrer at tekst aldri blir usynlig på bakgrunnen ved modusskifte,
       mens alle manuelle spesialfarger som f.eks. blå #0284c7, oransje #b45309,
       grønn #15803d, marineblå #003366 forblir 100% uberørt) */

/* I mørk modus: konverter enhver eksplisitt sort/mørk tekst til hvit (#ffffff) */
html.dark .step3-content-input font[color="#0f172a" i],
html.dark .step3-content-input font[color="#000000" i],
html.dark .step3-content-input font[color="#000" i],
html.dark .step3-content-input font[color="black" i],
html.dark .step3-content-input font[color="#1e293b" i],
html.dark .step3-content-input font[color="#0b1c30" i],
html.dark .step3-content-input font[color="#031635" i],
html.dark .step3-content-input span[style*="#0f172a" i],
html.dark .step3-content-input span[style*="#000000" i],
html.dark .step3-content-input span[style*="#000" i],
html.dark .step3-content-input span[style*="black" i],
html.dark .step3-content-input span[style*="rgb(15, 23, 42)" i],
html.dark .step3-content-input span[style*="rgb(15,23,42)" i],
html.dark .step3-content-input span[style*="rgb(0, 0, 0)" i],
html.dark .step3-content-input span[style*="rgb(0,0,0)" i],
html.dark .step3-content-input span[style*="rgb(30, 41, 59)" i],
html.dark .step3-content-input span[style*="rgb(30,41,59)" i],
html.dark .callout-body font[color="#0f172a" i],
html.dark .callout-body font[color="#000000" i],
html.dark .callout-body font[color="#000" i],
html.dark .callout-body font[color="black" i],
html.dark .callout-body font[color="#1e293b" i],
html.dark .callout-body font[color="#0b1c30" i],
html.dark .callout-body font[color="#031635" i],
html.dark .callout-body span[style*="#0f172a" i],
html.dark .callout-body span[style*="#000000" i],
html.dark .callout-body span[style*="#000" i],
html.dark .callout-body span[style*="black" i],
html.dark .callout-body span[style*="rgb(15, 23, 42)" i],
html.dark .callout-body span[style*="rgb(15,23,42)" i],
html.dark .callout-body span[style*="rgb(0, 0, 0)" i],
html.dark .callout-body span[style*="rgb(0,0,0)" i] {
    color: #ffffff !important;
}

/* I lys modus: konverter enhver eksplisitt hvit tekst til sort (#0f172a) */
html:not(.dark) .step3-content-input font[color="#ffffff" i],
html:not(.dark) .step3-content-input font[color="#fff" i],
html:not(.dark) .step3-content-input font[color="white" i],
html:not(.dark) .step3-content-input font[color="#f8fafc" i],
html:not(.dark) .step3-content-input span[style*="#ffffff" i],
html:not(.dark) .step3-content-input span[style*="#fff" i],
html:not(.dark) .step3-content-input span[style*="white" i],
html:not(.dark) .step3-content-input span[style*="rgb(255, 255, 255)" i],
html:not(.dark) .step3-content-input span[style*="rgb(255,255,255)" i],
html:not(.dark) .step3-content-input span[style*="#f8fafc" i],
html:not(.dark) .callout-body font[color="#ffffff" i],
html:not(.dark) .callout-body font[color="#fff" i],
html:not(.dark) .callout-body font[color="white" i],
html:not(.dark) .callout-body font[color="#f8fafc" i],
html:not(.dark) .callout-body span[style*="#ffffff" i],
html:not(.dark) .callout-body span[style*="#fff" i],
html:not(.dark) .callout-body span[style*="white" i],
html:not(.dark) .callout-body span[style*="rgb(255, 255, 255)" i],
html:not(.dark) .callout-body span[style*="rgb(255,255,255)" i] {
    color: #0f172a !important;
}

/* ==========================================================================
   Film- & Videomanus: Standard Manuskript & Typografi
   ========================================================================== */

/* Google Font: Courier Prime for autentisk filmmanus-layout */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap');

.font-courier {
    font-family: 'Courier Prime', 'Courier New', Courier, monospace;
}

/* Modusveksler for Film-editor (Tydelig og stor frittstående kontroll) */
.film-view-toggle-standalone {
    display: inline-flex;
    align-items: center;
    background-color: var(--color-surface-container-low, #f1f5f9);
    border: 1px solid var(--color-outline-variant, #cbd5e1);
    border-radius: 1rem;
    padding: 4px;
    gap: 4px;
}
html.dark .film-view-toggle-standalone {
    background-color: #1e293b;
    border-color: #334155;
}

.film-view-btn-prominent {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
}
.film-view-btn-prominent:hover {
    color: #0f172a;
    background-color: rgba(0, 0, 0, 0.05);
}
html.dark .film-view-btn-prominent {
    color: #94a3b8;
}
html.dark .film-view-btn-prominent:hover {
    color: #f8fafc;
    background-color: rgba(255, 255, 255, 0.06);
}

.film-view-btn-prominent.active {
    background-color: #003366;
    color: #ffffff !important;
    box-shadow: 0 2px 6px -1px rgba(0, 51, 102, 0.35);
}
html.dark .film-view-btn-prominent.active {
    background-color: #00677e;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 103, 126, 0.45);
}

/* Modusveksler (Segmented Control) */
.film-view-toggle {
    display: inline-flex;
    background-color: var(--color-surface-container-high, #e2e8f0);
    border: 1px solid var(--color-outline-variant, #cbd5e1);
    border-radius: 9999px;
    padding: 3px;
    gap: 2px;
}
html.dark .film-view-toggle {
    background-color: #1e293b;
    border-color: #334155;
}

.film-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s ease;
    color: #64748b;
    cursor: pointer;
    border: none;
    background: transparent;
}
.film-view-btn:hover {
    color: #0f172a;
}
html.dark .film-view-btn {
    color: #94a3b8;
}
html.dark .film-view-btn:hover {
    color: #f8fafc;
}

.film-view-btn.active {
    background-color: #ffffff;
    color: #003366;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
html.dark .film-view-btn.active {
    background-color: #2b3952;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Screenplay Paper (Papirark i Courier for ekte manusopplevelse) */
.screenplay-paper {
    background: #ffffff;
    color: #111827;
    font-family: 'Courier Prime', 'Courier New', Courier, monospace;
    font-size: 12pt;
    line-height: 1.45;
    padding: 3.5rem 3.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 850px;
    margin: 0 auto;
}
html.dark .screenplay-paper {
    background: #171d28;
    color: #f1f5f9;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Storyboard & Referansebilde i Scenebygger */
.scene-visuals-preview-col {
    width: 220px;
    max-width: 100%;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .scene-visuals-preview-col {
        width: 100%;
    }
}

/* Elementer i Screenplay-modus (Standard bransjemarger og regler) */
.sp-title-header {
    text-align: center;
    border-bottom: 2px solid currentColor;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
}
.sp-title-header h1 {
    font-size: 18pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.sp-scene-block {
    margin-bottom: 2.5rem;
    page-break-inside: avoid;
}

.sp-slugline {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.25);
    padding-bottom: 0.25rem;
}

.sp-action {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.4;
    white-space: pre-wrap;
}

.sp-dialogue-group {
    margin: 1.25rem auto;
    max-width: 480px;
}

.sp-character {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    margin-bottom: 0.2rem;
}

.sp-parenthetical {
    text-align: center;
    font-style: italic;
    margin-bottom: 0.2rem;
    opacity: 0.9;
}

.sp-dialogue-text {
    text-align: left;
    margin: 0 auto;
    line-height: 1.35;
    white-space: pre-wrap;
}

.sp-transition {
    text-align: right;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.sp-production-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9pt;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.3);
}
html.dark .sp-production-badge {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.2);
}

/* -------------------------------------------------------------------------
   DASHBOARD ACTION BUTTONS (Opprett Kursmanus, Opprett Filmmanus, Gå til oversikt)
   ------------------------------------------------------------------------- */
.dashboard-action-btn {
    background-color: #ffffff;
    color: #031635;
    border: 1px solid rgba(197, 198, 207, 0.6);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-action-btn .btn-icon {
    color: #00677e;
    transition: color 0.2s ease, transform 0.2s ease;
}
.dashboard-action-btn:hover {
    background-color: #00677e !important;
    color: #ffffff !important;
    border-color: #004e5f !important;
    box-shadow: 0 4px 14px rgba(0, 103, 126, 0.35);
    transform: translateY(-1px);
}
.dashboard-action-btn:hover .btn-icon {
    color: #ffffff !important;
    transform: scale(1.08);
}

/* Dark mode dashboard action buttons */
html.dark .dashboard-action-btn {
    background-color: #151f32 !important;
    color: #89ceff !important;
    border-color: #2a3850 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
html.dark .dashboard-action-btn .btn-icon {
    color: #38bdf8 !important;
}
html.dark .dashboard-action-btn:hover {
    background-color: #00677e !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 18px rgba(0, 103, 126, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-1px);
}
html.dark .dashboard-action-btn:hover .btn-icon {
    color: #ffffff !important;
    transform: scale(1.08);
}

/* -------------------------------------------------------------------------
   EDITOR FLOATING BOTTOM BAR (Kursmanus & Filmmanus)
   ------------------------------------------------------------------------- */
.editor-floating-bar {
    background-color: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

html.dark .editor-floating-bar {
    background-color: rgba(21, 31, 50, 0.94) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.6), 0 10px 15px -5px rgba(0, 0, 0, 0.5) !important;
    color: #dde2f5;
}

.editor-floating-bar #action-buttons-container,
.editor-floating-bar #filmActionButtonsContainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
    width: 100%;
}

.editor-floating-bar .editor-actions-main {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1 1 auto;
    min-width: 0;
}

.editor-floating-bar .editor-actions-main .editor-btn-save,
.editor-floating-bar .editor-actions-main .editor-btn-takeover,
.editor-floating-bar .editor-actions-main .editor-btn-revert {
    margin-left: auto;
}

.editor-floating-bar .editor-actions-delete {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 0.25rem;
    padding-left: 0.625rem;
    border-left: 1px solid rgba(203, 213, 225, 0.4);
}

html.dark .editor-floating-bar .editor-actions-delete {
    border-left-color: rgba(255, 255, 255, 0.12);
}

/* Floating bar back button (Innrammet tertiærknapp) */
.editor-floating-bar .editor-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: rgba(241, 245, 249, 0.7);
    color: #334155;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.editor-floating-bar .editor-btn-back:hover {
    background: rgba(226, 232, 240, 0.9);
    border-color: rgba(148, 163, 184, 0.6);
    color: #0f172a;
}

html.dark .editor-floating-bar .editor-btn-back {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

html.dark .editor-floating-bar .editor-btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

html.dark .editor-floating-bar .editor-autosave-status {
    color: #94a3b8;
}

/* Floating bar Undo/Redo buttons (Fast plassering & tydelig knappestil) */
.editor-floating-bar .editor-floating-actions-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

@media (max-width: 1023px) {
    .editor-floating-bar .editor-floating-actions-wrapper {
        width: 100%;
        justify-content: space-between;
    }
}

.editor-floating-bar #historyControlsGroup {
    flex-shrink: 0;
}

.editor-floating-bar .editor-btn-history {
    transition: all 0.15s ease;
    user-select: none;
    min-width: 78px;
    justify-content: center;
}

.editor-floating-bar .editor-btn-history:not(:disabled) {
    background-color: #ffffff;
    border-color: rgba(203, 213, 225, 0.9);
    color: #1e293b;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.editor-floating-bar .editor-btn-history:hover:not(:disabled) {
    transform: translateY(-1px);
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: var(--primary, #1e3a8a);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
}

.editor-floating-bar .editor-btn-history:active:not(:disabled) {
    transform: translateY(0);
}

.editor-floating-bar .editor-btn-history:disabled {
    opacity: 0.38 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    background-color: rgba(241, 245, 249, 0.6) !important;
    border-color: rgba(203, 213, 225, 0.5) !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

html.dark .editor-floating-bar .editor-btn-history:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}

html.dark .editor-floating-bar .editor-btn-history:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.4);
}

html.dark .editor-floating-bar .editor-btn-history:disabled {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #64748b !important;
    box-shadow: none !important;
}

/* Rise 360-stil Undo Toast & Slette-toast */
#kmUndoToastNotification {
    position: fixed !important;
    bottom: 5.5rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    background-color: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.35) !important;
    border-radius: 0.75rem !important;
    animation: undoToastPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
html.dark #kmUndoToastNotification {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
#kmUndoToastNotification #kmUndoToastBtn {
    background-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
}
#kmUndoToastNotification #kmUndoToastBtn:hover {
    background-color: rgba(255, 255, 255, 0.28) !important;
}
#kmUndoToastNotification #kmUndoToastCloseBtn {
    color: rgba(255, 255, 255, 0.7) !important;
}
#kmUndoToastNotification #kmUndoToastCloseBtn:hover {
    color: #ffffff !important;
}
@keyframes undoToastPop {
    from {
        opacity: 0;
        transform: translate(-50%, 12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

html.dark .editor-floating-bar .editor-btn-collab {
    border-color: rgba(56, 189, 248, 0.4) !important;
    background-color: rgba(56, 189, 248, 0.12) !important;
    color: #38bdf8 !important;
}
html.dark .editor-floating-bar .editor-btn-collab:hover {
    background-color: rgba(56, 189, 248, 0.22) !important;
}

html.dark .editor-floating-bar .editor-btn-delete {
    border-color: rgba(248, 113, 113, 0.4) !important;
    background-color: rgba(248, 113, 113, 0.12) !important;
    color: #f87171 !important;
}
html.dark .editor-floating-bar .editor-btn-delete:hover {
    background-color: rgba(248, 113, 113, 0.22) !important;
}

html.dark .editor-floating-bar .editor-btn-export {
    border-color: rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #dde2f5 !important;
}
html.dark .editor-floating-bar .editor-btn-export:hover {
    background-color: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

/* Save button: disabled state */
.editor-btn-save.is-disabled {
    background-color: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1px solid #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 0.65;
}
html.dark .editor-btn-save.is-disabled {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #64748b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    cursor: not-allowed !important;
    opacity: 0.65;
}

/* Save button: read-only locked state (uten lagringsrettigheter) */
.editor-btn-save.is-readonly-locked {
    background-color: #f8fafc !important;
    color: #64748b !important;
    border: 1px dashed #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 0.75;
}
.editor-btn-save.is-readonly-locked:hover {
    background-color: #f1f5f9 !important;
}
html.dark .editor-btn-save.is-readonly-locked {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #94a3b8 !important;
    border: 1px dashed rgba(255, 255, 255, 0.18) !important;
    cursor: not-allowed !important;
    opacity: 0.75;
}
html.dark .editor-btn-save.is-readonly-locked:hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
}

/* Save button: active / dirty state */
.editor-btn-save.is-dirty {
    background-color: #00677e !important;
    color: #ffffff !important;
    border: 1px solid #004e5f !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 103, 126, 0.35);
    opacity: 1 !important;
}
.editor-btn-save.is-dirty:hover {
    background-color: #005366 !important;
}
html.dark .editor-btn-save.is-dirty {
    background-color: #00677e !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(0, 103, 126, 0.5) !important;
    opacity: 1 !important;
}
html.dark .editor-btn-save.is-dirty:hover {
    background-color: #007a94 !important;
}

html.dark .editor-floating-bar .editor-btn-revert {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #dde2f5 !important;
}
html.dark .editor-floating-bar .editor-btn-revert:hover {
    background-color: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
}

/* Slett-knapp i bunnmeny (kun ikon) */
.editor-floating-bar .editor-btn-delete {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* Admin-panel søkefelt: Sikre god avstand fra forstørrelsesglasset til teksten */
.admin-search-input,
#admin-search,
#admin-user-search {
    padding-left: 2.5rem !important;
    padding-right: 1rem !important;
}

/* -------------------------------------------------------------------------
   DASHBOARD SØK OG FILTER (Kompakt, elegant og visuelt strukturert)
   ------------------------------------------------------------------------- */
.dashboard-search-input {
    padding-left: 36px !important;
    padding-right: 12px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 38px !important;
    font-size: 13px !important;
    line-height: 38px !important;
    background-color: #ffffff;
    border: 1px solid rgba(197, 198, 207, 0.6);
    border-radius: 8px;
    color: #0b1c30;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.dashboard-search-input::placeholder {
    color: #75777f;
    opacity: 0.8;
}
.dashboard-search-input:focus {
    outline: none;
    border-color: #00677e;
    box-shadow: 0 0 0 2px rgba(0, 103, 126, 0.15);
    background-color: #ffffff;
}
html.dark .dashboard-search-input {
    background-color: #151f32;
    border-color: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
}
html.dark .dashboard-search-input::placeholder {
    color: #94a3b8;
    opacity: 0.8;
}
html.dark .dashboard-search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.dashboard-filter-select {
    width: auto !important;
    height: 38px !important;
    line-height: 36px !important;
    padding: 0 28px 0 12px !important;
    font-size: 13px !important;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid rgba(197, 198, 207, 0.6);
    background-color: #ffffff;
    color: #0b1c30;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2375777f' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dashboard-filter-select:hover {
    border-color: #00677e;
    box-shadow: 0 2px 6px rgba(0, 103, 126, 0.1);
}
.dashboard-filter-select:focus {
    outline: none;
    border-color: #00677e;
    box-shadow: 0 0 0 2px rgba(0, 103, 126, 0.15);
}
html.dark .dashboard-filter-select {
    background-color: #151f32;
    border-color: rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
html.dark .dashboard-filter-select:hover {
    border-color: #38bdf8;
    background-color: #1c283f;
}
html.dark .dashboard-filter-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}
html.dark .dashboard-filter-select option {
    background-color: #151f32;
    color: #f8fafc;
}

.dashboard-controls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: auto;
}

.dashboard-search-wrapper {
    position: relative;
    width: 230px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .dashboard-controls-bar {
        width: 100%;
    }
    .dashboard-search-wrapper {
        width: 100%;
    }
    .dashboard-filter-select {
        flex: 1 1 calc(50% - 10px);
        max-width: none !important;
    }
}

/* ==========================================================================
   Fortsett der du slapp (Quick Resume Card & Link) - Lys og Mørk Modus
   ========================================================================== */
#quick-resume-container {
    border-color: rgba(0, 103, 126, 0.25);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

#quick-resume-container:hover {
    border-color: #00677e !important;
    box-shadow: 0 6px 20px rgba(0, 103, 126, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

#quick-resume-link {
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#quick-resume-link:hover {
    background-color: #004e60 !important;
    box-shadow: 0 4px 12px rgba(0, 103, 126, 0.25) !important;
    transform: translateY(-1px);
}

/* Mørk modus tilpasning for konsekvent opplevelse */
html.dark #quick-resume-container {
    border-color: rgba(56, 189, 248, 0.25) !important;
}

html.dark #quick-resume-container:hover {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.18), 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

html.dark #quick-resume-link {
    background-color: #00677e !important;
    color: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

html.dark #quick-resume-link:hover {
    background-color: #00829f !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.4) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   CINEMATIC TRANSITION PREVIEW PLAYER (Alternativ A)
   ========================================================================== */
.transition-preview-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #020617;
    user-select: none;
}

.transition-preview-player .preview-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.transition-preview-player .preview-layer-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

/* --- 1. KUTT TIL (Cut To) --- */
.trans-anim-cut_to .preview-layer-a {
    animation: anim-cut-a 4s infinite steps(1, end);
}
.trans-anim-cut_to .preview-layer-b {
    animation: anim-cut-b 4s infinite steps(1, end);
}
@keyframes anim-cut-a {
    0%, 46% { opacity: 1; }
    47%, 94% { opacity: 0; }
    95%, 100% { opacity: 1; }
}
@keyframes anim-cut-b {
    0%, 46% { opacity: 0; }
    47%, 94% { opacity: 1; }
    95%, 100% { opacity: 0; }
}

/* --- 2. OVERTONING TIL (Dissolve To) --- */
.trans-anim-dissolve .preview-layer-a {
    opacity: 1;
}
.trans-anim-dissolve .preview-layer-trans {
    animation: anim-dissolve-trans 4s infinite ease-in-out;
}
.trans-anim-dissolve .preview-layer-b {
    animation: anim-dissolve-b 4s infinite ease-in-out;
}
@keyframes anim-dissolve-trans {
    0%, 30% { opacity: 0; }
    40%, 64% { opacity: 1; }
    70%, 100% { opacity: 0; }
}
@keyframes anim-dissolve-b {
    0%, 58% { opacity: 0; }
    68%, 94% { opacity: 1; }
    100% { opacity: 0; }
}

/* --- 3. SMASH CUT TIL (Smash Cut) --- */
.trans-anim-smash_cut .preview-layer-a {
    animation: anim-smash-a 4s infinite ease-out;
}
.trans-anim-smash_cut .preview-layer-b {
    animation: anim-smash-b 4s infinite ease-out;
}
.trans-anim-smash_cut .preview-layer-fx {
    animation: anim-smash-fx 4s infinite ease-out;
}
@keyframes anim-smash-a {
    0% { opacity: 1; transform: scale(1); }
    45% { opacity: 1; transform: scale(1.03); }
    46%, 95% { opacity: 0; transform: scale(1.03); }
    96%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes anim-smash-b {
    0%, 45% { opacity: 0; transform: scale(1.06); }
    46% { opacity: 1; transform: scale(1); }
    94% { opacity: 1; transform: scale(1.02); }
    95%, 100% { opacity: 0; transform: scale(1.06); }
}
@keyframes anim-smash-fx {
    0%, 44% { opacity: 0; background: transparent; }
    46% { opacity: 0.7; background: #dc2626; }
    50%, 100% { opacity: 0; background: transparent; }
}

/* --- 4. FADE TIL SORT (Fade to Black) --- */
.trans-anim-fade_black .preview-layer-a {
    animation: anim-fadeblack-a 4s infinite ease-in-out;
}
.trans-anim-fade_black .preview-layer-b {
    animation: anim-fadeblack-b 4s infinite ease-in-out;
}
.trans-anim-fade_black .preview-layer-fx {
    animation: anim-fadeblack-fx 4s infinite ease-in-out;
}
@keyframes anim-fadeblack-a {
    0%, 35% { opacity: 1; }
    48%, 95% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes anim-fadeblack-b {
    0%, 52% { opacity: 0; }
    65%, 88% { opacity: 1; }
    98%, 100% { opacity: 0; }
}
@keyframes anim-fadeblack-fx {
    0%, 35% { opacity: 0; background: #000000; }
    48%, 52% { opacity: 1; background: #000000; }
    65%, 100% { opacity: 0; background: #000000; }
}

/* --- 5. FADE TIL HVITT (Fade to White) --- */
.trans-anim-fade_white .preview-layer-a {
    animation: anim-fadewhite-a 4s infinite ease-in-out;
}
.trans-anim-fade_white .preview-layer-b {
    animation: anim-fadewhite-b 4s infinite ease-in-out;
}
.trans-anim-fade_white .preview-layer-fx {
    animation: anim-fadewhite-fx 4s infinite ease-in-out;
}
@keyframes anim-fadewhite-a {
    0%, 38% { opacity: 1; }
    48%, 95% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes anim-fadewhite-b {
    0%, 48% { opacity: 0; }
    62%, 88% { opacity: 1; }
    98%, 100% { opacity: 0; }
}
@keyframes anim-fadewhite-fx {
    0%, 36% { opacity: 0; background: #ffffff; }
    46%, 49% { opacity: 0.95; background: #ffffff; }
    62%, 100% { opacity: 0; background: #ffffff; }
}

/* --- 6. MATCH CUT TIL (Match Cut) - Myk form-overtoning (Graphic Match Dissolve) --- */
.trans-anim-match_cut .preview-layer-a {
    animation: anim-match-fade-a 4s infinite ease-in-out;
}
.trans-anim-match_cut .preview-layer-b {
    animation: anim-match-fade-b 4s infinite ease-in-out;
}
.trans-anim-match_cut .preview-layer-fx {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 60%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    box-sizing: border-box;
    animation: anim-match-guide 4s infinite ease-in-out;
}
@keyframes anim-match-fade-a {
    0%, 35% { opacity: 1; }
    55%, 92% { opacity: 0; }
    98%, 100% { opacity: 1; }
}
@keyframes anim-match-fade-b {
    0%, 35% { opacity: 0; }
    55%, 92% { opacity: 1; }
    98%, 100% { opacity: 0; }
}
@keyframes anim-match-guide {
    0%, 28% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    36%, 56% { 
        opacity: 0.95; 
        border: 2.5px dashed rgba(56, 189, 248, 0.95); 
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.6), inset 0 0 20px rgba(56, 189, 248, 0.25);
        transform: translate(-50%, -50%) scale(1);
    }
    65%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.08); border-color: transparent; }
}

/* --- 7. SVEIP TIL (Wipe To) - Maskinvareakselerert jevn sveip --- */
.trans-anim-wipe .preview-layer-a {
    opacity: 1;
}
.trans-anim-wipe .preview-layer-b {
    animation: anim-wipe-b 4s infinite linear;
    will-change: clip-path, -webkit-clip-path, transform;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.trans-anim-wipe .preview-layer-fx {
    animation: anim-wipe-line 4s infinite linear;
    will-change: left, opacity;
    transform: translate3d(0, 0, 0);
}
@keyframes anim-wipe-b {
    0%, 35% { 
        -webkit-clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
        clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
        opacity: 1; 
    }
    58%, 88% { 
        -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        opacity: 1; 
    }
    96%, 100% { 
        -webkit-clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
        clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
        opacity: 1; 
    }
}
@keyframes anim-wipe-line {
    0%, 35% { left: 0%; opacity: 0; }
    36% { opacity: 1; width: 2px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 12px #38bdf8; }
    58% { left: 100%; opacity: 1; width: 2px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 12px #38bdf8; }
    59%, 100% { opacity: 0; }
}

/* --- 8. KRYSSKLIPP MED (Intercut With) - Rolig, pedagogisk veksling --- */
.trans-anim-intercut .preview-layer-a {
    animation: anim-intercut-a 5s infinite steps(1, end);
}
.trans-anim-intercut .preview-layer-b {
    animation: anim-intercut-b 5s infinite steps(1, end);
}
@keyframes anim-intercut-a {
    0%, 46% { opacity: 1; }
    47%, 94% { opacity: 0; }
    95%, 100% { opacity: 1; }
}
@keyframes anim-intercut-b {
    0%, 46% { opacity: 0; }
    47%, 94% { opacity: 1; }
    95%, 100% { opacity: 0; }
}

/* --- Tidslinje / Fase-indikator --- */
.phase-pill {
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 9px;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}
.trans-anim-cut_to .phase-a,
.trans-anim-dissolve .phase-a,
.trans-anim-smash_cut .phase-a,
.trans-anim-fade_black .phase-a,
.trans-anim-fade_white .phase-a,
.trans-anim-match_cut .phase-a,
.trans-anim-wipe .phase-a {
    animation: anim-phase-a 4s infinite;
}
.trans-anim-cut_to .phase-trans,
.trans-anim-dissolve .phase-trans,
.trans-anim-smash_cut .phase-trans,
.trans-anim-fade_black .phase-trans,
.trans-anim-fade_white .phase-trans,
.trans-anim-match_cut .phase-trans,
.trans-anim-wipe .phase-trans {
    animation: anim-phase-trans 4s infinite;
}
.trans-anim-cut_to .phase-b,
.trans-anim-dissolve .phase-b,
.trans-anim-smash_cut .phase-b,
.trans-anim-fade_black .phase-b,
.trans-anim-fade_white .phase-b,
.trans-anim-match_cut .phase-b,
.trans-anim-wipe .phase-b {
    animation: anim-phase-b 4s infinite;
}

/* 5s syklus for Kryssklipp */
.trans-anim-intercut .phase-a {
    animation: anim-phase-a-5s 5s infinite;
}
.trans-anim-intercut .phase-trans {
    animation: anim-phase-trans-5s 5s infinite;
}
.trans-anim-intercut .phase-b {
    animation: anim-phase-b-5s 5s infinite;
}

@keyframes anim-phase-a {
    0%, 35% { background: rgba(56, 189, 248, 0.3); color: #ffffff; box-shadow: 0 0 8px rgba(56, 189, 248, 0.4); font-weight: 700; }
    36%, 100% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
}
@keyframes anim-phase-trans {
    0%, 35% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
    36%, 60% { background: rgba(234, 179, 8, 0.35); color: #fef08a; box-shadow: 0 0 10px rgba(234, 179, 8, 0.4); font-weight: 700; }
    61%, 100% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
}
@keyframes anim-phase-b {
    0%, 60% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
    61%, 94% { background: rgba(34, 197, 94, 0.3); color: #86efac; box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); font-weight: 700; }
    95%, 100% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
}

@keyframes anim-phase-a-5s {
    0%, 42% { background: rgba(56, 189, 248, 0.3); color: #ffffff; box-shadow: 0 0 8px rgba(56, 189, 248, 0.4); font-weight: 700; }
    43%, 100% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
}
@keyframes anim-phase-trans-5s {
    0%, 42% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
    43%, 52% { background: rgba(234, 179, 8, 0.35); color: #fef08a; box-shadow: 0 0 10px rgba(234, 179, 8, 0.4); font-weight: 700; }
    53%, 100% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
}
@keyframes anim-phase-b-5s {
    0%, 52% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
    53%, 94% { background: rgba(34, 197, 94, 0.3); color: #86efac; box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); font-weight: 700; }
    95%, 100% { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }
}

/* ==========================================================================
   DRAWER & MODAL SYSTEM (Slide-over, Transitions, Pointer Events, Scale)
   ========================================================================== */
.pointer-events-none {
    pointer-events: none !important;
}

.pointer-events-auto {
    pointer-events: auto !important;
}

.opacity-0 {
    opacity: 0 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

.translate-x-full {
    transform: translateX(100%) !important;
}

.translate-x-0 {
    transform: translateX(0) !important;
}

.scale-95 {
    transform: scale(0.95) !important;
}

.scale-100 {
    transform: scale(1) !important;
}

/* Eksplisitt sikring av korrektur-skuff og modaler */
#commentsDrawer {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
#commentsDrawer.translate-x-full {
    transform: translateX(100%) !important;
    pointer-events: none !important;
}
#commentsDrawer:not(.translate-x-full) {
    transform: translateX(0) !important;
    pointer-events: auto !important;
}

#commentsDrawerBackdrop {
    transition: opacity 0.3s ease !important;
}
#commentsDrawerBackdrop.opacity-0 {
    opacity: 0 !important;
    pointer-events: none !important;
}
#commentsDrawerBackdrop.opacity-100 {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#revisionsModalBackdrop {
    transition: opacity 0.2s ease !important;
}
#revisionsModalBackdrop.opacity-0 {
    opacity: 0 !important;
    pointer-events: none !important;
}
#revisionsModalBackdrop.opacity-100 {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Editor Status Bar - Kompakt responsiv statuslinje */
.editor-status-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .editor-status-bar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
    }
}

/* ==========================================================================
   REVISIONS MODAL 2-COLUMN LAYOUT & FLICKER-FREE TIMELINE
   ========================================================================== */
#revisionsModal {
    max-height: 88vh !important;
    height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.revisions-modal-body {
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
}

.revisions-sidebar {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    border-right: 1px solid rgba(197, 198, 207, 0.4);
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    min-height: 0 !important;
    background-color: #f8fafc;
}

html.dark .revisions-sidebar {
    border-right-color: rgba(255, 255, 255, 0.1);
    background-color: #0e1626;
}

.revisions-details {
    flex: 1 1 0% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    padding: 1.5rem !important;
    background-color: #ffffff;
    min-width: 0 !important;
}

html.dark .revisions-details {
    background-color: #151f32;
}

.revision-timeline-card {
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(197, 198, 207, 0.4);
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    text-align: left;
    user-select: none;
}

html.dark .revision-timeline-card {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(21, 31, 50, 0.5);
}

.revision-timeline-card:hover {
    background-color: #ffffff;
    border-color: rgba(0, 103, 126, 0.4);
}

html.dark .revision-timeline-card:hover {
    background-color: rgba(30, 41, 65, 0.9);
    border-color: rgba(76, 215, 246, 0.4);
}

.revision-timeline-card.is-active {
    background-color: #ffffff !important;
    border-color: #00677e !important;
    box-shadow: 0 0 0 2px rgba(0, 103, 126, 0.25) !important;
}

html.dark .revision-timeline-card.is-active {
    background-color: #1a253c !important;
    border-color: #4cd7f6 !important;
    box-shadow: 0 0 0 2px rgba(76, 215, 246, 0.35) !important;
}

@media (max-width: 768px) {
    .revisions-modal-body {
        flex-direction: column !important;
        height: auto !important;
        max-height: 70vh !important;
    }
    .revisions-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        max-height: 180px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(197, 198, 207, 0.4);
    }
    html.dark .revisions-sidebar {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

/* =========================================================================
   UNIVERSAL TYPE BADGES (KURS & FILM)
   Ensartet design, farge, kontrast og typografi på tvers av hele applikasjonen
   ========================================================================= */

.badge-type-kurs,
.report-type-badge-kurs {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    background-color: var(--surface-container-highest);
    color: var(--on-surface);
    border: 1px solid var(--outline-variant);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.badge-type-kurs .material-symbols-outlined,
.report-type-badge-kurs .material-symbols-outlined {
    font-size: 12px;
    line-height: 1;
}

html.dark .badge-type-kurs,
html.dark .report-type-badge-kurs {
    background-color: #242a38 !important;
    color: var(--on-surface) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

html.dark .badge-type-kurs .material-symbols-outlined,
html.dark .report-type-badge-kurs .material-symbols-outlined {
    color: var(--on-surface) !important;
}

/* =========================================================================
   KORT-LABEL FOR FORFATTERROLLER (HOVEDFORFATTER / MEDFORFATTER)
   Ensartet label-stil, fargepalett og kontrast for kurs- og filmkort
   ========================================================================= */

.badge-card-role-owner,
.badge-card-role-collab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    background-color: var(--surface-container-highest);
    border: 1px solid var(--outline-variant);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

.badge-card-role-owner {
    color: var(--primary);
}

.badge-card-role-collab {
    color: var(--secondary);
}

.badge-card-role-owner .material-symbols-outlined,
.badge-card-role-collab .material-symbols-outlined {
    font-size: 12px;
    line-height: 1;
}

html.dark .badge-card-role-owner {
    background-color: #242a38 !important;
    color: var(--on-surface) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

html.dark .badge-card-role-collab {
    background-color: #242a38 !important;
    color: var(--secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.badge-type-film,
.report-type-badge-film {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    background-color: #031635;
    color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.badge-type-film .material-symbols-outlined,
.report-type-badge-film .material-symbols-outlined {
    font-size: 12px;
    line-height: 1;
    color: #ffffff !important;
}

/* Film-label i mørk modus: lys himmelblå (#89ceff) med MØRKEBLÅ tekst og ikon (#031635) for suveren kontrast */
html.dark .badge-type-film,
html.dark .report-type-badge-film {
    background-color: #89ceff !important;
    color: #031635 !important;
    border: 1.5px solid #89ceff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

html.dark .badge-type-film .material-symbols-outlined,
html.dark .report-type-badge-film .material-symbols-outlined {
    color: #031635 !important;
}

/* KPI Card Icons */
.report-kpi-icon-blue {
    background-color: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
html.dark .report-kpi-icon-blue {
    background-color: rgba(30, 58, 138, 0.5) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(96, 165, 250, 0.3) !important;
}

.report-kpi-icon-purple {
    background-color: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}
html.dark .report-kpi-icon-purple {
    background-color: rgba(88, 28, 135, 0.5) !important;
    color: #d8b4fe !important;
    border: 1px solid rgba(192, 132, 252, 0.3) !important;
}

.report-kpi-icon-amber {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
html.dark .report-kpi-icon-amber {
    background-color: rgba(120, 53, 15, 0.5) !important;
    color: #fcd34d !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.report-kpi-icon-emerald {
    background-color: #d1fae5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
html.dark .report-kpi-icon-emerald {
    background-color: rgba(6, 78, 59, 0.5) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

/* KPI % ferdig badge */
.report-kpi-pct-badge {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
html.dark .report-kpi-pct-badge {
    background-color: rgba(6, 78, 59, 0.6) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(52, 211, 153, 0.4) !important;
}

/* Status Badges in Reports (Clean / Pending / Ferdig / Under arbeid) */
.report-status-clean-badge {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
html.dark .report-status-clean-badge {
    background-color: rgba(6, 78, 59, 0.6) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(52, 211, 153, 0.4) !important;
}

.report-status-pending-badge {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
html.dark .report-status-pending-badge {
    background-color: rgba(120, 53, 15, 0.6) !important;
    color: #fcd34d !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
}

/* ==========================================================================
   Rise 360 Collaborative Lock Modals
   ========================================================================== */
.manuscript-lock-modal-card {
    background-color: #ffffff !important;
    color: #0b1c30 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 40px rgba(26, 43, 75, 0.15) !important;
    border-radius: 1rem;
}

html.dark .manuscript-lock-modal-card {
    background-color: #151f32 !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7) !important;
}

.btn-lock-primary {
    background-color: #031635;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: none;
    text-decoration: none;
}

.btn-lock-primary:hover {
    background-color: #1a2b4b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 22, 53, 0.25);
}

html.dark .btn-lock-primary {
    background-color: #89ceff !important;
    color: #00344d !important;
}

html.dark .btn-lock-primary:hover {
    background-color: #b6c6ef !important;
    box-shadow: 0 4px 14px rgba(137, 206, 255, 0.35);
}

.btn-lock-secondary {
    background-color: transparent;
    color: #334155;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-lock-secondary:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

html.dark .btn-lock-secondary {
    color: #e2e8f0;
    border-color: #475569;
}

html.dark .btn-lock-secondary:hover {
    background-color: #242a38;
    color: #ffffff;
    border-color: #64748b;
}

/* ==========================================================================
   AI Skriveassistent - Handlingsknapper i sidepanel (Klarspråk)
   ========================================================================== */
.ai-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0.85rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background-color: #ffffff;
    color: var(--on-surface, #0f172a);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.ai-action-btn:hover {
    background-color: #f0f7fb;
    border-color: var(--secondary, #0077a8);
    color: var(--secondary, #0077a8);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px -3px rgba(0, 102, 153, 0.16);
}

.ai-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

.ai-action-btn .ai-action-badge {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: transform 0.18s ease, color 0.18s ease;
}

.ai-action-btn:hover .ai-action-badge {
    color: var(--secondary, #0077a8);
}

.ai-action-btn .ai-action-arrow {
    display: inline-block;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-action-btn:hover .ai-action-arrow {
    transform: translateX(3px);
}

/* Mørk modus */
html.dark .ai-action-btn {
    background-color: #1e293b;
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}

html.dark .ai-action-btn:hover {
    background-color: #2b3952;
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px -3px rgba(0, 0, 0, 0.5), 0 0 12px -2px rgba(56, 189, 248, 0.3);
}

html.dark .ai-action-btn .ai-action-badge {
    color: #94a3b8;
}

html.dark .ai-action-btn:hover .ai-action-badge {
    color: #38bdf8;
}

