/* ==========================================================================
   O'NAY OQU — student & parent web app design system
   Palette is inherited from the admin panel (Copilot.Admin/wwwroot/css/app.css):
   corporate purple #6c509a, teal #13a58a, warm cream canvas rgb(254,248,237).
   The language here is softer and larger than the admin's: big rounded cards,
   generous type, motion on every state change.
   ========================================================================== */

:root {
    /* brand */
    --oo-purple: #6c509a;
    --oo-purple-dark: #583c86;
    --oo-purple-deep: #43305f;
    --oo-purple-light: #8f6fd0;
    --oo-purple-soft: rgba(108, 80, 154, .08);
    --oo-purple-softer: rgba(108, 80, 154, .04);
    --oo-teal: #13a58a;
    --oo-teal-soft: rgba(19, 165, 138, .1);

    /* text */
    --oo-ink: #1f2430;
    --oo-muted: #7c8296;
    --oo-faint: #aab1c1;
    --oo-inverse: #ffffff;

    /* surfaces */
    --oo-bg: #fbf7f0;
    --oo-bg-deep: #f4efe6;
    --oo-card: #ffffff;
    --oo-line: #efe9e0;
    --oo-line-soft: #f6f2ec;

    /* status */
    --oo-green: #22a565;
    --oo-red: #e5484d;
    --oo-amber: #f5a524;
    --oo-blue: #3b82f6;

    /* radii */
    --oo-r-xs: 8px;
    --oo-r-sm: 12px;
    --oo-r-md: 16px;
    --oo-r-lg: 22px;
    --oo-r-xl: 28px;
    --oo-r-pill: 999px;

    /* elevation */
    --oo-shadow-sm: 0 2px 8px rgba(67, 48, 95, .05);
    --oo-shadow: 0 8px 26px rgba(67, 48, 95, .08);
    --oo-shadow-pop: 0 18px 48px rgba(67, 48, 95, .18);
    --oo-shadow-brand: 0 12px 30px rgba(108, 80, 154, .32);

    /* motion */
    --oo-ease: cubic-bezier(.4, 0, .2, 1);
    --oo-spring: cubic-bezier(.34, 1.56, .64, 1);
    --oo-fast: 140ms;
    --oo-base: 260ms;
    --oo-slow: 520ms;

    /* layout */
    --oo-rail: 260px;
    --oo-topbar: 68px;
    --oo-tabbar: 68px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--oo-ink);
    background: var(--oo-bg);
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.5;
    overscroll-behavior-y: none;
}

/* The soft aurora behind everything — two blurred brand blobs, fixed so scrolling feels layered. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(52vw 42vw at 12% -8%, rgba(143, 111, 208, .20), transparent 62%),
        radial-gradient(46vw 38vw at 96% 4%, rgba(19, 165, 138, .14), transparent 60%),
        radial-gradient(60vw 50vw at 60% 108%, rgba(245, 165, 36, .10), transparent 64%);
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.01em; }

a { color: var(--oo-purple); text-decoration: none; }
a:hover { color: var(--oo-purple-dark); }

button { font-family: inherit; }

.num, .oo-num { font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(108, 80, 154, .18); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(108, 80, 154, .3); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ boot / error ================================ */

.boot {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    background: var(--oo-bg);
}

.boot-logo { width: 190px; animation: bootPulse 1.6s var(--oo-ease) infinite; }

.boot-bar {
    width: 160px;
    height: 4px;
    border-radius: 99px;
    background: rgba(108, 80, 154, .14);
    overflow: hidden;
}

.boot-bar span {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 99px;
    background: var(--oo-purple);
    animation: bootSlide 1.2s var(--oo-ease) infinite;
}

@keyframes bootPulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes bootSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    padding: 14px 20px;
    background: var(--oo-ink);
    color: #fff;
    font-weight: 600;
}

#blazor-error-ui .reload { color: #fff; text-decoration: underline; margin-left: 10px; }

/* ============================== app shell ================================= */

.oo-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
}

/* --- desktop rail --- */
.oo-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--oo-rail);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(18px);
    border-right: 1px solid var(--oo-line);
    z-index: 30;
}

.oo-rail-logo { display: block; width: 150px; margin: 4px 8px 22px; }
.oo-rail-logo img { width: 100%; display: block; }

.oo-rail-section {
    margin: 18px 12px 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--oo-faint);
}

.oo-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--oo-r-md);
    color: var(--oo-muted);
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    transition: background var(--oo-fast) var(--oo-ease), color var(--oo-fast) var(--oo-ease), transform var(--oo-fast) var(--oo-ease);
}

.oo-nav-item:hover { background: var(--oo-purple-softer); color: var(--oo-purple); }
.oo-nav-item:active { transform: scale(.98); }

.oo-nav-item.active {
    background: var(--oo-purple-soft);
    color: var(--oo-purple);
}

.oo-nav-item.active::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    width: 4px;
    height: 22px;
    border-radius: 0 4px 4px 0;
    background: var(--oo-purple);
    transform: translateY(-50%);
    animation: railMark var(--oo-base) var(--oo-spring);
}

@keyframes railMark { from { height: 0; opacity: 0; } to { height: 22px; opacity: 1; } }

.oo-nav-icon { width: 22px; height: 22px; flex: none; }
.oo-nav-icon svg { width: 100%; height: 100%; display: block; }

.oo-nav-count {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: var(--oo-r-pill);
    background: var(--oo-red);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: pop var(--oo-base) var(--oo-spring);
}

@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* --- main column --- */
.oo-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--oo-rail);
    display: flex;
    flex-direction: column;
}

.oo-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    height: var(--oo-topbar);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    background: rgba(251, 247, 240, .82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--oo-line);
}

