/* ==========================================================================
   AMIKRAF — Design system (native CSS, no framework)
   Palette drawn from the association's mark: navy ink, electric indigo,
   and the ember-orange of the logo's triangle, on warm paper.
   ========================================================================== */

:root {
  --ink:          #0A0E1A;
  --ink-2:        #1C2333;
  --body:         #3E4557;
  --muted:        #757D90;
  --paper:        #FBF9F5;
  --surface:      #FFFFFF;
  --surface-2:    #F3F0E9;
  --line:         #E6E1D6;

  --accent:       #2440F5;
  --accent-deep:  #1A2FB8;
  --accent-wash:  #EAEDFF;
  --ember:        #FF4B26;
  --ember-wash:   #FFEBE5;

  --ok:           #12805C;
  --ok-wash:      #E2F3EC;
  --warn:         #9A6B00;
  --warn-wash:    #FBF1DA;
  --danger:       #C22B2B;
  --danger-wash:  #FBE8E8;

  --on-accent:    #FFFFFF;
  --on-ink:       #F4F2ED;
  --on-ink-dim:   rgba(244,242,237,.62);
  --ink-line:     rgba(255,255,255,.12);

  --shadow-sm: 0 1px 2px rgba(10,14,26,.05);
  --shadow:    0 2px 4px rgba(10,14,26,.04), 0 12px 28px -14px rgba(10,14,26,.18);
  --shadow-lg: 0 30px 60px -28px rgba(10,14,26,.42);

  --f-display: 'Sora', system-ui, sans-serif;
  --f-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, Consolas, monospace;

  --r-xs: 6px; --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-pill: 999px;
  --wrap: 1200px;
  --nav-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:       #F2F4F8;
    --ink-2:     #DCE0E9;
    --body:      #B3BAC9;
    --muted:     #838C9E;
    --paper:     #0B0E14;
    --surface:   #141821;
    --surface-2: #1C222D;
    --line:      #29303D;

    --accent:      #8095FF;
    --accent-deep: #B9C4FF;
    --accent-wash: #191F38;
    --ember:       #FF7A5C;
    --ember-wash:  #2C1611;

    --ok:     #4FC49A;
    --ok-wash:#11291F;
    --warn:   #DCAE4E;
    --warn-wash:#2A2110;
    --danger: #E97070;
    --danger-wash:#2B1414;

    --on-accent: #0B0E14;
    --on-ink:    #F2F4F8;
    --on-ink-dim: rgba(242,244,248,.62);
    --ink-line:  rgba(255,255,255,.10);

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow:    0 2px 4px rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.6);
    --shadow-lg: 0 30px 60px -28px rgba(0,0,0,.75);
  }
}
:root[data-theme="dark"] {
  --ink:       #F2F4F8;
  --ink-2:     #DCE0E9;
  --body:      #B3BAC9;
  --muted:     #838C9E;
  --paper:     #0B0E14;
  --surface:   #141821;
  --surface-2: #1C222D;
  --line:      #29303D;

  --accent:      #8095FF;
  --accent-deep: #B9C4FF;
  --accent-wash: #191F38;
  --ember:       #FF7A5C;
  --ember-wash:  #2C1611;

  --ok:     #4FC49A;
  --ok-wash:#11291F;
  --warn:   #DCAE4E;
  --warn-wash:#2A2110;
  --danger: #E97070;
  --danger-wash:#2B1414;

  --on-accent: #0B0E14;
  --on-ink:    #F2F4F8;
  --on-ink-dim: rgba(242,244,248,.62);
  --ink-line:  rgba(255,255,255,.10);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 2px 4px rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 60px -28px rgba(0,0,0,.75);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
@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(--body);
  font-family: var(--f-body); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
hr { border: none; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }

h1,h2,h3,h4,h5 {
  font-family: var(--f-display); font-weight: 700; color: var(--ink);
  line-height: 1.12; letter-spacing: -.022em; margin: 0; text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 800; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0; }
strong { color: var(--ink); font-weight: 700; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: var(--r-xs);
}

/* ---------- Primitives ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: 780px; margin-inline: auto; padding-inline: 24px; }
.stack { display: flex; flex-direction: column; }
.row   { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrapf { flex-wrap: wrap; }
.g4{gap:4px}.g8{gap:8px}.g12{gap:12px}.g16{gap:16px}.g20{gap:20px}.g24{gap:24px}.g32{gap:32px}.g48{gap:48px}
.grow { flex: 1; }
.center { text-align: center; }
.hidden { display: none !important; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--body); max-width: 62ch; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--f-mono); font-size: .73rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; }
.eyebrow.on-dark { color: var(--ember); }

.section { padding: clamp(64px, 9vw, 118px) 0; }
.section-tight { padding: clamp(48px, 6vw, 76px) 0; }
.band-ink { background: var(--ink); color: var(--on-ink); }
.band-ink h1,.band-ink h2,.band-ink h3,.band-ink h4 { color: var(--on-ink); }
.band-ink .muted, .band-ink .lead { color: var(--on-ink-dim); }
.band-alt { background: var(--surface-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-display); font-weight: 600; font-size: .95rem; line-height: 1;
  padding: 15px 28px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap; text-align: center;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 10px 18px; font-size: .86rem; }
.btn-lg { padding: 18px 34px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ember  { background: var(--ember); color: #fff; box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--ember) 70%, transparent); }
.btn-ink    { background: var(--ink); color: var(--on-ink); }
.btn-outline{ background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.btn-onink  { background: transparent; border-color: var(--ink-line); color: var(--on-ink); }
.btn-onink:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost  { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 600; color: var(--accent); }
.link-arrow i { transition: transform .2s; }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card-pad { padding: clamp(20px, 3vw, 32px); }
.card-hover { transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s, border-color .25s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* ---------- Badges / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-pill); white-space: nowrap;
}
.pill-ok     { background: var(--ok-wash); color: var(--ok); }
.pill-warn   { background: var(--warn-wash); color: var(--warn); }
.pill-danger { background: var(--danger-wash); color: var(--danger); }
.pill-accent { background: var(--accent-wash); color: var(--accent); }
.pill-neutral{ background: var(--surface-2); color: var(--muted); }
.pill-ember  { background: var(--ember-wash); color: var(--ember); }

/* ---------- Alerts ---------- */
.alert {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 16px 20px; border-radius: var(--r-sm); font-size: .94rem;
  border: 1px solid transparent; border-left-width: 4px;
}
.alert i { margin-top: 3px; flex-shrink: 0; }
.alert-ok     { background: var(--ok-wash);     border-color: var(--ok);     color: var(--ok); }
.alert-warn   { background: var(--warn-wash);   border-color: var(--warn);   color: var(--warn); }
.alert-danger { background: var(--danger-wash); border-color: var(--danger); color: var(--danger); }
.alert-info   { background: var(--accent-wash); border-color: var(--accent); color: var(--accent); }
.alert strong { color: inherit; }
.alert .close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: .6; font-size: 1.2rem; line-height: 1; }
.alert .close:hover { opacity: 1; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .flabel { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.fhint { font-size: .78rem; color: var(--muted); }
.control { position: relative; display: block; }
.control > .ico {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .92rem; pointer-events: none;
}
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=tel], input[type=url], input[type=search],
select, textarea {
  width: 100%; font: inherit; font-size: .96rem; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid transparent;
  border-radius: var(--r-sm); padding: 13px 15px;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.control > .ico ~ input, .control > .ico ~ select { padding-left: 42px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
select { appearance: none; cursor: pointer; padding-right: 42px; }
.control.sel::after {
  content: ''; position: absolute; right: 17px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
input[type=file] {
  width: 100%; font-size: .88rem; color: var(--muted);
  background: var(--surface-2); border: 1.5px dashed var(--line);
  border-radius: var(--r-sm); padding: 12px 14px; cursor: pointer;
}
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; font-size: .84rem; margin-right: 14px;
  padding: 8px 16px; border: none; border-radius: var(--r-pill);
  background: var(--accent-wash); color: var(--accent); cursor: pointer;
}
input[type=color] { width: 100%; height: 46px; padding: 4px; cursor: pointer; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-sm); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2 .span-2 { grid-column: 1 / -1; } }

/* ---------- Tables ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data thead th {
  text-align: left; font-family: var(--f-display); font-size: .74rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  padding: 15px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data tbody td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover { background: var(--surface-2); }
.t-primary { font-weight: 600; color: var(--ink); }
.t-sub { font-size: .82rem; color: var(--muted); }
.empty-state { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty-state i { font-size: 2rem; opacity: .35; margin-bottom: 12px; }

/* ---------- Public nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand img { height: 36px; width: auto; }
.brand .bname { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.nav-links { display: none; align-items: center; gap: 30px; }
.nav-links a { font-size: .93rem; font-weight: 500; color: var(--body); position: relative; padding: 4px 0; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .22s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.on::after { width: 100%; }
.nav-links a.on { color: var(--ink); font-weight: 600; }
.nav-cta { display: none; align-items: center; gap: 10px; }
.burger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
@media (min-width: 940px) { .nav-links, .nav-cta { display: flex; } .burger { display: none; } }
.nav-mobile { display: none; border-top: 1px solid var(--line); background: var(--surface); padding: 10px 0 18px; }
.nav-mobile.open { display: block; }
.nav-mobile a { display: block; padding: 13px 24px; font-weight: 500; color: var(--body); }
.nav-mobile a:hover { background: var(--surface-2); color: var(--ink); }
.nav-mobile .m-cta { padding: 14px 24px 4px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Public footer ---------- */
.foot { background: var(--ink); color: var(--on-ink-dim); padding: 76px 0 34px; }
.foot h4 { color: var(--on-ink); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--f-mono); font-weight: 600; margin-bottom: 16px; }
.foot a { color: var(--on-ink-dim); transition: color .16s; }
.foot a:hover { color: var(--on-ink); }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 44px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1.3fr; gap: 60px; } }
.foot .bar { margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--ink-line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; }
.foot .bname { font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; color: var(--on-ink); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); padding: clamp(72px, 11vw, 132px) 0 0; }
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.11) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero .glow-a { position: absolute; width: 640px; height: 640px; right: -180px; top: -260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 62%, transparent), transparent 68%); filter: blur(28px); }
.hero .glow-b { position: absolute; width: 420px; height: 420px; left: -160px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--ember) 40%, transparent), transparent 70%); filter: blur(30px); }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 980px) { .hero-in { grid-template-columns: 1.08fr .92fr; gap: 64px; } }
.hero h1 { color: var(--on-ink); }
.hero h1 .hl { color: var(--ember); }
.hero .sub { color: var(--on-ink-dim); font-size: 1.13rem; max-width: 52ch; margin-top: 22px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-art { position: relative; }
.hero-art img { width: 100%; height: clamp(300px, 42vw, 430px); object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--ink-line); }
.hero-art .tag {
  position: absolute; left: -14px; bottom: 26px;
  background: var(--surface); color: var(--ink); border-radius: var(--r);
  padding: 15px 20px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 13px;
}
.hero-art .tag .n { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; color: var(--accent); line-height: 1; }
.hero-art .tag .l { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* Stats rail beneath hero */
.rail { position: relative; z-index: 2; margin-top: clamp(48px, 7vw, 84px); border-top: 1px solid var(--ink-line); }
.rail-in { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .rail-in { grid-template-columns: repeat(4, 1fr); } }
.rail-cell { padding: 26px 6px 30px; border-right: 1px solid var(--ink-line); }
.rail-cell:last-child { border-right: none; }
@media (max-width: 759px) { .rail-cell:nth-child(2n) { border-right: none; } .rail-cell:nth-child(-n+2) { border-bottom: 1px solid var(--ink-line); } }
.rail-cell .n { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--on-ink); line-height: 1; letter-spacing: -.03em; }
.rail-cell .l { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--on-ink-dim); margin-top: 8px; font-weight: 600; }

