/* ============================================================
   EduMaster — "Aurora Glass" UI Enhancement Layer
   Loaded LAST. Refines the shared design system (glass, glow,
   motion) and completes responsive behaviour. Additive only —
   relies on cascade order, avoids clobbering inline styles.
   ============================================================ */

:root {
    --au-indigo: 99, 102, 241;
    --au-cyan:   6, 182, 212;
    --au-violet: 139, 92, 246;
    --au-emerald:16, 185, 129;
    --au-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 1. Atmosphere: animated aurora backdrop ---------- */
html { background: #EBF0FB; }
body { background: transparent; }

body::before {
    content: '';
    position: fixed;
    inset: -12%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(38% 46% at 14% 18%, rgba(var(--au-indigo), .20), transparent 72%),
        radial-gradient(34% 42% at 86% 12%, rgba(var(--au-cyan),   .17), transparent 72%),
        radial-gradient(42% 48% at 78% 84%, rgba(var(--au-violet), .15), transparent 72%),
        radial-gradient(40% 42% at 18% 88%, rgba(var(--au-emerald), .11), transparent 72%);
    filter: saturate(120%);
    animation: auroraDrift 26s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(1.5%, -2%, 0) scale(1.06); }
    100% { transform: translate3d(-1%, 1.5%, 0) scale(1.03); }
}

/* ---------- 2. Frosted glass cards: luminous edge + hover glow ---------- */
.glass-card {
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(18px) saturate(165%);
    backdrop-filter: blur(18px) saturate(165%);
    border: 1px solid rgba(255, 255, 255, .65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .75),
        0 10px 30px -14px rgba(30, 41, 99, .20),
        0 2px 8px -5px rgba(30, 41, 99, .12);
    transition: transform .4s var(--au-ease), box-shadow .4s ease, border-color .4s ease;
}
.glass-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--au-indigo), .38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .85),
        0 22px 48px -16px rgba(79, 70, 229, .30),
        0 0 0 1px rgba(var(--au-indigo), .08);
}

/* ---------- 3. Staggered page-load entrance ---------- */
@keyframes riseFade {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
.page-container > * { animation: riseFade .55s var(--au-ease) both; }
.page-container > *:nth-child(2) { animation-delay: .05s; }
.page-container > *:nth-child(3) { animation-delay: .10s; }
.page-container > *:nth-child(4) { animation-delay: .15s; }
.page-container > *:nth-child(5) { animation-delay: .20s; }
.page-container > *:nth-child(6) { animation-delay: .25s; }

.dashboard-grid > * { animation: riseFade .55s var(--au-ease) both; }
.dashboard-grid > *:nth-child(2) { animation-delay: .06s; }
.dashboard-grid > *:nth-child(3) { animation-delay: .12s; }
.dashboard-grid > *:nth-child(4) { animation-delay: .18s; }
.dashboard-grid > *:nth-child(5) { animation-delay: .24s; }
.dashboard-grid > *:nth-child(6) { animation-delay: .30s; }

/* ---------- 4. Sidebar nav micro-interaction ----------
   NOTE: the sidebar keeps its original dark indigo gradient + white text.
   We only add a subtle hover nudge — never override its background. */
.nav-item { transition: background .25s ease, color .25s ease, transform .25s var(--au-ease); }
.nav-item:hover { transform: translateX(2px); }

/* ---------- 5. Buttons: lift + glow ---------- */
.btn { transition: transform .22s var(--au-ease), box-shadow .25s ease, filter .25s ease; }
.btn-primary { box-shadow: 0 10px 24px -10px rgba(79, 70, 229, .55); }
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -10px rgba(79, 70, 229, .65), 0 0 0 1px rgba(var(--au-indigo), .25);
}
.btn:active { transform: translateY(0) scale(.99); }