.oo-topbar-logo { display: none; height: 30px; }
.oo-topbar-title { font-size: 19px; font-weight: 800; }
.oo-topbar-spacer { flex: 1; }

.oo-content {
    flex: 1;
    padding: 26px 24px 40px;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
}

.oo-content--wide { max-width: 1440px; }
.oo-content--flush { padding: 0; max-width: none; }

/* --- mobile tab bar --- */
.oo-tabbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: calc(var(--oo-tabbar) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--oo-line);
}

.oo-tabbar-inner { display: flex; height: var(--oo-tabbar); }

.oo-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--oo-faint);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: color var(--oo-fast) var(--oo-ease);
}

.oo-tab .oo-nav-icon { width: 24px; height: 24px; transition: transform var(--oo-base) var(--oo-spring); }
.oo-tab.active { color: var(--oo-purple); }
.oo-tab.active .oo-nav-icon { transform: translateY(-2px) scale(1.12); }

.oo-tab-dot {
    position: absolute;
    top: 9px;
    left: 50%;
    margin-left: 6px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: var(--oo-r-pill);
    background: var(--oo-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: pop var(--oo-base) var(--oo-spring);
}

@media (max-width: 900px) {
    .oo-rail { display: none; }
    .oo-main { margin-left: 0; }
    .oo-tabbar { display: block; }
    .oo-topbar { padding: 0 16px; }
    .oo-topbar-logo { display: block; }
    .oo-topbar-title { display: none; }
    .oo-content { padding: 18px 16px calc(var(--oo-tabbar) + env(safe-area-inset-bottom) + 28px); }
    .oo-content--flush { padding-bottom: 0; }
}

/* ============================ page furniture ============================== */

.oo-page-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.oo-page-title {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.oo-page-subtitle {
    color: var(--oo-muted);
    font-weight: 600;
    margin-top: 4px;
    font-size: 14px;
}

.oo-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 14px;
}

.oo-section-title { font-size: 18px; font-weight: 800; }
.oo-section-head .spacer { flex: 1; }

.oo-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--oo-muted);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 14px;
    transition: gap var(--oo-fast) var(--oo-ease), color var(--oo-fast) var(--oo-ease);
}

.oo-back:hover { gap: 11px; color: var(--oo-purple); }

/* ================================ cards =================================== */

.oo-card {
    background: var(--oo-card);
    border-radius: var(--oo-r-lg);
    box-shadow: var(--oo-shadow);
    padding: 20px;
}

.oo-card--flat { box-shadow: var(--oo-shadow-sm); }
.oo-card--tight { padding: 14px; }

.oo-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.oo-card-title { font-size: 16px; font-weight: 800; }
.oo-card-head .spacer { flex: 1; }

.oo-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.oo-grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* Cards are wrapped in a per-item <div> that carries the stagger delay; make that wrapper a flex box
   so the card inside it fills the grid row's height instead of hugging its own content. */
.oo-grid.oo-stagger > div { display: flex; }
.oo-grid.oo-stagger > div > * { width: 100%; }

/* --- hero --- */
.oo-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--oo-r-xl);
    padding: 26px 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--oo-purple) 0%, var(--oo-purple-light) 58%, #b490e8 100%);
    box-shadow: var(--oo-shadow-brand);
}

.oo-hero::after {
    content: '';
    position: absolute;
    right: -70px;
    top: -90px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    animation: heroFloat 9s var(--oo-ease) infinite alternate;
}

.oo-hero::before {
    content: '';
    position: absolute;
    left: -50px;
    bottom: -110px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    animation: heroFloat 11s var(--oo-ease) infinite alternate-reverse;
}

@keyframes heroFloat { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-24px, 22px, 0) scale(1.1); } }

.oo-hero > * { position: relative; z-index: 1; }
.oo-hero-eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .78; }
.oo-hero-title { font-size: 25px; font-weight: 900; margin-top: 6px; letter-spacing: -.02em; }
.oo-hero-sub { opacity: .85; font-weight: 600; margin-top: 6px; }
.oo-hero--teal { background: linear-gradient(135deg, #0f8f78 0%, var(--oo-teal) 55%, #4fd0b4 100%); box-shadow: 0 12px 30px rgba(19, 165, 138, .3); }

/* ================================ buttons ================================= */

.oo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: var(--oo-r-sm);
    background: var(--oo-purple);
    color: #fff;
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--oo-fast) var(--oo-ease), box-shadow var(--oo-base) var(--oo-ease), background var(--oo-fast) var(--oo-ease), opacity var(--oo-fast) var(--oo-ease);
    box-shadow: 0 6px 16px rgba(108, 80, 154, .26);
}

.oo-btn:hover { background: var(--oo-purple-dark); box-shadow: 0 10px 24px rgba(108, 80, 154, .34); transform: translateY(-1px); }
.oo-btn:active { transform: scale(.97) translateY(0); }
.oo-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.oo-btn-ghost {
    background: var(--oo-purple-soft);
    color: var(--oo-purple);
    box-shadow: none;
}

.oo-btn-ghost:hover { background: rgba(108, 80, 154, .14); color: var(--oo-purple-dark); box-shadow: none; }

.oo-btn-quiet { background: transparent; color: var(--oo-muted); box-shadow: none; }
.oo-btn-quiet:hover { background: var(--oo-line-soft); color: var(--oo-ink); box-shadow: none; }

.oo-btn-teal { background: var(--oo-teal); box-shadow: 0 6px 16px rgba(19, 165, 138, .26); }
.oo-btn-teal:hover { background: #0f8f78; box-shadow: 0 10px 24px rgba(19, 165, 138, .32); }

.oo-btn-danger { background: var(--oo-red); box-shadow: 0 6px 16px rgba(229, 72, 77, .24); }
.oo-btn-danger:hover { background: #cf3b40; }

.oo-btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: var(--oo-r-xs); }
.oo-btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: var(--oo-r-md); }
.oo-btn-block { width: 100%; }

