/* ==========================================================================
   EduManage GH — UI refinement layer
   --------------------------------------------------------------------------
   Loaded as a static asset (public/css) AFTER the Vite bundle, so it can
   refine Bootstrap 5 + resources/css/_edumanage.scss without an asset rebuild.
   All colours derive from the runtime CSS variables injected by
   layouts/app.blade.php (--school-primary / --school-accent), so a change in
   Settings -> Appearance instantly re-themes the whole application.
   ========================================================================== */

:root {
    --em-sidebar-w: 264px;
    --em-radius-sm: .55rem;
    --em-radius: .85rem;
    --em-radius-lg: 1.15rem;

    --em-primary: var(--school-primary, #0f6b4f);
    --em-primary-rgb: var(--school-primary-rgb, 15, 107, 79);
    --em-accent: var(--school-accent, #b08d2e);
    --em-accent-rgb: var(--school-accent-rgb, 176, 141, 46);

    --em-ink: #1f2933;
    --em-muted: #6b7280;
    --em-line: #e6ebef;
    --em-surface: #ffffff;

    --em-shadow-xs: 0 1px 2px rgba(15, 32, 25, .05);
    --em-shadow-sm: 0 2px 6px rgba(15, 32, 25, .06);
    --em-shadow: 0 .55rem 1.4rem rgba(15, 32, 25, .07);
    --em-shadow-lg: 0 1.1rem 2.6rem rgba(15, 32, 25, .13);
}

html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------------ Shell */
.sidebar { width: var(--em-sidebar-w); }
.main-area { margin-inline-start: var(--em-sidebar-w); }

@media (max-width: 991.98px) {
    .main-area { margin-inline-start: 0; }
}

/* ---------------------------------------------------------------- Sidebar */
.sidebar {
    background-image: linear-gradient(180deg,
        color-mix(in srgb, var(--sidebar-bg, #0f6b4f) 92%, #000 8%) 0%,
        var(--sidebar-bg, #0f6b4f) 55%,
        color-mix(in srgb, var(--sidebar-bg, #0f6b4f) 88%, #000 12%) 100%) !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
}

.sidebar .sidebar-brand {
    padding: 1.1rem 1.15rem;
    letter-spacing: .01em;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.sidebar .sidebar-brand img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.sidebar .sidebar-nav {
    padding: .55rem .55rem 2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
}

.sidebar .sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .2);
    border-radius: 8px;
}

/* Group toggle */
.nav-group { list-style: none; margin: 0; }

.nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .7rem;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, .92);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .85rem .7rem .45rem;
    cursor: pointer;
    transition: color .15s ease;
}

.nav-group-toggle:hover { color: #fff; }

.nav-group-toggle .nav-group-caret {
    margin-inline-start: auto;
    font-size: .7rem;
    opacity: .65;
    transition: transform .2s ease;
}

.nav-group.open .nav-group-toggle .nav-group-caret { transform: rotate(180deg); }

.nav-group-toggle .bi:first-child { font-size: .95rem; opacity: .85; }

/* Sub items */
.nav-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-sub > .nav-item { }

.nav-group .nav-sub {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .22s ease;
}

.nav-group.open .nav-sub { grid-template-rows: 1fr; }

.nav-group .nav-sub > * { overflow: hidden; }

/* Sidebar links (refined) */
.sidebar .nav-link {
    padding: .5rem .7rem;
    border-radius: .6rem;
    margin-bottom: 1px;
    font-size: .9rem;
    font-weight: 500;
    position: relative;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .1);
    transform: translateX(2px);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, .2),
        rgba(255, 255, 255, .08));
    box-shadow: inset 3px 0 0 var(--em-accent);
    font-weight: 600;
}

.sidebar .nav-link .bi { font-size: 1rem; width: 1.15rem; text-align: center; }

/* ---------------------------------------------------------------- Topbar */
.topbar {
    box-shadow: 0 1px 0 var(--em-line), 0 6px 18px rgba(15, 32, 25, .04);
    gap: .75rem;
}

.topbar .school-title { font-size: 1rem; }

.topbar .btn-light {
    border-radius: .7rem;
    box-shadow: var(--em-shadow-xs);
}

.topbar .avatar {
    width: 36px;
    height: 36px;
    font-size: .9rem;
    background: rgba(var(--em-primary-rgb), .12);
    color: var(--em-primary);
}

/* ------------------------------------------------------------------ Content */
.content { padding: 1.75rem; }

@media (max-width: 575.98px) {
    .content { padding: 1rem; }
}

/* --------------------------------------------------------------- Page header */
.page-header { margin-bottom: 1.5rem; }

.page-header h1 {
    font-size: 1.55rem;
    font-weight: 750;
    letter-spacing: -.01em;
    color: var(--em-ink);
}

.page-header .lead {
    color: var(--em-muted);
    font-size: .93rem;
    margin-bottom: 0;
}

.page-header .breadcrumb {
    --bs-breadcrumb-divider-color: #b9c2cb;
    font-size: .8rem;
    margin-bottom: .35rem;
}

.page-header .breadcrumb-item a { color: var(--em-muted); text-decoration: none; }
.page-header .breadcrumb-item a:hover { color: var(--em-primary); }

/* ---------------------------------------------------------------- Buttons */
.btn {
    --bs-btn-font-weight: 600;
    border-radius: var(--em-radius-sm);
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}

.btn:not(.btn-link):active { transform: translateY(1px); }

.btn-primary {
    --bs-btn-bg: var(--em-primary);
    --bs-btn-border-color: var(--em-primary);
    --bs-btn-hover-bg: color-mix(in srgb, var(--em-primary) 86%, #000 14%);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--em-primary) 86%, #000 14%);
    --bs-btn-active-bg: color-mix(in srgb, var(--em-primary) 78%, #000 22%);
    --bs-btn-active-border-color: color-mix(in srgb, var(--em-primary) 78%, #000 22%);
    --bs-btn-focus-shadow-rgb: var(--em-primary-rgb);
    box-shadow: 0 4px 12px rgba(var(--em-primary-rgb), .22);
}

.btn-secondary {
    --bs-btn-bg: var(--em-accent);
    --bs-btn-border-color: var(--em-accent);
    --bs-btn-hover-bg: color-mix(in srgb, var(--em-accent) 86%, #000 14%);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--em-accent) 86%, #000 14%);
    --bs-btn-active-bg: color-mix(in srgb, var(--em-accent) 78%, #000 22%);
    --bs-btn-active-border-color: color-mix(in srgb, var(--em-accent) 78%, #000 22%);
}

.btn-outline-primary {
    --bs-btn-color: var(--em-primary);
    --bs-btn-border-color: color-mix(in srgb, var(--em-primary) 45%, #fff 55%);
    --bs-btn-hover-bg: var(--em-primary);
    --bs-btn-hover-border-color: var(--em-primary);
    --bs-btn-active-bg: var(--em-primary);
    --bs-btn-active-border-color: var(--em-primary);
}

.btn-light { border-color: var(--em-line); }

/* ----------------------------------------------------------------- Cards */
.card {
    border-color: var(--em-line);
    border-radius: var(--em-radius-lg);
    box-shadow: var(--em-shadow-xs);
    transition: box-shadow .18s ease, transform .18s ease;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--em-line);
    padding: .9rem 1.15rem;
    border-radius: var(--em-radius-lg) var(--em-radius-lg) 0 0 !important;
}

.card-footer {
    background: #fbfcfd;
    border-top: 1px solid var(--em-line);
}

a.card { color: inherit; }

a.card:hover,
.card.card-hover:hover {
    box-shadow: var(--em-shadow);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------- Stat cards */
.stat-card {
    border: 1px solid var(--em-line) !important;
    border-radius: var(--em-radius-lg);
    box-shadow: var(--em-shadow-xs);
    overflow: hidden;
}

.stat-card .card-body { padding: 1.15rem 1.2rem; }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: .9rem;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    color: #fff;
    flex: 0 0 auto;
    box-shadow: 0 6px 14px rgba(15, 32, 25, .16);
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 750;
    line-height: 1.1;
    color: var(--em-ink);
}

.stat-card .stat-label {
    color: var(--em-muted);
    font-size: .82rem;
    letter-spacing: .01em;
}

a.stat-card:hover { transform: translateY(-3px); box-shadow: var(--em-shadow); }

/* ---------------------------------------------------------------- Tables */
.table {
    --bs-table-hover-bg: rgba(var(--em-primary-rgb), .045);
    margin-bottom: 0;
}

.table thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--em-muted);
    border-bottom: 1px solid var(--em-line);
    background: #fbfcfd;
    padding-top: .7rem;
    padding-bottom: .7rem;
}

.table td { vertical-align: middle; }

.table tbody tr:last-child td { border-bottom: 0; }

/* Card-wrapped tables sit flush */
.card > .table-responsive > .table,
.card > .table { border-radius: 0 0 var(--em-radius-lg) var(--em-radius-lg); }

/* ---------------------------------------------------------------- Badges */
.badge {
    font-weight: 600;
    letter-spacing: .01em;
    padding: .38em .62em;
    border-radius: 999px;
}

.badge.rounded-pill { border-radius: 999px; }

/* --------------------------------------------------------------- Avatars */
.avatar {
    background: rgba(var(--em-primary-rgb), .12);
    color: var(--em-primary);
    box-shadow: inset 0 0 0 1px rgba(var(--em-primary-rgb), .12);
}

.avatar-lg { width: 56px; height: 56px; font-size: 1.3rem; }
.avatar-sm { width: 28px; height: 28px; font-size: .72rem; }

/* --------------------------------------------------------------- Forms */
.form-label { font-weight: 600; font-size: .84rem; color: #37424d; }

.form-control, .form-select {
    border-radius: var(--em-radius-sm);
    border-color: #d7dee5;
    padding: .55rem .8rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--em-primary);
    box-shadow: 0 0 0 .22rem rgba(var(--em-primary-rgb), .13);
}

.form-text { color: var(--em-muted); }

.input-group-text {
    border-radius: var(--em-radius-sm);
    background: #f4f6f8;
    border-color: #d7dee5;
    color: var(--em-muted);
    font-weight: 600;
}

/* ---------------------------------------------------------- List groups */
.list-group-item { border-color: var(--em-line); }
.list-group-item-action:hover { background: rgba(var(--em-primary-rgb), .04); }

/* --------------------------------------------------------------- Dropdowns */
.dropdown-menu {
    border-color: var(--em-line);
    border-radius: .8rem;
    box-shadow: var(--em-shadow-lg);
    padding: .4rem;
}

.dropdown-item {
    border-radius: .5rem;
    padding: .5rem .7rem;
    font-size: .9rem;
}

.dropdown-item:hover { background: rgba(var(--em-primary-rgb), .08); }

/* ------------------------------------------------------------- Nav pills */
.nav-pills {
    background: #eef1f4;
    border-radius: 999px;
    padding: .25rem;
    gap: .15rem;
}

.nav-pills .nav-link {
    border-radius: 999px;
    color: var(--em-muted);
    font-weight: 600;
    padding: .4rem 1rem;
}

.nav-pills .nav-link.active {
    background: var(--em-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--em-primary-rgb), .25);
}

/* ---------------------------------------------------------- Empty states */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--em-muted);
}

.empty-state .empty-icon {
    font-size: 1.6rem;
    margin-bottom: .85rem;
    color: var(--em-primary);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: rgba(var(--em-primary-rgb), .09);
}

/* --------------------------------------------------------------- Alerts */
.alert {
    border: 0;
    border-radius: var(--em-radius);
    box-shadow: var(--em-shadow-xs);
}

/* --------------------------------------------------------------- Pagination */
.pagination {
    margin-bottom: 0;
    gap: .25rem;
}

.page-link {
    border: 0;
    border-radius: var(--em-radius-sm) !important;
    color: var(--em-ink);
    min-width: 38px;
    text-align: center;
}

.page-item.active .page-link {
    background-color: var(--em-primary);
    border-color: var(--em-primary);
    box-shadow: 0 4px 10px rgba(var(--em-primary-rgb), .25);
}

/* ----------------------------------------------------------------- Auth */
.auth-card {
    border: 0;
    border-radius: 1.25rem;
    box-shadow: var(--em-shadow-lg);
    overflow: hidden;
}

.auth-card .card-body { padding: 2rem; }

.auth-brand {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--em-primary), color-mix(in srgb, var(--em-primary) 70%, #000 30%));
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(var(--em-primary-rgb), .3);
}

/* ------------------------------------------------------ Theme preset picker */
.theme-preset-card {
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.theme-preset-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--em-shadow-sm);
}

.theme-preset-card.theme-preset-active {
    border-color: var(--em-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--em-primary-rgb), .25);
}

/* --------------------------------------------------------- Utility helpers */
.text-gradient {
    background: linear-gradient(90deg, var(--em-primary), var(--em-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--em-muted);
    margin: 1.75rem 0 .85rem;
}

.hover-lift { transition: transform .18s ease, box-shadow .18s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--em-shadow); }

.icon-chip {
    width: 40px;
    height: 40px;
    border-radius: .75rem;
    display: inline-grid;
    place-items: center;
    background: rgba(var(--em-primary-rgb), .1);
    color: var(--em-primary);
    font-size: 1.1rem;
}

/* ------------------------------------------------------------- Responsive */
@media (max-width: 991.98px) {
    .page-header h1 { font-size: 1.3rem; }
}

@media (max-width: 575.98px) {
    .stat-card .stat-value { font-size: 1.35rem; }
    .stat-card .card-body { padding: 1rem; }
}

/* ------------------------------------------------------------------ Print */
@media print {
    .sidebar, .topbar, .no-print, footer { display: none !important; }
    .main-area { margin-inline-start: 0; }
    .content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #dee2e6; }
}

/* =====================================================================
   Identity & profile
   --------------------------------------------------------------------------
   A small, self-contained layer used by the My Profile page. Colours are
   derived from the runtime school variables, so it re-themes along with
   Settings -> Appearance.
   ===================================================================== */

/* Soft, on-brand badges (roles, chips) that follow --school-primary. */
.badge-soft {
    background: rgba(var(--em-primary-rgb), .12);
    color: var(--em-primary);
    border: 1px solid rgba(var(--em-primary-rgb), .18);
    font-weight: 600;
}

/* ------------------------------------------------------------- Hero banner */
.profile-hero {
    border: 0;
    overflow: hidden;
    box-shadow: var(--em-shadow-sm);
}

.profile-hero-cover {
    position: relative;
    height: 146px;
    background:
        radial-gradient(1100px 280px at 10% -30%, rgba(255, 255, 255, .30), transparent 60%),
        radial-gradient(900px 240px at 95% 140%, rgba(255, 255, 255, .20), transparent 55%),
        linear-gradient(120deg, var(--em-primary), var(--em-accent));
}

.profile-hero-body {
    position: relative;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0 1.5rem 1.25rem;
    margin-top: -52px;
}

.profile-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}

.profile-avatar {
    width: 104px;
    height: 104px;
    font-size: 2.6rem;
    border: 4px solid #fff;
    background: #fff;
    box-shadow: var(--em-shadow);
}

.profile-status-dot {
    position: absolute;
    right: 6px;
    bottom: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px #fff;
}

.profile-status-dot.is-online { background: #22c55e; }
.profile-status-dot.is-offline { background: #94a3b8; }

.profile-hero-meta { min-width: 0; }

.profile-hero-meta h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--em-ink);
}

.profile-hero-meta .profile-sub {
    color: var(--em-muted);
    font-size: .9rem;
}

.profile-hero-stat { text-align: right; }

/* ------------------------------------------------------ Account meta list */
.profile-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-meta-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px dashed var(--em-line);
    font-size: .9rem;
}

