html {
    scroll-behavior: smooth;
}

.hallo-modal-surface {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hallo-modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 rgba(148, 163, 184, 0.18);
}

.hallo-modal-scroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.hallo-modal-scroll::-webkit-scrollbar-track {
    margin: 0.65rem 0;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 999px;
}

.hallo-modal-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, #64748b, #475569);
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.hallo-modal-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #475569, #334155);
    background-clip: padding-box;
}

.halloapp-formula-palette {
    position: fixed;
    z-index: 1000;
    width: min(520px, calc(100vw - 24px));
    max-height: min(76vh, 680px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.24);
}

.halloapp-formula-palette-title {
    margin-bottom: .75rem;
    font-weight: 800;
    color: #0f172a;
}

.halloapp-formula-group + .halloapp-formula-group {
    margin-top: .7rem;
}

.halloapp-formula-group h3 {
    margin: 0 0 .35rem;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #475569;
}

.halloapp-formula-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
}

.halloapp-formula-template {
    display: flex;
    min-height: 3.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    border: 1px solid #e2e8f0;
    border-radius: .55rem;
    background: #f8fafc;
    padding: .3rem;
    color: #0f172a;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.halloapp-formula-template:hover,
.halloapp-formula-template:focus-visible {
    border-color: var(--hallo-accent-1);
    background: #eef2ff;
    outline: none;
    transform: translateY(-1px);
}

.halloapp-formula-preview {
    min-height: 1.15rem;
    display: grid;
    place-items: center;
    font-size: .92rem;
}

.halloapp-formula-label {
    font-size: .58rem;
    font-weight: 700;
    color: #475569;
    text-align: center;
}

@media (max-width: 430px) {
    .halloapp-formula-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.halloapp-formula-palette-close {
    width: 100%;
    margin-top: 1rem;
    border: 0;
    border-radius: .65rem;
    background: #e2e8f0;
    padding: .6rem;
    font-size: .8rem;
    font-weight: 700;
    color: #334155;
}

.ql-editor .ql-formula[data-value] {
    cursor: pointer;
    border-radius: .3rem;
    font-size: inherit;
}

.ql-editor .ql-formula[data-value]:hover {
    background: #eef2ff;
    outline: 2px solid rgba(79, 70, 229, .22);
}

.halloapp-formula-editor {
    position: fixed;
    z-index: 1001;
    width: min(360px, calc(100vw - 24px));
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .24);
}

.halloapp-formula-editor-title {
    display: block;
    font-size: .8rem;
    font-weight: 800;
    color: #334155;
}

.halloapp-formula-editor-input {
    width: 100%;
    margin-top: .55rem;
    border: 1px solid #cbd5e1;
    border-radius: .6rem;
    padding: .65rem .75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .85rem;
    color: #0f172a;
}

.halloapp-formula-editor-preview {
    display: grid;
    min-height: 3.25rem;
    margin-top: .75rem;
    place-items: center;
    border-radius: .65rem;
    background: #f8fafc;
    padding: .6rem;
    overflow-x: auto;
}

.halloapp-formula-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .85rem;
}

.halloapp-formula-editor-actions button {
    border: 0;
    border-radius: .55rem;
    padding: .55rem .8rem;
    font-size: .78rem;
    font-weight: 700;
}

.halloapp-formula-editor-cancel {
    background: #e2e8f0;
    color: #334155;
}

.halloapp-formula-editor-save {
    background: #4f46e5;
    color: #ffffff;
}

/* ==========================================================================
   Theme tokens — default palette ("Indigo/Cyan") + 5 alternative schemes.
   Switch by setting data-theme="ocean" | "coral" | "slate" | "sage" | "navy" on <html>.
   ========================================================================== */
:root,
[data-theme="indigo"] {
    --hallo-bg-from: #f8fafc;
    --hallo-bg-to: #eef2ff;
    --hallo-bg-page: #eef4ff;
    --hallo-accent-1: #4f46e5;
    --hallo-accent-1-dark: #4338ca;
    --hallo-accent-2: #06b6d4;
    --hallo-accent-2-dark: #0891b2;
    --hallo-sidebar-from: #1e1b4b;
    --hallo-sidebar-via: #4f46e5;
    --hallo-sidebar-to: #0891b2;
    --hallo-kicker: #0f766e;
    --hallo-glow-1: rgba(124, 58, 237, 0.16);
    --hallo-glow-2: rgba(6, 182, 212, 0.12);
    --hallo-selection: rgba(37, 99, 235, 0.25);
    --hallo-focus-ring: rgba(37, 99, 235, 0.35);
}

[data-theme="ocean"] {
    --hallo-bg-from: #f0f9ff;
    --hallo-bg-to: #e0f2fe;
    --hallo-bg-page: #f0f9ff;
    --hallo-accent-1: #0284c7;
    --hallo-accent-1-dark: #075985;
    --hallo-accent-2: #14b8a6;
    --hallo-accent-2-dark: #0f766e;
    --hallo-sidebar-from: #0c1e3d;
    --hallo-sidebar-via: #0369a1;
    --hallo-sidebar-to: #14b8a6;
    --hallo-kicker: #0369a1;
    --hallo-glow-1: rgba(2, 132, 199, 0.16);
    --hallo-glow-2: rgba(20, 184, 166, 0.14);
    --hallo-selection: rgba(2, 132, 199, 0.25);
    --hallo-focus-ring: rgba(2, 132, 199, 0.35);
}