/* ---------- Section heading ---------- */
.sec-head { display: flex; flex-direction: column; gap: 14px; max-width: 62ch; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head.spread { max-width: none; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.sec-head.spread > div:first-child { max-width: 62ch; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Feature / program cards ---------- */
.tiles { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles.t3 { grid-template-columns: repeat(3, 1fr); } }
.tile { padding: 32px 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s, border-color .25s; }
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.tile .ic { width: 50px; height: 50px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 1.2rem; background: var(--accent-wash); color: var(--accent); margin-bottom: 20px; }
.tile h3 { margin-bottom: 10px; }
.tile .num { position: absolute; right: 20px; top: 14px; font-family: var(--f-display); font-weight: 800; font-size: 3.2rem; color: var(--line); line-height: 1; user-select: none; }
.band-ink .tile { background: rgba(255,255,255,.04); border-color: var(--ink-line); }
.band-ink .tile:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.25); }
.band-ink .tile .ic { background: rgba(255,255,255,.09); color: var(--ember); }
.band-ink .tile .num { color: rgba(255,255,255,.09); }

/* ---------- News cards ---------- */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 700px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news-card .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.3,1); }
.news-card:hover .thumb img { transform: scale(1.06); }
.news-card .cat { position: absolute; left: 14px; top: 14px; }
.news-card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card h3 { font-size: 1.12rem; }
.news-card .date { font-size: .8rem; color: var(--muted); font-family: var(--f-mono); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Auth split shell ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .auth { grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); } }
.auth-aside { display: none; position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); padding: 44px 48px; flex-direction: column; justify-content: space-between; }
@media (min-width: 1000px) { .auth-aside { display: flex; } }
.auth-aside::before { content:''; position:absolute; inset:0; opacity:.45; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 24px 24px; }
.auth-aside .beam { position: absolute; width: 560px; height: 560px; right: -230px; top: -200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 58%, transparent), transparent 70%); filter: blur(26px); }
.auth-aside .wedge { position: absolute; left: -40px; bottom: -80px; width: 0; height: 0; border-left: 160px solid transparent; border-right: 90px solid transparent; border-bottom: 330px solid color-mix(in srgb, var(--ember) 34%, transparent); transform: rotate(14deg); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 { color: var(--on-ink); font-size: clamp(1.9rem, 2.7vw, 2.6rem); max-width: 16ch; }
.auth-aside .said { color: var(--on-ink-dim); margin-top: 18px; max-width: 42ch; }
.auth-feats { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; }
.auth-feats div { display: flex; align-items: center; gap: 13px; font-size: .93rem; color: var(--on-ink-dim); }
.auth-feats i { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--ember); font-size: .85rem; flex-shrink: 0; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px 56px; background: var(--paper); }
.auth-box { width: 100%; max-width: 448px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; gap: 16px; }
.auth-mini-brand { display: inline-flex; align-items: center; gap: 10px; }
.auth-mini-brand img { height: 32px; }
@media (min-width: 1000px) { .auth-mini-brand { display: none; } }
.auth-back { font-size: .86rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.auth-back:hover { color: var(--accent); }

/* ---------- Panel (admin + member dashboard) ---------- */
.panel { min-height: 100vh; display: flex; background: var(--paper); }
.side {
  position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 70;
  background: var(--ink); color: var(--on-ink-dim);
  display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.8,.3,1);
}
.side.open { transform: none; }
@media (min-width: 1024px) { .side { position: sticky; top: 0; height: 100vh; transform: none; flex-shrink: 0; } }
.side-head { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--ink-line); flex-shrink: 0; }
.side-head .bname { font-family: var(--f-display); font-weight: 800; color: var(--on-ink); font-size: 1.08rem; letter-spacing: -.02em; }
.side-head .x { background: none; border: none; color: var(--on-ink-dim); font-size: 1.2rem; cursor: pointer; }
@media (min-width: 1024px) { .side-head .x { display: none; } }
.side-nav { flex: 1; overflow-y: auto; padding: 22px 14px; display: flex; flex-direction: column; gap: 3px; }
.side-cap { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.35); padding: 18px 12px 8px; }
.side-nav a {
  display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: var(--r-sm);
  font-size: .91rem; font-weight: 500; color: var(--on-ink-dim);
  transition: background .16s, color .16s;
}
.side-nav a i { width: 18px; text-align: center; font-size: .95rem; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: var(--on-ink); }
.side-nav a.on { background: var(--accent); color: #fff; font-weight: 600; }
.side-foot { padding: 16px 14px; border-top: 1px solid var(--ink-line); flex-shrink: 0; }
.side-foot a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--r-sm); color: #FF8A7A; font-weight: 600; font-size: .91rem; }
.side-foot a:hover { background: rgba(255,90,60,.14); }
.scrim { position: fixed; inset: 0; background: rgba(5,8,15,.6); backdrop-filter: blur(2px); z-index: 65; display: none; }
.scrim.on { display: block; }
@media (min-width: 1024px) { .scrim { display: none !important; } }

