/* ==========================================================================
   IHM Accountant — design system
   Navy / gold academic prospectus. Serif display (Spectral) + IBM Plex Sans.
   Written with logical properties so an Arabic (RTL) build can reuse this file.
   ========================================================================== */

:root {
  --ink:        #1A4A7A;
  --ink-deep:   #123A63;
  --ink-soft:   #2C6299;
  --gold:       #C6A15B;
  --gold-light: #E3C88A;
  --gold-wash:  #F5EDDD;
  --paper:      #FBFAF8;
  --parchment:  #F3EEE4;
  --white:      #FFFFFF;
  --rule:       #DED6C6;
  --rule-cool:  #E4E7EC;
  --text:       #1C2733;
  --muted:      #59667A;
  --green:      #1E6F50;

  --max: 1180px;
  --gut: clamp(1.15rem, 4vw, 2.5rem);

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --shadow-card: 0 1px 2px rgba(26,74,122,.07), 0 12px 30px -18px rgba(26,74,122,.32);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: var(--ink-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.35rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.18rem, 1.9vw, 1.45rem); }
h4 { font-size: 1.06rem; }
p  { margin: 0 0 1.05em; max-width: 74ch; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.narrow { max-width: 820px; }

section { padding-block: clamp(3rem, 6vw, 5.25rem); }
section.tight { padding-block: clamp(2rem, 4vw, 3rem); }

/* ---------- signature device: the seal rule ---------------------------- */
.seal-rule {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-block-end: 1.4rem;
}
.seal-rule::before {
  content: "";
  inline-size: 9px; block-size: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}
.seal-rule::after {
  content: "";
  block-size: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(198,161,91,0));
  flex: 1 1 auto;
}
.seal-rule span {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-soft);
  flex: none;
}
.on-ink .seal-rule span { color: var(--gold-light); }
.on-ink .seal-rule::after { background: linear-gradient(90deg, var(--gold), rgba(198,161,91,0)); }

/* ---------- header ------------------------------------------------------ */
header.site {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251,250,248,.96);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--rule);
}
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.brand img { block-size: 50px; inline-size: auto; }
.brand b { font-family: var(--serif); font-size: 1.14rem; color: var(--ink); display: block; line-height: 1.1; white-space: nowrap; }
.brand small { display: block; font-size: .68rem; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 1.05rem; }
.nav a {
  font-size: .88rem; font-weight: 500; color: var(--ink); text-decoration: none;
  padding-block: .35rem; border-block-end: 2px solid transparent; white-space: nowrap;
}
.nav a:hover, .nav a.current { border-block-end-color: var(--gold); }
.nav .btn { border: 0; }

.navtoggle {
  display: none; background: none; border: 1px solid var(--rule);
  border-radius: 3px; padding: .5rem .7rem; cursor: pointer; font-size: 1.1rem; color: var(--ink);
}