[data-theme="coral"] {
    --hallo-bg-from: #fff5f2;
    --hallo-bg-to: #ffe4de;
    --hallo-bg-page: #fff5f2;
    --hallo-accent-1: #ea580c;
    --hallo-accent-1-dark: #c2410c;
    --hallo-accent-2: #f43f5e;
    --hallo-accent-2-dark: #be123c;
    --hallo-sidebar-from: #4c0519;
    --hallo-sidebar-via: #ea580c;
    --hallo-sidebar-to: #f43f5e;
    --hallo-kicker: #ea580c;
    --hallo-glow-1: rgba(234, 88, 12, 0.18);
    --hallo-glow-2: rgba(244, 63, 94, 0.14);
    --hallo-selection: rgba(234, 88, 12, 0.25);
    --hallo-focus-ring: rgba(234, 88, 12, 0.35);
}

[data-theme="slate"] {
    --hallo-bg-from: #f8fafc;
    --hallo-bg-to: #f1f5f9;
    --hallo-bg-page: #f8fafc;
    --hallo-accent-1: #334155;
    --hallo-accent-1-dark: #1e293b;
    --hallo-accent-2: #64748b;
    --hallo-accent-2-dark: #475569;
    --hallo-sidebar-from: #0f172a;
    --hallo-sidebar-via: #334155;
    --hallo-sidebar-to: #64748b;
    --hallo-kicker: #334155;
    --hallo-glow-1: rgba(51, 65, 85, 0.14);
    --hallo-glow-2: rgba(100, 116, 139, 0.12);
    --hallo-selection: rgba(51, 65, 85, 0.22);
    --hallo-focus-ring: rgba(51, 65, 85, 0.3);
}

[data-theme="sage"] {
    --hallo-bg-from: #f6f9f4;
    --hallo-bg-to: #eaf1e4;
    --hallo-bg-page: #f6f9f4;
    --hallo-accent-1: #4d7c4a;
    --hallo-accent-1-dark: #386641;
    --hallo-accent-2: #84a98c;
    --hallo-accent-2-dark: #6b8f71;
    --hallo-sidebar-from: #1b2f1e;
    --hallo-sidebar-via: #4d7c4a;
    --hallo-sidebar-to: #84a98c;
    --hallo-kicker: #4d7c4a;
    --hallo-glow-1: rgba(77, 124, 74, 0.15);
    --hallo-glow-2: rgba(132, 169, 140, 0.12);
    --hallo-selection: rgba(77, 124, 74, 0.22);
    --hallo-focus-ring: rgba(77, 124, 74, 0.3);
}

[data-theme="navy"] {
    --hallo-bg-from: #f4f7fb;
    --hallo-bg-to: #e6ecf5;
    --hallo-bg-page: #f4f7fb;
    --hallo-accent-1: #1e3a8a;
    --hallo-accent-1-dark: #172554;
    --hallo-accent-2: #2563eb;
    --hallo-accent-2-dark: #1d4ed8;
    --hallo-sidebar-from: #050b1f;
    --hallo-sidebar-via: #1e3a8a;
    --hallo-sidebar-to: #2563eb;
    --hallo-kicker: #1e3a8a;
    --hallo-glow-1: rgba(30, 58, 138, 0.18);
    --hallo-glow-2: rgba(37, 99, 235, 0.14);
    --hallo-selection: rgba(30, 58, 138, 0.25);
    --hallo-focus-ring: rgba(30, 58, 138, 0.35);
}

[id] {
    scroll-margin-top: 1.5rem;
}

/* ==========================================================================
   Theme-aware hero utility — replaces hardcoded Tailwind "from-indigo..."
   gradients on page hero banners so they follow the active color theme.
   ========================================================================== */
.hallo-hero {
    background-image: linear-gradient(135deg, var(--hallo-sidebar-from) 0%, var(--hallo-sidebar-via) 55%, var(--hallo-sidebar-to) 100%) !important;
    box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    position: relative;
    isolation: isolate;
}

.hallo-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.10) 0%, transparent 45%),
                       radial-gradient(circle at 85% 85%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hallo-hero > * {
    position: relative;
    z-index: 1;
}

.hallo-hero-badge {
    background-image: linear-gradient(135deg, var(--hallo-accent-1) 0%, var(--hallo-accent-2) 100%) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hallo-hero-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 32px -12px rgba(15, 23, 42, 0.35);
}

/* Theme-aware solid control utility — replaces hardcoded bg-indigo-600/bg-violet-600/
   bg-emerald-600 CTA buttons and active-tab pills so they follow the active theme. */
.hallo-btn-accent {
    background-image: none !important;
    background-color: var(--hallo-accent-2) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hallo-btn-accent:hover {
    background-color: var(--hallo-accent-2-dark) !important;
}

/* ==========================================================================
   Modern theme-aware form-control utility — consistent inputs/selects/
   textareas across the app: soft border, subtle shadow, smooth focus ring
   that follows the active color theme (via --hallo-accent-2 / focus-ring).
   ========================================================================== */
.hallo-input {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240);
    background-color: #ffffff;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: rgb(15 23 42);
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hallo-input:hover {
    border-color: rgb(203 213 225);
}

.hallo-input:focus {
    border-color: var(--hallo-accent-2);
    box-shadow: 0 0 0 3px var(--hallo-focus-ring), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hallo-input:disabled {
    background-color: rgb(248 250 252);
    color: rgb(100 116 139);
    cursor: not-allowed;
}

.hallo-input.invalid {
    border-color: rgb(244 63 94);
    outline: none;
}

.hallo-input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
}

select.hallo-input {
    cursor: pointer;
}

textarea.hallo-input {
    resize: vertical;
    min-height: 5.5rem;
}

.hallo-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(51 65 85);
}

.hallo-btn-accent:disabled {
    background-color: #cbd5e1 !important;
    color: #64748b !important;
}

.submit-loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 9999px;
    display: inline-block;
    animation: hallo-spin 0.75s linear infinite;
}