.panel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--nav-h); position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 clamp(16px, 3vw, 32px);
}
.topbar .tb-title { font-family: var(--f-display); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar .who .nm { font-size: .86rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.topbar .who .rl { font-size: .74rem; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-wash); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-family: var(--f-display); flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.panel-body { padding: clamp(22px, 3.5vw, 38px) clamp(16px, 3vw, 32px) 64px; flex: 1; }

/* Panel stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; align-items: center; gap: 16px; }
.stat .ic { width: 46px; height: 46px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.stat .n { font-family: var(--f-display); font-weight: 800; font-size: 1.65rem; color: var(--ink); line-height: 1.1; letter-spacing: -.02em; }
.stat .l { font-size: .78rem; color: var(--muted); font-weight: 600; }

.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.panel-card > header { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-card > header h3 { font-size: 1.02rem; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 13px 18px; font-size: .89rem; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Icon buttons in tables */
.iconbtn {
  width: 34px; height: 34px; border-radius: var(--r-sm); display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
  transition: all .16s; font-size: .82rem;
}
.iconbtn:hover { transform: translateY(-1px); }
.iconbtn.ok:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.iconbtn.warn:hover { background: var(--warn); border-color: var(--warn); color: #fff; }
.iconbtn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.iconbtn.accent:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(5,8,15,.72); backdrop-filter: blur(4px); }
.modal.on { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--r-lg); max-width: 620px; width: 100%; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-box header { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-box .mb-body { padding: 24px; }

/* Search box (client-side filter) */
.searchbox { position: relative; min-width: 240px; }
.searchbox i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.searchbox input { padding-left: 40px; }

/* Progress */
.progress { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .4s; }

/* Member card (digital ID) */
.idcard {
  position: relative; overflow: hidden; width: 100%; max-width: 420px;
  aspect-ratio: 1.586; border-radius: var(--r-lg); background: var(--ink); color: var(--on-ink);
  padding: 24px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-lg); border: 1px solid var(--ink-line);
}
.idcard::before { content:''; position:absolute; inset:0; opacity:.4; background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); background-size: 18px 18px; }
.idcard .beam { position: absolute; width: 300px; height: 300px; right: -110px; top: -130px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 65%, transparent), transparent 70%); filter: blur(14px); }
.idcard .wedge { position: absolute; right: 28%; top: 0; width: 4px; height: 110px; background: linear-gradient(var(--ember), transparent); transform: skewX(-18deg); }
.idcard > * { position: relative; z-index: 1; }
.idcard .nm { font-family: var(--f-display); font-weight: 800; font-size: 1.32rem; color: #fff; letter-spacing: -.02em; line-height: 1.15; }
.idcard .lbl { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 600; }
.idcard .reg { font-family: var(--f-mono); font-weight: 700; color: var(--ember); font-size: .88rem; }
.idcard .qr { width: 54px; height: 54px; background: #fff; border-radius: 7px; padding: 3px; }

@media print {
  body * { visibility: hidden; }
  .idcard, .idcard * { visibility: visible; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .idcard { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); box-shadow: none; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
