/* ==========================================================================
   Educational Avenue brand layer
   Palette sampled from the company logo (navy #0A2050 / gold #E4B43C).
   Sits on top of CORK; overrides only what it needs to.
   ========================================================================== */
:root {
    --ea-navy: #0A2050;
    --ea-navy-600: #16336F;
    --ea-navy-050: #EEF1F8;
    --ea-gold: #E4B43C;
    --ea-gold-600: #C8992A;
    --ea-gold-050: #FDF6E6;
    --ea-ink: #1B2E4B;
    --ea-muted: #6C7A93;
    --ea-line: #E6EAF2;
    --ea-radius: 12px;
    --ea-shadow: 0 1px 2px rgba(10, 32, 80, .04), 0 6px 18px rgba(10, 32, 80, .06);
}

/* ---------- Sidebar branding ---------- */
.sidebar-wrapper .theme-brand { padding: 14px 12px 10px; align-items: center; }
.sidebar-wrapper .theme-brand .nav-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-wrapper .navbar-logo.ea-logo { width: auto; height: 34px; max-width: 150px; object-fit: contain; }
.sidebar-wrapper .theme-text a {
    font-size: 13px; font-weight: 700; letter-spacing: .01em;
    color: var(--ea-navy) !important; line-height: 1.15; white-space: normal;
}
.sidebar-wrapper .theme-text .ea-sub {
    display: block; font-size: 10px; font-weight: 600; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ea-gold-600);
}

/* active nav item in brand navy */
#sidebar .menu .menu-toggle.active, #sidebar .menu.active > a { background: var(--ea-navy-050) !important; }
#sidebar .menu.active > a span, #sidebar .menu.active > a svg, #sidebar .menu.active > a i { color: var(--ea-navy) !important; }
#sidebar .menu > a:hover { background: var(--ea-navy-050) !important; }

/* ---------- Page header ---------- */
.ea-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.ea-page-head h1 { font-size: 22px; font-weight: 700; color: var(--ea-ink); margin: 0 0 3px; }
.ea-page-head p { margin: 0; color: var(--ea-muted); font-size: 13px; }
.ea-page-head .ea-rule { height: 3px; width: 46px; background: var(--ea-gold); border-radius: 2px; margin-bottom: 10px; }

/* ---------- Stat cards ---------- */
.ea-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.ea-stat {
    background: #fff; border: 1px solid var(--ea-line); border-radius: var(--ea-radius);
    padding: 16px 18px; box-shadow: var(--ea-shadow); position: relative; overflow: hidden;
}
.ea-stat::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--ea-navy); opacity: .85; }
.ea-stat.is-gold::after { background: var(--ea-gold); }
.ea-stat .ea-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ea-stat .ea-stat-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ea-muted); }
.ea-stat .ea-stat-value { font-size: 28px; font-weight: 700; color: var(--ea-ink); line-height: 1.1; margin-top: 8px; }
.ea-stat .ea-stat-meta { font-size: 12px; color: var(--ea-muted); margin-top: 4px; }
.ea-stat .ea-chip {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: var(--ea-navy-050); color: var(--ea-navy); flex: 0 0 auto;
}
.ea-stat.is-gold .ea-chip { background: var(--ea-gold-050); color: var(--ea-gold-600); }
.ea-stat .ea-chip svg { width: 18px; height: 18px; }

/* ---------- Panels ---------- */
.ea-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ea-panel { background: #fff; border: 1px solid var(--ea-line); border-radius: var(--ea-radius); box-shadow: var(--ea-shadow); }
.ea-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--ea-line); }
.ea-panel-head h2 { font-size: 14px; font-weight: 700; color: var(--ea-ink); margin: 0; }
.ea-panel-head a { font-size: 12px; font-weight: 600; color: var(--ea-navy); text-decoration: none; }
.ea-panel-head a:hover { color: var(--ea-gold-600); }
.ea-panel-body { padding: 8px 18px 16px; }