.is-submit-loading {
    pointer-events: none;
}

@keyframes hallo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Full-bleed section utility \u2014 lets a home-page band break out of the
   .app-content horizontal padding to create a clear, edge-to-edge color
   separation between sections, while sidebar/nav layout stays intact.
   ========================================================================== */
.hallo-full-bleed {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 0 !important;
}

@media (min-width: 641px) {
    .hallo-full-bleed {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .hallo-full-bleed {
        margin-left: -2rem;
        margin-right: -2rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.hallo-band-indigo {
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
}

.hallo-band-teal {
    background: linear-gradient(180deg, #ecfeff 0%, #d1fae5 100%);
}

.hallo-band-slate {
    background: #f8fafc;
}

.hallo-hero-photo {
    background-size: cover;
    background-position: center;
}

.home-hero-screen {
    padding-top: 0;
    padding-bottom: 0;
}

@media (max-width: 640px) {
    .home-hero-screen.hallo-full-bleed {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 641px) {
    .home-hero-screen {
        min-height: min(760px, calc(100svh - 2rem));
        height: min(760px, calc(100svh - 2rem));
    }
}

.home-hero-image {
    position: relative;
    z-index: 0;
    object-fit: cover;
    object-position: center 25%;
}

/* Mobile hero: subtly visible photo beneath the active theme */
.home-hero-mobile {
    position: relative;
    min-height: auto;
    background:
        radial-gradient(circle at 15% 12%, color-mix(in srgb, var(--hallo-accent-2) 55%, transparent), transparent 42%),
        radial-gradient(circle at 85% 78%, color-mix(in srgb, var(--hallo-accent-1) 45%, transparent), transparent 45%),
        linear-gradient(
            155deg,
            color-mix(in srgb, var(--hallo-sidebar-from) 88%, transparent),
            color-mix(in srgb, var(--hallo-sidebar-via) 86%, transparent) 55%,
            color-mix(in srgb, var(--hallo-sidebar-to) 88%, transparent)
        ),
        url("images/hero-halloapp - mobile.png") center 38% / cover no-repeat;
    background-color: var(--hallo-sidebar-from);
}

.home-hero-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(2px);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--hallo-accent-2) 72%, transparent),
        color-mix(in srgb, var(--hallo-accent-1) 18%, transparent)
    );
}

.home-hero-orb-1 {
    width: 11rem;
    height: 11rem;
    top: -3rem;
    right: -3rem;
}

.home-hero-orb-2 {
    width: 8rem;
    height: 8rem;
    bottom: 18%;
    left: -2.5rem;
}

.home-hero-glyph {
    position: absolute;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    padding: 0.15rem 0.6rem;
}

@media (min-width: 641px) {
    .home-hero-screen {
        min-height: min(760px, calc(100svh - 2rem));
        height: min(760px, calc(100svh - 2rem));
    }

    .home-hero-image {
        object-fit: cover;
        object-position: center 40%;
    }
}

.home-hero-catalog-badge {
    background: linear-gradient(90deg, var(--hallo-sidebar-from), var(--hallo-accent-1), var(--hallo-accent-2));
}

.home-intro-section {
    background:
        radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--hallo-accent-2) 12%, transparent), transparent 34%),
        radial-gradient(circle at 88% 22%, color-mix(in srgb, var(--hallo-accent-1) 10%, transparent), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, var(--hallo-bg-page) 100%);
}

.home-intro-gradient {
    background-image: linear-gradient(90deg, var(--hallo-accent-1), var(--hallo-accent-2));
}

html, body {
    font-family: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: var(--hallo-bg-page);
    color: #0f172a;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: clip;
    scrollbar-color: var(--hallo-accent-2) rgba(15, 23, 42, 0.08);
    scrollbar-width: thin;
}

::selection {
    background: var(--hallo-selection);
    color: #0f172a;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--hallo-accent-1), var(--hallo-accent-2));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--hallo-accent-1-dark), var(--hallo-accent-2-dark));
    background-clip: padding-box;
}

a, .btn-link {
    color: var(--hallo-accent-1);
}

.btn-primary {
    color: #fff;
    background-color: var(--hallo-accent-1);
    border-color: var(--hallo-accent-1-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--hallo-focus-ring);
}

* {
    box-sizing: border-box;
}

h1:focus {
    outline: none;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

p {
    margin-top: 0;
}

main {
    min-width: 0;
}

#app,
.app-shell,
.app-main,
.app-content {
    min-width: 0;
    max-width: 100%;
}

#app {
    min-height: 100vh;
}