.profile-meta-list li:last-child { border-bottom: 0; }

.profile-meta-list .label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--em-muted);
}

.profile-meta-list .value {
    font-weight: 600;
    color: var(--em-ink);
    text-align: right;
}

/* ----------------------------------------------------- Password strength */
.password-strength { margin-top: .5rem; }

.password-strength-track {
    height: 6px;
    border-radius: 999px;
    background: var(--em-line);
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #ef4444;
    transition: width .25s ease, background-color .25s ease;
}

.password-strength-label {
    min-height: 1.1rem;
    margin-top: .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--em-muted);
}

.password-requirements {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .15rem .75rem;
    margin: .5rem 0 0;
    padding: 0;
    font-size: .78rem;
    color: var(--em-muted);
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.password-requirements li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background-color .2s ease, box-shadow .2s ease;
}

.password-requirements li.is-met { color: var(--em-ink); }

.password-requirements li.is-met::before {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}

/* ------------------------------------------------------ Entrance motion */
@keyframes emFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.em-fade-up { animation: emFadeUp .5s ease both; }
.em-fade-up.delay-1 { animation-delay: .08s; }
.em-fade-up.delay-2 { animation-delay: .16s; }

@media (max-width: 767.98px) {
    .profile-hero-cover { height: 116px; }
    .profile-avatar { width: 84px; height: 84px; font-size: 2rem; }
    .profile-hero-stat { text-align: left; margin-inline-start: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
    .em-fade-up { animation: none; }
    .hover-lift, a.stat-card, .profile-avatar { transition: none; }
}

/* =====================================================================
   Dashboard hero
   --------------------------------------------------------------------------
   The greeting banner on the dashboard. Uses the runtime school colours,
   so it re-themes with Settings -> Appearance just like the profile hero.
   ===================================================================== */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    border: 0;
    color: #fff;
    background:
        radial-gradient(900px 260px at 88% -30%, rgba(255, 255, 255, .24), transparent 60%),
        radial-gradient(700px 240px at 6% 140%, rgba(255, 255, 255, .16), transparent 55%),
        linear-gradient(120deg, var(--em-primary), var(--em-accent));
    box-shadow: var(--em-shadow);
}

