/* ==========================================================================
   Ayantrix Solutions - one website design system
   Loaded last (after style.css) by Views/layouts/header.php.
   Navy + blue + gold brand, light content surfaces, white cards, 18px radius.
   Everything the portal pages use (portal-*, account-*, student-*, assessment-*)
   is defined here, so Careers, Trainings, Login and the Student/Career
   dashboards share exactly the same look as Home, About, Services and Contact.
   ========================================================================== */

:root {
  --ayx-navy: #071f54;
  --ayx-navy-2: #0b2a6b;
  --ayx-navy-3: #020617;
  --ayx-primary: #2563eb;
  --ayx-primary-dark: #1d4ed8;
  --ayx-primary-soft: #eaf1ff;
  --ayx-accent: #fbbf24;
  --ayx-ink: #0f172a;
  --ayx-text: #1e293b;
  --ayx-muted: #64748b;
  --ayx-line: #e2e8f0;
  --ayx-bg: #f4f7fc;
  --ayx-card: #ffffff;
  --ayx-ok: #15803d;
  --ayx-ok-bg: #ecfdf3;
  --ayx-warn: #b45309;
  --ayx-warn-bg: #fffbeb;
  --ayx-bad: #be123c;
  --ayx-bad-bg: #fff1f2;
  --ayx-radius: 18px;
  --ayx-radius-sm: 12px;
  --ayx-shadow: 0 10px 30px rgba(7, 31, 84, .08);
  --ayx-shadow-lg: 0 22px 50px rgba(7, 31, 84, .14);
  --ayx-font: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  --ayx-gutter: clamp(16px, 4vw, 32px);
  --ayx-header-h: 78px;
  /* names used by the existing inline styles */
  --portal-line: var(--ayx-line);
  --portal-muted: var(--ayx-muted);
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--ayx-font); color: var(--ayx-text); }
img, video { max-width: 100%; }
img { height: auto; }
::selection { background: #bfdbfe; color: var(--ayx-ink); }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .55); outline-offset: 2px; border-radius: 6px; }
.ayx-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / navbar (same on every page) ---------- */
body .top-header { background: rgba(7, 31, 84, .97); border-bottom: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 6px 22px rgba(2, 6, 23, .18); }
body .top-header .container.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--ayx-header-h); padding: 8px var(--ayx-gutter); max-width: 1280px; margin: 0 auto; width: 100%; }
body .top-header .logo-wrap { margin-left: 0; flex: 0 0 auto; }
body .top-header .logo-link { align-items: flex-start; gap: 2px; }
body .top-header .site-logo { height: 52px; width: auto; max-width: 220px; object-fit: contain; }
body .top-header .logo-sub1 { margin: 0; font-size: 12px; letter-spacing: .5px; color: #cbd5e1; text-align: left; }
body .top-header #menu { flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
body .top-header #menu > a:not(.nav-cta),
body .top-header #menu .mega-menu > a { padding: 9px 14px; border-radius: 12px; color: #e2e8f0; font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; transition: background .2s, color .2s; }
body .top-header #menu > a:not(.nav-cta):hover,
body .top-header #menu .mega-menu > a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
body .top-header #menu > a.active,
body .top-header #menu .mega-menu > a.active { background: var(--ayx-primary); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .35); }
body .top-header #menu a::after { display: none !important; }
body .top-header #menu .nav-cta { margin-left: 8px; padding: 10px 20px; border-radius: 12px; background: var(--ayx-primary); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(37, 99, 235, .35); }
body .top-header #menu .nav-cta:hover { background: var(--ayx-primary-dark); transform: translateY(-1px); }
body .top-header .header-gst { width: auto; margin: 0 0 0 10px; padding: 0; color: var(--ayx-accent); font-size: 12px; font-weight: 600; white-space: nowrap; text-align: left; }
body .top-header .menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; border: 0; }
body .top-header .menu-btn:hover { background: rgba(255, 255, 255, .16); }