.app-route-loading {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    z-index: 1500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(-50%);
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.55rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #475569;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
    animation: app-route-loading-in 0.16s ease 0.35s both;
}

@keyframes app-route-loading-in {
    from {
        opacity: 0;
        transform: translate(-50%, -0.5rem);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-route-loading {
        animation: none;
    }
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 10% -10%, var(--hallo-glow-1), transparent 38%),
        radial-gradient(circle at 90% 0%, var(--hallo-glow-2), transparent 42%),
        linear-gradient(180deg, var(--hallo-bg-from) 0%, var(--hallo-bg-to) 100%);
}

.app-sidebar {
    background: linear-gradient(160deg, var(--hallo-sidebar-from) 0%, var(--hallo-sidebar-via) 50%, var(--hallo-sidebar-to) 100%);
    color: #f8fafc;
    box-shadow: 4px 0 32px rgba(15, 23, 42, 0.18);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem;
    flex-wrap: wrap;
    overflow-x: clip;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(238, 244, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.app-header-copy {
    min-width: 0;
}

.app-kicker {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #0f766e;
    font-weight: 700;
}

.app-title {
    margin: 0.25rem 0 0;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--hallo-accent-1);
}

.app-header-actions,
.app-auth-group,
.app-profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-header-actions {
    align-items: flex-start;
    justify-content: flex-end;
    margin-left: auto;
    position: sticky;
    top: 0.75rem;
    z-index: 30;
}

.app-auth-group {
    align-items: flex-end;
    justify-content: flex-end;
}

.app-profile-card {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    min-width: 0;
}

.app-profile-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #475569;
    font-weight: 700;
}

.app-profile-name,
.app-link-pill {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.app-link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    text-decoration: none;
    white-space: nowrap;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-link-pill:hover {
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.app-link-pill-accent {
    color: #ffffff;
    background: linear-gradient(135deg, var(--hallo-accent-1) 0%, var(--hallo-accent-2) 100%);
}

.app-link-pill-accent:hover {
    color: #ffffff;
}

.app-profile-name {
    max-width: min(24rem, 100%);
    padding: 0.7rem 1rem;
    overflow-wrap: anywhere;
}

.app-logout-form {
    margin: 0;
    display: inline-flex;
}

.app-logout-form button.app-link-pill {
    cursor: pointer;
    font: inherit;
}

.app-content {
    padding: 0 1.5rem 2rem;
}

.app-footer {
    margin-top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.75rem 3rem;
    padding: 2.25rem 1.5rem 1.25rem;
    color: rgba(255, 255, 255, 0.82);
    background:
        radial-gradient(circle at 12% 0%, var(--hallo-glow-2), transparent 35%),
        linear-gradient(130deg, var(--hallo-sidebar-from) 0%, var(--hallo-sidebar-via) 48%, var(--hallo-sidebar-to) 100%);
    box-shadow: 0 -12px 35px rgba(15, 23, 42, 0.09);
}

.app-footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 42rem;
}

.app-footer-logo {
    display: grid;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 1rem;
    color: #172554;
    background: linear-gradient(135deg, #ecfeff, #67e8f9);
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.32);
    font-size: 1.5rem;
    font-weight: 900;
}

.app-footer-kicker,
.app-footer-title,
.app-footer-tagline,
.app-footer-heading {
    margin: 0;
}

.app-footer-kicker {
    color: #a5f3fc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.app-footer-title {
    margin-top: 0.2rem;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.app-footer-tagline {
    margin-top: 0.45rem;
    max-width: 36rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.app-footer-contact {
    display: grid;
    align-content: start;
    gap: 0.4rem;
    min-width: min(100%, 18rem);
    font-size: 0.9rem;
}

.app-footer-heading {
    margin-bottom: 0.2rem;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-footer-contact a {
    width: fit-content;
    color: #cffafe;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.app-footer-contact a:hover,
.app-footer-contact a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.app-footer-bottom {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.78rem;
    flex-wrap: wrap;
}

.brand-panel {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    position: relative;
    background: radial-gradient(circle at 0% 0%, var(--hallo-glow-2), transparent 60%);
}

.brand-copy {
    padding-right: 3.5rem;
}

.brand-title {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 0 24px var(--hallo-glow-2);
}

.brand-title:hover {
    color: #ffffff;
}

.brand-subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.navbar-toggler:checked {
    background-color: rgba(255, 255, 255, 0.5);
}

.nav-overlay-backdrop {
    display: none;
}

.nav-scrollable {
    display: none;
    padding: 1rem 1rem 1.5rem;
    min-width: 0;
    overflow-x: clip;
}

.navbar-toggler:checked ~ .nav-scrollable {
    display: block;
}

.nav-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
}

.nav-section-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

.nav-section-spacing {
    margin-top: 1.2rem;
}

.nav-item {
    font-size: 0.95rem;
}

.nav-link,
.nav-anchor-link,
.nav-subitem-link {
    color: #e2e8f0;
    text-decoration: none;
}

.nav-item .nav-link,
.nav-anchor-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid transparent;
    border-radius: 18px;
    min-height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    min-width: 0;
    overflow-wrap: anywhere;
}

.nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    border-left-color: var(--hallo-accent-2);
    color: white;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.nav-subitem-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.4rem 0 0 1.4rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.14);
}

.nav-subitem-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    min-width: 0;
    overflow-wrap: anywhere;
}