.dashboard-hero-body {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
}

.dashboard-hero-greet {
    font-size: 1.35rem;
    font-weight: 600;
}

.dashboard-hero-sub {
    margin-top: .3rem;
    font-size: .9rem;
    color: rgba(255, 255, 255, .88);
}

.dashboard-hero-dot { margin: 0 .4rem; opacity: .6; }

.dashboard-hero-aside {
    margin-inline-start: auto;
    text-align: right;
}

.connectivity-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.connectivity-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .28);
    transition: background-color .2s ease, box-shadow .2s ease;
}

@media (max-width: 767.98px) {
    .dashboard-hero-body { padding: 1.2rem 1.25rem; }
    .dashboard-hero-aside { margin-inline-start: 0; text-align: left; }
}

/* =====================================================================
   Auth / guest shell
   --------------------------------------------------------------------------
   Centred card by default. Child views that define @section('brand') opt in
   to the split, branded layout (brand panel on the left from lg up).
   ===================================================================== */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-main {
    width: 100%;
    max-width: 420px;
}

.auth-panel { width: 100%; max-width: 420px; }

.auth-side { display: none; }

.auth-shell-split {
    padding: 0;
    align-items: stretch;
}

.auth-shell-split .auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

@media (min-width: 992px) {
    .auth-shell-split .auth-side {
        position: relative;
        display: flex;
        align-items: center;
        flex: 0 0 46%;
        max-width: 620px;
        overflow: hidden;
        padding: 3.5rem;
        color: #fff;
        background:
            radial-gradient(900px 400px at 12% 8%, rgba(255, 255, 255, .20), transparent 60%),
            radial-gradient(700px 400px at 100% 100%, rgba(255, 255, 255, .14), transparent 55%),
            linear-gradient(140deg, var(--em-primary), var(--em-accent));
    }

    .auth-shell-split .auth-side-content {
        position: relative;
        z-index: 1;
        max-width: 30rem;
        animation: emFadeUp .6s ease both;
    }

    .auth-shell-split .auth-main { max-width: none; padding: 3rem; }

    /* The compact logo lives in the brand panel on wide screens. */
    .auth-shell-split .auth-intro { display: none; }
}