/* ---------- Lists ---------- */
.ea-list { list-style: none; margin: 0; padding: 0; }
.ea-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ea-line); }
.ea-list li:last-child { border-bottom: 0; }
.ea-list .ea-list-main { min-width: 0; flex: 1; }
.ea-list .ea-list-title { font-size: 13.5px; font-weight: 600; color: var(--ea-ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ea-list .ea-list-sub { font-size: 12px; color: var(--ea-muted); }
.ea-avatar {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
    background: var(--ea-navy); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.ea-avatar.is-gold { background: var(--ea-gold); color: #3a2c05; }

/* ---------- Badges ---------- */
.ea-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; }
.ea-badge-active { background: #E7F6EE; color: #1B7A4B; }
.ea-badge-muted  { background: #F0F2F6; color: #61708A; }
.ea-badge-gold   { background: var(--ea-gold-050); color: var(--ea-gold-600); }
.ea-badge-navy   { background: var(--ea-navy-050); color: var(--ea-navy); }

/* ---------- Empty states ---------- */
.ea-empty { text-align: center; padding: 30px 16px; color: var(--ea-muted); }
.ea-empty svg { width: 34px; height: 34px; opacity: .45; margin-bottom: 10px; }
.ea-empty p { margin: 0 0 4px; font-size: 13.5px; font-weight: 600; color: var(--ea-ink); }
.ea-empty span { font-size: 12.5px; }

/* ---------- Buttons ---------- */
.btn-ea { background: var(--ea-navy); border-color: var(--ea-navy); color: #fff; font-weight: 600; }
.btn-ea:hover, .btn-ea:focus { background: var(--ea-navy-600); border-color: var(--ea-navy-600); color: #fff; }
.btn-ea-gold { background: var(--ea-gold); border-color: var(--ea-gold); color: #3a2c05; font-weight: 600; }
.btn-ea-gold:hover, .btn-ea-gold:focus { background: var(--ea-gold-600); border-color: var(--ea-gold-600); color: #fff; }

/* ---------- Auth pages ---------- */
.ea-auth-logo { display: block; max-width: 210px; height: auto; margin: 0 auto 18px; }
.ea-auth-tag { text-align: center; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ea-gold-600); font-weight: 700; margin-bottom: 20px; }

/* ---------- Dark mode ---------- */
[data-theme="dark"] .ea-stat, [data-theme="dark"] .ea-panel { background: #0e1726; border-color: #1b2e4b; }
[data-theme="dark"] .ea-stat .ea-stat-value, [data-theme="dark"] .ea-panel-head h2,
[data-theme="dark"] .ea-list .ea-list-title, [data-theme="dark"] .ea-page-head h1 { color: #e0e6ed; }
[data-theme="dark"] .ea-list li { border-color: #1b2e4b; }
[data-theme="dark"] .ea-stat .ea-chip { background: #1b2e4b; color: #b7c0cd; }

@media (max-width: 575px) {
    .ea-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
    .ea-stat .ea-stat-value { font-size: 23px; }
}

/* ---------- Auth page alignment & brand buttons ---------- */
/* CORK's login markup is .card > .card-body > form#loginForm (no .form-form-wrap) */
#loginForm h2 { text-align: center; font-weight: 700; color: var(--ea-ink); margin-bottom: 4px; }
#loginForm h2 + p { text-align: center; color: var(--ea-muted); font-size: 13px; }

#loginForm .btn-secondary {
    background: var(--ea-navy) !important;
    border-color: var(--ea-navy) !important;
    color: #fff !important;
    font-weight: 600; letter-spacing: .05em;
    padding: 10px 16px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(10, 32, 80, .18);
    transition: background .15s ease, transform .1s ease;
}
#loginForm .btn-secondary:hover,
#loginForm .btn-secondary:focus {
    background: var(--ea-navy-600) !important;
    border-color: var(--ea-navy-600) !important;
}
#loginForm .btn-secondary:active { transform: translateY(1px); }

#loginForm .form-control:focus {
    border-color: var(--ea-navy-600);
    box-shadow: 0 0 0 3px rgba(10, 32, 80, .10);
}
.card { border-radius: var(--ea-radius); }

/* ---------- Header brand ----------
   CORK forces .theme-logo img to a 34x34 square, which letterboxes a wide
   wordmark; override width/height explicitly so the logo keeps its ratio. */
.header .theme-brand { align-items: center; padding-left: 10px; }
.header .theme-brand .nav-item.theme-logo { display: flex; align-items: center; }
.header .theme-brand .ea-header-logo {
    height: 38px !important;
    width: auto !important;
    max-width: 190px !important;
    object-fit: contain;
    display: block;
    background: #fff;
    padding: 4px 10px;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
@media (max-width: 991px) {
    .header .theme-brand .ea-header-logo { height: 32px !important; max-width: 150px !important; padding: 3px 8px; }
}
@media (max-width: 575px) {
    .header .theme-brand .ea-header-logo { height: 28px !important; max-width: 120px !important; }
}