.nav-link:hover,
.nav-anchor-link:hover,
.nav-subitem-link:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-1px) translateX(2px);
}

.bi {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    background-size: cover;
    flex-shrink: 0;
}

.bi-house-door-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 2 8h1v5.5a.5.5 0 0 0 .5.5h3.5a.5.5 0 0 0 .5-.5V10h1v3.5a.5.5 0 0 0 .5.5H12.5a.5.5 0 0 0 .5-.5V8h1a.5.5 0 0 0 .354-.854z'/%3E%3C/svg%3E");
}

.bi-book-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M1 2.828c.885-.37 2.154-.769 3.5-.769 1.465 0 2.827.436 3.5 1.087.673-.651 2.035-1.087 3.5-1.087 1.346 0 2.615.4 3.5.769V14.5c-.885-.37-2.154-.769-3.5-.769-1.465 0-2.827.436-3.5 1.087-.673-.651-2.035-1.087-3.5-1.087-1.346 0-2.615.4-3.5.769z'/%3E%3C/svg%3E");
}

.bi-checklist-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 2A.5.5 0 0 0 2 2.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-11A.5.5 0 0 0 13.5 2zm0-1h11A1.5 1.5 0 0 1 15 2.5v11a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 13.5v-11A1.5 1.5 0 0 1 2.5 1'/%3E%3Cpath d='M10.854 5.146a.5.5 0 0 1 0 .708L7.707 9l-1.561-1.561a.5.5 0 0 1 .708-.708L7.707 7.293l2.793-2.793a.5.5 0 0 1 .708 0M4 5.5A.5.5 0 0 1 4.5 5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5m0 3A.5.5 0 0 1 4.5 8h1a.5.5 0 0 1 0 1h-1A.5.5 0 0 1 4 8.5m0 3A.5.5 0 0 1 4.5 11h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M2 3.5A.5.5 0 0 1 2.5 3h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 3.5m0 4A.5.5 0 0 1 2.5 7h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 7.5m0 4A.5.5 0 0 1 2.5 11h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 11.5'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm-5 3H7v3H4v2h3v3h2V9h3V7H9z'/%3E%3C/svg%3E");
}

.bi-person-badge-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 2a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1zM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0'/%3E%3Cpath d='M4.5 0A2.5 2.5 0 0 0 2 2.5V14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2.5A2.5 2.5 0 0 0 11.5 0zm0 1h7A1.5 1.5 0 0 1 13 2.5v10.795a4.2 4.2 0 0 0-.776-.492C11.392 12.387 10.063 12 8 12s-3.392.387-4.224.803a4.2 4.2 0 0 0-.776.492V2.5A1.5 1.5 0 0 1 4.5 1'/%3E%3C/svg%3E");
}

.bi-cash-stack-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M1 3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1H1zm7 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3Cpath d='M0 5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1zm3 0a2 2 0 0 1-2 2v4a2 2 0 0 1 2 2h10a2 2 0 0 1 2-2V7a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}

.app-content > * {
    min-width: 0;
}

.grid {
    min-width: 0;
}