/* ---------- 6. Topnav + search glass ---------- */
.topnav {
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    background: rgba(255, 255, 255, .62);
    border-bottom: 1px solid rgba(255, 255, 255, .55);
}
.topnav-icon { transition: transform .25s var(--au-ease), box-shadow .25s ease, border-color .25s ease; }
.topnav-icon:hover { transform: translateY(-1px); }
.search-box { transition: box-shadow .3s ease, border-color .3s ease; }
.search-box:focus-within {
    box-shadow: 0 0 0 4px rgba(var(--au-indigo), .12);
    border-color: rgba(var(--au-indigo), .45);
}

/* ---------- 7. Table row affordance ---------- */
.data-table tbody tr { transition: background .2s ease, box-shadow .2s ease; }
.data-table tbody tr:hover { box-shadow: inset 3px 0 0 rgba(var(--au-indigo), .5); }

/* ---------- 7b. Status badge: dot must not overlap the label ---------- */
.status-badge.approved { padding-left: 22px; }
.status-badge.approved::before { left: 9px; }

/* ---------- 8. Notification badge pulse ---------- */
.notification-badge {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, .55);
    animation: badgePulse 2.2s ease-out infinite;
}
@keyframes badgePulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); }
    70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ---------- 8b. Unread notification affordance ---------- */
.notif-item { position: relative; }
.notif-item.notif-unread { background: rgba(var(--au-indigo), .06); }
.notif-item.notif-unread .notif-title { font-weight: 700; }
.notif-dot {
    position: absolute; top: 14px; right: 12px;
    width: 8px; height: 8px; border-radius: 50%;
    background: rgb(var(--au-cyan));
    box-shadow: 0 0 8px rgba(var(--au-cyan), .85);
}
.notif-mark-read { cursor: pointer; transition: opacity .2s ease; }
.notif-mark-read:hover { opacity: .7; }

/* ---------- 9. Modals ---------- */
.modal-overlay {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    background: rgba(15, 23, 42, .42);
}
.modal-card { animation: riseFade .35s var(--au-ease) both; }

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    body::before,
    .page-container > *,
    .dashboard-grid > *,
    .modal-card,
    .notification-badge { animation: none; }
    .glass-card, .nav-item, .btn, .topnav-icon { transition: none; }
}

/* ============================================================
   RESPONSIVE COMPLETION
   ============================================================ */

/* Tablet: 769–1180 — slimmer sidebar, 2-col grids, fluid search */
@media (max-width: 1180px) and (min-width: 769px) {
    :root { --sidebar-width: 216px; }
    .dashboard-grid   { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .topnav .search-box { max-width: 240px; }
}

/* Mobile ≤768 — refine the existing drawer + stack everything */
@media (max-width: 768px) {
    body { overflow-x: hidden; }

    .sidebar { width: min(84vw, 310px); box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .5); }
    .sidebar-overlay {
        background: rgba(15, 23, 42, .45);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
    }

    .topnav { position: sticky; top: 0; z-index: 60; min-height: 64px; gap: 10px; }
    .topnav-left .page-subtitle { display: none; }
    .topnav-right { gap: 8px; }

    .page-container { padding: 14px; }
    .glass-card { padding: 18px; }
    .page-header { flex-wrap: wrap; gap: 12px; }
    .page-header h2 { font-size: 1.3rem; }

    /* Keep wide tables readable: horizontal scroll inside their wrappers. */
    .data-table { min-width: 560px; }

    /* Stack two-up form rows. */
    .form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }

    /* Modal + notification dropdown fit the viewport. */
    .modal-card { width: 94vw; max-width: 94vw; margin: 10px; max-height: 88vh; overflow-y: auto; }
    .notification-dropdown {
        position: fixed;
        left: 3vw; right: 3vw; top: 70px;
        width: auto;
        max-height: 70vh;
        overflow-y: auto;
    }

    .btn { min-height: 42px; }
}

/* Small phones ≤430 */
@media (max-width: 430px) {
    .dashboard-grid,
    .dashboard-grid-2,
    .dashboard-grid-3 { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.5rem; }
    .topnav-left .page-title { font-size: 1.05rem; }
}

/* ============================================================
   Bespoke Super Admin "Command Center" dashboard
   ============================================================ */