.oo-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--oo-r-sm);
    background: var(--oo-line-soft);
    color: var(--oo-muted);
    cursor: pointer;
    transition: background var(--oo-fast) var(--oo-ease), color var(--oo-fast) var(--oo-ease), transform var(--oo-fast) var(--oo-ease);
}

.oo-icon-btn:hover { background: var(--oo-purple-soft); color: var(--oo-purple); }
.oo-icon-btn:active { transform: scale(.92); }
.oo-icon-btn svg { width: 20px; height: 20px; }

/* ================================ forms =================================== */

.oo-field { margin-bottom: 16px; }

.oo-label {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--oo-muted);
    margin-bottom: 7px;
    letter-spacing: .01em;
}

.oo-input, .oo-select, .oo-textarea {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1.5px solid var(--oo-line);
    border-radius: var(--oo-r-sm);
    background: #fff;
    color: var(--oo-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color var(--oo-fast) var(--oo-ease), box-shadow var(--oo-fast) var(--oo-ease);
}

.oo-textarea { height: auto; min-height: 96px; padding: 12px 15px; resize: vertical; line-height: 1.5; }

.oo-input:hover, .oo-select:hover, .oo-textarea:hover { border-color: #e2d9cc; }

.oo-input:focus, .oo-select:focus, .oo-textarea:focus {
    border-color: var(--oo-purple);
    box-shadow: 0 0 0 4px var(--oo-purple-soft);
}

.oo-input::placeholder, .oo-textarea::placeholder { color: var(--oo-faint); font-weight: 600; }

.oo-input.is-error { border-color: var(--oo-red); }

.oo-hint { font-size: 12.5px; color: var(--oo-muted); font-weight: 600; margin-top: 6px; }
.oo-error { font-size: 13px; color: var(--oo-red); font-weight: 700; margin-top: 7px; }

.oo-search {
    position: relative;
}

.oo-search .oo-input { padding-left: 44px; }

.oo-search svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--oo-faint);
    pointer-events: none;
}

/* --- OTP boxes --- */
.oo-otp {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.oo-otp input {
    width: 48px;
    height: 58px;
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    border: 1.5px solid var(--oo-line);
    border-radius: var(--oo-r-sm);
    background: #fff;
    color: var(--oo-ink);
    outline: none;
    font-family: inherit;
    transition: border-color var(--oo-fast) var(--oo-ease), box-shadow var(--oo-fast) var(--oo-ease), transform var(--oo-fast) var(--oo-spring);
}

.oo-otp input:focus { border-color: var(--oo-purple); box-shadow: 0 0 0 4px var(--oo-purple-soft); transform: scale(1.05); }
.oo-otp.is-error input { border-color: var(--oo-red); animation: shake 420ms var(--oo-ease); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

/* --- segmented --- */
.oo-seg {
    display: inline-flex;
    padding: 4px;
    background: var(--oo-line-soft);
    border-radius: var(--oo-r-md);
    gap: 2px;
}

.oo-seg button {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: var(--oo-r-sm);
    font-size: 13.5px;
    font-weight: 800;
    color: var(--oo-muted);
    cursor: pointer;
    transition: background var(--oo-base) var(--oo-ease), color var(--oo-fast) var(--oo-ease), box-shadow var(--oo-base) var(--oo-ease);
}

.oo-seg button.active { background: #fff; color: var(--oo-purple); box-shadow: var(--oo-shadow-sm); }

/* --- switch --- */
.oo-switch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--oo-line-soft);
}

.oo-switch-row:last-child { border-bottom: none; }
.oo-switch-row .txt { flex: 1; min-width: 0; }
.oo-switch-row .txt b { display: block; font-weight: 800; font-size: 14.5px; }
.oo-switch-row .txt span { font-size: 12.5px; color: var(--oo-muted); font-weight: 600; }

.oo-switch {
    flex: none;
    width: 48px;
    height: 28px;
    border-radius: var(--oo-r-pill);
    border: none;
    background: #ddd6ca;
    position: relative;
    cursor: pointer;
    transition: background var(--oo-base) var(--oo-ease);
}

.oo-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    transition: transform var(--oo-base) var(--oo-spring);
}

.oo-switch.on { background: var(--oo-teal); }
.oo-switch.on::after { transform: translateX(20px); }

/* ============================== badges/pills ============================== */

.oo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: var(--oo-r-pill);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .01em;
    background: var(--oo-line-soft);
    color: var(--oo-muted);
    white-space: nowrap;
}

