/* ============================================================================
 * بستان غراس — the identity the owner chose on 2026-10-07
 * ----------------------------------------------------------------------------
 * Loaded last, over identity.css and glass-modern.css: it re-points their
 * tokens and adds the few shapes that make the identity recognisable, so every
 * page takes it at once. Pages redesigned one by one use the same tokens.
 *
 *   Ground   Warm paper instead of white, so a screen read all day is easy on
 *            the eyes. Surfaces a shade lighter than the ground.
 *   Colour   Pine green from the Ghiras mark, a night green for the rail and
 *            heroes, and one sand note spent sparingly.
 *   Shape    The leaf: three rounded corners and one sharp. Cards, buttons and
 *            badges carry it; it is the identity's signature.
 *   Type     Reem Kufi for titles, IBM Plex Sans Arabic for everything else.
 *
 * The design canvas: https://claude.ai/artifact/34gNZWB7YfRYyNWmi4Gaoi
 * ==========================================================================*/

:root {
    --i-primary-900: #18392c;
    --i-primary-700: #1f4a38;
    --i-primary: #2f6a50;
    --i-primary-400: #4e8a6e;
    --i-primary-100: #e4ece5;

    --i-accent: #b08646;
    --i-accent-100: #f3ead6;

    --i-good: #2f6a50;
    --i-good-100: #e4ece5;
    --i-warn: #6b4f1d;
    --i-warn-100: #f3ead6;
    --i-bad: #9a4a2c;
    --i-bad-100: #f5e4db;

    --i-ink: #1e2a24;
    --i-ink-soft: #56625b;
    --i-ink-faint: #8c978f;
    --i-line: #e2ddd1;
    --i-line-soft: #ece8df;
    --i-surface: #faf8f3;
    --i-canvas: #f2efe7;
    --i-sidebar: #18392c;
    --i-sidebar-ink: #b7cabf;

    --i-radius: 14px;
    --i-radius-lg: 28px;
    --i-shadow: 0 1px 2px rgba(24, 57, 44, .04), 0 10px 26px -18px rgba(24, 57, 44, .30);
    --i-shadow-lift: 0 2px 4px rgba(24, 57, 44, .06), 0 16px 34px -18px rgba(24, 57, 44, .38);

    /* Bustan's own. */
    --b-night: #18392c;
    --b-night-2: #24503f;
    --b-sand: #d8be8c;
    --b-sand-ink: #6b4f1d;
    --b-moss: #9dbea8;
    --b-mist: #e1eaef;
    --b-mist-ink: #2e4e5e;
    --b-leaf: 28px 28px 8px 28px;
    --b-leaf-sm: 18px 18px 5px 18px;
    --b-display: 'Reem Kufi', 'IBM Plex Sans Arabic', sans-serif;

    /* glass-modern.css, made solid: paper does not need frosting. */
    --glass-bg: var(--i-surface);
    --glass-bg-hover: #ffffff;
    --glass-border: var(--i-line);
    --glass-border-subtle: var(--i-line-soft);
    --glass-shadow: var(--i-shadow);
    --glass-shadow-hover: var(--i-shadow-lift);
    --glass-blur: none;
    --glass-glow-primary: rgba(47, 106, 80, .22);
    --glass-glow-success: rgba(47, 106, 80, .22);
    --glass-glow-danger: rgba(154, 74, 44, .22);
    --glass-glow-accent: rgba(176, 134, 70, .22);
}

/* Night: the same garden after dark, never pure black. */
[data-theme="dark"] {
    --i-primary-900: #e3eee7;
    --i-primary-700: #b9d6c4;
    --i-primary: #8fc3a6;
    --i-primary-400: #6fae8c;
    --i-primary-100: #1e3a2f;

    --i-accent: #d8be8c;
    --i-accent-100: #3a3120;

    --i-good: #8fc3a6;
    --i-good-100: #1e3a2f;
    --i-warn: #e3c98f;
    --i-warn-100: #3a3120;
    --i-bad: #eba98d;
    --i-bad-100: #40261c;

    --i-ink: #e6ece8;
    --i-ink-soft: #a9b8b0;
    --i-ink-faint: #7d8c84;
    --i-line: #2b4237;
    --i-line-soft: #23382e;
    --i-surface: #16271f;
    --i-canvas: #0f1d17;
    --i-sidebar: #0b1712;
    --i-sidebar-ink: #a9b8b0;

    --b-night: #0b1712;
    --b-night-2: #1e3a2f;
    --b-mist: #1c2e36;
    --b-mist-ink: #b9d3e0;

    --glass-bg-hover: #1b2f26;
}