.grid > * {
    min-width: 0;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.gradient-text {
    color: var(--hallo-accent-1);
}

@keyframes
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-content > * {
    animation: fade-in-up 0.5s ease;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

section {
    scroll-margin-top: 6.5rem;
}

.teacher-dashboard > :nth-child(2) {
    order: 2;
}

.teacher-dashboard > :nth-child(6) {
    order: 3;
}

.teacher-dashboard > :nth-child(3) {
    order: 4;
}

.teacher-dashboard > :nth-child(4) {
    order: 5;
}

.teacher-dashboard > :nth-child(5) {
    order: 6;
}

@media (min-width: 1200px) {
    .app-shell {
        flex-direction: row;
    }

    .app-sidebar {
        width: clamp(17rem, 22vw, 20rem);
        height: 100vh;
        align-self: flex-start;
        position: sticky;
        top: 0;
        overflow: hidden;
    }

    .app-header {
        padding: 2rem 2rem 1rem;
    }

    .app-content {
        padding: 0 2rem 2rem;
    }

    .navbar-toggler {
        display: none;
    }

    .nav-scrollable {
        display: block;
        height: calc(100vh - 8.5rem);
        overflow-y: auto;
        overflow-x: clip;
    }
}

@media (max-width: 1199px) {
    .app-sidebar {
        position: sticky;
        top: 0;
        z-index: 1200;
    }

    .app-header {
        align-items: flex-start;
    }

    .app-header-actions,
    .app-auth-group,
    .app-profile-links {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .brand-panel {
        padding: 1rem 1rem 0.75rem;
        border-bottom: none;
    }

    .brand-copy {
        padding-right: 4rem;
    }

    .navbar-toggler {
        z-index: 1201;
    }

    .nav-overlay-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1190;
        backdrop-filter: blur(2px);
    }

    .nav-scrollable {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        width: min(22rem, calc(100vw - 2rem));
        max-height: calc(100vh - 2rem);
        padding: 1rem;
        overflow-y: auto;
        overflow-x: clip;
        border-radius: 1.75rem;
        background: linear-gradient(180deg, var(--hallo-sidebar-from) 0%, var(--hallo-sidebar-via) 55%, var(--hallo-sidebar-to) 100%);
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-2rem);
        transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
        z-index: 1200;
    }

    .navbar-toggler:checked ~ .nav-overlay-backdrop,
    .navbar-toggler:checked ~ .nav-scrollable {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .navbar-toggler:checked ~ .nav-scrollable {
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .app-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.25rem 1rem 0.5rem;
    }

    .app-header-actions,
    .app-auth-group,
    .app-profile-card,
    .app-profile-links {
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .app-link-pill,
    .app-profile-name {
        max-width: 100%;
    }

    .app-link-pill {
        white-space: normal;
    }

    .app-content {
        padding: 0 1rem 1.5rem;
    }

    .app-footer {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.75rem 1rem 1rem;
    }

    .app-footer-contact {
        min-width: 0;
    }

    .app-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.halloapp-large-editor-modal {
    max-height: 96dvh;
}

.halloapp-large-editor-body {
    overflow-y: auto;
}

/* ===== Rich-Text-Editor: Schriftarten ===== */
/* Lesbare Beschriftungen im Schriftart-Dropdown und tatsächliche Anwendung der Schrift. */
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value]::before {
    content: attr(data-value);
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="sans-serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="sans-serif"]::before {
    content: "Sans Serif";
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
    content: "Serif";
    font-family: Georgia, "Times New Roman", serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
    content: "Monospace";
    font-family: "Courier New", Courier, monospace;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="inter"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="inter"]::before {
    content: "Inter";
    font-family: "Inter", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="roboto"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="roboto"]::before {
    content: "Roboto";
    font-family: "Roboto", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="nunito"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="nunito"]::before {
    content: "Nunito";
    font-family: "Nunito", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="arial"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="arial"]::before {
    content: "Arial";
    font-family: Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="arial-black"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="arial-black"]::before {
    content: "Arial Black";
    font-family: "Arial Black", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="georgia"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="georgia"]::before {
    content: "Georgia";
    font-family: Georgia, serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="times-new-roman"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="times-new-roman"]::before {
    content: "Times New Roman";
    font-family: "Times New Roman", Times, serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="comic-sans"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="comic-sans"]::before {
    content: "Comic Sans";
    font-family: "Comic Sans MS", "Comic Sans", cursive;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="courier-new"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="courier-new"]::before {
    content: "Courier New";
    font-family: "Courier New", Courier, monospace;
}

/* Anwendung der Schriftart im Editor-Inhalt. */
.ql-font-sans-serif { font-family: "Helvetica Neue", Arial, sans-serif; }
.ql-font-serif { font-family: Georgia, "Times New Roman", serif; }
.ql-font-monospace { font-family: "Courier New", Courier, monospace; }
.ql-font-inter { font-family: "Inter", Arial, sans-serif; }
.ql-font-roboto { font-family: "Roboto", Arial, sans-serif; }
.ql-font-nunito { font-family: "Nunito", Arial, sans-serif; }
.ql-font-arial { font-family: Arial, sans-serif; }
.ql-font-arial-black { font-family: "Arial Black", Arial, sans-serif; }
.ql-font-georgia { font-family: Georgia, serif; }
.ql-font-times-new-roman { font-family: "Times New Roman", Times, serif; }
.ql-font-comic-sans { font-family: "Comic Sans MS", "Comic Sans", cursive; }
.ql-font-courier-new { font-family: "Courier New", Courier, monospace; }

.ql-snow .ql-picker.ql-size {
    width: 5.75rem;
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value]::before {
    content: attr(data-value);
}

.ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before,
.ql-snow .ql-picker.ql-size .ql-picker-item:not([data-value])::before {
    content: "Normal";
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
    content: "Small";
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
    content: "Large";
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
    content: "Huge";
}

.ql-size-10px { font-size: 10px; }
.ql-size-12px { font-size: 12px; }
.ql-size-14px { font-size: 14px; }
.ql-size-16px { font-size: 16px; }
.ql-size-18px { font-size: 18px; }
.ql-size-20px { font-size: 20px; }
.ql-size-24px { font-size: 24px; }
.ql-size-28px { font-size: 28px; }
.ql-size-32px { font-size: 32px; }
.ql-size-36px { font-size: 36px; }
.ql-size-48px { font-size: 48px; }

/* Großeditor: Der Quill-Inhalt nutzt die gesamte Modalhöhe zwischen Kopf- und
   Aktionsleiste. Dadurch bleibt auch bei langen Texten eine große, nach unten
   ausgedehnte Bearbeitungsfläche erhalten. */
.halloapp-large-editor-modal {
    min-height: 34rem;
}

.halloapp-large-editor-body > .halloapp-richtext {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.halloapp-large-editor-body .ql-toolbar {
    flex: 0 0 auto;
}

.halloapp-large-editor-body .ql-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.halloapp-large-editor-body .ql-editor {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.student-exercise-page {
    margin-inline: -0.75rem;
}

.student-exercise-page .progress-ring {
    width: 3rem;
    height: 3rem;
}

.student-exercise-page .progress-ring-label {
    font-size: 0.75rem;
}

.student-exercise-page .halloapp-richtext .ql-toolbar {
    padding: 0.35rem;
}

.student-exercise-page .halloapp-richtext .ql-toolbar .ql-formats {
    margin-right: 0.25rem;
}

.student-exercise-page .halloapp-richtext .ql-container,
.student-exercise-page .halloapp-richtext .ql-editor {
    font-size: 16px;
}

.student-exercise-page .halloapp-richtext .ql-container {
    min-height: 8.5rem;
}

.student-exercise-page .halloapp-richtext .ql-editor {
    min-height: 8.5rem;
}

@media (min-width: 1024px) {
    .student-exercise-page {
        margin-inline: 0;
    }

    .student-exercise-page .progress-ring {
        width: 4.5rem;
        height: 4.5rem;
    }

    .student-exercise-page .progress-ring-label {
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .halloapp-large-editor-modal {
        min-height: 0;
    }
}

/* ===== Rich-Text-Editor: Farb-Buttons mit sichtbaren Farben ===== */
.ql-snow .ql-color-picker .ql-picker-item {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.ql-snow .ql-color-picker .ql-picker-label {
    padding: 2px 4px;
}

.ql-snow .ql-toolbar .ql-color,
.ql-snow .ql-toolbar .ql-background {
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 0.35rem;
    margin-inline: 0.1rem;
}

.ql-snow .ql-toolbar .ql-color:hover,
.ql-snow .ql-toolbar .ql-background:hover,
.ql-snow .ql-toolbar .ql-color.ql-expanded,
.ql-snow .ql-toolbar .ql-background.ql-expanded {
    background: #f1f5f9;
    border-color: var(--hallo-accent-1);
}

.ql-snow .ql-toolbar .ql-color .ql-picker-label svg .ql-color-label,
.ql-snow .ql-toolbar .ql-background .ql-picker-label svg .ql-color-label {
    stroke-width: 3;
}

.ql-snow .ql-toolbar button.ql-align {
    border: 1px solid transparent;
    border-radius: 0.35rem;
    margin-inline: 0.05rem;
}

.ql-snow .ql-toolbar button.ql-align:hover,
.ql-snow .ql-toolbar button.ql-align.ql-active {
    background: #eef2ff;
    border-color: var(--hallo-accent-1);
}

/* Quill 2 rendert Nummerierungen/Aufzählungszeichen über .ql-ui::before.
   Die Marker erben die Schriftgröße nicht, wenn Quill die Größe nur auf den Text setzt. */
.ql-editor li.ql-size-small > .ql-ui::before,
.ql-editor li:has(.ql-size-small) > .ql-ui::before {
    font-size: 0.75em;
}

.ql-editor li.ql-size-large > .ql-ui::before,
.ql-editor li:has(.ql-size-large) > .ql-ui::before {
    font-size: 1.5em;
}

.ql-editor li.ql-size-huge > .ql-ui::before,
.ql-editor li:has(.ql-size-huge) > .ql-ui::before {
    font-size: 2.5em;
}

.ql-editor li.ql-size-small,
.ql-editor li.ql-size-large,
.ql-editor li.ql-size-huge,
.ql-editor li:has(.ql-size-small),
.ql-editor li:has(.ql-size-large),
.ql-editor li:has(.ql-size-huge) {
    line-height: 1.2;
}

.lesson-pdf-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lesson-pdf-page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid #cbd5e1;
    font-size: 0.78rem;
    color: #475569;
    letter-spacing: 0.03em;
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    html,
    body,
    #app,
    .app-shell,
    .app-main,
    .app-content {
        background: #ffffff !important;
    }

    body * {
        visibility: hidden !important;
    }

    .pdf-export-root,
    .pdf-export-root * {
        visibility: visible !important;
    }

    body > :not(.app-shell),
    .app-sidebar,
    .app-header,
    .app-header-actions,
    .app-footer,
    .student-bottom-nav,
    #blazor-error-ui,
    .scroll-to-top-button {
        display: none !important;
    }

    .app-content > :not(.pdf-export-root) {
        display: none !important;
    }

    html,
    body {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #app {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .app-shell,
    .app-main,
    .app-content {
        display: block !important;
        min-height: 0 !important;
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    .pdf-export-root {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 50% !important;
        width: 186mm !important;
        max-width: 186mm !important;
        margin: 0 !important;
        padding: 18mm 0 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        transform: translateX(-50%) !important;
    }

    .no-print {
        display: none !important;
    }

    .pdf-export-root > * {
        width: 100% !important;
        max-width: 186mm !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .pdf-document {
        width: 100% !important;
        max-width: 186mm !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
        border: 0 !important;
        outline: 0 !important;
        padding: 0 8mm !important;
    }

    .lesson-pdf-page {
        min-height: 0 !important;
        break-after: auto;
        page-break-after: auto;
        break-inside: auto;
        page-break-inside: auto;
    }

    .lesson-pdf-page:last-child {
        break-after: auto;
        page-break-after: auto;
    }
}

/* ==========================================================================
   Student mobile bottom navigation
   ========================================================================== */

.student-bottom-nav {
    display: none;
}

@media (max-width: 900px) {
    .app-main {
        padding-bottom: 5.5rem;
    }

    .student-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        justify-content: space-around;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
        background: rgba(15, 23, 42, 0.96);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid rgba(148, 163, 184, 0.22);
        box-shadow: 0 -8px 24px rgba(2, 6, 23, 0.35);
    }

    .student-bottom-nav-item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        padding: 0.35rem 0.2rem;
        border-radius: 0.9rem;
        color: rgba(226, 232, 240, 0.7);
        text-decoration: none;
        font-size: 0.66rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
    }

    .student-bottom-nav-icon {
        font-size: 1.2rem;
        line-height: 1;
    }

    .student-bottom-nav-label {
        white-space: nowrap;
    }

    .student-bottom-nav-item:active {
        transform: scale(0.94);
    }

    .student-bottom-nav-item.active {
        color: #ffffff;
        background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(59, 130, 246, 0.35));
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    }
}

/* ==========================================================================
   Shared gamified UI utilities (progress rings, skeletons, toasts, cards)
   ========================================================================== */

.progress-ring {
    --ring-size: 4.5rem;
    --ring-thickness: 0.45rem;
    --ring-percent: 0;
    --ring-color: var(--hallo-accent-2);
    position: relative;
    width: var(--ring-size);
    height: var(--ring-size);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--ring-color) calc(var(--ring-percent) * 1%), rgba(148, 163, 184, 0.2) 0);
    transition: background 0.4s ease;
}

.progress-ring::before {
    content: "";
    position: absolute;
    inset: var(--ring-thickness);
    border-radius: 50%;
    background: var(--app-surface, #0f172a);
}

.progress-ring-label {
    position: relative;
    z-index: 1;
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #1f2937;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
}

.xp-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, var(--hallo-accent-2));
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3);
}

@keyframes hallo-pop-in {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-stack-enter {
    animation: hallo-pop-in 0.28s ease both;
}

@keyframes hallo-bounce {
    0%, 100% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.06);
    }

    70% {
        transform: scale(0.97);
    }
}

.bounce-on-correct {
    animation: hallo-bounce 0.4s ease;
}

@keyframes hallo-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton-block {
    border-radius: 0.9rem;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.15) 25%, rgba(148, 163, 184, 0.3) 37%, rgba(148, 163, 184, 0.15) 63%);
    background-size: 400% 100%;
    animation: hallo-shimmer 1.4s ease infinite;
}