.oo-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.b-open { background: var(--oo-teal-soft); color: #0f8f78; }
.b-closed { background: #f1f2f6; color: var(--oo-muted); }
.b-overdue { background: rgba(245, 165, 36, .14); color: #b97a06; }
.b-today { background: var(--oo-purple-soft); color: var(--oo-purple); }
.b-free { background: rgba(34, 165, 101, .12); color: var(--oo-green); }
.b-paid { background: rgba(108, 80, 154, .1); color: var(--oo-purple); }
.b-done { background: rgba(34, 165, 101, .12); color: var(--oo-green); }
.b-red { background: rgba(229, 72, 77, .1); color: var(--oo-red); }

.oo-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border-radius: var(--oo-r-pill);
    background: #fff;
    box-shadow: var(--oo-shadow-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--oo-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--oo-fast) var(--oo-ease);
}

.oo-chip:hover { color: var(--oo-purple); }
.oo-chip.active { background: var(--oo-purple); color: #fff; box-shadow: 0 6px 14px rgba(108, 80, 154, .26); }

.oo-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.oo-chips::-webkit-scrollbar { display: none; }

/* ================================ avatar ================================== */

.oo-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex: none;
    background: var(--oo-purple-soft);
    color: var(--oo-purple);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 15px;
    line-height: 1;
    overflow: hidden;
    /* Flex centring centres the *line box*, and a line box reserves descender space that a capital
       initial never uses — so the letter reads as sitting high in the circle. Measured on Nunito Black,
       the ink centre is 0.034em above the line-box centre; half of this padding cancels it. */
    padding-top: .068em;
}

/* Positioned out of flow so the optical padding above can never crop or offset a photo. */
.oo-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.oo-avatar--lg { width: 62px; height: 62px; font-size: 22px; }
.oo-avatar--sm { width: 32px; height: 32px; font-size: 12.5px; }

/* ============================= lesson cards =============================== */

.oo-lesson-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: #fff;
    border-radius: var(--oo-r-lg);
    box-shadow: var(--oo-shadow);
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--oo-base) var(--oo-spring), box-shadow var(--oo-base) var(--oo-ease);
}

.oo-lesson-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--oo-purple);
    opacity: .85;
}

.oo-lesson-card.is-overdue::before { background: var(--oo-amber); }
.oo-lesson-card.is-closed::before { background: var(--oo-faint); }
.oo-lesson-card.is-done::before { background: var(--oo-green); }

.oo-lesson-card:hover { transform: translateY(-4px); box-shadow: var(--oo-shadow-pop); }
.oo-lesson-card:active { transform: translateY(-1px) scale(.99); }

/* No chat on the server yet — the card must read as not-yet-openable rather than silently do nothing. */
.oo-lesson-card.is-unavailable { background: #fcfbf9; box-shadow: var(--oo-shadow-sm); }
.oo-lesson-card.is-unavailable::before { background: var(--oo-line); }
.oo-lesson-card.is-unavailable .oo-lesson-title { color: var(--oo-muted); }
.oo-lesson-card.is-unavailable:hover { transform: none; box-shadow: var(--oo-shadow-sm); }
.oo-lesson-card.is-unavailable:active { transform: none; }

.oo-go.is-locked { color: var(--oo-faint); }
.oo-lesson-card:hover .oo-go.is-locked { gap: 6px; }

.oo-lesson-top { display: flex; align-items: center; gap: 8px; }
.oo-lesson-course { font-size: 12px; font-weight: 800; color: var(--oo-purple); text-transform: uppercase; letter-spacing: .04em; }
.oo-lesson-title { font-size: 17px; font-weight: 800; line-height: 1.3; }
.oo-lesson-desc {
    font-size: 13.5px;
    color: var(--oo-muted);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oo-lesson-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.oo-lesson-foot .spacer { flex: 1; }

.oo-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--oo-purple);
    transition: gap var(--oo-fast) var(--oo-ease);
}

.oo-lesson-card:hover .oo-go { gap: 10px; }

/* --- course card --- */
.oo-course-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--oo-r-lg);
    box-shadow: var(--oo-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--oo-base) var(--oo-spring), box-shadow var(--oo-base) var(--oo-ease);
}

.oo-course-card:hover { transform: translateY(-5px); box-shadow: var(--oo-shadow-pop); }

.oo-course-cover {
    height: 132px;
    background: linear-gradient(135deg, var(--oo-purple) 0%, var(--oo-purple-light) 100%);
    position: relative;
    overflow: hidden;
}

.oo-course-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--oo-slow) var(--oo-ease); }
.oo-course-card:hover .oo-course-cover img { transform: scale(1.06); }

.oo-course-cover-letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    font-weight: 900;
    color: rgba(255, 255, 255, .55);
}

.oo-course-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.oo-course-title { font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.oo-course-teacher { font-size: 13px; color: var(--oo-muted); font-weight: 700; }

/* --- progress bar --- */
.oo-bar { height: 8px; border-radius: 99px; background: var(--oo-line-soft); overflow: hidden; }

.oo-bar > i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--oo-purple), var(--oo-purple-light));
    transition: width 900ms var(--oo-ease);
}

.oo-bar--teal > i { background: linear-gradient(90deg, #0f8f78, #4fd0b4); }

.oo-progress-line { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 800; color: var(--oo-muted); }
.oo-progress-line .oo-bar { flex: 1; }

/* --- progress ring --- */
.oo-ring { position: relative; display: inline-flex; }
.oo-ring svg { transform: rotate(-90deg); display: block; }
.oo-ring circle { fill: none; stroke-linecap: round; }
.oo-ring .track { stroke: var(--oo-line-soft); }
/* The stroke itself is a per-instance gradient set as a presentation attribute on the circle —
   declaring it here too would win over that attribute and paint every ring the same colour. */
.oo-ring .value { transition: stroke-dashoffset 1100ms var(--oo-ease); }

.oo-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: -.02em;
}

.oo-ring-label small { font-size: 10px; font-weight: 700; color: var(--oo-muted); }

/* ================================= stats ================================== */

.oo-stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.oo-stat {
    position: relative;
    background: #fff;
    border-radius: var(--oo-r-md);
    box-shadow: var(--oo-shadow-sm);
    padding: 16px 16px 16px 20px;
    overflow: hidden;
}

.oo-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--oo-purple);
}

.oo-stat.s-teal::before { background: var(--oo-teal); }
.oo-stat.s-amber::before { background: var(--oo-amber); }
.oo-stat.s-green::before { background: var(--oo-green); }