.sa-hero { position: relative; overflow: hidden; padding: 28px 30px; }
.sa-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(60% 130% at 100% 0%, rgba(var(--au-violet), .18), transparent 60%),
        radial-gradient(55% 130% at 0% 100%, rgba(var(--au-cyan), .15), transparent 60%);
}
.sa-hero-content {
    position: relative; z-index: 1;
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 24px; flex-wrap: wrap;
}
.sa-hero-eyebrow {
    font-size: .72rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: rgb(var(--au-indigo));
}
.sa-hero-title { font-family: var(--font-heading); font-size: 1.6rem; margin: 6px 0 4px; color: var(--text-primary); }
.sa-hero-sub { font-size: .9rem; color: var(--text-muted); margin-bottom: 16px; }
.sa-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sa-hero-mrr { text-align: right; }
.sa-hero-mrr-label { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.sa-hero-mrr-value {
    font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; line-height: 1.1;
    background: linear-gradient(135deg, #4338CA, #06B6D4);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sa-hero-mrr-foot { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }

.sa-tile {
    position: relative; overflow: hidden; padding: 20px; border-radius: 18px;
    background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .65);
    -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 10px 26px -16px rgba(30, 41, 99, .25);
    transition: transform .35s var(--au-ease), box-shadow .35s ease;
}
.sa-tile:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 22px 44px -18px rgba(79, 70, 229, .35); }
.sa-tile::after { content: ''; position: absolute; right: -28px; top: -28px; width: 88px; height: 88px; border-radius: 50%; opacity: .14; }
.sa-tile-icon { font-size: 1.3rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; margin-bottom: 12px; }
.sa-tile-value { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.sa-tile-label { font-size: .9rem; font-weight: 600; color: var(--text-primary); margin-top: 6px; }
.sa-tile-sub { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }
.sa-indigo .sa-tile-icon { background: rgba(var(--au-indigo), .14); } .sa-indigo::after { background: rgb(var(--au-indigo)); }
.sa-green  .sa-tile-icon { background: rgba(var(--au-emerald), .16); } .sa-green::after  { background: rgb(var(--au-emerald)); }
.sa-amber  .sa-tile-icon { background: rgba(245, 158, 11, .18); } .sa-amber::after  { background: #F59E0B; }
.sa-cyan   .sa-tile-icon { background: rgba(var(--au-cyan), .16); } .sa-cyan::after   { background: rgb(var(--au-cyan)); }
/* tile icon colors so the glowing SVG inherits the right hue */
.sa-indigo .sa-tile-icon { color: rgb(var(--au-indigo)); }
.sa-green  .sa-tile-icon { color: rgb(var(--au-emerald)); }
.sa-amber  .sa-tile-icon { color: #F59E0B; }
.sa-cyan   .sa-tile-icon { color: rgb(var(--au-cyan)); }

/* ---------- Glowing SVG icon system (icons.js) — ALL icons glow ---------- */
.gi { display: inline-block; vertical-align: middle; animation: giPulse 2.8s ease-in-out infinite; }
.gi-glow { animation: giPulse 2.1s ease-in-out infinite; }
@keyframes giPulse {
    0%, 100% { filter: drop-shadow(0 0 1.5px currentColor); }
    50%      { filter: drop-shadow(0 0 6px currentColor); }
}

/* ============================================================
   Sidebar refresh (keeps the dark indigo gradient)
   ============================================================ */
.nav-item { position: relative; border-radius: 14px; }
.nav-item.active {
    background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.10)) !important;
    box-shadow: 0 8px 22px -10px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.14);
}
.nav-item.active::before {
    content: ''; position: absolute; left: 6px; top: 22%; bottom: 22%;
    width: 3px; border-radius: 3px;
    background: linear-gradient(180deg, #A5B4FC, #67E8F9);
    box-shadow: 0 0 10px rgba(165,180,252,.9);
}
.nav-item svg { transition: transform .25s var(--au-ease); }
.nav-item:hover svg { transform: scale(1.1); }

/* User card — glass; avatar left, name + role-badge stacked on the right */
.sidebar-user {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px; padding: 12px;
    transition: background .25s ease, transform .25s var(--au-ease);
}
.sidebar-user:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.sidebar-user .user-info {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    min-width: 0; flex: 1;
}
.sidebar-user .user-name {
    font-weight: 700; color: #fff; line-height: 1.1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.sidebar-user .role-badge {
    position: static !important; align-self: flex-start;
    display: inline-block; padding: 2px 11px; border-radius: 20px;
    font-size: .66rem; font-weight: 700; color: #fff;
    letter-spacing: .02em; white-space: nowrap;
    box-shadow: 0 4px 12px -4px rgba(0,0,0,.4);
}

/* Powered by — light green, glowing */
.sidebar-branding { color: #86EFAC !important; }
.sidebar-branding strong { color: #4ADE80; animation: roGlow 2.6s ease-in-out infinite; }
@keyframes roGlow {
    0%, 100% { text-shadow: 0 0 6px rgba(74,222,128,.55); }
    50%      { text-shadow: 0 0 15px rgba(74,222,128,.95); }
}

/* Logout — red-light outline + glowing red text */
.btn-logout { border: 1px solid rgba(239,68,68,.5) !important; color: #FCA5A5 !important; }
.btn-logout svg { color: #FCA5A5; }
.btn-logout span { color: #FCA5A5; animation: logoutGlow 2.6s ease-in-out infinite; }
.btn-logout:hover { background: rgba(239,68,68,.15) !important; border-color: rgba(239,68,68,.85) !important; }
@keyframes logoutGlow {
    0%, 100% { text-shadow: 0 0 6px rgba(239,68,68,.55); }
    50%      { text-shadow: 0 0 15px rgba(239,68,68,.95); }
}

/* Admission delete button */
.btn-sm.btn-delete { background: rgba(100,116,139,.12); color: #64748B; transition: background .2s ease, color .2s ease; }
.btn-sm.btn-delete:hover { background: rgba(239,68,68,.14); color: #DC2626; }

/* Inline emoji→SVG wrapper (iconize.js) */
.gi-wrap { display: inline-flex; align-items: center; vertical-align: -0.15em; margin: 0 .12em; }

/* ============================================================
   Super Admin settings — profile banner (organised layout)
   ============================================================ */
.sa-profile-banner { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.sa-pb-avatar { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.sa-pb-initials {
    position: absolute; inset: 0; border-radius: 24px;
    background: linear-gradient(135deg, #4F46E5, #06B6D4);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700;
    box-shadow: 0 12px 28px -10px rgba(79,70,229,.55);
}
.sa-pb-avatar img {
    position: absolute; inset: 0; width: 88px; height: 88px;
    border-radius: 24px; object-fit: cover; background: #fff;
    box-shadow: 0 12px 28px -10px rgba(79,70,229,.45);
}
.sa-pb-info { flex: 1; min-width: 200px; }
.sa-pb-name { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.sa-pb-email { font-size: .85rem; color: var(--text-muted); margin: 2px 0 8px; }
.sa-pb-actions { margin-left: auto; text-align: right; }
@media (max-width: 640px) {
    .sa-profile-banner { justify-content: center; text-align: center; }
    .sa-pb-info { text-align: center; flex-basis: 100%; }
    .sa-pb-actions { margin: 0 auto; }
}

/* ============================================================
   Centered glassy dialog (replaces native alert/confirm) — dialog.js
   ============================================================ */
.app-dialog-overlay {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(15, 23, 42, .45);
    -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
    opacity: 0; transition: opacity .2s ease;
}
.app-dialog-overlay.show { opacity: 1; }
.app-dialog {
    width: 100%; max-width: 420px; text-align: center;
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(22px) saturate(165%); backdrop-filter: blur(22px) saturate(165%);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 24px; padding: 30px 26px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 30px 70px -20px rgba(30, 41, 99, .55);
    transform: translateY(16px) scale(.95); opacity: 0;
    transition: transform .3s cubic-bezier(.2, .9, .2, 1), opacity .3s ease;
}
.app-dialog-overlay.show .app-dialog { transform: none; opacity: 1; }
.app-dialog-icon {
    width: 62px; height: 62px; margin: 0 auto 18px;
    display: grid; place-items: center; border-radius: 18px;
    color: #4F46E5; background: rgba(99, 102, 241, .12);
    box-shadow: 0 0 26px -6px rgba(99, 102, 241, .55);
    animation: adIconPop .4s cubic-bezier(.2, .9, .2, 1) both;
}
@keyframes adIconPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.app-dialog.ad-success .app-dialog-icon { color: #10B981; background: rgba(16, 185, 129, .14); box-shadow: 0 0 26px -6px rgba(16, 185, 129, .6); }
.app-dialog.ad-error   .app-dialog-icon { color: #EF4444; background: rgba(239, 68, 68, .14); box-shadow: 0 0 26px -6px rgba(239, 68, 68, .6); }
.app-dialog.ad-confirm .app-dialog-icon,
.app-dialog.ad-warn    .app-dialog-icon { color: #F59E0B; background: rgba(245, 158, 11, .16); box-shadow: 0 0 26px -6px rgba(245, 158, 11, .6); }
.app-dialog-msg { font-size: 1rem; font-weight: 500; color: var(--text-primary); line-height: 1.55; word-break: break-word; }
.app-dialog-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }
.app-dialog-actions .btn { min-width: 120px; }
@media (max-width: 480px) {
    .app-dialog { max-width: 100%; padding: 26px 18px; border-radius: 22px; }
    .app-dialog-actions { flex-direction: column-reverse; }
    .app-dialog-actions .btn { width: 100%; }
}

/* ============================================================
   Super Admin "viewing a school" banner (impersonation)
   ============================================================ */
.impersonation-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #4338CA, #06B6D4);
    color: #fff; font-size: .9rem; font-weight: 600;
    box-shadow: 0 8px 24px -10px rgba(67, 56, 202, .55);
    position: sticky; top: 0; z-index: 90;
}
.impersonation-banner .imp-text { display: inline-flex; align-items: center; gap: 8px; }
.impersonation-banner strong { font-weight: 800; }
.impersonation-banner .imp-exit {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, .18); color: #fff;
    border: 1px solid rgba(255, 255, 255, .4); border-radius: 11px;
    padding: 8px 15px; font-weight: 700; font-size: .82rem; cursor: pointer;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.impersonation-banner .imp-exit:hover {
    background: rgba(255, 255, 255, .3); transform: translateY(-1px);
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35);
}
@media (max-width: 560px) {
    .impersonation-banner { flex-direction: column; gap: 8px; text-align: center; padding: 10px 14px; }
}

/* Prominent "Enter school" action (All Schools table) */
.btn-sm.btn-enter {
    background: linear-gradient(135deg, #4F46E5, #06B6D4);
    color: #fff; font-weight: 700;
    box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .5);
    transition: transform .2s ease, box-shadow .2s ease;
}
.btn-sm.btn-enter:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(79, 70, 229, .6); }

/* ============================================================
   Bespoke School-Admin dashboard — "Campus" identity
   ============================================================ */
.sd-hero {
    position: relative; overflow: hidden; padding: 26px 30px;
    display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.sd-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(52% 130% at 0% 0%, rgba(16,185,129,.16), transparent 60%),
        radial-gradient(55% 130% at 100% 100%, rgba(99,102,241,.16), transparent 60%);
}
.sd-hero-main, .sd-hero-pulse { position: relative; z-index: 1; }
.sd-hero-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--au-emerald)); }
.sd-hero-title { font-family: var(--font-heading); font-size: 1.6rem; margin: 6px 0 2px; color: var(--text-primary); }
.sd-hero-date { font-size: .86rem; color: var(--text-muted); }
.sd-hero-pulse {
    display: flex; align-items: center; gap: 18px;
    background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.6);
    border-radius: 18px; padding: 14px 22px;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.sd-pulse-item { display: flex; flex-direction: column; align-items: center; }
.sd-pulse-num {
    font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, #10B981, #4F46E5);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sd-pulse-lbl { font-size: .72rem; color: var(--text-muted); margin-top: 4px; white-space: nowrap; }
.sd-pulse-sep { width: 1px; height: 34px; background: rgba(99,102,241,.18); }

.sd-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 20px; }
.sd-stat {
    display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px;
    background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.65);
    border-left: 3px solid var(--sd-accent, #4F46E5);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 26px -16px rgba(30,41,99,.25);
    transition: transform .35s var(--au-ease), box-shadow .35s ease;
}
.sd-stat:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 20px 40px -18px var(--sd-glow, rgba(79,70,229,.35)); }
.sd-stat-ic { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; color: var(--sd-accent, #4F46E5); background: var(--sd-tint, rgba(99,102,241,.12)); }
.sd-stat-ic svg { width: 24px; height: 24px; }
.sd-stat-num { font-family: var(--font-heading); font-size: 1.7rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.sd-stat-label { font-size: .86rem; font-weight: 600; color: var(--text-primary); margin-top: 3px; }
.sd-stat-sub { font-size: .74rem; color: var(--text-muted); margin-top: 1px; }
.sd-indigo  { --sd-accent: #4F46E5; --sd-tint: rgba(99,102,241,.12); --sd-glow: rgba(79,70,229,.4); }
.sd-emerald { --sd-accent: #10B981; --sd-tint: rgba(16,185,129,.14); --sd-glow: rgba(16,185,129,.4); }
.sd-cyan    { --sd-accent: #06B6D4; --sd-tint: rgba(6,182,212,.14); --sd-glow: rgba(6,182,212,.4); }
.sd-amber   { --sd-accent: #F59E0B; --sd-tint: rgba(245,158,11,.16); --sd-glow: rgba(245,158,11,.4); }

.sd-fee-card { display: flex; flex-direction: column; }
.sd-fee-amount {
    font-family: var(--font-heading); font-size: 2.4rem; font-weight: 800; margin-top: 18px;
    background: linear-gradient(135deg, #059669, #10B981);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sd-fee-note { font-size: .8rem; color: var(--text-muted); margin-top: 6px; }

.sd-pipeline { margin-top: 14px; display: grid; gap: 14px; }
.sd-pipe-row { display: flex; align-items: center; gap: 12px; }
.sd-pipe-lbl { min-width: 74px; font-size: .84rem; font-weight: 600; color: var(--text-primary); }
.sd-pipe-track { flex: 1; height: 10px; border-radius: 6px; background: rgba(99,102,241,.10); overflow: hidden; }
.sd-pipe-track > i { display: block; height: 100%; border-radius: 6px; transition: width .8s var(--au-ease); }
.sd-pipe-row b { min-width: 28px; text-align: right; font-weight: 800; font-size: .9rem; color: var(--text-primary); }
.sd-pipe-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(99,102,241,.12); font-size: .8rem; color: var(--text-muted); }

.sd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px 0; }
.sd-actions .btn { padding: 14px; }

@media (max-width: 1100px) { .sd-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
    .sd-stats { grid-template-columns: 1fr; }
    .sd-hero { padding: 20px; }
    .sd-hero-pulse { width: 100%; justify-content: space-around; }
    .sd-actions { grid-template-columns: 1fr; }
}

.sa-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px 0; }
.sa-health-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.sa-health-row .lbl { min-width: 70px; font-size: .85rem; font-weight: 600; color: var(--text-primary); }
.sa-health-bar { flex: 1; height: 10px; border-radius: 6px; background: rgba(var(--au-indigo), .10); overflow: hidden; }
.sa-health-bar > i { display: block; height: 100%; border-radius: 6px; transition: width .6s var(--au-ease); }
.sa-health-val { min-width: 34px; text-align: right; font-weight: 700; font-size: .85rem; }

@media (max-width: 768px) {
    .sa-hero { padding: 22px; }
    .sa-hero-content { flex-direction: column; }
    .sa-hero-mrr { text-align: left; }
    .sa-hero-title { font-size: 1.35rem; }
}