/* -------------------------------------------------------------- ground -- */

body,
.page-content,
.content-wrapper {
    background-color: var(--i-canvas);
}

/* ---------------------------------------------------------------- type -- */

h1, h2, h3,
.page-title h4,
.page-header h4,
.card-title,
.card-header h5,
.card-header h6,
.modal-title,
.b-display {
    font-family: var(--b-display);
    font-weight: 600;
    letter-spacing: 0;
}

.card-title { font-size: 1.05rem; }

/* ---------------------------------------------------------------- leaf -- */

.card,
.card-glass,
.modal-content {
    background: var(--i-surface);
    border: 1px solid var(--i-line);
    border-radius: var(--b-leaf) !important;
    box-shadow: none;
}

.card > .card-header:first-child { border-radius: 28px 28px 0 0; }
.card-header { background: transparent; border-bottom-color: var(--i-line-soft); }

.btn {
    border-radius: 22px 22px 6px 22px;
    font-weight: 600;
    min-height: 40px;
}

.btn-sm { border-radius: 16px 16px 5px 16px; min-height: 34px; }
.btn-icon, .btn-icon.btn-sm, .btn.rounded-round { border-radius: 50% !important; }

.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active {
    background: var(--i-primary);
    border-color: var(--i-primary);
}

.btn-primary:hover { background: var(--i-primary-700); border-color: var(--i-primary-700); }

.btn-light {
    background: transparent;
    border: 1px solid #cfc9bb;
    color: var(--i-ink);
}

[data-theme="dark"] .btn-light { border-color: var(--i-line); }

.badge {
    border-radius: 999px;
    padding: .3em .85em;
    font-weight: 600;
}

.alert { border-radius: var(--b-leaf-sm); border-width: 0; }

/* -------------------------------------------------------------- inputs -- */

.form-control,
.custom-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-radius: 14px;
    border-color: #dcd6c8;
    background-color: #ffffff;
    min-height: 44px;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .custom-select { background-color: var(--i-surface); border-color: var(--i-line); }

.form-control:focus,
.custom-select:focus {
    border-color: var(--i-primary);
    box-shadow: 0 0 0 3px var(--i-primary-100);
}

/* --------------------------------------------------------------- table -- */

.table thead th {
    background: transparent;
    color: var(--i-ink-soft);
    font-weight: 500;
    border-bottom: 1px solid var(--i-line);
}

.table td { border-top-color: var(--i-line-soft); }
.table tbody tr:hover { background: var(--i-canvas); }

/* A phone shows the start of a wide table and its buttons sit in the last
   column, off the screen. Where the last column holds actions it stays pinned
   to the end edge, so marking or editing a row needs no sideways scroll. */
@media (max-width: 767.98px) {
    .table-responsive > .table:has(tbody td:last-child :is(.btn, .dropdown, .list-icons)) tr > :last-child {
        position: sticky;
        inset-inline-end: 0;
        z-index: 1;
        background: var(--i-surface);
        box-shadow: -8px 0 12px -10px rgba(0, 0, 0, .35);
    }

    [dir="rtl"] .table-responsive > .table:has(tbody td:last-child :is(.btn, .dropdown, .list-icons)) tr > :last-child {
        box-shadow: 8px 0 12px -10px rgba(0, 0, 0, .35);
    }
}

/* Bootstrap's light bubble and dark text (a homework, a pupil's answer) were
   a white box with black text on the night page. */
[data-theme="dark"] .bg-light { background-color: var(--i-line-soft) !important; }
[data-theme="dark"] .text-dark { color: var(--i-ink) !important; }

/* ------------------------------------------------------------- the rail -- */

.sidebar-dark,
.sidebar-main {
    background: var(--b-night) !important;
}