.oo-stat-label { font-size: 12px; font-weight: 800; color: var(--oo-muted); text-transform: uppercase; letter-spacing: .04em; }
.oo-stat-value { font-size: 26px; font-weight: 900; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.oo-stat-sub { font-size: 12.5px; color: var(--oo-faint); font-weight: 700; }

/* ============================== list rows ================================= */

.oo-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    border-radius: var(--oo-r-md);
    cursor: pointer;
    transition: background var(--oo-fast) var(--oo-ease), transform var(--oo-fast) var(--oo-ease);
}

.oo-row:hover { background: var(--oo-purple-softer); }
.oo-row:active { transform: scale(.995); }
.oo-row.static { cursor: default; }
.oo-row.static:hover { background: transparent; }
.oo-row-main { flex: 1; min-width: 0; }
.oo-row-title { font-weight: 800; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oo-row-meta { font-size: 12.5px; color: var(--oo-muted); font-weight: 600; }
.oo-rows { display: flex; flex-direction: column; }
.oo-rows > .oo-row + .oo-row { border-top: 1px solid var(--oo-line-soft); border-radius: 0; }
.oo-rows > .oo-row:first-child { border-radius: var(--oo-r-md) var(--oo-r-md) 0 0; }
.oo-rows > .oo-row:last-child { border-radius: 0 0 var(--oo-r-md) var(--oo-r-md); }

/* ============================== empty state =============================== */

.oo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    text-align: center;
    color: var(--oo-muted);
}

.oo-empty-art {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--oo-purple-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--oo-purple);
    animation: floatY 4.5s var(--oo-ease) infinite alternate;
}

.oo-empty-art svg { width: 44px; height: 44px; }
.oo-empty b { font-size: 17px; color: var(--oo-ink); font-weight: 800; }
.oo-empty span { font-size: 14px; max-width: 360px; font-weight: 600; }

@keyframes floatY { from { transform: translateY(-6px); } to { transform: translateY(6px); } }

/* =============================== skeleton ================================= */

.oo-sk {
    border-radius: var(--oo-r-sm);
    background: linear-gradient(90deg, #f1ece4 25%, #f8f5f0 37%, #f1ece4 63%);
    background-size: 400% 100%;
    animation: skShimmer 1.4s ease infinite;
}

@keyframes skShimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

.oo-sk-card { height: 132px; border-radius: var(--oo-r-lg); }
.oo-sk-line { height: 13px; margin-bottom: 9px; }
.oo-sk-line.w60 { width: 60%; }
.oo-sk-line.w40 { width: 40%; }
.oo-sk-line.w80 { width: 80%; }

/* ================================= chat =================================== */

.oo-chat {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--oo-topbar));
    background: linear-gradient(180deg, #fdfaf5 0%, #fbf7f0 100%);
}

.oo-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--oo-line);
    flex: none;
}

.oo-chat-head-main { flex: 1; min-width: 0; }
.oo-chat-head-title { font-weight: 800; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oo-chat-head-sub { font-size: 12.5px; color: var(--oo-muted); font-weight: 700; }

.oo-chat-feed {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oo-msg { display: flex; gap: 10px; max-width: 760px; width: 100%; margin: 0 auto; animation: msgIn 340ms var(--oo-ease) both; }

@keyframes msgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.oo-msg-body { max-width: 78%; }

.oo-bubble {
    padding: 12px 16px;
    border-radius: var(--oo-r-lg);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: var(--oo-shadow-sm);
}

.oo-msg.from-ai .oo-bubble { background: #fff; border-bottom-left-radius: 8px; }
.oo-msg.from-curator .oo-bubble { background: #fff; border-bottom-left-radius: 8px; border-left: 3px solid var(--oo-teal); }

.oo-msg.from-student { flex-direction: row-reverse; }
.oo-msg.from-student .oo-bubble {
    background: linear-gradient(135deg, var(--oo-purple) 0%, var(--oo-purple-light) 100%);
    color: #fff;
    border-bottom-right-radius: 8px;
    box-shadow: 0 6px 16px rgba(108, 80, 154, .22);
}

.oo-msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--oo-faint);
    font-weight: 700;
    margin-top: 5px;
    padding: 0 6px;
}

.oo-msg.from-student .oo-msg-meta { justify-content: flex-end; }

.oo-msg-sender { font-size: 11.5px; font-weight: 800; color: var(--oo-teal); margin: 0 0 4px 6px; }

.oo-msg-images { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.oo-msg-images img {
    max-width: 220px;
    max-height: 220px;
    border-radius: var(--oo-r-md);
    box-shadow: var(--oo-shadow-sm);
    cursor: zoom-in;
    transition: transform var(--oo-base) var(--oo-spring);
}

.oo-msg-images img:hover { transform: scale(1.03); }

.oo-msg audio { max-width: 260px; height: 40px; }

.oo-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 15px 18px;
    background: #fff;
    border-radius: var(--oo-r-lg);
    border-bottom-left-radius: 8px;
    box-shadow: var(--oo-shadow-sm);
}

.oo-typing i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--oo-purple-light);
    animation: typing 1.25s var(--oo-ease) infinite;
}

.oo-typing i:nth-child(2) { animation-delay: .16s; }
.oo-typing i:nth-child(3) { animation-delay: .32s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.oo-chat-day {
    align-self: center;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--oo-muted);
    background: rgba(255, 255, 255, .8);
    padding: 4px 12px;
    border-radius: var(--oo-r-pill);
    text-transform: capitalize;
}

/* --- composer --- */
.oo-composer {
    flex: none;
    padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--oo-line);
}

.oo-composer-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: flex-end; gap: 10px; }

