/* ============================================================
   EDUBRIDGE — UI stylesheet
   One typeface (Plus Jakarta Sans), SKSU green + gold, neutral
   surfaces. Bootstrap supplies the components; this file sets
   the tokens, layout shell, and motion.
   ============================================================ */

:root {
    --bg: #F4F5F2;
    --card: #FFFFFF;
    --ink: #13201A;
    --ink-2: #3B4842;
    --muted: #66726B;
    --faint: #98A29C;
    --line: #E4E7E1;
    --line-2: #EEF0EC;
    --hover: #F1F3EF;

    --primary: #0E7A4B;
    --primary-600: #0B663E;
    --primary-700: #094F31;
    --primary-50: #E8F5EE;
    --primary-100: #CDEBDB;

    --gold: #E5A11A;
    --gold-50: #FDF4DF;

    --success: #1E9A57;  --success-50: #E7F6EE;
    --info: #2D6CDF;     --info-50: #E9F0FD;
    --warning: #C98204;  --warning-50: #FEF3DF;
    --danger: #D03F3F;   --danger-50: #FCEBEB;
    --purple: #7458D6;   --purple-50: #F0ECFC;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(19, 32, 26, .05);
    --shadow: 0 1px 2px rgba(19, 32, 26, .04), 0 4px 12px -2px rgba(19, 32, 26, .06);
    --shadow-lg: 0 12px 32px -8px rgba(19, 32, 26, .18), 0 2px 6px rgba(19, 32, 26, .05);

    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --sidebar-w: 256px;

    /* Retint Bootstrap utilities used throughout the pages */
    --bs-body-font-family: var(--font);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--line);
    --bs-primary: var(--primary);       --bs-primary-rgb: 14, 122, 75;
    --bs-secondary: var(--muted);       --bs-secondary-rgb: 102, 114, 107;
    --bs-success: var(--success);       --bs-success-rgb: 30, 154, 87;
    --bs-info: var(--info);             --bs-info-rgb: 45, 108, 223;
    --bs-warning: var(--warning);       --bs-warning-rgb: 201, 130, 4;
    --bs-danger: var(--danger);         --bs-danger-rgb: 208, 63, 63;
    --bs-dark: var(--ink);
    --bs-link-color: var(--primary);    --bs-link-color-rgb: 14, 122, 75;
    --bs-link-hover-color: var(--primary-700);
    --bs-secondary-color: var(--muted);
}

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.015em;
}
h4 { font-size: 1.35rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: .92rem; }

a { text-decoration: none; transition: color .15s; }
.text-muted { color: var(--muted) !important; }
.small, small { font-size: .84em; }
::selection { background: var(--primary-100); color: var(--primary-700); }

/* Numbers line up in tables and stats */
.table, .stat-value, .badge, .eb-num { font-variant-numeric: tabular-nums; }

/* Heading icons in page titles — quieter than the text */
h4 > i.fas, h5 > i.fas { color: var(--primary); opacity: .9; font-size: .9em; }

/* ------------------------------------------------------------
   App shell
   ------------------------------------------------------------ */
.eb-shell { display: flex; min-height: 100vh; }

.eb-sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--card);
    border-right: 1px solid var(--line);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1040;
}

.eb-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
}
.eb-brand-link { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.eb-brand-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: grid; place-items: center;
    font-size: 16px;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
    position: relative;
}
.eb-brand-mark::after {
    content: "";
    position: absolute; right: -3px; top: -3px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--card);
}
.eb-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.eb-brand-name { font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; }
.eb-brand-sub { font-size: 11.5px; color: var(--muted); font-weight: 500; }

.eb-sidebar-close {
    border: 0; background: var(--hover); color: var(--muted);
    width: 32px; height: 32px; border-radius: 8px;
}