.nav-sidebar .nav-link {
    border-radius: 16px;
    margin: 2px 10px;
    color: var(--i-sidebar-ink);
}

.nav-sidebar .nav-link:hover { background: rgba(255, 255, 255, .05); color: #ffffff; }

/* glass-modern paints the active item with a teal gradient, more specifically. */
.sidebar .nav-sidebar .nav-item .nav-link.active,
.sidebar .nav-sidebar .nav-group-sub .nav-link.active {
    background: var(--b-night-2) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-weight: 600;
}

.sidebar .nav-sidebar .nav-item .nav-link:hover { transform: none; }

/* The rail is night green in both themes, so the light theme's grey ink
   (layout-min.css, scoped to [data-theme="light"]) must not reach it. */
[data-theme] .sidebar { background-color: var(--b-night); color: var(--i-sidebar-ink); border-color: transparent; }
[data-theme] .sidebar .nav-sidebar .nav-link { color: var(--i-sidebar-ink); }
[data-theme] .sidebar .nav-sidebar .nav-link:not(.disabled):hover { color: #ffffff; background-color: rgba(255, 255, 255, .05); }
[data-theme] .sidebar .nav-sidebar .nav-item-open > .nav-link:not(.disabled),
[data-theme] .sidebar .nav-sidebar > .nav-item-expanded:not(.nav-item-open) > .nav-link { color: #ffffff; background-color: rgba(255, 255, 255, .05); }
[data-theme] .sidebar .nav-sidebar .nav-item-header { color: #8fa79c; }
[data-theme] .sidebar .nav-sidebar .nav-item-divider { background-color: rgba(255, 255, 255, .08); }
.nav-sidebar .nav-link.active i { color: var(--b-sand); opacity: 1; }
.nav-sidebar .nav-item-header { color: #8fa79c; }

.sidebar-user,
.sidebar .sidebar-user-glass {
    margin: 12px;
    border-radius: 20px 20px 6px 20px;
    background: rgba(255, 255, 255, .06);
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* The top bar: paper, not a coloured slab. */
.navbar-expand-md.navbar-dark,
.navbar-dark {
    background: var(--i-surface) !important;
    border-bottom: 1px solid var(--i-line);
    box-shadow: none;
}

.navbar-dark .navbar-nav-link,
.navbar-dark .navbar-brand,
.navbar-dark .navbar-text { color: var(--i-ink) !important; }

.navbar-dark .navbar-nav-link:hover { background: var(--i-canvas); }

/* --------------------------------------------------------------- tabs -- */

.nav-tabs {
    border-bottom: 0;
    background: #e8e4da;
    border-radius: 24px;
    padding: 5px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nav-tabs .nav-link {
    border: 0 !important;
    border-radius: 19px;
    color: #3f4b45;
}

.nav-tabs .nav-link.active {
    background: var(--i-surface) !important;
    color: var(--i-ink) !important;
    font-weight: 600;
}

[data-theme="dark"] .nav-tabs { background: var(--i-line-soft); }

/* ------------------------------------------------------- the sign-in page -- */
/* The page's own <style> (partials/login/inc_top) set the old greens; these
   come after it. Night ground with the star pattern, the form a paper leaf. */

div.page-content.login-cover {
    background-color: var(--b-night) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%23D8BE8C' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M32 7l7 18 18 7-18 7-7 18-7-18-18-7 18-7z'/%3E%3Crect x='20' y='20' width='24' height='24' transform='rotate(45 32 32)'/%3E%3C/g%3E%3C/svg%3E") !important;
}

.login-cover .content-wrapper,
.login-cover .content { background: transparent !important; }

.navbar.login {
    background: transparent !important;
    border-bottom: 0 !important;
    backdrop-filter: none;
}

.navbar.login .text-color-custom,
.navbar.login .navbar-brand,
.navbar.login .navbar-nav-link { color: #f2efe7 !important; }

.login-cover .bento-login-card {
    background: var(--i-canvas) !important;
    border: 0 !important;
    border-radius: 40px 40px 12px 40px !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .28) !important;
    backdrop-filter: none;
}

.login-cover .login-brand-name {
    font-family: var(--b-display);
    color: var(--b-night);
}

.login-cover .login-brand-tagline { color: var(--i-primary) !important; }

.login-cover .role-tabs-wrapper {
    background: #e5e0d4;
    border: 0;
    border-radius: 22px;
    padding: 5px;
}

.login-cover .role-tab-btn {
    border-radius: 18px;
    color: #3f4b45;
    min-height: 44px;
}

.login-cover .role-tab-btn.active {
    background: var(--b-night);
    box-shadow: none;
}

.login-cover .role-tab-btn:hover:not(.active) { color: var(--b-night); }

.login-cover .bento-input {
    background: var(--i-surface) !important;
    border: 1px solid #d6cfbf !important;
    border-radius: 18px !important;
    min-height: 54px;
}

.login-cover .bento-input:focus {
    border-color: var(--i-primary) !important;
    box-shadow: 0 0 0 3px var(--i-primary-100) !important;
}

.login-cover .bento-input-group:focus-within .bento-input-icon,
.login-cover .password-toggle-btn:hover { color: var(--i-primary) !important; }

.login-cover .bento-btn-primary {
    background: var(--i-primary) !important;
    border-radius: 28px 28px 8px 28px !important;
    box-shadow: none !important;
    min-height: 56px;
}

.login-cover .bento-btn-primary:hover {
    background: var(--i-primary-700) !important;
    transform: none;
    box-shadow: none !important;
}

.login-cover #openQrScannerBtn {
    border: 1px solid var(--i-primary) !important;
    background: var(--i-primary-100) !important;
    color: var(--i-primary-700) !important;
}

.login-cover .login-lang {
    color: #f2efe7;
    border-radius: 999px;
}

.login-cover .login-lang.active {
    background: var(--b-sand);
    color: var(--b-night);
}

.b-login-hero {
    color: #f2efe7;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: flex-start;
}

.b-login-hero .b-rings { max-width: 100%; height: auto; }

.b-login-title {
    margin: 0;
    font-family: var(--b-display);
    font-weight: 600;
    font-size: clamp(30px, 3.4vw, 48px);
    line-height: 1.35;
    color: #ffffff;
    max-width: 560px;
}

.b-login-hero .login-hero-text { color: #c8d7ce; font-size: 17px; max-width: 470px; }

/* -------------------------------------------------- the identity's motifs -- */

/* A hero in night green with the eight-pointed star, faintly. */
.b-hero {
    position: relative;
    overflow: hidden;
    background: var(--b-night);
    color: #f2efe7;
    border-radius: 36px 36px 10px 36px;
    padding: clamp(24px, 3vw, 40px);
}

.b-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .09;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23D8BE8C' stroke-width='1'%3E%3Cpath d='M28 6l6 16 16 6-16 6-6 16-6-16-16-6 16-6z'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
}

/* After dark the night hero sits on a night page: a hairline keeps its edge. */
[data-theme="dark"] .b-hero { border: 1px solid var(--i-line); }

.b-hero > * { position: relative; }
.b-hero h1, .b-hero h2 { color: #ffffff; }
.b-hero .text-muted { color: #b7cabf !important; }

.b-leaf { border-radius: var(--b-leaf); }
.b-leaf-sm { border-radius: var(--b-leaf-sm); }

.b-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
}

.b-chip-good { background: var(--i-good-100); color: var(--i-primary-700); }
.b-chip-warn { background: var(--i-warn-100); color: var(--i-warn); }
.b-chip-bad { background: var(--i-bad-100); color: var(--i-bad); }
.b-chip-info { background: var(--b-mist); color: var(--b-mist-ink); }

/* ------------------------------------------------------------ dashboards -- */

.b-dash-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.b-dash-hero-text { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.b-dash-kicker { font-size: .875rem; color: #b7cabf; }

.b-dash-title {
    margin: 0;
    font-family: var(--b-display);
    font-weight: 600;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.3;
    color: #ffffff;
}

.b-dash-lead { margin: 0; font-size: 1.0625rem; color: #d9e4dd; }
.b-dash-lead strong { color: var(--b-sand); font-weight: 600; }

.b-dash-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.b-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 22px;
    background: #f3ead6;
    color: var(--b-night) !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform .15s ease, background .15s ease;
}

.b-hero-btn:hover { background: #ffffff; transform: translateY(-1px); }
.b-hero-btn .material-symbols-rounded { font-size: 20px; }

.b-hero-btn-ghost {
    background: transparent;
    border: 1px solid #4e7a66;
    color: #f2efe7 !important;
    font-weight: 500;
}

.b-hero-btn-ghost:hover { background: rgba(255, 255, 255, .08); }

.b-dash-rings { display: flex; align-items: center; gap: 22px; }

.b-dash-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: .875rem;
    color: #e6ece8;
}

.b-dash-legend li { display: flex; align-items: center; gap: 10px; }
.b-dash-legend strong { font-size: 1.125rem; color: #ffffff; }
.b-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }

@media (max-width: 575.98px) {
    .b-dash-rings { width: 100%; justify-content: space-between; }
    .b-dash-rings svg { width: 132px; height: 132px; }
    .b-hero-btn { flex: 1 1 auto; justify-content: center; }
}

/* Quick figures: a tinted icon and one number that says what it counts. */
.b-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 18px;
    margin-bottom: 1.5rem;
}

.b-tile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: var(--b-leaf);
    background: var(--i-surface);
    border: 1px solid var(--i-line);
    color: inherit !important;
    text-decoration: none !important;
    transition: box-shadow .15s ease, transform .15s ease;
}

a.b-tile:hover { box-shadow: var(--i-shadow-lift); transform: translateY(-1px); }

.b-tile-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: var(--i-primary-100);
    color: var(--i-primary);
}

.b-tile-icon .material-symbols-rounded { font-size: 26px; }
.b-tile-bad .b-tile-icon { background: var(--i-bad-100); color: var(--i-bad); }
.b-tile-warn .b-tile-icon { background: var(--i-warn-100); color: var(--i-warn); }
.b-tile-info .b-tile-icon { background: var(--b-mist); color: var(--b-mist-ink); }

.b-tile-body { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.b-tile-value { font-size: 1.625rem; font-weight: 700; color: var(--i-ink); }
.b-tile-value small { font-size: .875rem; font-weight: 500; color: var(--i-ink-soft); }
.b-tile-label { font-size: .84rem; color: var(--i-ink-soft); }

/* A paper panel with a Kufi title. */
.b-panel {
    background: var(--i-surface);
    border: 1px solid var(--i-line);
    border-radius: var(--b-leaf);
    padding: 26px;
}

[class*="bento-col-"] > .b-panel { height: 100%; }

.b-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
}

.b-panel-title {
    margin: 0;
    font-family: var(--b-display);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--i-ink);
}

.b-panel-head a { font-size: .875rem; font-weight: 600; }

/* "Needs your attention": short tinted notes, each with one action. */
.b-notes { display: flex; flex-direction: column; gap: 12px; }

.b-note {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 20px;
    background: var(--i-primary-100);
    color: var(--i-primary-700);
}

.b-note strong { font-weight: 600; }
.b-note a { font-size: .875rem; font-weight: 600; color: inherit !important; text-decoration: underline; text-underline-offset: 3px; }
.b-note-bad { background: var(--i-bad-100); color: var(--i-bad); }
.b-note-warn { background: var(--i-warn-100); color: var(--i-warn); }
.b-note-info { background: var(--b-mist); color: var(--b-mist-ink); }

.b-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: var(--i-ink-soft);
    padding: 26px 10px;
}

.b-empty .material-symbols-rounded { font-size: 2.4rem; color: var(--b-moss); }

/* A greeting on the paper itself, for pages whose hero is the work. */
.b-page-greeting { display: flex; flex-direction: column; gap: 4px; }
.b-dash-kicker-ink { font-size: .875rem; color: var(--i-ink-soft); }

.b-greeting-title {
    margin: 0;
    font-family: var(--b-display);
    font-weight: 600;
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1.3;
    color: var(--i-ink);
}

/* The teacher's next lesson: the night card that opens the register. */
.b-lesson { display: flex; flex-direction: column; gap: 10px; justify-content: center; }

.b-waiting { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.b-waiting .b-tile { flex: 1; padding: 16px 18px; }
.b-waiting .b-tile strong { color: var(--i-ink); font-weight: 600; }

.b-tile-num {
    font-family: var(--b-display);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Today's periods, one leaf each, in the order of the day. */
.b-periods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 14px;
}

.b-period {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 18px;
    border-radius: var(--b-leaf-sm);
    background: var(--i-canvas);
    border: 1px solid var(--i-line);
    color: var(--i-ink) !important;
    text-decoration: none !important;
    transition: box-shadow .15s ease, transform .15s ease;
}

.b-period:hover { box-shadow: var(--i-shadow-lift); transform: translateY(-1px); }
.b-period strong { font-size: 1.0625rem; font-weight: 600; }
.b-period-time { font-size: .84rem; color: var(--i-ink-soft); }
.b-period-class { font-size: .875rem; color: var(--i-ink-soft); margin-bottom: 6px; }
.b-period.is-focus { background: var(--i-primary-100); border-color: var(--i-primary); }
.b-period.is-past { opacity: .78; }
/* Page titles are short; Kufi broken over two lines reads as a fault. */
.page-title-heading { white-space: nowrap; line-height: 1.4; }
@media (max-width: 575.98px) { .page-title-heading { white-space: normal; } }
/* The parent's hero: each child and where they are today. */
.b-hero-kids {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 1 380px;
    min-width: 0;
}

.b-hero-kids li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 22px 22px 6px 22px;
    background: var(--b-night-2);
}

.b-hero-kids img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--b-sand); }
.b-hero-kid-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; flex: 1; }
.b-hero-kid-text strong { color: #ffffff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-hero-kid-text span { font-size: .8rem; color: #b7cabf; }
.b-hero-kid-text .b-hero-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .8rem; color: #e6ece8; }
.b-hero-state .b-dot { width: 9px; height: 9px; background: #8fa79c; }
.b-hero-state.is-good .b-dot { background: #9dbea8; }
.b-hero-state.is-warn .b-dot { background: var(--b-sand); }
.b-hero-state.is-bad .b-dot { background: #e3b7a0; }

/* A child's school card. */
.b-child { display: flex; flex-direction: column; gap: 16px; }
.b-child-head { display: flex; align-items: center; gap: 14px; }
.b-child-photo { width: 58px; height: 58px; border-radius: 20px 20px 6px 20px; object-fit: cover; flex: none; }
.b-child-name h3 { margin: 0 0 2px; font-family: var(--b-display); font-weight: 600; font-size: 1.25rem; color: var(--i-ink); }
.b-child-name span { font-size: .84rem; color: var(--i-ink-soft); }
.b-child-chips { display: flex; flex-wrap: wrap; gap: 8px; }
a.b-chip { text-decoration: none !important; }

.b-child-figures {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0;
    padding: 14px 8px;
    border-radius: 20px;
    background: var(--i-canvas);
    text-align: center;
}

.b-child-figures dt { font-size: .75rem; font-weight: 400; color: var(--i-ink-soft); }
.b-child-figures dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 700; color: var(--i-ink); }

@media (max-width: 575.98px) {
    .b-child-figures { grid-template-columns: repeat(2, 1fr); }
}

.b-child-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.b-child-links a {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 21px;
    border: 1px solid var(--i-line);
    color: var(--i-ink) !important;
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none !important;
}

.b-child-links a:hover { background: var(--i-primary-100); border-color: var(--i-primary); }
.b-child-links a .material-symbols-rounded { font-size: 18px; color: var(--i-primary); }
.b-child-links a.is-primary { background: var(--i-primary); border-color: var(--i-primary); color: #ffffff !important; }
.b-child-links a.is-primary .material-symbols-rounded { color: #ffffff; }
/* -------------------------------------------------------------- pages -- */

/* A page's own head: kicker, a title that is a sentence, the page's controls. */
.b-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
}

.b-page-head.b-hero { align-items: center; }
.b-page-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 720px; }
.b-page-sub { margin: 4px 0 0; color: var(--i-ink-soft); font-size: .95rem; }
.b-page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.b-page-head-actions .form-control { min-width: 180px; border-radius: 22px; height: 44px; }
.b-page-head-actions .form-inline { flex-wrap: nowrap; }

/* Segmented links (today / week / month) in a head. */
.b-segment {
    display: inline-flex;
    padding: 4px;
    gap: 2px;
    border-radius: 24px;
    background: var(--i-surface);
    border: 1px solid var(--i-line);
}

.b-segment a {
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--i-ink-soft) !important;
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none !important;
}

.b-segment a.active, .b-segment a[aria-current] { background: var(--i-primary); color: #ffffff !important; }

/* The figures band. */
.b-figures {
    background: var(--i-surface);
    border: 1px solid var(--i-line);
    border-radius: var(--b-leaf);
    padding: 20px 24px;
}

.b-figures-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 16px 24px;
}

.b-figure { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-inline-start: 14px; border-inline-start: 3px solid var(--i-line); }
.b-figure.is-good { border-inline-start-color: var(--b-moss); }
.b-figure.is-warn { border-inline-start-color: var(--b-sand); }
.b-figure.is-bad { border-inline-start-color: #e3b7a0; }
.b-figure-label { font-size: .84rem; color: var(--i-ink-soft); }
.b-figure-value { font-size: 1.5rem; font-weight: 700; color: var(--i-ink); line-height: 1.3; overflow-wrap: anywhere; }
.b-figure-value small { font-size: .8rem; font-weight: 500; color: var(--i-ink-soft); }
.b-figure.is-bad .b-figure-value { color: var(--i-bad); }
.b-figure-note { font-size: .78rem; color: var(--i-ink-faint); }

.b-share { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.b-share-bar { flex: 1; height: 10px; border-radius: 5px; background: var(--i-line-soft); overflow: hidden; }
.b-share-bar > span { display: block; height: 100%; border-radius: 5px; background: var(--i-primary); }
.b-share-text { font-size: .875rem; color: var(--i-ink-soft); white-space: nowrap; }
.b-share-text strong { color: var(--i-ink); }

/* A list of people or items inside a panel, one leaf row each. */
.b-rows { display: flex; flex-direction: column; gap: 8px; }

.b-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--i-canvas);
    color: var(--i-ink) !important;
    text-decoration: none !important;
}

a.b-row:hover { background: var(--i-primary-100); }
.b-row-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--i-primary-100); color: var(--i-primary-700); font-family: var(--b-display); font-weight: 600; }
.b-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.b-row-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-row-text span { font-size: .82rem; color: var(--i-ink-soft); }
.b-row-end { font-weight: 700; white-space: nowrap; }

/* Classes as small leaves: a register state each. */
.b-leaves { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }

.b-leaf-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--b-leaf-sm);
    background: var(--i-surface);
    border: 1px solid var(--i-line);
    color: var(--i-ink) !important;
    text-decoration: none !important;
}