.hallo-toast-stack {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    pointer-events: none;
    width: min(92vw, 26rem);
}

.hallo-toast {
    pointer-events: auto;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
    animation: hallo-pop-in 0.25s ease both;
}

.hallo-toast-success {
    border-left: 4px solid #22c55e;
}

.hallo-toast-error {
    border-left: 4px solid #ef4444;
}

/* Progress dots used by the lesson exercise card-stack flow */
.exercise-dot {
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Lernpfad (learning path) view for the student lesson overview */
.lesson-path {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
}

.lesson-path-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1.75rem;
}

.lesson-path-item:last-child {
    padding-bottom: 0;
}

.lesson-path-connector {
    position: absolute;
    top: 2.75rem;
    left: 1.5rem;
    bottom: -0.25rem;
    width: 3px;
    background: #e2e8f0;
    border-radius: 999px;
    z-index: 0;
}

.lesson-path-item:last-child .lesson-path-connector {
    display: none;
}

.lesson-path-item--completed .lesson-path-connector {
    background: linear-gradient(180deg, #22c55e, #86efac);
}

.lesson-path-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    border: 3px solid #ffffff;
}

.lesson-path-node--completed {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.lesson-path-node--current {
    background: linear-gradient(135deg, var(--hallo-accent-1), var(--hallo-accent-2));
    animation: hallo-pulse 1.8s ease infinite;
}

.lesson-path-node--open {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.lesson-path-node--locked {
    background: #cbd5e1;
    color: #64748b;
}

@keyframes hallo-pulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25), 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35), 0 0 0 8px rgba(99, 102, 241, 0);
    }
}