.eb-nav {
    flex: 1;
    overflow-y: auto;
    padding: 6px 12px 16px;
    position: relative;
    scrollbar-width: thin;
}
.eb-nav-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--faint);
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 18px 10px 6px;
}
.eb-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    margin: 1px 0;
    border-radius: 9px;
    color: var(--ink-2);
    font-weight: 600;
    font-size: 13.5px;
    position: relative;
    transition: background .15s, color .15s, transform .15s var(--ease);
}
.eb-nav-link i {
    width: 18px;
    text-align: center;
    color: var(--faint);
    font-size: 14px;
    transition: color .15s, transform .25s var(--ease-spring);
}
.eb-nav-link:hover { background: var(--hover); color: var(--ink); }
.eb-nav-link:hover i { color: var(--ink-2); }
.eb-nav-link.active { background: var(--primary-50); color: var(--primary-700); }
.eb-nav-link.active i { color: var(--primary); }
.eb-nav-link.active::before {
    content: "";
    position: absolute;
    left: -12px; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
    animation: navIndicator .35s var(--ease) both;
}
@keyframes navIndicator { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.eb-nav-badge {
    margin-left: auto;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: grid; place-items: center;
}
.eb-nav-logout { color: var(--danger) !important; }
.eb-nav-logout i { color: var(--danger) !important; opacity: .8; }
.eb-nav-logout:hover { background: var(--danger-50) !important; }

.eb-sidebar-user {
    margin: 0 12px 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
}
.eb-sidebar-user .name { font-weight: 700; font-size: 13px; line-height: 1.2; }
.eb-sidebar-user .role { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }

.eb-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.eb-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px;
    background: rgba(244, 245, 242, .85);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, background .2s;
}
.eb-topbar.scrolled { border-bottom-color: var(--line); background: rgba(255,255,255,.88); }

.eb-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.eb-crumbs .sep { color: var(--faint); font-size: 10px; }
.eb-crumbs .current { color: var(--ink); font-weight: 700; }

.eb-topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.eb-icon-btn {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 10px;
    display: grid; place-items: center;
    color: var(--ink-2);
    border: 1px solid var(--line);
    background: var(--card);
    transition: background .15s, transform .15s var(--ease), box-shadow .15s;
}
.eb-icon-btn:hover { color: var(--ink); background: var(--hover); }
.eb-icon-btn:active { transform: scale(.94); }
.eb-icon-dot {
    position: absolute; top: 8px; right: 9px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--card);
}


.eb-profile-btn {
    display: flex; align-items: center; gap: 9px;
    padding: 4px 10px 4px 4px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font-weight: 600;
    font-size: 13px;
    transition: box-shadow .15s;
}
.eb-profile-btn:hover { color: var(--ink); background: var(--hover); }
.eb-profile-btn::after { margin-left: 2px; color: var(--faint); }

.eb-main { padding: 24px 28px 48px; max-width: 1440px; width: 100%; }

.eb-sidebar-toggle {
    position: fixed; top: 11px; left: 14px; z-index: 1035;
    width: 38px; height: 38px;
    border: 1px solid var(--line); border-radius: 10px;
    background: var(--card); color: var(--ink);
}
.eb-sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(19, 32, 26, .35);
    opacity: 0; visibility: hidden;
    transition: opacity .25s, visibility .25s;
    z-index: 1039;
}
.eb-sidebar-backdrop.show { opacity: 1; visibility: visible; }

@media (max-width: 991.98px) {
    .eb-sidebar {
        position: fixed; left: 0; top: 0;
        transform: translateX(-100%);
        transition: transform .3s var(--ease);
        box-shadow: var(--shadow-lg);
    }
    .eb-sidebar.open { transform: none; }
    .eb-topbar { padding-left: 64px; padding-right: 14px; }
    .eb-main { padding: 18px 14px 40px; }
}

/* Top navigation progress bar */
.eb-progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 0;
    background: var(--primary);
    z-index: 2000;
    box-shadow: 0 0 8px rgba(14, 122, 75, .5);
    transition: width .4s var(--ease), opacity .3s;
    pointer-events: none;
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line-2);
    padding: 14px 18px;
    font-weight: 700;
}
.card-header:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card-header h5, .card-header h6 { margin: 0; font-size: .95rem; }
.card-header i { color: var(--primary); }
.card-body { padding: 18px; }
.card-footer { background: transparent; border-top: 1px solid var(--line-2); }

/* Clickable cards lift */
a.card:hover, .card.card-hover:hover, .program-card:hover {
    box-shadow: var(--shadow);
    border-color: #D3D8D0;
}