.oo-composer textarea {
    flex: 1;
    min-width: 0;
    height: 46px;
    min-height: 46px;
    max-height: 160px;
    /* JS (ooAutoGrow) drives the height; hide the scrollbar until the cap is reached. */
    overflow-y: hidden;
    padding: 12px 16px;
    border: 1.5px solid var(--oo-line);
    border-radius: var(--oo-r-lg);
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    resize: none;
    outline: none;
    transition: border-color var(--oo-fast) var(--oo-ease), box-shadow var(--oo-fast) var(--oo-ease);
}

.oo-composer textarea:focus { border-color: var(--oo-purple); box-shadow: 0 0 0 4px var(--oo-purple-soft); }

.oo-send {
    width: 46px;
    height: 46px;
    flex: none;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--oo-purple) 0%, var(--oo-purple-light) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(108, 80, 154, .3);
    transition: transform var(--oo-fast) var(--oo-spring), opacity var(--oo-fast) var(--oo-ease);
}

.oo-send:hover { transform: scale(1.07); }
.oo-send:active { transform: scale(.92); }
.oo-send:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.oo-send svg { width: 20px; height: 20px; }

.oo-attach-strip { display: flex; gap: 8px; flex-wrap: wrap; max-width: 760px; margin: 0 auto 10px; }

.oo-attach {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: var(--oo-r-sm);
    overflow: hidden;
    box-shadow: var(--oo-shadow-sm);
    animation: pop var(--oo-base) var(--oo-spring);
}

.oo-attach img { width: 100%; height: 100%; object-fit: cover; }

.oo-attach button {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(31, 36, 48, .72);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oo-closed-note {
    max-width: 760px;
    margin: 0 auto;
    padding: 13px 18px;
    border-radius: var(--oo-r-md);
    background: rgba(245, 165, 36, .1);
    color: #a06a04;
    font-weight: 700;
    font-size: 13.5px;
    text-align: center;
}

@media (max-width: 900px) {
    /* The tab bar is fixed over the page, so the chat column must stop above it — otherwise the
       composer sits underneath and the last message is unreachable. */
    .oo-chat { height: calc(100vh - var(--oo-topbar) - var(--oo-tabbar) - env(safe-area-inset-bottom)); }
    .oo-chat-feed { padding: 16px 14px 6px; }
    .oo-composer { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
    .oo-msg-body { max-width: 86%; }
}

/* ============================== lightbox ================================== */

.oo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(24, 20, 32, .88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn var(--oo-base) var(--oo-ease);
    cursor: zoom-out;
}

.oo-lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--oo-r-md); animation: zoomIn var(--oo-base) var(--oo-spring); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =============================== heatmap ================================== */

.oo-heat-wrap { overflow-x: auto; padding-bottom: 6px; }
.oo-heat { display: flex; gap: 3px; }
.oo-heat-col { display: flex; flex-direction: column; gap: 3px; }

.oo-heat-cell {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    background: #efe9e0;
    cursor: pointer;
    transition: transform var(--oo-fast) var(--oo-spring), outline-color var(--oo-fast) var(--oo-ease);
    outline: 2px solid transparent;
    outline-offset: 1px;
}

.oo-heat-cell.l1 { background: rgba(108, 80, 154, .26); }
.oo-heat-cell.l2 { background: rgba(108, 80, 154, .48); }
.oo-heat-cell.l3 { background: rgba(108, 80, 154, .72); }
.oo-heat-cell.l4 { background: var(--oo-purple); }
.oo-heat-cell.empty { background: transparent; cursor: default; }
.oo-heat-cell:hover:not(.empty) { transform: scale(1.35); }
.oo-heat-cell.sel { outline-color: var(--oo-ink); }

.oo-heat-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--oo-muted); font-weight: 700; margin-top: 10px; }
.oo-heat-months { display: flex; gap: 3px; font-size: 10.5px; color: var(--oo-faint); font-weight: 800; margin-bottom: 4px; }

/* =============================== toasts =================================== */

.oo-toasts {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.oo-toast {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 260px;
    max-width: 380px;
    padding: 13px 16px;
    border-radius: var(--oo-r-md);
    background: #fff;
    box-shadow: var(--oo-shadow-pop);
    font-weight: 700;
    font-size: 14px;
    pointer-events: auto;
    animation: toastIn 360ms var(--oo-spring) both;
    border-left: 4px solid var(--oo-purple);
}

.oo-toast.is-error { border-left-color: var(--oo-red); }
.oo-toast.is-success { border-left-color: var(--oo-green); }
.oo-toast.leaving { animation: toastOut 220ms var(--oo-ease) both; }

@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(.96); } }

@media (max-width: 900px) {
    .oo-toasts { top: auto; bottom: calc(var(--oo-tabbar) + env(safe-area-inset-bottom) + 14px); left: 14px; right: 14px; }
    .oo-toast { min-width: 0; max-width: none; }
}

/* ============================= modal / sheet ============================== */

.oo-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(31, 24, 45, .45);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn var(--oo-base) var(--oo-ease);
}

.oo-modal {
    width: 100%;
    max-width: 460px;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: var(--oo-r-xl);
    box-shadow: var(--oo-shadow-pop);
    padding: 24px;
    animation: modalIn 320ms var(--oo-spring) both;
}

@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }

.oo-modal-title { font-size: 19px; font-weight: 900; margin-bottom: 6px; }
.oo-modal-sub { color: var(--oo-muted); font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.oo-modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.oo-modal-actions .oo-btn { flex: 1; }

@media (max-width: 640px) {
    .oo-backdrop { align-items: flex-end; padding: 0; }
    .oo-modal { max-width: none; border-radius: var(--oo-r-xl) var(--oo-r-xl) 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: sheetIn 320ms var(--oo-spring) both; }
    @keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
}

/* ============================= auth screen ================================ */

.oo-auth {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
}

.oo-auth-art {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, var(--oo-purple-deep) 0%, var(--oo-purple) 52%, var(--oo-purple-light) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px;
}

.oo-auth-art::before,
.oo-auth-art::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
}