.lesson-path-card {
    flex: 1;
    min-width: 0;
}

@media (max-width: 1023px) {
    .student-learning-page {
        margin-inline: -0.75rem;
    }

    .lesson-path {
        padding: 0.25rem 0;
    }

    .lesson-path-item {
        gap: 0.55rem;
        padding-bottom: 1.1rem;
    }

    .lesson-path-connector {
        top: 2.35rem;
        left: 1.15rem;
        width: 2px;
    }

    .lesson-path-node {
        width: 2.35rem;
        height: 2.35rem;
        border-width: 2px;
        font-size: 0.95rem;
    }

    .lesson-path-card p,
    .lesson-path-card button {
        font-size: 0.8125rem;
    }
}

/* ============================================
   Hero Text Animations
   ============================================ */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(103, 232, 249, 0.5),
                     0 0 40px rgba(103, 232, 249, 0.3),
                     0 0 60px rgba(103, 232, 249, 0.2);
    }
    50% {
        text-shadow: 0 0 30px rgba(103, 232, 249, 0.8),
                     0 0 60px rgba(103, 232, 249, 0.5),
                     0 0 90px rgba(103, 232, 249, 0.3);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.hero-animate-badge {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-animate-title {
    animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.hero-animate-subtitle {
    animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

.hero-animate-description {
    animation: fadeSlideUp 0.8s ease-out 0.6s both;
}

.hero-animate-buttons {
    animation: fadeSlideUp 0.8s ease-out 0.8s both;
}

.hero-animate-stats {
    animation: scaleIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 1s both;
}

.hero-gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

.hero-text-glow {
    animation: textGlow 3s ease-in-out infinite;
}

.hero-float {
    animation: float 3s ease-in-out infinite;
}

.hero-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

/* Staggered Stats Animation */
.hero-stat-1 {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s both;
}

.hero-stat-2 {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s both;
}

.hero-stat-3 {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s both;
}