/* ------------------------------------------------------------
   Page headers & dashboard greeting
   ------------------------------------------------------------ */
.eb-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
    line-height: 1.25;
}
.eb-page-title-sub {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0;
    margin-bottom: 2px;
}

.eb-greeting { margin: 4px 0 24px; }
.eb-greeting-date { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 0 0 2px; }
.eb-greeting h1 { font-size: 1.65rem; font-weight: 700; letter-spacing: -.025em; margin: 0 0 4px; }
.eb-greeting-sub { color: var(--ink-2); margin: 0; max-width: 680px; }

.eb-link { font-size: .84rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
.eb-link::after { content: " →"; transition: margin .2s var(--ease); }
.eb-link:hover { color: var(--primary-700); }
.eb-link:hover::after { margin-left: 3px; }

/* Plain summary panel (used on the recommendations page) */
.dashboard-welcome {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.dashboard-welcome h2, .dashboard-welcome h4 { font-size: 1rem; margin-bottom: 4px; }
.dashboard-welcome p { color: var(--ink-2); }

/* ------------------------------------------------------------
   Stat cards — neutral; colour only where it carries meaning
   ------------------------------------------------------------ */
.stat-card {
    position: relative;
    height: 100%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "label icon" "value icon";
    align-items: center;
    column-gap: 12px;
}
.stat-card .stat-icon {
    grid-area: icon;
    width: 36px; height: 36px;
    border-radius: 9px;
    display: grid; place-items: center;
    background: var(--bg);
    color: var(--faint);
    font-size: 15px;
}
.stat-card .stat-label {
    grid-area: label;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
}
.stat-card .stat-value {
    grid-area: value;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
    color: var(--ink);
    white-space: nowrap;
}
/* Meaningful states only */
.stat-danger .stat-icon  { background: var(--danger-50);  color: var(--danger); }
.stat-warning .stat-icon { background: var(--warning-50); color: var(--warning); }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-font-size: .875rem;
    --bs-btn-padding-x: .95rem;
    --bs-btn-padding-y: .5rem;
    --bs-btn-border-radius: 9px;
    --bs-btn-focus-box-shadow: 0 0 0 3px rgba(14, 122, 75, .22);
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .12s var(--ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .15rem;
}
.btn:active { transform: scale(.97); }
.btn-sm { --bs-btn-padding-x: .65rem; --bs-btn-padding-y: .3rem; --bs-btn-font-size: .8rem; --bs-btn-border-radius: 8px; }
.btn-lg { --bs-btn-padding-y: .72rem; --bs-btn-font-size: .95rem; --bs-btn-border-radius: 11px; }

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-600);
    --bs-btn-hover-border-color: var(--primary-600);
    --bs-btn-active-bg: var(--primary-700);
    --bs-btn-active-border-color: var(--primary-700);
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 2px rgba(9, 79, 49, .25);
}
.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary-100);
    --bs-btn-hover-bg: var(--primary-50);
    --bs-btn-hover-color: var(--primary-700);
    --bs-btn-hover-border-color: var(--primary-100);
    --bs-btn-active-bg: var(--primary);
    --bs-btn-active-border-color: var(--primary);
    background: var(--card);
}
.btn-secondary {
    --bs-btn-color: var(--ink-2);
    --bs-btn-bg: var(--card);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: var(--ink);
    --bs-btn-hover-bg: var(--hover);
    --bs-btn-hover-border-color: var(--line);
    --bs-btn-active-bg: var(--line);
    --bs-btn-active-color: var(--ink);
    --bs-btn-active-border-color: var(--line);
}
.btn-outline-secondary {
    --bs-btn-color: var(--ink-2);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-bg: var(--hover);
    --bs-btn-hover-color: var(--ink);
    --bs-btn-hover-border-color: var(--line);
    --bs-btn-active-bg: var(--line);
    --bs-btn-active-color: var(--ink);
    background: var(--card);
}
.btn-success { --bs-btn-bg: var(--success); --bs-btn-border-color: var(--success); --bs-btn-hover-bg: #178547; --bs-btn-hover-border-color: #178547; }
.btn-danger  { --bs-btn-bg: var(--danger);  --bs-btn-border-color: var(--danger);  --bs-btn-hover-bg: #B53232; --bs-btn-hover-border-color: #B53232; }
.btn-outline-danger  { --bs-btn-color: var(--danger);  --bs-btn-border-color: #F2C9C9; --bs-btn-hover-bg: var(--danger);  --bs-btn-hover-border-color: var(--danger); background: var(--card); }
.btn-outline-success { --bs-btn-color: var(--success); --bs-btn-border-color: #BFE6D0; --bs-btn-hover-bg: var(--success); --bs-btn-hover-border-color: var(--success); background: var(--card); }
.btn-outline-info    { --bs-btn-color: var(--info);    --bs-btn-border-color: #C9D9F7; --bs-btn-hover-bg: var(--info);    --bs-btn-hover-border-color: var(--info); background: var(--card); }
.btn-outline-warning { --bs-btn-color: var(--warning); --bs-btn-border-color: #F2DDB0; --bs-btn-hover-bg: var(--warning); --bs-btn-hover-border-color: var(--warning); --bs-btn-hover-color: #fff; background: var(--card); }

/* Loading state for submit buttons */
.btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    animation: spin .6s linear infinite;
}
.btn-outline-primary.is-loading::after, .btn-secondary.is-loading::after { border-color: var(--primary-100); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-group > .btn-check:checked + .btn-outline-primary { box-shadow: none; }

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-label { font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.form-control, .form-select {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: .55rem .8rem;
    font-size: .9rem;
    color: var(--ink);
    background-color: var(--card);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.form-control::placeholder { color: var(--faint); }
.form-control:hover, .form-select:hover { border-color: #D3D8D0; }
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 122, 75, .14);
}
.form-control-sm, .form-select-sm { padding: .35rem .65rem; font-size: .82rem; }
.input-group-text { background: var(--bg); border-color: var(--line); color: var(--muted); border-radius: 9px; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(14, 122, 75, .14); border-color: var(--primary); }
.form-text { color: var(--muted); }

.table-search {
    padding-left: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2398A29C' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: .75rem center;
    background-size: 15px;
}

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */
.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #F7F8F5;
    margin-bottom: 0;
    font-size: .875rem;
}
.table > :not(caption) > * > * { padding: .8rem 1rem; border-bottom-color: var(--line-2); vertical-align: middle; }
.table thead th {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    background: #FAFBF9;
    border-bottom: 1px solid var(--line) !important;
    white-space: nowrap;
}
.table tbody tr { transition: background-color .12s; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table-bordered > :not(caption) > * > * { border-color: var(--line-2); }
.card > .table-responsive, .card-body > .table-responsive:only-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-body.p-0 .table thead th:first-child { border-top-left-radius: 0; }

/* ------------------------------------------------------------
   Badges
   ------------------------------------------------------------ */
.badge {
    font-weight: 600;
    font-size: 11.5px;
    padding: .38em .7em;
    border-radius: 999px;
    letter-spacing: .01em;
}
/* Soft, readable status pills instead of saturated blocks */
.badge.bg-success   { background: var(--success-50) !important; color: #137A42 !important; }
.badge.bg-primary   { background: var(--primary-50) !important; color: var(--primary-700) !important; }
.badge.bg-info      { background: var(--info-50) !important;    color: #2257B8 !important; }
.badge.bg-warning   { background: var(--warning-50) !important; color: #9A6303 !important; }
.badge.bg-danger    { background: var(--danger-50) !important;  color: #B03030 !important; }
.badge.bg-secondary { background: #EEF0EC !important;           color: var(--ink-2) !important; }
.badge.bg-dark      { background: var(--ink) !important;        color: #fff !important; }
/* Status dot, only for status pills inside tables */
td .badge.bg-success::before, td .badge.bg-warning::before, td .badge.bg-danger::before,
td .badge.bg-info::before, td .badge.bg-secondary::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 5px;
    vertical-align: 1px;
    opacity: .8;
}
.eb-nav-badge::before, .avatar-circle .badge::before { display: none; }

/* ------------------------------------------------------------
   Alerts & toasts
   ------------------------------------------------------------ */
.alert {
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: .88rem;
    padding: .8rem 1rem;
}
.alert-success { background: var(--success-50); border-color: #C6EAD5; color: #145F36; }
.alert-danger  { background: var(--danger-50);  border-color: #F4CACA; color: #8E2626; }
.alert-warning { background: var(--warning-50); border-color: #F5DFAE; color: #7A4F03; }
.alert-info    { background: var(--info-50);    border-color: #CCDCF8; color: #1D4C9E; }

.eb-toasts {
    position: fixed;
    top: 72px; right: 20px;
    z-index: 1090;
    display: flex; flex-direction: column; gap: 10px;
    width: min(380px, calc(100vw - 32px));
}
.eb-toast {
    --tone: var(--success);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 13px 14px 15px;
    position: relative;
    overflow: hidden;
    animation: toastIn .45s var(--ease-spring) both;
}
.eb-toast.leaving { animation: toastOut .3s var(--ease) forwards; }
.eb-toast .eb-toast-icon {
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 8px;
    display: grid; place-items: center;
    color: #fff; background: var(--tone);
    font-size: 13px;
}
.eb-toast .eb-toast-body { flex: 1; font-size: .875rem; font-weight: 500; color: var(--ink); padding-top: 3px; }
.eb-toast .btn-close { font-size: 10px; margin-top: 6px; }
.eb-toast .eb-toast-timer {
    position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: var(--tone); opacity: .35;
    transform-origin: left;
    animation: toastTimer 5s linear forwards;
}
.eb-toast:hover .eb-toast-timer { animation-play-state: paused; }
.eb-toast-success { --tone: var(--success); }
.eb-toast-danger  { --tone: var(--danger); }
.eb-toast-warning { --tone: var(--warning); }
.eb-toast-info    { --tone: var(--info); }
@keyframes toastIn  { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.96); } }
@keyframes toastTimer { to { transform: scaleX(0); } }

/* ------------------------------------------------------------
   Dropdowns & modals
   ------------------------------------------------------------ */
.dropdown-menu {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    font-size: .875rem;
}
.dropdown-menu.show { animation: popIn .18s var(--ease) both; transform-origin: top right; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
.dropdown-item { border-radius: 7px; padding: .5rem .7rem; font-weight: 500; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--hover); color: var(--ink); }
.dropdown-item.text-danger:hover { background: var(--danger-50); }
.dropdown-header { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.notification-dropdown { width: 340px; max-height: 420px; overflow-y: auto; }
.notification-item { white-space: normal; border-bottom: 1px solid var(--line-2); padding: .65rem .7rem; }
.notification-item:last-child { border-bottom: 0; }
.notification-item .fw-bold { font-weight: 700 !important; color: var(--ink); }

.modal-content {
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px -12px rgba(19, 32, 26, .35);
}
.modal-header { border-bottom: 1px solid var(--line-2); padding: 16px 20px; }
.modal-title { font-weight: 700; font-size: 1.05rem; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--line-2); padding: 12px 20px; background: #FAFBF9; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal.fade .modal-dialog { transform: translateY(14px) scale(.97); transition: transform .32s var(--ease-spring), opacity .2s; opacity: 0; }
.modal.show .modal-dialog { transform: none; opacity: 1; }
.modal-backdrop.show { opacity: .4; backdrop-filter: blur(2px); }
.modal-backdrop { background: #0B1410; }

/* ------------------------------------------------------------
   Tabs, list groups, progress
   ------------------------------------------------------------ */
.nav-tabs {
    border-bottom: 1px solid var(--line);
    gap: 4px;
}
.nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: .88rem;
    padding: .65rem .9rem;
    margin-bottom: -1px;
    border-radius: 0;
    transition: color .15s, border-color .25s;
}
.nav-tabs .nav-link:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav-tabs .nav-link.active { color: var(--primary-700); background: transparent; border-bottom-color: var(--primary); }
.tab-pane.active { animation: fadeUp .35s var(--ease) both; }

.list-group-item { border-color: var(--line-2); padding: .8rem 1rem; }
.list-group-item-action { transition: background .12s, padding-left .2s var(--ease); }
.list-group-item-action:hover { background: var(--hover); padding-left: 1.2rem; }

.progress { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.progress-bar { border-radius: 99px; background-color: var(--primary); transition: width 1.1s var(--ease); }

/* ------------------------------------------------------------
   Avatars
   ------------------------------------------------------------ */
.avatar-circle {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: inline-grid; place-items: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .02em;
    background: var(--primary-50);
    color: var(--primary-700);
}
.avatar-circle.bg-primary { background: var(--primary-50) !important; color: var(--primary-700) !important; }
.avatar-circle.bg-success { background: var(--success-50) !important; color: #137A42 !important; }
.avatar-circle.bg-info    { background: var(--info-50) !important;    color: #2257B8 !important; }
.avatar-circle.bg-warning { background: var(--warning-50) !important; color: #9A6303 !important; }
.avatar-circle.bg-danger  { background: var(--danger-50) !important;  color: #B03030 !important; }
.eb-avatar-sm { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; background: var(--primary); color: #fff; }
.avatar-circle.mx-auto { width: 76px; height: 76px; font-size: 26px; }

/* ------------------------------------------------------------
   Programs, messages, ratings
   ------------------------------------------------------------ */
.program-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.program-card .program-header {
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line-2);
    position: relative;
}
.program-card .program-header h4, .program-card .program-header h5, .program-card .program-header h6 { margin-bottom: 4px; }
.program-card .program-body { padding: 16px 18px; flex: 1; color: var(--ink-2); }
.program-card .program-footer { padding: 12px 18px; border-top: 1px solid var(--line-2); background: #FAFBF9; }

.message-list { display: flex; flex-direction: column; }
.message-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-2);
    position: relative;
    transition: background .15s;
}
.message-item:hover { background: #FAFBF9; }
.message-item.unread { background: var(--primary-50); }
.message-item.unread::before {
    content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--primary);
}

.rating-stars i, .text-warning.fa-star { color: var(--gold) !important; }
.star-rating { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-rating input { display: none; }
.star-rating label {
    font-size: 26px;
    color: var(--line);
    cursor: pointer;
    transition: color .15s, transform .2s var(--ease-spring);
}
.star-rating label:hover, .star-rating label:hover ~ label,
.star-rating input:checked ~ label, .star-rating label.active { color: var(--gold); }
.star-rating label:hover { transform: scale(1.2); }

/* Empty states */
.eb-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.eb-empty i { font-size: 32px; color: var(--faint); margin-bottom: 10px; display: block; }

/* ------------------------------------------------------------
   Motion: entry animations (classes added by main.js)
   ------------------------------------------------------------ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.eb-reveal { animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }

/* ------------------------------------------------------------
   Auth screens
   ------------------------------------------------------------ */
.auth-body { background: var(--card); }
.auth-wrapper { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-wrapper.auth-single { grid-template-columns: 1fr; background: var(--bg); }

.auth-form-panel {
    display: flex;
    flex-direction: column;
    padding: 28px clamp(20px, 5vw, 64px);
}
.auth-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: auto; }
.auth-topline .small a { font-weight: 700; }
.auth-card { width: 100%; max-width: 400px; margin: 40px auto; }
.auth-card.wide { max-width: 640px; }
.auth-single .auth-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .lead-text { color: var(--muted); margin-bottom: 26px; }
.auth-card .form-control { padding: .7rem .9rem; }
.auth-foot { margin-top: auto; font-size: 12px; color: var(--faint); }

.auth-pw { position: relative; }
.auth-pw .form-control { padding-right: 2.75rem; }
.auth-pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--faint);
    width: 34px; height: 34px; border-radius: 8px;
}
.auth-pw-toggle:hover { color: var(--ink); background: var(--hover); }

.pw-meter { display: flex; gap: 4px; margin-top: 8px; }
.pw-meter span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .25s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warning); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: var(--info); }
.pw-meter[data-score="4"] span:nth-child(-n+4) { background: var(--success); }
.pw-hint { font-size: 12px; color: var(--muted); margin-top: 5px; min-height: 18px; }

.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-picker input { position: absolute; opacity: 0; pointer-events: none; }
.role-picker label {
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    display: flex; flex-direction: column; gap: 6px;
    transition: border-color .15s, background .15s, transform .2s var(--ease);
}
.role-picker label:hover { border-color: #CFD5CB; transform: translateY(-1px); }
.role-picker label i { align-self: flex-start; font-size: 18px; color: var(--faint); transition: color .15s, transform .3s var(--ease-spring); }
.role-picker label b { font-size: 13.5px; }
.role-picker label small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.role-picker input:checked + label { border-color: var(--primary); background: var(--primary-50); }
.role-picker input:checked + label i { color: var(--primary); transform: scale(1.15); }
.role-picker input:focus-visible + label { box-shadow: 0 0 0 3px rgba(14, 122, 75, .2); }
.role-fields { animation: fadeUp .35s var(--ease) both; }

.demo-accounts { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 18px; }
.demo-accounts .title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-chip {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: left;
    font-size: 12.5px;
    display: flex; align-items: center; gap: 8px;
    transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.demo-chip:hover { border-color: var(--primary-100); background: var(--primary-50); transform: translateY(-1px); }
.demo-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.demo-chip b { font-weight: 700; }

/* Showcase panel (login right side) */
.auth-showcase {
    position: relative;
    overflow: hidden;
    background: var(--primary-700);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px clamp(28px, 5vw, 72px);
    isolation: isolate;
}
.auth-showcase::before {
    content: "";
    position: absolute; inset: -40px;
    background-image: radial-gradient(rgba(255,255,255,.12) 1.2px, transparent 1.3px);
    background-size: 22px 22px;
    z-index: -1;
}
.auth-showcase::after {
    content: "";
    position: absolute; right: -120px; top: -120px;
    width: 420px; height: 420px; border-radius: 50%;
    border: 70px solid rgba(229, 161, 26, .16);
    z-index: -1;
}
.showcase-copy { max-width: 440px; margin-bottom: 36px; }
.showcase-copy .kicker { display: inline-flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.75); margin-bottom: 14px; }
.showcase-copy .kicker .live { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.showcase-copy h2 { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.15rem); font-weight: 800; letter-spacing: -.018em; line-height: 1.15; }
.showcase-copy p { color: rgba(255,255,255,.72); margin: 12px 0 0; font-size: .95rem; }

.showcase-stage { position: relative; height: 330px; max-width: 520px; }
.sc-card {
    position: absolute;
    background: #fff;
    color: var(--ink);
    border-radius: 16px;
    box-shadow: 0 24px 48px -16px rgba(0,0,0,.45);
    padding: 16px;
}
.sc-progress { left: 0; top: 0; width: 290px; animation: cardIn .7s var(--ease) .1s both; }
.sc-payment  { right: 0; top: 40px; width: 220px; animation: cardIn .7s var(--ease) .3s both; }
.sc-notif    { left: 60px; bottom: 0; width: 360px; animation: cardIn .7s var(--ease) .5s both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }

.sc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sc-head .avatar-circle { width: 34px; height: 34px; font-size: 12px; }
.sc-head b { font-size: 13.5px; display: block; line-height: 1.2; }
.sc-head small { color: var(--muted); font-size: 11.5px; }
.sc-ring { width: 64px; height: 64px; margin-left: auto; position: relative; }
.sc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sc-ring circle { fill: none; stroke-width: 7; }
.sc-ring .track { stroke: var(--line-2); }
.sc-ring .bar { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 163; stroke-dashoffset: 163; animation: ring 1.6s var(--ease) .8s forwards; }
@keyframes ring { to { stroke-dashoffset: 18; } }
.sc-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 14px; transform: none; }
.sc-bars { display: flex; flex-direction: column; gap: 9px; }
.sc-bar-row { display: grid; grid-template-columns: 70px 1fr 34px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.sc-bar-row .track { height: 6px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.sc-bar-row .fill { height: 100%; border-radius: 6px; background: var(--primary); width: 0; animation: grow 1.2s var(--ease) forwards; }
.sc-bar-row:nth-child(2) .fill { background: var(--gold); animation-delay: .15s; }
.sc-bar-row:nth-child(3) .fill { background: var(--info); animation-delay: .3s; }
.sc-bar-row b { color: var(--ink); text-align: right; }
@keyframes grow { to { width: var(--w); } }

.sc-payment .amt { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.sc-payment .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #137A42; background: var(--success-50); padding: 3px 9px; border-radius: 99px; }
.sc-check { width: 18px; height: 18px; }
.sc-check path { stroke: #137A42; stroke-width: 3; fill: none; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .5s var(--ease) 1.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.sc-notif { display: flex; gap: 12px; align-items: center; }
.sc-notif .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--gold-50); color: var(--gold); display: grid; place-items: center; flex-shrink: 0; }
.sc-notif .txt { font-size: 12.5px; line-height: 1.4; }
.sc-notif .txt b { display: block; font-size: 13px; }
.sc-rotator { position: relative; height: 40px; overflow: hidden; flex: 1; }
.sc-rotator > div { position: absolute; inset: 0; opacity: 0; transform: translateY(100%); transition: transform .5s var(--ease), opacity .5s; }
.sc-rotator > div.on { opacity: 1; transform: none; }
.sc-rotator > div.off { opacity: 0; transform: translateY(-100%); }

@media (max-width: 991.98px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-showcase { display: none; }
}
@media (max-width: 575.98px) {
    .role-picker { grid-template-columns: 1fr; }
    .demo-grid { grid-template-columns: 1fr; }
    .auth-single .auth-card { padding: 22px; border-radius: 16px; }
}

/* ------------------------------------------------------------
   Print
   ------------------------------------------------------------ */
@media print {
    .eb-sidebar, .eb-topbar, .eb-sidebar-toggle, .btn, .eb-toasts, .eb-progress { display: none !important; }
    .eb-main { padding: 0; }
    body { background: #fff; }
    .card, .stat-card { box-shadow: none; break-inside: avoid; }
    .eb-reveal { animation: none !important; }
}

/* ------------------------------------------------------------
   Respect "reduce motion"
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: .01ms !important;
    }
}

/* ------------------------------------------------------------
   Action list (dashboard quick actions)
   ------------------------------------------------------------ */
.eb-actions { display: flex; flex-direction: column; padding: 6px; }
.eb-actions a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink);
    font-weight: 600;
    font-size: .88rem;
    transition: background .15s, padding-left .2s var(--ease);
}
.eb-actions a::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    font-size: 11px; color: var(--faint);
    margin-left: 8px;
    transition: transform .2s var(--ease), color .15s;
}
.eb-actions a > span:nth-child(2) { flex: 1; }
.eb-actions a:hover { background: var(--hover); padding-left: 16px; }
.eb-actions a:hover::after { transform: translateX(3px); color: var(--primary); }
.eb-actions .ico {
    width: 34px; height: 34px; border-radius: 9px;
    display: grid; place-items: center;
    background: var(--primary-50); color: var(--primary);
    font-size: 14px; flex-shrink: 0;
}

/* Stat cards sit two-up on phones instead of one long column */
@media (max-width: 767.98px) {
    .row > [class*="col-md"]:has(> .stat-card) { flex: 0 0 50%; max-width: 50%; }
    .row.g-4:has(> [class*="col-md"] > .stat-card) { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
    .stat-card { grid-template-columns: 1fr; grid-template-areas: "icon" "label" "value"; row-gap: 8px; padding: 14px; }
    .stat-card .stat-icon { width: 36px; height: 36px; font-size: 15px; }
    .stat-card .stat-value { font-size: 1.3rem; white-space: normal; }
    .dashboard-welcome { padding: 20px; }
}

.table .eb-empty-row td { padding: 28px 16px; text-align: center; color: var(--muted); font-size: .875rem; background: transparent; }
.table .eb-empty-row i { display: block; font-size: 22px; color: var(--faint); margin-bottom: 6px; }
.table-hover > tbody > tr.eb-empty-row:hover > * { --bs-table-bg-state: transparent; }

/* Keep row action buttons on one line */
.table td:has(> .btn, > form, > .btn-group) { white-space: nowrap; }
.table td > form.d-inline, .table td > .btn-group { margin-right: 4px; }

/* Back link above a page title */
.eb-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .82rem; font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}
.eb-back i { font-size: 11px; transition: transform .2s var(--ease); }
.eb-back:hover { color: var(--ink); }
.eb-back:hover i { transform: translateX(-2px); }

/* Program card details */
.program-meta { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.program-fee { font-weight: 700; font-variant-numeric: tabular-nums; }