@media (max-width: 1100px) {
  body .top-header .header-gst { display: none; }
  body .top-header #menu > a:not(.nav-cta), body .top-header #menu .mega-menu > a { padding: 9px 10px; font-size: 14px; }
}
@media (max-width: 900px) {
  body .top-header .container.nav { position: relative; min-height: 68px; }
  body .top-header .site-logo { height: 44px; }
  body .top-header .logo-sub1 { display: none; }
  body .top-header .menu-btn { display: inline-flex; }
  body .top-header #menu { position: absolute; top: calc(100% + 1px); left: 12px; right: 12px; display: none; flex-direction: column; align-items: stretch; gap: 4px; width: auto; padding: 12px; border-radius: 16px; background: #0b2a6b; border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--ayx-shadow-lg); max-height: calc(100vh - 90px); overflow-y: auto; }
  body .top-header #menu.show { display: flex; }
  body .top-header #menu > a:not(.nav-cta), body .top-header #menu .mega-menu > a { display: block; padding: 12px 14px; font-size: 16px; }
  body .top-header #menu .mega-menu { width: 100%; }
  body .top-header #menu .nav-cta { margin: 6px 0 0; text-align: center; }
  body .top-header .header-gst { display: block; margin: 8px 0 0; text-align: center; }
}

/* ---------- footer alignment ---------- */
body .pf-footer .pf-container, body .pf-cta .pf-container { max-width: 1240px; margin: 0 auto; padding-left: var(--ayx-gutter); padding-right: var(--ayx-gutter); }
body .pf-footer img { max-width: 100%; height: auto; }
body .pf-socials { display: flex; gap: 10px; flex-wrap: wrap; }
body .pf-socials a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
body .pf-top-grid { align-items: start; }
@media (max-width: 760px) { body .pf-top-grid { gap: 28px; } body .pf-footer { text-align: left; } }