.b-leaf-item .b-dot { width: 10px; height: 10px; }
.b-leaf-item.is-good .b-dot { background: var(--b-moss); }
.b-leaf-item.is-warn .b-dot { background: var(--b-sand); }
.b-leaf-item.is-bad .b-dot { background: #e3b7a0; }
.b-leaf-item.is-idle { border-style: dashed; }
.b-leaf-item.is-idle .b-dot { background: transparent; border: 2px solid var(--i-ink-faint); }
/* The short sign-in pages (code, forgotten password, new password): a paper
   leaf on the night ground, as the sign-in page itself. */
/* components-min.css clears .login-cover .card with !important; this is the one card that must be paper. */
.login-cover .login-form .card:not(.intro) {
    background: var(--i-surface) !important;
    border: 0;
    border-radius: 32px 32px 10px 32px;
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .55);
}

.login-cover .login-form .card-body { padding: 32px 28px; }

.b-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 22px 22px 6px 22px;
    background: var(--i-accent-100);
    color: var(--b-sand-ink);
    font-size: 30px;
}

.b-auth-title {
    font-family: var(--b-display);
    font-weight: 600;
    font-size: 1.45rem;
    color: var(--i-ink);
}

.login-cover .login-form .form-control { height: 48px; border-radius: 16px; }
.login-cover .login-form .form-control-lg { height: 56px; font-size: 1.4rem; }
.login-cover .login-form .btn-primary { min-height: 48px; border-radius: 24px 24px 8px 24px; }