.auth-side-glow {
    position: absolute;
    right: -140px;
    bottom: -150px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
    pointer-events: none;
}

.auth-side-logo {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: inline-grid;
    place-items: center;
    font-size: 1.8rem;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.auth-side-title {
    margin: 1.4rem 0 .35rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.auth-side-tagline {
    max-width: 26rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, .86);
}

.auth-side-points {
    list-style: none;
    display: grid;
    gap: .8rem;
    margin: 2rem 0 0;
    padding: 0;
}

.auth-side-points li {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .95rem;
    color: rgba(255, 255, 255, .94);
}

.auth-side-points li i { color: rgba(255, 255, 255, .95); }

.auth-side-foot {
    margin-top: 2.75rem;
    font-size: .8rem;
    color: rgba(255, 255, 255, .7);
}

/* =====================================================================
   Branded document header
   --------------------------------------------------------------------------
   Mirrors the .doc-head block in layouts/print.blade.php. Printed documents
   load only the Vite bundle, so the stylesheet below keeps the shared
   report-card partial looking right on screen (reportcards.show) too.
   ===================================================================== */
.doc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 10px;
    color: #fff;
    background:
        radial-gradient(620px 200px at 92% -50%, rgba(255, 255, 255, .22), transparent 60%),
        linear-gradient(120deg, var(--em-primary), var(--em-accent));
}