.oo-auth-art::before { width: 420px; height: 420px; top: -120px; right: -120px; animation: heroFloat 12s var(--oo-ease) infinite alternate; }
.oo-auth-art::after { width: 320px; height: 320px; bottom: -110px; left: -80px; animation: heroFloat 15s var(--oo-ease) infinite alternate-reverse; }

.oo-auth-art > * { position: relative; z-index: 1; }
.oo-auth-art h1 { font-size: 40px; font-weight: 900; line-height: 1.12; letter-spacing: -.03em; max-width: 12ch; }
.oo-auth-art p { font-size: 16.5px; font-weight: 600; opacity: .84; margin-top: 16px; max-width: 34ch; }

.oo-auth-points { margin-top: 38px; display: flex; flex-direction: column; gap: 16px; }
.oo-auth-point { display: flex; align-items: center; gap: 13px; font-weight: 700; font-size: 15px; }

.oo-auth-point i {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: var(--oo-r-sm);
    background: rgba(255, 255, 255, .16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.oo-auth-point svg { width: 20px; height: 20px; }

.oo-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background: var(--oo-bg);
}

.oo-auth-box { width: 100%; max-width: 400px; }
.oo-auth-logo { width: 176px; margin: 0 auto 30px; display: block; }
.oo-auth-title { font-size: 25px; font-weight: 900; text-align: center; letter-spacing: -.02em; }
.oo-auth-sub { text-align: center; color: var(--oo-muted); font-weight: 600; margin: 8px 0 26px; font-size: 14.5px; }

.oo-role-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.oo-role {
    padding: 16px 14px;
    border-radius: var(--oo-r-md);
    background: #fff;
    box-shadow: var(--oo-shadow-sm);
    text-align: center;
    cursor: pointer;
    font-weight: 800;
    font-size: 14.5px;
    color: var(--oo-muted);
    border: 2px solid transparent;
    transition: all var(--oo-base) var(--oo-ease);
}

.oo-role svg { width: 26px; height: 26px; display: block; margin: 0 auto 7px; }
.oo-role:hover { transform: translateY(-2px); }
.oo-role.active { border-color: var(--oo-purple); color: var(--oo-purple); background: #fff; box-shadow: 0 8px 20px rgba(108, 80, 154, .18); }

.oo-auth-alt { text-align: center; margin-top: 18px; font-size: 14px; font-weight: 700; }
.oo-auth-alt button { background: none; border: none; color: var(--oo-purple); font-weight: 800; cursor: pointer; font-size: 14px; font-family: inherit; }
.oo-auth-alt button:hover { text-decoration: underline; }

.oo-channel-pick { display: flex; gap: 10px; margin-bottom: 16px; }

.oo-channel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border-radius: var(--oo-r-sm);
    background: #fff;
    box-shadow: var(--oo-shadow-sm);
    border: 2px solid transparent;
    font-weight: 800;
    font-size: 13.5px;
    color: var(--oo-muted);
    cursor: pointer;
    transition: all var(--oo-fast) var(--oo-ease);
}

.oo-channel svg { width: 18px; height: 18px; }
.oo-channel.active { border-color: var(--oo-purple); color: var(--oo-purple); }

@media (max-width: 980px) {
    .oo-auth { grid-template-columns: 1fr; }
    .oo-auth-art { display: none; }
}

/* ============================ misc utilities ============================== */

.oo-muted { color: var(--oo-muted); font-weight: 600; }
.oo-faint { color: var(--oo-faint); font-weight: 600; }
.oo-strong { font-weight: 800; }
.oo-center { text-align: center; }
.oo-flex { display: flex; align-items: center; gap: 10px; }
.oo-flex-col { display: flex; flex-direction: column; gap: 10px; }
.oo-spacer { flex: 1; }
.oo-wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

.oo-amount { font-weight: 900; font-variant-numeric: tabular-nums; }
.oo-amount.is-plus { color: var(--oo-green); }
.oo-amount.is-minus { color: var(--oo-red); }

.oo-divider { height: 1px; background: var(--oo-line-soft); margin: 16px 0; }

/* Staggered entrance for lists/grids — set --i on each child. */
.oo-stagger > * { animation: riseIn 460ms var(--oo-ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.oo-fade { animation: fadeIn var(--oo-base) var(--oo-ease) both; }
.oo-page-enter { animation: pageIn 380ms var(--oo-ease) both; }

@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.oo-spin { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.oo-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--oo-teal);
    box-shadow: 0 0 0 0 rgba(19, 165, 138, .55);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(19, 165, 138, .5); }
    70% { box-shadow: 0 0 0 9px rgba(19, 165, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(19, 165, 138, 0); }
}

/* language switch */
.oo-lang {
    display: inline-flex;
    padding: 3px;
    border-radius: var(--oo-r-pill);
    background: var(--oo-line-soft);
    gap: 2px;
}

.oo-lang button {
    border: none;
    background: transparent;
    padding: 4px 11px;
    border-radius: var(--oo-r-pill);
    font-size: 12px;
    font-weight: 800;
    color: var(--oo-muted);
    cursor: pointer;
    text-transform: uppercase;
    transition: all var(--oo-fast) var(--oo-ease);
}

.oo-lang button.active { background: #fff; color: var(--oo-purple); box-shadow: var(--oo-shadow-sm); }

/* account chip */
.oo-account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--oo-r-pill);
    background: #fff;
    box-shadow: var(--oo-shadow-sm);
    cursor: pointer;
    transition: box-shadow var(--oo-fast) var(--oo-ease), transform var(--oo-fast) var(--oo-ease);
}

.oo-account:hover { box-shadow: var(--oo-shadow); transform: translateY(-1px); }
.oo-account-name { font-weight: 800; font-size: 13.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oo-account-role { font-size: 11px; color: var(--oo-muted); font-weight: 700; }

/* child picker */
.oo-child-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.oo-child-strip::-webkit-scrollbar { display: none; }

.oo-child {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px 9px 9px;
    border-radius: var(--oo-r-pill);
    background: #fff;
    box-shadow: var(--oo-shadow-sm);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    transition: all var(--oo-base) var(--oo-ease);
}

.oo-child:hover { transform: translateY(-2px); box-shadow: var(--oo-shadow); }
.oo-child.active { border-color: var(--oo-purple); box-shadow: 0 8px 20px rgba(108, 80, 154, .18); }
.oo-child-text { min-width: 0; }
.oo-child-name { display: block; font-size: 14px; font-weight: 800; }
.oo-child-meta { display: block; font-size: 11.5px; color: var(--oo-muted); font-weight: 700; }

/* ticket tile */
.oo-pack {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--oo-r-md);
    background: #fff;
    box-shadow: var(--oo-shadow-sm);
    transition: transform var(--oo-base) var(--oo-spring), box-shadow var(--oo-base) var(--oo-ease);
}

.oo-pack:hover { transform: translateY(-3px); box-shadow: var(--oo-shadow); }

.oo-pack-icon {
    width: 50px;
    height: 50px;
    flex: none;
    border-radius: var(--oo-r-sm);
    background: linear-gradient(135deg, var(--oo-purple), var(--oo-purple-light));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 17px;
}

.oo-pack-main { flex: 1; min-width: 0; }
.oo-pack-title { font-weight: 800; font-size: 15px; }
.oo-pack-desc { font-size: 12.5px; color: var(--oo-muted); font-weight: 600; }
.oo-pack-price { font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* notification row */
.oo-note {
    display: flex;
    gap: 13px;
    padding: 15px 16px;
    border-radius: var(--oo-r-md);
    background: #fff;
    box-shadow: var(--oo-shadow-sm);
    cursor: pointer;
    position: relative;
    transition: transform var(--oo-fast) var(--oo-ease), box-shadow var(--oo-base) var(--oo-ease);
}

.oo-note:hover { transform: translateX(3px); box-shadow: var(--oo-shadow); }
.oo-note.unread { background: linear-gradient(90deg, rgba(108, 80, 154, .07), #fff 45%); }
.oo-note.unread::after { content: ''; position: absolute; top: 18px; right: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--oo-purple); }

.oo-note-icon {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: var(--oo-r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--oo-purple-soft);
    color: var(--oo-purple);
}

.oo-note-icon.t-lesson { background: var(--oo-teal-soft); color: var(--oo-teal); }
.oo-note-icon.t-marketing { background: rgba(245, 165, 36, .13); color: #b97a06; }
.oo-note-icon.t-system { background: #f1f2f6; color: var(--oo-muted); }
.oo-note-icon svg { width: 20px; height: 20px; }
.oo-note-main { flex: 1; min-width: 0; padding-right: 14px; }
.oo-note-title { font-weight: 800; font-size: 14.5px; }
.oo-note-body { font-size: 13.5px; color: var(--oo-muted); font-weight: 600; margin-top: 2px; white-space: pre-wrap; }
.oo-note-time { font-size: 11.5px; color: var(--oo-faint); font-weight: 700; margin-top: 6px; }

/* teacher block */
.oo-teacher { display: flex; align-items: center; gap: 14px; }
.oo-teacher-name { font-weight: 800; font-size: 15.5px; }
.oo-teacher-bio { font-size: 13px; color: var(--oo-muted); font-weight: 600; margin-top: 2px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* confetti layer (created from js/app.js) */
.oo-confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.oo-confetti-layer i { position: absolute; top: 0; border-radius: 2px; display: block; }

/* =========================== icon sizing (global) ========================= */
/* These target the <svg> rendered by the Icon component. They must be global: a scoped .razor.css
   rewrites its selectors with the *hosting* component's scope id, which the icon's own markup does
   not carry, so the same rules in a scoped file would silently never match. */

.oo-toast-icon { width: 20px; height: 20px; flex: none; color: var(--oo-purple); }
.oo-toast.is-success .oo-toast-icon { color: var(--oo-green); }
.oo-toast.is-error .oo-toast-icon { color: var(--oo-red); }

.badge-ico { width: 13px; height: 13px; }
.go-ico { width: 15px; height: 15px; }
.ava-ico { width: 16px; height: 16px; }
.meta-ico { width: 13px; height: 13px; }
.price-ico { width: 13px; height: 13px; }
.back-ico { width: 16px; height: 16px; }
.cta-ico { width: 15px; height: 15px; }
.lock-ico { width: 17px; height: 17px; color: var(--oo-faint); flex: none; }
.balance-ico { width: 34px; height: 34px; opacity: .8; }
.wa-ico { width: 18px; height: 18px; }
.tx-icon svg { width: 18px; height: 18px; }
.think-ico { width: 16px; height: 16px; }
.req-ico { width: 17px; height: 17px; }
.done-ico { width: 15px; height: 15px; }
.day-ico { width: 15px; height: 15px; }
.head-ico { width: 16px; height: 16px; }
.profile-ico { width: 17px; height: 17px; }

/* <FocusOnNavigate> moves focus to the page's h1 after every navigation, which otherwise paints a
   focus ring around the whole heading. Keyboard focus rings on real controls are untouched. */
h1:focus,
h1:focus-visible,
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
    outline: none;
}
