/* Axis brand theme — matches www.tuitioncentres.org
   Palette: navy #1e2fb8, magenta #ff5a5f, purple #2743e0
   Typography: Inter body, Playfair Display headings.
   Loaded LAST on every page so it wins over module styles. */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;600;700;800&display=swap");

:root {
  --axis-brand-navy: #1e2fb8;
  --axis-brand-magenta: #ff5a5f;
  --axis-brand-purple: #2743e0;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;
}

h1,
h2,
.axis-brand-serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  letter-spacing: 0.2px;
}

h1 {
  color: var(--axis-brand-navy);
}

/* Website-style accent: short magenta rule under page titles */
main h1::after,
.card h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--axis-brand-magenta),
    var(--axis-brand-purple)
  );
}

/* Primary action buttons pick up the site's magenta on hover */
.axis-app button[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--axis-brand-magenta);
  opacity: 1;
}

/* Links in purple, matching site accents */
main a:not([class]) {
  color: var(--axis-brand-purple);
}

/* ============================================================
   THEME LAYER (loaded last — wins over app-shell)
   Soft grey canvas, floating white cards — and the signature:
   a deep-navy sidebar with a white "pill" for the active page.
   ============================================================ */

/* --- Dark navy sidebar --- */
.axis-app .axis-sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 90, 95, 0.14), transparent 34%),
    linear-gradient(180deg, #1e2fb8 0%, #1c2757 100%);
  color: #e7eaf7;
  border-right: none;
  box-shadow: 8px 0 28px rgba(28, 39, 87, 0.18);
}

.axis-app .axis-brand-link,
.axis-app .axis-brand-copy strong {
  color: #ffffff;
}

.axis-app .axis-brand-copy span {
  color: #aab3d6;
}