.doc-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.doc-logo {
    max-height: 60px;
    width: auto;
    padding: 5px 7px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

.doc-school {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.doc-meta { font-size: .8rem; color: rgba(255, 255, 255, .85); }

.doc-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.doc-sub { font-size: .78rem; color: rgba(255, 255, 255, .85); }

@media print {
    .doc-head { border-radius: 0; }
}

/* =====================================================================
   Report card / printable document surface
   --------------------------------------------------------------------------
   Mirrors the .report-card rules in layouts/print.blade.php. The report-card
   partial is shared by reportcards.show (app layout) and reportcards.print
   (print layout). Printed pages load only the Vite bundle, so these rules keep
   the on-screen card identical to the printed sheet. Keep both copies in sync.
   ===================================================================== */
.report-card {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
}

.report-card-border-classic {
    border: 2px solid var(--school-primary, #0f6b4f);
    padding: 24px;
    border-radius: 4px;
}

.report-card-border-double {
    border: 6px double var(--school-primary, #0f6b4f);
    padding: 20px;
    border-radius: 6px;
}

.report-card-border-ornate {
    border: 8px ridge var(--school-accent, #b08d2e);
    outline: 2px solid var(--school-primary, #0f6b4f);
    outline-offset: -12px;
    padding: 28px;
    border-radius: 8px;
}

.report-card-border-modern {
    border: 1px solid #dee2e6;
    border-left: 8px solid var(--school-primary, #0f6b4f);
    border-top: 4px solid var(--school-accent, #b08d2e);
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .05);
    border-radius: 8px;
}

.report-card-border-certificate {
    border: 12px double var(--school-primary, #0f6b4f);
    padding: 24px;
    position: relative;
    background: #fafafa;
}

.report-card-border-minimal {
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
}

@media print {
    .report-card { max-width: none; }
}

/* Status accents (approved / draft). A slim strip across the top of the sheet,
   painted above the branded header. Works with every border style and never
   overrides their borders or box-shadows. Keep in sync with layouts/print. */
.report-card-approved::before,
.report-card-draft::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    border-radius: inherit;
    pointer-events: none;
}

.report-card-approved::before {
    background: linear-gradient(90deg, #157347, #20c997);
}

.report-card-draft::before {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

@media print {
    .report-card-approved::before,
    .report-card-draft::before {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ---------------------------------------------------------------------------
   Live refresh notice

   Shown instead of an automatic reload when a colleague's change arrives while
   someone is typing, has a field focused, or has a dialog open.
   --------------------------------------------------------------------------- */
.em-live-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: min(24rem, calc(100vw - 2rem));
    padding: .6rem .6rem .6rem .9rem;
    border-radius: .5rem;
    background: #1f2d3d;
    color: #fff;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25);
    font-size: .875rem;
    line-height: 1.3;
}

.em-live-toast[hidden] {
    display: none;
}

.em-live-toast-text {
    flex: 1 1 auto;
}

@media print {
    .em-live-toast {
        display: none !important;
    }
}