@media (max-width: 1300px) {
  .nav {
    position: fixed; inset-block-start: 0; inset-inline-end: 0;
    block-size: 100dvh; inline-size: min(340px, 86vw);
    background: var(--ink); flex-direction: column; align-items: stretch;
    gap: 0; padding: 5rem 1.5rem 2rem; overflow-y: auto;
    transform: translateX(105%); transition: transform .25s ease; z-index: 80;
  }
  .nav.open { transform: translateX(0); }
  .nav a { color: #EAF0F8; padding-block: .85rem; border-block-end: 1px solid rgba(255,255,255,.12); }
  .nav a:hover, .nav a.current { color: var(--gold-light); border-block-end-color: rgba(255,255,255,.12); }
  .nav .btn { margin-block-start: 1.2rem; text-align: center; }
  .navtoggle { display: block; }
  .navclose { position: absolute; inset-block-start: 1rem; inset-inline-end: 1.2rem; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }
}
.navclose { display: none; }
@media (max-width: 1300px) { .navclose { display: block; } }

/* ---------- buttons ----------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--sans); font-size: .95rem; font-weight: 600;
  padding: .78rem 1.5rem; border-radius: 2px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .18s ease, color .18s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink-deep); }
.btn-gold:hover { background: var(--gold-light); color: var(--ink-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.6); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.btn-wide { inline-size: 100%; text-align: center; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: 1.5rem; }

/* ---------- video advertising banner ------------------------------------ */
.adbanner { background: var(--ink-deep); border-block-end: 1px solid rgba(198,161,91,.35); }
.adbanner .wrap { padding-block: clamp(1.6rem, 3.2vw, 2.4rem); }
.adgrid {
  display: grid; gap: clamp(1.5rem, 3.5vw, 3rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
  align-items: center;
}
@media (max-width: 900px) { .adgrid { grid-template-columns: 1fr; } }

.adcopy .price-tag {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-deep); background: var(--gold);
  padding: .3rem .8rem; margin-block-end: .9rem;
}
.adcopy strong {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.22; color: #fff; margin-block-end: .55rem;
}
.adcopy p { color: #C6D5E7; font-size: .96rem; margin: 0; max-width: 52ch; }
.adcopy .btn-row { margin-block-start: 1.35rem; }

.adfilm { margin: 0; }
.adfilm video {
  inline-size: 100%; block-size: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block;
  background: #000; border: 1px solid rgba(198,161,91,.55);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.8);
}
.adfilm figcaption { font-size: .8rem; color: #8FA6C2; margin-block-start: .6rem; text-align: end; }
@media (max-width: 900px) { .adfilm figcaption { text-align: start; } }

/* ---------- hero -------------------------------------------------------- */
.hero { position: relative; background: var(--ink); color: #E9EFF7; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: 46%;
  background-size: cover; background-position: center;
  opacity: .34;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 42%);
  mask-image: linear-gradient(90deg, transparent, #000 42%);
}
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(3.2rem, 7vw, 5.75rem); }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p.lede { font-size: 1.1rem; color: #CBD8E8; max-width: 54ch; }
.hero-inner { max-width: 660px; }

.trustline { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: 2.2rem; }
.trustline li {
  list-style: none; font-size: .82rem; color: #E4EBF4;
  border: 1px solid rgba(198,161,91,.45); padding: .3rem .75rem; border-radius: 2px;
}

/* ---------- generic page head ------------------------------------------ */
.pagehead { background: var(--ink); color: #E9EFF7; padding-block: clamp(2.4rem, 5vw, 3.6rem); position: relative; overflow: hidden; }
.pagehead h1 { color: #fff; margin-block-end: .35rem; }
.pagehead p { color: #C4D2E4; max-width: 62ch; margin: 0; }
.crumbs { font-size: .82rem; color: #93A9C4; margin-block-end: 1rem; }
.crumbs a { color: #C4D2E4; text-decoration: none; }
.crumbs a:hover { color: var(--gold-light); text-decoration: underline; }

/* ---------- panels ------------------------------------------------------ */
.on-ink { background: var(--ink); color: #DFE8F3; }
.on-ink h2, .on-ink h3 { color: #fff; }
.on-parchment { background: var(--parchment); }

/* ---------- grids & cards ----------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--rule-cool);
  border-block-start: 3px solid var(--ink);
  padding: 1.5rem; box-shadow: var(--shadow-card);
}
.card h3 { margin-block-end: .45rem; }
.card p { font-size: .95rem; color: var(--muted); }
.card .more { font-size: .88rem; font-weight: 600; text-decoration: none; color: var(--ink-soft); border-block-end: 1px solid var(--gold); }

.subjectcard { background: var(--white); border: 1px solid var(--rule-cool); box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.subjectcard img { block-size: 175px; object-fit: cover; inline-size: 100%; }
.subjectcard .body { padding: 1.35rem; display: flex; flex-direction: column; flex: 1; }
.subjectcard h3 { margin-block-end: .4rem; }
.subjectcard p { font-size: .93rem; color: var(--muted); flex: 1; }

/* prospectus entry: image + text */
.entry { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); gap: clamp(1.5rem, 4vw, 3.25rem); align-items: center; }
.entry.flip > :first-child { order: 2; }
.entry img { inline-size: 100%; block-size: 100%; max-block-size: 430px; object-fit: cover; border: 1px solid var(--rule); }
@media (max-width: 800px) { .entry { grid-template-columns: 1fr; } .entry.flip > :first-child { order: 0; } }

/* numbered list only where content is a real sequence */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 3rem; margin-block-end: 1.5rem; }
.steps li::before {
  content: counter(s); position: absolute; inset-inline-start: 0; inset-block-start: -2px;
  inline-size: 2rem; block-size: 2rem; display: grid; place-items: center;
  background: var(--ink); color: var(--gold-light); font-family: var(--serif); font-size: .95rem;
}
.steps h4 { margin-block-end: .25rem; }
.steps p { margin: 0; font-size: .95rem; color: var(--muted); }

.ticks { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.ticks li { position: relative; padding-inline-start: 1.6rem; margin-block-end: .55rem; font-size: .96rem; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .55em;
  inline-size: 7px; block-size: 7px; background: var(--gold); transform: rotate(45deg);
}
.on-ink .ticks li::before { background: var(--gold-light); }

.factlist { border-block-start: 1px solid var(--rule); margin: 0; padding: 0; }
.factlist div { display: flex; gap: 1rem; justify-content: space-between; padding-block: .7rem; border-block-end: 1px solid var(--rule); font-size: .93rem; }
.factlist dt { color: var(--muted); margin: 0; flex: none; }
.factlist dd { margin: 0; text-align: end; font-weight: 500; }

/* ---------- course finder ---------------------------------------------- */
.finder { background: var(--white); border: 1px solid var(--rule); padding: 1.5rem; box-shadow: var(--shadow-card); }
.filters { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-block-end: .3rem; }
input, select, textarea {
  inline-size: 100%; font-family: var(--sans); font-size: .95rem; color: var(--text);
  padding: .65rem .75rem; border: 1px solid #C9D0DA; border-radius: 2px; background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink-soft); outline: 2px solid rgba(198,161,91,.5); outline-offset: 0; }
textarea { min-block-size: 120px; resize: vertical; }
.field { margin-block-end: 1rem; }
.hint { font-size: .82rem; color: var(--muted); margin-block-start: .35rem; }

.courserow {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 1.25rem; align-items: center;
  background: #fff; border: 1px solid var(--rule-cool); padding: 1rem; margin-block-end: 1rem;
}
.courserow img { inline-size: 150px; block-size: 100px; object-fit: cover; }
.courserow h3 { font-size: 1.12rem; margin-block-end: .25rem; }
.courserow p { font-size: .9rem; color: var(--muted); margin: 0 0 .4rem; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .74rem; letter-spacing: .02em; padding: .16rem .55rem; border: 1px solid var(--rule); color: var(--muted); background: var(--gold-wash); }
@media (max-width: 720px) {
  .courserow { grid-template-columns: 1fr; }
  .courserow img { inline-size: 100%; block-size: 160px; }
}
.noresults { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--rule); }

/* ---------- certificate callout ---------------------------------------- */
.certbox {
  background: var(--gold-wash); border: 1px solid var(--gold);
  padding: 1.35rem 1.5rem; position: relative;
}
.certbox h4 { margin-block-end: .3rem; }
.certbox p { font-size: .92rem; margin: 0; color: #5A4A2C; }

.notice { background: #fff; border-inline-start: 3px solid var(--gold); padding: .9rem 1.1rem; font-size: .9rem; color: var(--muted); }

/* ---------- countries --------------------------------------------------- */
.countrygrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.countrycard { background: #fff; border: 1px solid var(--rule-cool); padding: 1.25rem; text-decoration: none; display: block; border-block-end: 3px solid var(--gold); }
.countrycard:hover { background: var(--gold-wash); }
.countrycard h3 { font-size: 1.15rem; margin-block-end: .3rem; }
.countrycard p { font-size: .87rem; color: var(--muted); margin: 0; }
.countrycard span { font-size: .8rem; color: var(--ink-soft); }

/* ---------- testimonials ------------------------------------------------ */
.quote { background: #fff; border: 1px solid var(--rule-cool); padding: 1.5rem; }
.quote blockquote { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.05rem; color: var(--ink); line-height: 1.5; }
.quote cite { font-style: normal; font-size: .86rem; color: var(--muted); }

/* ---------- trainers ---------------------------------------------------- */
.trainer { background: #fff; border: 1px solid var(--rule-cool); padding: 1.5rem; }
.trainer .initials {
  inline-size: 62px; block-size: 62px; background: var(--ink); color: var(--gold-light);
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.35rem; margin-block-end: 1rem;
}
.trainer h3 { margin-block-end: .1rem; font-size: 1.15rem; }
.trainer .role { font-size: .86rem; color: var(--gold); font-weight: 600; margin-block-end: .8rem; }
.trainer p { font-size: .92rem; color: var(--muted); }

/* ---------- stats ------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
.stat b { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--gold-light); line-height: 1; }
.stat span { font-size: .88rem; color: #BCCBDD; }

/* ---------- forms / enquiry -------------------------------------------- */
.formcard { background: #fff; border: 1px solid var(--rule); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-card); }
.formgrid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.formgrid .full { grid-column: 1 / -1; }
.formnote { font-size: .86rem; color: var(--muted); margin-block-start: .9rem; }
.formok {
  background: #EEF6F1; border: 1px solid #B7D9C6; color: #14513A;
  padding: 1rem 1.15rem; margin-block-end: 1rem; font-size: .94rem;
}
.formerr { background: #FDF0EE; border: 1px solid #E9BDB5; color: #8A2A17; padding: .8rem 1rem; margin-block-end: 1rem; font-size: .9rem; }
.hp { position: absolute; inset-inline-start: -9999px; }

/* ---------- tables ------------------------------------------------------ */
table.data { inline-size: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; }
table.data th, table.data td { text-align: start; padding: .7rem .8rem; border-block-end: 1px solid var(--rule-cool); vertical-align: top; }
table.data th { background: var(--ink); color: #fff; font-weight: 600; font-size: .84rem; letter-spacing: .02em; }
table.data tbody tr:nth-child(even) { background: #FAFAF7; }
.tablescroll { overflow-x: auto; }

/* ---------- FAQ --------------------------------------------------------- */
details.faq { border-block-end: 1px solid var(--rule); padding-block: 1rem; }
details.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.08rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin-block: .8rem 0; font-size: .95rem; color: var(--muted); }

/* ---------- footer ------------------------------------------------------ */
footer.site { background: var(--ink-deep); color: #A9BCD3; padding-block: 3.25rem 1.5rem; font-size: .9rem; }
footer.site h4 { color: #fff; font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .06em; margin-block-end: .9rem; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-block-end: .45rem; }
footer.site a { color: #A9BCD3; text-decoration: none; }
footer.site a:hover { color: var(--gold-light); text-decoration: underline; }
.footgrid { display: grid; gap: 2rem 1.5rem; grid-template-columns: 1.6fr repeat(6, minmax(0, 1fr)); }
@media (max-width: 1080px) { .footgrid { grid-template-columns: 1.4fr repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px) { .footgrid { grid-template-columns: repeat(2, minmax(0,1fr)); } .footbrand { grid-column: 1 / -1; } }
.footbrand img { block-size: 66px; margin-block-end: 1rem; }
.footbrand p { font-size: .9rem; color: #9DB1CA; max-width: 34ch; }
.footbottom { margin-block-start: 2.5rem; padding-block-start: 1.25rem; border-block-start: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; font-size: .82rem; }

/* ---------- floating contact + chat ------------------------------------ */
.floaters { position: fixed; inset-block-end: 1.1rem; inset-inline-end: 1.1rem; z-index: 70; display: flex; flex-direction: column; gap: .6rem; align-items: flex-end; }
.fab {
  inline-size: 54px; block-size: 54px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(18,58,99,.32); color: #fff;
}
.fab svg { inline-size: 27px; block-size: 27px; fill: currentColor; }
.fab-wa { background: #25D366; }
.fab-chat { background: var(--ink); }

.chatpanel {
  position: fixed; inset-block-end: 5.6rem; inset-inline-end: 1.1rem; z-index: 75;
  inline-size: min(370px, calc(100vw - 2.2rem)); max-block-size: min(560px, 76vh);
  background: #fff; border: 1px solid var(--rule); box-shadow: 0 20px 50px -12px rgba(18,58,99,.42);
  display: none; flex-direction: column; overflow: hidden;
}
.chatpanel.open { display: flex; }
.chathead { background: var(--ink); color: #fff; padding: .9rem 1rem; display: flex; justify-content: space-between; align-items: center; }
.chathead b { font-family: var(--serif); font-weight: 600; font-size: 1rem; }
.chathead small { display: block; color: #A8BFDD; font-size: .76rem; }
.chathead button { background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.chatlog { flex: 1; overflow-y: auto; padding: 1rem; background: #F7F8FA; }
.msg { margin-block-end: .8rem; max-inline-size: 88%; padding: .65rem .85rem; font-size: .9rem; line-height: 1.5; }
.msg.bot { background: #fff; border: 1px solid var(--rule-cool); }
.msg.me { background: var(--ink); color: #fff; margin-inline-start: auto; }
.chatopts { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .8rem; background: #F7F8FA; }
.chatopts button { background: #fff; border: 1px solid var(--ink-soft); color: var(--ink-soft); font-size: .8rem; padding: .35rem .7rem; cursor: pointer; border-radius: 2px; font-family: var(--sans); }
.chatopts button:hover { background: var(--ink); color: #fff; }
.chatfoot { display: flex; gap: .5rem; padding: .7rem; border-block-start: 1px solid var(--rule-cool); }
.chatfoot input { flex: 1; }
.chatfoot button { background: var(--gold); border: 0; color: var(--ink-deep); padding: 0 1rem; cursor: pointer; font-weight: 600; border-radius: 2px; }

/* ---------- auth pages -------------------------------------------------- */
.authwrap { display: grid; grid-template-columns: 1fr 1fr; min-block-size: 78vh; }
.authside { background: var(--ink); color: #D6E1EF; padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.authside h2 { color: #fff; }
.authside .ticks li { color: #CBD8E8; font-size: .95rem; }
.authmain { padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; background: var(--paper); }
.authmain .inner { inline-size: min(430px, 100%); margin-inline: auto; }
@media (max-width: 880px) { .authwrap { grid-template-columns: 1fr; } .authside { order: 2; } }

/* ---------- dashboard / admin ------------------------------------------ */
.dash { display: grid; grid-template-columns: 250px 1fr; min-block-size: 80vh; }
.dashnav { background: var(--ink); padding: 1.5rem 1rem; }
.dashnav button {
  display: block; inline-size: 100%; text-align: start; background: none; border: 0;
  color: #C3D3E7; padding: .7rem .8rem; font-size: .93rem; cursor: pointer; font-family: var(--sans);
  border-inline-start: 3px solid transparent;
}
.dashnav button:hover { color: #fff; }
.dashnav button.active { background: rgba(255,255,255,.08); color: #fff; border-inline-start-color: var(--gold); }
.dashbody { padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--paper); }
.tabpane { display: none; }
.tabpane.active { display: block; }
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-block-end: 2rem; }
.kpi { background: #fff; border: 1px solid var(--rule-cool); border-block-start: 3px solid var(--gold); padding: 1.1rem; }
.kpi b { display: block; font-family: var(--serif); font-size: 1.9rem; color: var(--ink); line-height: 1.1; }
.kpi span { font-size: .82rem; color: var(--muted); }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; } .dashnav { display: flex; overflow-x: auto; padding: .5rem; } .dashnav button { inline-size: auto; white-space: nowrap; border-inline-start: 0; border-block-end: 3px solid transparent; } .dashnav button.active { border-block-end-color: var(--gold); border-inline-start-color: transparent; } }

.badge { font-size: .74rem; padding: .18rem .5rem; border-radius: 2px; font-weight: 600; }
.badge.new { background: #FDF3DC; color: #7A5B12; }
.badge.done { background: #E8F3ED; color: var(--green); }

/* ---------- utilities --------------------------------------------------- */
.center { text-align: center; }
.center p { margin-inline: auto; }
.mt0 { margin-block-start: 0; }
.mb0 { margin-block-end: 0; }
.small { font-size: .88rem; }
.muted { color: var(--muted); }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 1rem; inset-block-start: 1rem; background: var(--gold); color: var(--ink-deep); padding: .6rem 1rem; z-index: 200; }
.imgcap { font-size: .82rem; color: var(--muted); margin-block-start: .5rem; }

/* very small screens: keep the header to one clean line */
@media (max-width: 430px) {
  .brand small { display: none; }
  .brand img { block-size: 42px; }
  .brand b { font-size: 1.05rem; }
}

/* principal course marker */
.tag-principal { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