.axis-app .axis-sidebar-context {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.axis-app .axis-sidebar-context strong {
  color: #ffffff;
}

.axis-app .axis-sidebar-context > span:last-child,
.axis-app .axis-sidebar-context span {
  color: #b7bfdd;
}

.axis-app .axis-nav-group h2 {
  font-size: 12px;
  letter-spacing: 1px;
}

/* Each sidebar group gets its own accent colour — group heading, a small
   left-edge marker, and the active page's icon all pick it up, so it's
   obvious at a glance which part of the app you're in. */
.axis-app .axis-nav-group h2 {
  position: relative;
  padding-left: 12px;
}

.axis-app .axis-nav-group h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.axis-app .axis-nav-group:nth-of-type(1) h2 { color: #2dd4bf; } /* Home — teal */
.axis-app .axis-nav-group:nth-of-type(2) h2 { color: #fb923c; } /* People — orange */
.axis-app .axis-nav-group:nth-of-type(3) h2 { color: #60a5fa; } /* Teaching — blue */
.axis-app .axis-nav-group:nth-of-type(4) h2 { color: #ff9a9d; } /* Families & Invoices — magenta */
.axis-app .axis-nav-group:nth-of-type(5) h2 { color: #c084fc; } /* Reports & Documents — purple */
.axis-app .axis-nav-group:nth-of-type(6) h2 { color: #4ade80; } /* Generate Documents — green */
.axis-app .axis-nav-group:nth-of-type(7) h2 { color: #f87171; } /* Administration — red */

/* Whole group block (heading + its links), not just the heading text —
   a soft tinted panel per group so the colour identity carries all the
   way down through the links, not just the label above them. */
.axis-app .axis-nav-group {
  border-radius: 14px;
  margin-left: -12px;
  margin-right: -12px;
  padding: 8px 12px 10px;
}

.axis-app .axis-nav-group:nth-of-type(1) { background: rgba(45, 212, 191, 0.14); }
.axis-app .axis-nav-group:nth-of-type(2) { background: rgba(251, 146, 60, 0.14); }
.axis-app .axis-nav-group:nth-of-type(3) { background: rgba(96, 165, 250, 0.14); }
.axis-app .axis-nav-group:nth-of-type(4) { background: rgba(244, 114, 182, 0.14); }
.axis-app .axis-nav-group:nth-of-type(5) { background: rgba(192, 132, 252, 0.14); }
.axis-app .axis-nav-group:nth-of-type(6) { background: rgba(74, 222, 128, 0.14); }
.axis-app .axis-nav-group:nth-of-type(7) { background: rgba(248, 113, 113, 0.14); }

.axis-app .axis-nav-group:nth-of-type(1) .axis-nav-link.is-active .axis-nav-icon { stroke: #0d9488; }
.axis-app .axis-nav-group:nth-of-type(2) .axis-nav-link.is-active .axis-nav-icon { stroke: #c2410c; }
.axis-app .axis-nav-group:nth-of-type(3) .axis-nav-link.is-active .axis-nav-icon { stroke: #1d4ed8; }
.axis-app .axis-nav-group:nth-of-type(4) .axis-nav-link.is-active .axis-nav-icon { stroke: var(--axis-brand-magenta); }
.axis-app .axis-nav-group:nth-of-type(5) .axis-nav-link.is-active .axis-nav-icon { stroke: #7e22ce; }
.axis-app .axis-nav-group:nth-of-type(6) .axis-nav-link.is-active .axis-nav-icon { stroke: #15803d; }
.axis-app .axis-nav-group:nth-of-type(7) .axis-nav-link.is-active .axis-nav-icon { stroke: #b91c1c; }

.axis-app .axis-nav-link {
  color: #ccd3ec;
  font-weight: 600;
  border-radius: 12px;
}

.axis-app .axis-nav-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

/* The reference's defining detail: active page = white pill, navy text */
.axis-app .axis-nav-link.is-active {
  background: #ffffff;
  color: #1e2fb8;
  box-shadow: 0 6px 18px rgba(10, 16, 42, 0.35);
}

.axis-app .axis-nav-link.is-active .axis-nav-icon {
  stroke: var(--axis-brand-magenta);
}

.axis-app .axis-nav-icon {
  stroke-width: 1.7;
}

.axis-app .axis-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9aa3c9;
}

.axis-app .axis-sidebar-footer small {
  color: #7681ad;
}

/* Section headers (h2) inside page content — previously plain dark-grey
   text with no visual separation from surrounding content. Now a clear
   left accent bar + bottom rule + extra weight, so each section reads as
   its own distinct block at a glance, on every page. */
.axis-app .axis-page-content h2,
.axis-app main h2,
.axis-app .card h2 {
  margin-top: 28px;
  margin-bottom: 14px;
  padding: 4px 0 10px 14px;
  border-left: 4px solid var(--axis-brand-magenta);
  border-bottom: 1px solid #e8ebf5;
  font-weight: 700;
  color: var(--axis-brand-navy);
}

.axis-app .axis-page-content h2:first-child,
.axis-app main h2:first-child,
.axis-app .card h2:first-child {
  margin-top: 0;
}

/* Section BACKGROUNDS — every fieldset (the app's most common section
   wrapper) and every .scr-group panel now get a genuinely visible tinted
   background, not the near-invisible off-white they had before. One
   consistent tint system-wide, not a different colour per section within
   a page, so pages stay calm and readable rather than looking chaotic. */
.axis-app fieldset,
.axis-app .scr-group {
  background: #f2f4fc !important;
  border: 1px solid #d7deef !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  margin-bottom: 18px;
}

.axis-app legend {
  padding: 2px 8px;
  border-radius: 6px;
  background: #e3e8f9;
  font-weight: 700;
}

/* --- Lighter page canvas --- */
.axis-app {
  background:
    radial-gradient(circle at 90% 0%, rgba(39, 67, 224, 0.04), transparent 32%),
    #f4f5fa;
}

.axis-app .axis-app-frame {
  background: transparent;
}

/* --- Cards: airier --- */
.card,
.wide-card {
  border: 1px solid #e8ebf5;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(30, 47, 184, 0.06);
}

/* --- Light table headers with dark text --- */
.axis-data-table thead th {
  background: #eef0f9;
  color: #1e2fb8;
  border-bottom: 2px solid #dde1f0;
}

.axis-data-table thead th:first-child {
  border-top-left-radius: 12px;
}

.axis-data-table thead th:last-child {
  border-top-right-radius: 12px;
}

/* --- Softer form controls --- */
.axis-app input,
.axis-app select,
.axis-app textarea {
  border: 1px solid #dbdff0;
  border-radius: 11px;
  background: #ffffff;
}

.axis-app input:focus,
.axis-app select:focus,
.axis-app textarea:focus {
  border-color: var(--axis-brand-magenta);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.12);
}

.axis-app label {
  color: #3a4260;
}

/* --- Buttons a touch softer --- */
.axis-app button[type="submit"] {
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(30, 47, 184, 0.14);
}

/* --- Topbar branch context + user menu on the light canvas --- */
.axis-app .axis-topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid #e8ebf5;
}

/* Topbar user chip — keep it light with readable dark text */
.axis-app .axis-user-menu-button {
  background: #ffffff;
  border-color: #e8ebf5;
  color: #1e2fb8;
}

.axis-app .axis-user-menu-button:hover {
  background: #f4f5fa;
  border-color: #dbdff0;
}

.axis-app .axis-user-button-copy strong {
  color: #1e2fb8;
}

.axis-app .axis-user-button-copy span {
  color: #6b7290;
}

.axis-app .axis-user-menu-button > svg {
  stroke: #6b7290;
}

/* User dropdown menu — keep light with readable items */
.axis-app .axis-user-menu {
  background: #ffffff;
  border-color: #e8ebf5;
}

.axis-app .axis-user-menu a,
.axis-app .axis-user-menu button {
  background: #ffffff !important;
  color: #1e2fb8 !important;
  box-shadow: none !important;
  min-height: 43px;
  margin: 0;
}

.axis-app .axis-user-menu a:hover,
.axis-app .axis-user-menu button:hover {
  background: #f4f5fa !important;
}

.axis-app .axis-user-menu button {
  color: #c0392b !important;
}

.axis-app .axis-user-menu-profile strong {
  color: #1e2fb8;
}

.axis-app .axis-user-menu-profile > span:not(.axis-role-badge) {
  color: #6b7290;
}

/* ============================================================
   Metric cards — reference-style tiles with a pastel accent
   corner and confident numerals.
   ============================================================ */

.axis-app .axis-metric-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e8ebf5;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(30, 47, 184, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.axis-app .axis-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(30, 47, 184, 0.1);
}

/* Pastel accent disc in the corner — colour keyed by card type */
.axis-app .axis-metric-card::before {
  content: "";
  position: absolute;
  top: -26px;
  right: -26px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #eef0f9; /* neutral default (navy family) */
}

.axis-app .axis-metric-card.axis-income::before {
  background: #e5f6ec; /* soft green — money in */
}

.axis-app .axis-metric-card.axis-alert::before {
  background: #ffecec; /* soft magenta — needs attention */
}

.axis-app .axis-metric-card.axis-attendance::before {
  background: #fff6e3; /* soft amber — attendance */
}

.axis-app .axis-metric-card > * {
  position: relative; /* keep content above the disc */
}

.axis-app .axis-metric-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6b7290;
}

.axis-app .axis-metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e2fb8;
  letter-spacing: -0.3px;
}

.axis-app .axis-metric-card.axis-income .axis-metric-value {
  color: #15803d;
}

.axis-app .axis-metric-card.axis-alert .axis-metric-value {
  color: var(--axis-brand-magenta);
}

.axis-app .axis-metric-note {
  color: #8a91ad;
  font-size: 0.8rem;
}

/* ============================================================
   Cards float a touch more on the soft canvas
   ============================================================ */

.card,
.wide-card {
  transition: box-shadow 0.15s ease;
}

.card:hover,
.wide-card:hover {
  box-shadow: 0 14px 36px rgba(30, 47, 184, 0.09);
}

/* ============================================================
   Tab strips (Family Accounts | Invoices | Transactions, and the
   student/staff sub-tabs) — previously all-navy, no colour at all.
   Each tab picks up a colour from the same palette used in the
   sidebar, and the active tab gets a solid coloured background
   instead of plain white, so it's obvious which tab you're on.
   ============================================================ */
.axis-fin-tab:nth-child(1), .axis-area-tab:nth-child(1) { --tab-accent: #2dd4bf; }
.axis-fin-tab:nth-child(2), .axis-area-tab:nth-child(2) { --tab-accent: #fb923c; }
.axis-fin-tab:nth-child(3), .axis-area-tab:nth-child(3) { --tab-accent: #60a5fa; }
.axis-fin-tab:nth-child(4), .axis-area-tab:nth-child(4) { --tab-accent: #ff9a9d; }
.axis-fin-tab:nth-child(5), .axis-area-tab:nth-child(5) { --tab-accent: #c084fc; }
.axis-fin-tab:nth-child(6), .axis-area-tab:nth-child(6) { --tab-accent: #4ade80; }
.axis-fin-tab:nth-child(7), .axis-area-tab:nth-child(7) { --tab-accent: #f87171; }

.axis-fin-tab,
.axis-area-tab {
  border-bottom: 3px solid transparent !important;
  border-bottom-color: var(--tab-accent, #cdd5e4) !important;
}

.axis-fin-tab:nth-child(1):hover, .axis-area-tab:nth-child(1):hover { background: rgba(45, 212, 191, 0.14) !important; }
.axis-fin-tab:nth-child(2):hover, .axis-area-tab:nth-child(2):hover { background: rgba(251, 146, 60, 0.14) !important; }
.axis-fin-tab:nth-child(3):hover, .axis-area-tab:nth-child(3):hover { background: rgba(96, 165, 250, 0.14) !important; }
.axis-fin-tab:nth-child(4):hover, .axis-area-tab:nth-child(4):hover { background: rgba(244, 114, 182, 0.14) !important; }
.axis-fin-tab:nth-child(5):hover, .axis-area-tab:nth-child(5):hover { background: rgba(192, 132, 252, 0.14) !important; }
.axis-fin-tab:nth-child(6):hover, .axis-area-tab:nth-child(6):hover { background: rgba(74, 222, 128, 0.14) !important; }
.axis-fin-tab:nth-child(7):hover, .axis-area-tab:nth-child(7):hover { background: rgba(248, 113, 113, 0.14) !important; }

.axis-fin-tab.is-active,
.axis-area-tab.is-active {
  background: var(--tab-accent, var(--axis-brand-navy)) !important;
  color: #ffffff !important;
  border-color: var(--tab-accent, var(--axis-brand-navy)) !important;
}

/* Table row striping — the variable existed but was so close to white
   it was invisible; now a genuinely visible tint, plus a slightly
   stronger hover so scanning a row across the table is easy. */
:root {
  --axis-table-stripe: #eaeef8;
  --axis-table-hover: #dde5f5;
}

/* ============================================================
   VIVID THEME (Aug 2026, Murat's choice) — inherited from the
   eSkooly/TeachNGo design family: gradient brand surfaces, bold
   coloured cards, navy table headers. This block loads last, so
   it is the final word over everything above.
   ============================================================ */

/* Sidebar: navy into brand purple — the Axis identity on every page. */
.axis-app .axis-sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 90, 95, 0.2), transparent 34%),
    linear-gradient(180deg, #1e2fb8 0%, #2743e0 100%);
}

/* Hero band: white text on the Axis gradient. ID rules like
   #dashboard-scope set grey text with higher specificity than a plain
   class chain, so the hero variants carry the ID too. */
.axis-command-hero h1,
.axis-command-hero h1 *,
.axis-command-hero p,
.axis-command-hero .axis-command-eyebrow {
  color: #ffffff !important;
}

.axis-command-hero p {
  opacity: 0.9;
}

.axis-command-hero #dashboard-scope,
.axis-command-hero #report-scope-status {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* The magenta title underline turns white on the gradient band. */
main .axis-command-hero h1::after,
.axis-command-hero h1::after {
  background: rgba(255, 255, 255, 0.55);
}

/* ============================================================
   VIVID LIGHT SIDEBAR (Aug 2026, Murat's request): light surface,
   coloured section text, gradient icon chips per section, and
   alternating row tints. Loads after the dark-sidebar rules above,
   so these win.
   ============================================================ */

.axis-app .axis-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f4f6fd 100%);
  color: #1e2fb8;
  border-right: 1px solid #e6eaf6;
  box-shadow: 4px 0 22px rgba(30, 47, 184, 0.07);
}

.axis-app .axis-brand-link,
.axis-app .axis-brand-copy strong {
  color: #1e2fb8;
}

.axis-app .axis-brand-copy span {
  color: #7681ad;
}

.axis-app .axis-brand-mark {
  border-color: #e6eaf6;
  box-shadow: 0 8px 20px rgba(30, 47, 184, 0.14);
}

.axis-app .axis-sidebar-context {
  border-color: #e6eaf6;
  background: linear-gradient(120deg, #f2f4fc, #fff2f2);
}

.axis-app .axis-sidebar-context strong {
  color: #1e2fb8;
}

.axis-app .axis-context-label,
.axis-app .axis-sidebar-context > span:last-child,
.axis-app .axis-sidebar-context span {
  color: #7681ad;
}

/* Section blocks: white cards with the section's tint, coloured title. */
.axis-app .axis-nav-group {
  background: #ffffff;
  border: 1px solid #e9edf8;
  box-shadow: 0 3px 10px rgba(30, 47, 184, 0.05);
}

.axis-app .axis-nav-group:nth-of-type(1) { background: rgba(20, 184, 166, 0.07); }
.axis-app .axis-nav-group:nth-of-type(2) { background: rgba(251, 146, 60, 0.08); }
.axis-app .axis-nav-group:nth-of-type(3) { background: rgba(96, 165, 250, 0.09); }
.axis-app .axis-nav-group:nth-of-type(4) { background: rgba(244, 114, 182, 0.09); }
.axis-app .axis-nav-group:nth-of-type(5) { background: rgba(192, 132, 252, 0.09); }
.axis-app .axis-nav-group:nth-of-type(6) { background: rgba(74, 222, 128, 0.1); }
.axis-app .axis-nav-group:nth-of-type(7) { background: rgba(248, 113, 113, 0.08); }
.axis-app .axis-nav-group:nth-of-type(8) { background: rgba(56, 189, 248, 0.09); }
.axis-app .axis-nav-group:nth-of-type(9) { background: rgba(251, 191, 36, 0.12); }

/* Coloured section titles — darker shades that read on light ground. */
.axis-app .axis-nav-group:nth-of-type(1) h2,
.axis-app .axis-nav-group:nth-of-type(1) .axis-nav-group-toggle { color: #0d9488; }
.axis-app .axis-nav-group:nth-of-type(2) h2,
.axis-app .axis-nav-group:nth-of-type(2) .axis-nav-group-toggle { color: #c2410c; }
.axis-app .axis-nav-group:nth-of-type(3) h2,
.axis-app .axis-nav-group:nth-of-type(3) .axis-nav-group-toggle { color: #1d4ed8; }
.axis-app .axis-nav-group:nth-of-type(4) h2,
.axis-app .axis-nav-group:nth-of-type(4) .axis-nav-group-toggle { color: #d63a3f; }
.axis-app .axis-nav-group:nth-of-type(5) h2,
.axis-app .axis-nav-group:nth-of-type(5) .axis-nav-group-toggle { color: #7e22ce; }
.axis-app .axis-nav-group:nth-of-type(6) h2,
.axis-app .axis-nav-group:nth-of-type(6) .axis-nav-group-toggle { color: #15803d; }
.axis-app .axis-nav-group:nth-of-type(7) h2,
.axis-app .axis-nav-group:nth-of-type(7) .axis-nav-group-toggle { color: #b91c1c; }
.axis-app .axis-nav-group:nth-of-type(8) h2,
.axis-app .axis-nav-group:nth-of-type(8) .axis-nav-group-toggle { color: #0369a1; }
.axis-app .axis-nav-group:nth-of-type(9) h2,
.axis-app .axis-nav-group:nth-of-type(9) .axis-nav-group-toggle { color: #b45309; }

/* Section titles (PEOPLE, TEACHING, FINANCE…) at full reading size. */
.axis-app .axis-nav-group h2,
.axis-app .axis-nav-group-toggle {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding-top: 6px;
  padding-bottom: 6px;
}

.axis-app .axis-nav-group-caret {
  font-size: 15px;
}

.axis-app .axis-nav-group-count {
  background: rgba(30, 47, 184, 0.1);
  color: #1e2fb8;
  font-size: 13px;
  padding: 2px 10px;
}

/* Items: dark navy text, BIGGER (Murat's request), alternating rows. */
.axis-app .axis-nav-link {
  color: #33406f;
  font-weight: 700;
  font-size: 19px;
  min-height: 48px;
}

.axis-app .axis-nav-link-child {
  font-size: 17px;
  min-height: 42px;
}

/* Emoji chips: each item's emoji on a small white tile so the row keeps
   the same rhythm as the old icon chips. */
.axis-app .axis-nav-emoji {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  background: #ffffff;
  border: 1px solid rgba(30, 47, 184, 0.14);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(30, 47, 184, 0.1);
}

.axis-app .axis-nav-link-child .axis-nav-emoji {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  font-size: 16px;
  border-radius: 8px;
}

/* Brand logos (Google Classroom SVG) get a white tile too, full colour. */
.axis-app .axis-nav-icon-brand {
  background: #ffffff !important;
  padding: 5px;
}

.axis-app .axis-nav-list li:nth-child(even) .axis-nav-link {
  background: rgba(30, 47, 184, 0.045);
}

.axis-app .axis-nav-link:hover {
  background: rgba(30, 47, 184, 0.1);
  color: #1e2fb8;
}

/* Icon chips: every item's icon sits in a small rounded square filled
   with its SECTION's gradient, glyph drawn in white — the "little
   picture" beside every menu entry. */
.axis-app .axis-nav-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 6px;
  border-radius: 9px;
  stroke: #ffffff;
  color: #ffffff;
  background: linear-gradient(140deg, #3b6fd6, #1e2fb8);
  box-shadow: 0 3px 7px rgba(30, 47, 184, 0.22);
}

.axis-app .axis-nav-group:nth-of-type(1) .axis-nav-icon { background: linear-gradient(140deg, #2dd4bf, #0d9488); }
.axis-app .axis-nav-group:nth-of-type(2) .axis-nav-icon { background: linear-gradient(140deg, #fb923c, #c2410c); }
.axis-app .axis-nav-group:nth-of-type(3) .axis-nav-icon { background: linear-gradient(140deg, #60a5fa, #1d4ed8); }
.axis-app .axis-nav-group:nth-of-type(4) .axis-nav-icon { background: linear-gradient(140deg, #ff9a9d, #d63a3f); }
.axis-app .axis-nav-group:nth-of-type(5) .axis-nav-icon { background: linear-gradient(140deg, #c084fc, #7e22ce); }
.axis-app .axis-nav-group:nth-of-type(6) .axis-nav-icon { background: linear-gradient(140deg, #4ade80, #15803d); }
.axis-app .axis-nav-group:nth-of-type(7) .axis-nav-icon { background: linear-gradient(140deg, #f87171, #b91c1c); }
.axis-app .axis-nav-group:nth-of-type(8) .axis-nav-icon { background: linear-gradient(140deg, #38bdf8, #0369a1); }
.axis-app .axis-nav-group:nth-of-type(9) .axis-nav-icon { background: linear-gradient(140deg, #fbbf24, #b45309); }

.axis-app .axis-nav-link-child .axis-nav-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  padding: 5px;
  border-radius: 7px;
}

/* Active page: the Axis gradient pill with white text — unmistakable
   on the light surface (the old white pill would vanish here). */
.axis-app .axis-primary-nav .axis-nav-link.is-active {
  background: linear-gradient(120deg, #1e2fb8, #ff5a5f);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(30, 47, 184, 0.3);
}

.axis-app .axis-primary-nav .axis-nav-link.is-active .axis-nav-icon {
  /* !important: older per-section active-icon rules carry higher
     specificity and would tint the glyph — on the gradient pill the
     chip must always be white with a navy glyph. */
  stroke: #1e2fb8 !important;
  color: #1e2fb8 !important;
  background: #ffffff !important;
}

.axis-app .axis-sidebar-footer {
  border-top: 1px solid #e6eaf6;
  color: #7681ad;
}

.axis-app .axis-sidebar-footer small {
  color: #9aa3c9;
}

/* Vivid tables: navy header with a magenta base line. */
.axis-data-table thead th {
  background: var(--axis-brand-navy);
  color: #ffffff;
  border-bottom: 2px solid var(--axis-brand-magenta);
}

/* Vivid typography: bold sans everywhere. The serif Playfair headings
   were the single strongest "old design" signal — gone. */
h1,
h2,
.axis-brand-serif {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Vivid page title: every content page opens with the Axis gradient
   ribbon — white bold title on navy → purple → magenta, exactly like
   the dashboard hero, so no page looks unbranded. The colour carries
   !important because gradient surfaces MUST have light text no matter
   what any other layer, extension or forced-dark mode decides. */
.axis-app .card > h1,
.axis-app .card h1 {
  margin: 0 0 14px;
  padding: 18px 22px;
  border-radius: 14px;
  background: linear-gradient(120deg, #141c3f 0%, #1e2fb8 45%, #2743e0 100%);
  color: #ffffff !important;
  font-size: 24px;
  box-shadow: 0 8px 22px rgba(30, 47, 184, 0.24);
}

.axis-app .card h1 * {
  color: #ffffff !important;
}

/* The little magenta underline is replaced by the ribbon itself. */
.axis-app .card h1::after {
  display: none;
}

/* Vivid metric cards: coloured gradient tiles with white text. The older
   white-tile block earlier in this file uses the same selectors — these
   come later, so they win. The pastel corner disc becomes a white glow. */
.axis-app .axis-metric-card {
  border: none;
  background: linear-gradient(140deg, #3b6fd6, #1e2fb8);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(30, 47, 184, 0.2);
}

.axis-app .axis-metric-card.axis-income {
  background: linear-gradient(140deg, #12b76a, #0b7a52);
}

.axis-app .axis-metric-card.axis-alert {
  background: linear-gradient(140deg, #f7941d, #d9600c);
}

.axis-app .axis-metric-card.axis-attendance {
  background: linear-gradient(140deg, #00b3c4, #00707d);
}

.axis-app .axis-metric-card.axis-violet {
  background: linear-gradient(140deg, #5b78ff, #2743e0);
}

.axis-app .axis-metric-card::before,
.axis-app .axis-metric-card.axis-income::before,
.axis-app .axis-metric-card.axis-alert::before,
.axis-app .axis-metric-card.axis-attendance::before {
  background: rgba(255, 255, 255, 0.16);
}

.axis-app .axis-metric-label {
  color: rgba(255, 255, 255, 0.85);
}

.axis-app .axis-metric-value,
.axis-app .axis-metric-card.axis-income .axis-metric-value,
.axis-app .axis-metric-card.axis-alert .axis-metric-value {
  color: #ffffff;
}

.axis-app .axis-metric-note {
  color: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NARROW ICON RAIL (Aug 2026, Murat's request — Teach'n-Go-style stripe).
   body.axis-nav-rail collapses the sidebar to an 88px column of icons: the
   Axis logo, Home/Help chips, and one emoji per section. Hovering (or
   keyboard focus) slides the FULL sidebar over the page; leaving collapses
   it again. Desktop only — the phone overlay behaviour is untouched.
   ═══════════════════════════════════════════════════════════════════════ */

/* The toggle button — pinned top-right inside the sidebar. */
.axis-rail-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(30, 47, 184, 0.2);
  background: #ffffff;
  color: #1e2fb8;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30, 47, 184, 0.15);
}

.axis-rail-toggle:hover { background: #eef1fb; }

@media (max-width: 980px) {
  /* Phones use the slide-over menu — the rail adds nothing there. */
  .axis-rail-toggle { display: none; }
}

@media (min-width: 981px) {
  body.axis-nav-rail .axis-app-layout {
    position: relative;
    grid-template-columns: 88px minmax(0, 1fr);
  }

  body.axis-nav-rail .axis-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 88px;
    overflow-x: hidden;
    transition: width 0.22s ease;
    z-index: 90;
  }

  /* The sidebar is absolutely positioned (so it can slide OVER the page),
     which takes it out of the grid — without this, the main frame slid
     into the narrow 88px first column and the page looked empty. Pin the
     frame into the wide second column explicitly. */
  body.axis-nav-rail .axis-app-frame {
    grid-column: 2 / 3;
    grid-row: 1;
  }

  /* Open (JS adds axis-rail-open with enter/leave delays, so the menu
     is calm — no instant flicker) or keyboard-focused: the full sidebar
     slides over the page. */
  body.axis-nav-rail.axis-rail-open .axis-sidebar,
  body.axis-nav-rail .axis-sidebar:focus-within {
    width: var(--axis-sidebar-width);
    box-shadow: 14px 0 44px rgba(20, 28, 60, 0.35);
  }

  /* Collapsed stripe: hide every word, keep every picture. */
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-brand-copy,
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-sidebar-context,
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-sidebar-footer,
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-group-caret,
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-group-count,
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-group-toggle > span:not(.axis-nav-group-emoji),
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-link > span:not(.axis-nav-emoji) {
    display: none;
  }

  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-group-toggle,
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-link {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
  }

  /* Keep the group emoji visible in the collapsed toggle row. */
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-group-toggle > .axis-nav-group-emoji {
    display: grid;
  }

  /* SVG brand icons (Google Classroom) keep their chip, centred. */
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-link > svg {
    margin: 0;
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  /* BIG icons on the rail (Murat: "bigger emojis like Teach'n Go") —
     generous tiles, the emoji doing all the talking; names ride on the
     browser tooltip. */
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-emoji {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    font-size: 27px;
    border-radius: 13px;
  }

  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-nav-group-toggle > .axis-nav-group-emoji {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    font-size: 27px;
    border-radius: 13px;
  }

  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-brand {
    justify-content: center;
    margin-top: 0;
    padding: 44px 8px 10px;
  }

  /* Collapsed: the toggle sits centred at the very top of the stripe,
     clear of the logo. */
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-rail-toggle {
    right: 50%;
    transform: translateX(50%);
  }

  /* Collapsed: the logo shrinks to a square tile that fits the stripe. */
  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-brand-mark {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    overflow: hidden;
    border-radius: 14px;
  }

  body.axis-nav-rail:not(.axis-rail-open) .axis-sidebar:not(:focus-within) .axis-brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* The group emoji chip beside each section title (wide mode too). */
.axis-app .axis-nav-group-emoji {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  font-size: 18px;
}

/* ── aheadtutors rebrand (Aug 2026) ─────────────────────────────
   Wordmark treatment in the sidebar: "ahead" bold + "tutors" light. */
.axis-brand-copy strong .axis-brand-accent {
  font-weight: 500;
  opacity: 0.85;
}