/* ---------- portal page frame ---------- */
body .portal-page { background: var(--ayx-bg); min-height: 60vh; padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 7vw, 84px); color: var(--ayx-text); font-family: var(--ayx-font); line-height: 1.6; }
body .portal-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--ayx-gutter); }
body .portal-page h1, body .portal-page h2, body .portal-page h3 { color: var(--ayx-ink); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 10px; }
body .portal-page h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
body .portal-page h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 750; }
body .portal-page h3 { font-size: 1.1rem; font-weight: 700; }
body .portal-page p { margin: 0 0 12px; color: var(--ayx-muted); }
body .portal-page a { color: var(--ayx-primary); }
body .portal-kicker { display: inline-block; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px; background: var(--ayx-primary-soft); color: var(--ayx-primary-dark); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
body .portal-heading { color: var(--ayx-ink); margin: 6px 0 14px; }
body .portal-section { margin-top: clamp(28px, 4vw, 44px); }
body .portal-section-title { margin: 0 0 18px; }
body .portal-subtitle { color: var(--ayx-muted); }

/* hero banner (navy, same family as the home hero) */
body .portal-hero { position: relative; overflow: hidden; margin-bottom: 26px; padding: clamp(30px, 5vw, 56px) clamp(20px, 4vw, 48px); border-radius: 24px; background: radial-gradient(900px 300px at 85% -20%, rgba(96, 165, 250, .35), transparent 60%), linear-gradient(135deg, var(--ayx-navy) 0%, var(--ayx-navy-2) 60%, #123a8f 100%); color: #fff; text-align: center; box-shadow: var(--ayx-shadow-lg); }
body .portal-hero h1 { color: #fff; margin-bottom: 12px; }
body .portal-hero p { max-width: 680px; margin: 0 auto 20px; color: #cbd5e1; font-size: 1.05rem; }
body .portal-hero .portal-kicker { background: rgba(255, 255, 255, .12); color: #dbeafe; }
body .portal-hero .portal-actions { justify-content: center; }
body .portal-hero .portal-btn.secondary { background: rgba(255, 255, 255, .1); color: #fff !important; border-color: rgba(255, 255, 255, .35); }
body .portal-hero .portal-btn.secondary:hover { background: rgba(255, 255, 255, .2); }

/* grids & cards */
body .portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; align-items: stretch; }
body .portal-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 22px; border: 1px solid var(--ayx-line); border-radius: var(--ayx-radius); background: var(--ayx-card); box-shadow: var(--ayx-shadow); color: var(--ayx-text); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
body a.portal-card:hover, body article.portal-card:hover { transform: translateY(-3px); box-shadow: var(--ayx-shadow-lg); border-color: #bfdbfe; }
body .portal-card h3 { margin: 6px 0 4px; }
body .portal-card > p { flex: 0 1 auto; }
body .portal-card .portal-actions { margin-top: auto; padding-top: 14px; }
body .portal-empty { align-items: center; justify-content: center; min-height: 140px; text-align: center; color: var(--ayx-muted); grid-column: 1 / -1; }
body .portal-chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--ayx-primary-soft); color: var(--ayx-primary-dark); font-size: 12px; font-weight: 750; text-decoration: none; }
body .portal-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 6px 0 4px; color: var(--ayx-muted); font-size: 14px; }
body .portal-price { margin: 6px 0 0; color: var(--ayx-ink); font-size: 1.5rem; font-weight: 800; }
body .portal-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }

/* buttons */
body .portal-btn, body button.portal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--ayx-primary); border-radius: var(--ayx-radius-sm); background: var(--ayx-primary); color: #fff !important; font: 700 15px/1.2 var(--ayx-font); text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s; box-shadow: 0 6px 16px rgba(37, 99, 235, .25); }
body .portal-btn:hover { background: var(--ayx-primary-dark); border-color: var(--ayx-primary-dark); transform: translateY(-1px); }
body .portal-btn.secondary { background: #fff; color: var(--ayx-primary-dark) !important; border-color: #c7d7f5; box-shadow: none; }
body .portal-btn.secondary:hover { background: var(--ayx-primary-soft); border-color: var(--ayx-primary); }
body .portal-btn.danger { background: #fff; color: var(--ayx-bad) !important; border-color: #fecdd3; box-shadow: none; }
body .portal-btn[disabled], body .portal-btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
body .portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
body .portal-actions form { margin: 0; max-width: none; }

/* status pills */
body .portal-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #eef2f7; color: var(--ayx-text); font-size: 12.5px; font-weight: 750; white-space: nowrap; }
body .portal-status.success { background: var(--ayx-ok-bg); color: var(--ayx-ok); }
body .portal-status.warn, body .portal-status.warning { background: var(--ayx-warn-bg); color: var(--ayx-warn); }
body .portal-status.danger, body .portal-status.error { background: var(--ayx-bad-bg); color: var(--ayx-bad); }
body .portal-status.info { background: var(--ayx-primary-soft); color: var(--ayx-primary-dark); }

/* search toolbar */
body .portal-toolbar { width: 100%; max-width: none; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 0 0 8px; padding: 14px; border: 1px solid var(--ayx-line); border-radius: var(--ayx-radius); background: #fff; box-shadow: var(--ayx-shadow); }
body .portal-toolbar .portal-input, body .portal-toolbar .portal-select { margin: 0; }
body .portal-toolbar .portal-btn { white-space: nowrap; }
@media (max-width: 720px) { body .portal-toolbar { grid-template-columns: 1fr; } body .portal-toolbar .portal-btn { width: 100%; } }

/* forms */
body .portal-form { width: 100%; max-width: 760px; margin: 0 auto; padding: clamp(22px, 4vw, 38px); border: 1px solid var(--ayx-line); border-radius: 22px; background: #fff; box-shadow: var(--ayx-shadow-lg); }
body .portal-form h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 6px; }
body .portal-form > p { margin-bottom: 18px; }
body .portal-fields, body .portal-form-grid, body .account-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
body .portal-fields > .full, body .portal-field.full, body .portal-form-grid .full, body .account-form-grid .full, body .account-form-grid .wide { grid-column: 1 / -1; }
body .portal-field, body .portal-form-grid > label, body .account-form-grid > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ayx-ink); font-size: 14px; font-weight: 700; }
body .portal-field small, body .portal-form small { color: var(--ayx-muted); font-weight: 500; font-size: 12.5px; }
body .portal-input, body .portal-select, body .portal-textarea,
body .portal-form-grid input, body .portal-form-grid select, body .portal-form-grid textarea,
body .account-form-grid input, body .account-form-grid select, body .account-form-grid textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: var(--ayx-radius-sm); background: #fff; color: var(--ayx-ink); font: 500 15px/1.4 var(--ayx-font); transition: border-color .2s, box-shadow .2s; }
body .portal-textarea, body .portal-form-grid textarea { min-height: 120px; resize: vertical; }
body .portal-input::placeholder, body .portal-textarea::placeholder { color: #94a3b8; }
body .portal-input:focus, body .portal-select:focus, body .portal-textarea:focus,
body .portal-form-grid input:focus, body .portal-form-grid select:focus, body .account-form-grid input:focus, body .account-form-grid select:focus { outline: 0; border-color: var(--ayx-primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
body .portal-input[type=file] { padding: 9px 12px; background: #f8fafc; }
body .portal-form fieldset { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--ayx-line); border-radius: var(--ayx-radius-sm); }
body .portal-form legend { padding: 0 8px; font-weight: 700; color: var(--ayx-ink); }
body .portal-auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 14px; font-weight: 650; }
body .portal-auth-links a { text-decoration: none; }
body .portal-auth-links a:hover { text-decoration: underline; }
@media (max-width: 640px) { body .portal-fields, body .portal-form-grid, body .account-form-grid { grid-template-columns: 1fr; } body .portal-auth-links { flex-direction: column; } }

/* login account switch */
body .portal-account-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
body .portal-account-option { position: relative; display: block; cursor: pointer; }
body .portal-account-option input { position: absolute; opacity: 0; pointer-events: none; }
body .portal-account-option span { display: block; height: 100%; padding: 14px 16px; border: 1.5px solid var(--ayx-line); border-radius: 14px; background: #f8fafc; transition: .2s; }
body .portal-account-option b { display: block; color: var(--ayx-ink); font-size: 15px; }
body .portal-account-option small { display: block; margin-top: 4px; color: var(--ayx-muted); font-size: 12px; }
body .portal-account-option input:checked + span { border-color: var(--ayx-primary); background: var(--ayx-primary-soft); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
body .portal-account-option input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .5); outline-offset: 2px; }
@media (max-width: 520px) { body .portal-account-switch { grid-template-columns: 1fr; } }

/* alerts (markup lives in partials/alerts.php) */
body .portal-alert-box, body .portal-alert { border-radius: 14px; }
body .portal-alert { display: block; margin: 14px 0; padding: 13px 16px; border: 1px solid #fde68a; background: var(--ayx-warn-bg); color: #78350f; line-height: 1.5; }
body .portal-alert.warning a { color: var(--ayx-primary-dark); font-weight: 750; }

/* detail layout (career / course) */
body .portal-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
body .portal-detail > aside { position: sticky; top: calc(var(--ayx-header-h) + 18px); }
body .portal-detail aside .portal-card p { margin-bottom: 10px; color: var(--ayx-text); font-size: 14.5px; }
body .portal-detail aside .portal-card p strong { color: var(--ayx-muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 920px) { body .portal-detail { grid-template-columns: 1fr; } body .portal-detail > aside { position: static; } }

/* rich text (job descriptions, course content): images always fit and stay sharp */
body .portal-prose, body .ayx-prose { color: var(--ayx-text); font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
body .portal-prose > :first-child, body .ayx-prose > :first-child { margin-top: 0; }
body .portal-prose p, body .ayx-prose p { color: var(--ayx-text); margin: 0 0 14px; }
body .portal-prose ul, body .portal-prose ol, body .ayx-prose ul, body .ayx-prose ol { margin: 0 0 14px; padding-left: 1.4em; }
body .portal-prose li, body .ayx-prose li { margin: 4px 0; }
body .portal-prose h1, body .portal-prose h2, body .portal-prose h3, body .portal-prose h4, body .ayx-prose h2, body .ayx-prose h3, body .ayx-prose h4 { margin: 22px 0 8px; font-size: 1.15rem; }
body .portal-prose img, body .ayx-prose img { display: block; max-width: 100%; height: auto; margin: 16px auto; border-radius: 14px; box-shadow: var(--ayx-shadow); object-fit: contain; }
body .portal-prose figure, body .ayx-prose figure { margin: 16px 0; }
body .portal-prose figcaption, body .ayx-prose figcaption { margin-top: 6px; color: var(--ayx-muted); font-size: 13px; text-align: center; }
body .portal-prose table, body .ayx-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 14px 0; }
body .portal-prose th, body .portal-prose td, body .ayx-prose th, body .ayx-prose td { padding: 8px 12px; border: 1px solid var(--ayx-line); text-align: left; }
body .portal-prose a, body .ayx-prose a { color: var(--ayx-primary); text-decoration: underline; }

/* tables */
body .portal-table-wrap, body .account-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--ayx-line); border-radius: var(--ayx-radius-sm); background: #fff; -webkit-overflow-scrolling: touch; }
body .portal-table, body .account-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14.5px; }
body .portal-table th, body .account-table th { padding: 12px 14px; background: #f1f5fb; color: var(--ayx-navy); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
body .portal-table td, body .account-table td { padding: 13px 14px; border-top: 1px solid var(--ayx-line); color: var(--ayx-text); vertical-align: top; }
body .portal-table tbody tr:hover, body .account-table tbody tr:hover { background: #f8fbff; }

/* progress */
body .portal-progress { flex: 1 1 auto; height: 10px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
body .portal-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ayx-primary), #60a5fa); }

/* ---------- account (career + student dashboards) ---------- */
body .account-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
body .account-sidebar { position: sticky; top: calc(var(--ayx-header-h) + 16px); padding: 20px; border: 1px solid var(--ayx-line); border-radius: var(--ayx-radius); background: #fff; box-shadow: var(--ayx-shadow); }
body .account-identity { padding: 6px 4px 18px; border-bottom: 1px solid var(--ayx-line); text-align: center; }
body .account-identity strong { display: block; color: var(--ayx-ink); font-size: 1.05rem; overflow-wrap: anywhere; }
body .account-identity > span:last-child { display: block; margin-top: 2px; color: var(--ayx-muted); font-size: 13px; }
body .account-big-avatar { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 12px; overflow: hidden; border-radius: 22px; background: linear-gradient(135deg, var(--ayx-primary), var(--ayx-navy-2)); color: #fff; font-size: 28px; font-weight: 800; }
body .account-big-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
body .account-side-links { display: grid; gap: 4px; margin-top: 14px; }
body .account-side-links a, body .account-side-links button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--ayx-text); font: 650 14.5px/1.2 var(--ayx-font); text-align: left; text-decoration: none; cursor: pointer; }
body .account-side-links a:hover, body .account-side-links button:hover { background: var(--ayx-primary-soft); color: var(--ayx-primary-dark); }
body .account-side-links a.current { background: var(--ayx-primary); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .3); }
body .account-side-links form { margin: 0; max-width: none; width: 100%; }
body .account-side-links button.logout { margin-top: 8px; color: var(--ayx-bad); }
body .account-side-links button.logout:hover { background: var(--ayx-bad-bg); color: var(--ayx-bad); }
body .account-main { min-width: 0; display: grid; gap: 20px; }
body .account-welcome { padding: clamp(22px, 3vw, 32px); border-radius: 22px; background: radial-gradient(700px 240px at 90% -30%, rgba(96, 165, 250, .35), transparent 60%), linear-gradient(135deg, var(--ayx-navy), var(--ayx-navy-2)); color: #fff; box-shadow: var(--ayx-shadow-lg); }
body .account-welcome h1 { color: #fff; margin-bottom: 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
body .account-welcome p { margin: 0; color: #cbd5e1; }
body .account-welcome .portal-kicker { background: rgba(255, 255, 255, .12); color: #dbeafe; }
body .account-welcome a { color: #93c5fd; font-weight: 750; }
body .account-progress-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
body .account-progress-row b { color: #fff; white-space: nowrap; font-size: 14px; }
body .account-welcome .portal-progress { background: rgba(255, 255, 255, .18); }
body .account-welcome .portal-progress span { background: linear-gradient(90deg, #fbbf24, #fde68a); }
body .account-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
body .account-metric { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--ayx-line); border-radius: var(--ayx-radius); background: #fff; box-shadow: var(--ayx-shadow); color: var(--ayx-text); text-decoration: none; }
body .account-metric span { color: var(--ayx-muted); font-size: 13px; font-weight: 650; }
body .account-metric b { color: var(--ayx-ink); font-size: 1.7rem; font-weight: 800; line-height: 1.15; }
body a.account-metric:hover { border-color: #bfdbfe; box-shadow: var(--ayx-shadow-lg); }
body .account-panel { padding: clamp(18px, 2.4vw, 26px); border: 1px solid var(--ayx-line); border-radius: var(--ayx-radius); background: #fff; box-shadow: var(--ayx-shadow); min-width: 0; }
body .account-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
body .account-panel-head h2 { margin: 0; }
body .account-panel-head > span { color: var(--ayx-muted); font-size: 13.5px; }
body .account-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
body .account-quick { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--ayx-line); border-radius: 14px; background: #f8fbff; color: var(--ayx-text); text-decoration: none; transition: .2s; }
body .account-quick:hover { border-color: var(--ayx-primary); background: var(--ayx-primary-soft); }
body .account-quick b { color: var(--ayx-ink); } body .account-quick span { color: var(--ayx-muted); font-size: 13.5px; }
body .account-file-note { color: var(--ayx-muted); font-size: 13px; }
body .account-profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
body .account-profile-photo { position: relative; }
body .account-camera { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; background: var(--ayx-primary); color: #fff; font-size: 14px; cursor: pointer; }
body .account-image-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
body .account-image-actions .portal-btn { min-height: 38px; padding: 7px 14px; font-size: 13px; }
body .student-list { display: grid; gap: 14px; }
body .student-row { padding: 18px; border: 1px solid var(--ayx-line); border-radius: 16px; background: #fbfdff; }
body .student-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
body .student-row-head h3 { margin: 0 0 4px; } body .student-row-head p { margin: 0; }
body .student-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
body .student-meta-grid > div { padding: 10px 12px; border-radius: 12px; background: #f1f5fb; }
body .student-meta-grid span { display: block; color: var(--ayx-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
body .student-meta-grid b { color: var(--ayx-ink); font-size: 15px; overflow-wrap: anywhere; }
body .student-empty { padding: 28px 18px; border: 1.5px dashed #cbd5e1; border-radius: 16px; background: #f8fafc; color: var(--ayx-muted); text-align: center; }
body .student-empty h3 { margin: 0 0 4px; }
body .profile-checklist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* assessments */
body .assessment-list, body .assessment-questions { display: grid; gap: 16px; }
body .assessment-card, body .assessment-question { padding: 20px; border: 1px solid var(--ayx-line); border-radius: 16px; background: #fff; box-shadow: var(--ayx-shadow); }
body .assessment-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
body .assessment-card-head h1, body .assessment-card-head h3 { margin: 4px 0 6px; }
body .assessment-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
body .assessment-meta div { padding: 10px 12px; border-radius: 12px; background: #f1f5fb; }
body .assessment-instructions { padding: 14px 16px; border-radius: 12px; background: var(--ayx-warn-bg); color: #78350f; }

/* responsive account shell */
@media (max-width: 960px) {
  body .account-shell { grid-template-columns: 1fr; }
  body .account-sidebar { position: static; padding: 14px; }
  body .account-identity { display: flex; align-items: center; gap: 14px; text-align: left; padding-bottom: 12px; }
  body .account-big-avatar { width: 56px; height: 56px; margin: 0; border-radius: 16px; font-size: 22px; }
  body .account-side-links { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
  body .account-side-links a, body .account-side-links button { white-space: nowrap; }
}

/* image safety: never overflow, never stretch */
body .portal-card img, body .account-panel img, body .student-row img { max-width: 100%; height: auto; }
img.ayx-img-missing { object-fit: contain; background: linear-gradient(135deg, #eaf1ff, #f4f7fc); padding: 14px; border-radius: 14px; min-height: 80px; }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* logo / image fallbacks */
body .top-header .site-logo { color: #fff; font-weight: 800; font-size: 18px; }

/* grid children may shrink: stops wide tables / nav strips widening the page */
body .account-shell > *, body .portal-detail > *, body .portal-grid > * { min-width: 0; }
@media (max-width: 960px) { body .account-shell { grid-template-columns: minmax(0, 1fr); } }

/* logo fallback: show the alt text on the brand bar instead of a white box */
body .top-header img.ayx-img-missing, body .pf-footer img.ayx-img-missing { background: transparent; padding: 0; min-height: 0; border-radius: 0; color: #fff; font-weight: 800; }
