/* ==========================================================================
EduNav — admin.css
Admin panel stylesheet. Loaded AFTER assets/css/style.css and reuses its
:root tokens (colours, radii, shadows, easing, type scale).
Nothing here redefines a global token and nothing here restates the reset.
Contract: DESIGN-SPEC.md § 8.
========================================================================== */

/* --------------------------------------------------------------------------
1. Shell
-------------------------------------------------------------------------- */

.adm {
  /* ------------------------------------------------ CONTRAST AND DEPTH

     Two measured faults, both of which read as «hazy» rather than as a
     colour anybody could name.

     1. --muted is #8A93A5, which is 3.09:1 on white. WCAG AA wants 4.5 for
        normal text, and --muted is what the SMALLEST text on every screen
        uses: the table column headings (2.93:1 — the worst on the site), the
        second line of every row, the sidebar's group labels and the account's
        role. The labels that name things were the hardest to read on the page.

     2. The page, the cards and the sidebar were #F8F9FC, #FFFFFF and #FFFFFF
        — 1.05:1 between them. Nothing was in front of anything: a card had a
        hairline and a soft shadow and otherwise dissolved into the page, and
        the sidebar's white nav cards sat on white with nothing to lift from,
        which is why the menu looked flat.

     So: one darker grey that passes, and a depth ladder that can be seen —
     page #E9EEF5, sidebar #F5F7FB, cards and nav rows #FFFFFF. Scoped to
     .adm; the public site keeps its own palette untouched. */
  --muted: #6B7384;

  /* The gold that labels «gözləyir» and «məktəb». #B0891F on its own pale
     grounds is 2.97:1 and 3.10:1 — the two lowest readings on the screen,
     and they are the chips that carry the counts. #8A6A16 is the same
     ochre four steps down: 4.61 on --warn-bg, 4.81 on --brand-soft, 5.06 on
     white. Both tokens are foregrounds in here, so nothing is refilled. */
  --warn: #8A6A16; --brand-dark: #8A6A16;

  /* The green of «Aktiv». #2E7D4F on --ok-bg is 4.499:1 — under 4.5 by a
     thousandth, on the most repeated chip in the panel. #2C7A4C is the
     nearest step that passes: 4.69 on --ok-bg, 5.26 on white. */
  --ok: #2C7A4C;

  /* The dimmer tiers, clamped rather than kept. --muted-2 (#9AA3B2) and
     --muted-3 (#A6AEBB) exist to be fainter than --muted, and on white they
     measure 2.7 and 2.4 — they were carrying the dashboard card notes, the
     facet manager's headings and the pager's «…». A tier that cannot be read
     is not a tier, so in here they are the same grey that passes; the
     hierarchy is carried by size and weight, which it already was.
     --text-2 joins them: 4.48 on --surface is a miss by a hair. */
  --muted-2: #6B7384; --muted-3: #6B7384; --text-2: #5B6577;

  /* #C2415C is 4.26 on its own pale ground — the «rədd edildi» chip. */
  --danger: #B23950;

  --adm-side-w: 248px; --adm-rail-w: 72px; --adm-top-h: 68px; --adm-gap: 20px; --adm-pad: 26px;
  /* The sidebar is LIGHT. It was a dark navy panel, which made the back
     office a different product from the site it administers — the public
     pages are white with one yellow accent, and so is this now. The four
     tokens below are what the sidebar paints with; they were named
     «--adm-on-dark» when there was a dark to be on. */
  /* A shade darker than --muted, because this one is read on the sidebar's
     tint rather than on white: the same grey measures 4.76 on #FFFFFF and
     4.44 on #F5F7FB, and 4.44 is under the line. */
  --adm-side-bg: #F5F7FB; --adm-side-fg: var(--text); --adm-side-fg-dim: #677085;
  --adm-hair: var(--line-4); --adm-hover: var(--surface-2);

  /* A softer surface, scoped to the back office and nothing else.
     Bigger radii, a hairline instead of a border, and a shadow doing the
     separating — a card should look placed on the page rather than cut out
     of it. The public pages keep their own --r-* values. */
  --adm-r: 16px; --adm-r-sm: 12px; --adm-gutter: 12px;
  --adm-edge: 1px solid var(--line-4);
  --adm-lift: 0 1px 2px rgba(15, 20, 32, .04), 0 8px 24px -12px rgba(15, 20, 32, .12);
  display: block; min-height: 100vh;
  background: #E9EEF5; color: var(--ink);
}
/* Shared scrim for the off-canvas sidebar and the detail drawer.
   `.adm-side-backdrop` is the name PARTIALS.md block 8b ships. */
.adm-scrim, .adm-side-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(15, 20, 32, .55); opacity: 0; visibility: hidden;
  pointer-events: none; transition: opacity .28s var(--ease), visibility .28s var(--ease);
}
.adm-scrim.is-on, .adm-side-backdrop.is-on,
/* admin.js flags the open off-canvas state on the .adm root, not on the scrim */
.adm.is-side-open .adm-scrim, .adm.is-side-open .adm-side-backdrop {
  opacity: 1; visibility: visible; pointer-events: auto;
}

/* --------------------------------------------------------------------------
2. Sidebar
-------------------------------------------------------------------------- */

/* The sidebar is a CARD, not a wall.
   It was flush to three edges of the window, which is what made the back
   office read as a different, older product: everything else on the screen —
   every panel, every stat card — is a rounded surface floating on the page,
   and the navigation was the one thing cut into the frame. Now it floats
   with them, and the page colour runs all the way round it. */
/* ------------------------------------------------------- the menu, in full

   Sixteen rows, five group labels and an account block, and every row is a
   card: at the comfortable size that is 1023px of menu, which fits a sidebar
   only on a screen about 1220px tall. Everything shorter — which is every
   laptop — scrolled, and the last group («Sistem») and the account block sat
   below the fold where nothing said they were there.

   So the metrics are knobs rather than numbers, and they step down as the
   window gets shorter. The design does not change: same cards, same lift,
   same tinted chips. The rows just stop being generous about their padding
   before they start being hidden. Below about 715px it scrolls again, because
   at that point the rows would be smaller than a finger.

   The steps are measured, not guessed: each one is checked against the
   SHORTEST window it has to serve, so adding a row to the menu means measuring
   them again.
   -------------------------------------------------------------------------- */
:root {
  --adm-nav-row-pad: 7px 10px; --adm-nav-ico: 30px; --adm-nav-gap: 6px;
  --adm-nav-label-fs: 11px; --adm-nav-label-pb: 8px;
  --adm-nav-group-mt: 12px; --adm-nav-group-pt: 6px;
  --adm-user-mt: 18px; --adm-user-pad: 14px 10px 4px;
}

@media (max-height: 1220px) {
  :root {
    --adm-nav-row-pad: 5px 10px; --adm-nav-ico: 28px; --adm-nav-gap: 5px;
    --adm-nav-label-pb: 7px; --adm-nav-group-mt: 10px; --adm-nav-group-pt: 5px;
    --adm-user-mt: 14px; --adm-user-pad: 12px 10px 2px;
  }
}

@media (max-height: 1080px) {
  :root {
    --adm-nav-row-pad: 4px 10px; --adm-nav-ico: 26px; --adm-nav-gap: 4px;
    --adm-nav-label-pb: 6px; --adm-nav-group-mt: 8px; --adm-nav-group-pt: 3px;
    --adm-user-mt: 12px; --adm-user-pad: 10px 10px 2px;
  }
}

@media (max-height: 970px) {
  :root {
    --adm-nav-row-pad: 3px 9px; --adm-nav-ico: 24px; --adm-nav-gap: 2px;
    --adm-nav-label-fs: 10px; --adm-nav-label-pb: 4px;
    --adm-nav-group-mt: 5px; --adm-nav-group-pt: 2px;
    --adm-user-mt: 9px; --adm-user-pad: 8px 10px 0;
  }
}

@media (max-height: 830px) {
  :root {
    --adm-nav-row-pad: 2px 9px; --adm-nav-ico: 22px; --adm-nav-gap: 1px;
    --adm-nav-label-pb: 2px; --adm-nav-group-mt: 4px; --adm-nav-group-pt: 0px;
    --adm-user-mt: 5px; --adm-user-pad: 7px 10px 0;
  }
  /* The card's own margins are worth six rows of menu down here. */
  .adm-side { padding-top: 10px; padding-bottom: 10px; }
}

.adm-side {
  position: fixed; top: var(--adm-gutter); left: var(--adm-gutter); bottom: var(--adm-gutter);
  z-index: 80; display: flex; flex-direction: column; width: var(--adm-side-w);
  padding: 16px 12px 12px; background: var(--adm-side-bg);
  /* A firmer edge and a deeper lift than a content card gets: the sidebar is
     the one panel that is always there, and --adm-edge (#EEF1F5) let it end
     without saying so. */
  border: 1px solid var(--line-5); border-radius: var(--adm-r);
  box-shadow: 0 1px 2px rgba(15, 20, 32, .05), 0 12px 32px -14px rgba(15, 20, 32, .22);
  overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-color: var(--line-5) transparent;
  transition: width .26s var(--ease), transform .28s var(--ease);
}
.adm-side::-webkit-scrollbar { width: 6px; }
.adm-side::-webkit-scrollbar-thumb { border-radius: var(--r-pill); background: var(--line-5); }
.adm-side::-webkit-scrollbar-track { background: transparent; }
/* Brand -------------------------------------------------------------------
   PARTIALS.md block 8b wraps the shared .logo block and the mobile close
   button in .adm-side-head, so the row lives on the wrapper and the logo
   itself is re-pointed at the shared .logo / .logo-mark / .logo-text. */
.adm-side-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 8px;
  margin-bottom: 22px;
}
.adm-side .logo { color: var(--ink); text-decoration: none; border-radius: var(--r-xs); }
.adm-side .logo:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.adm-side .logo-mark {
  display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px;
  border-radius: var(--r-xxs); background: var(--brand); color: var(--ink);
}
.adm-side .logo-mark svg { width: 19px; height: 19px; }
/* The public header's own .logo-text, unchanged: the sidebar is the site's
   own white now, so the shared colour is the right one. */
.adm-side .logo-text {
  font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -.026em;
  color: var(--ink); white-space: nowrap;
}
.adm-side .logo-text b { font-weight: 700; color: var(--brand); }
/* Legacy .adm-brand* markup (the two login cards). It was white for the dark
   sidebar it used to share; there is no dark surface in the back office now. */
.adm-brand {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; color: var(--ink);
  text-decoration: none; border-radius: var(--r-xs);
}
.adm-brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.adm-brand-mark {
  display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px;
  border-radius: var(--r-xxs); background: var(--brand); color: var(--ink);
}
.adm-brand-mark svg { width: 19px; height: 19px; }
.adm-brand-text {
  font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -.026em;
  white-space: nowrap;
}
.adm-brand-text b { font-weight: 700; color: var(--brand); }
/* Sidebar close button — only visible in off-canvas mode. */
.adm-side-close {
  display: none; place-items: center; flex: 0 0 auto; width: 34px; height: 34px;
  padding: 0; border: 1px solid var(--line-4); border-radius: var(--r-ctl); background: transparent;
  color: var(--ink); font: inherit; cursor: pointer;
}
.adm-side-close svg { width: 16px; height: 16px; }
.adm-side-close:hover { background: var(--adm-hover); }
.adm-side-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Nav --------------------------------------------------------------------- */
/* PARTIALS.md block 8b emits a flat sequence: <p class="adm-nav-group"> group
   labels interleaved with .adm-nav-link anchors — .adm-nav-group is the LABEL. */
/* Grows to push the account block to the foot of a tall sidebar, and does NOT
   shrink on a short one. It was `1 1 auto; min-height: 0`, which let the flex
   column squeeze the nav below its own content — and since the nav does not
   scroll, the links spilled out of their box and painted straight over
   .adm-user: on a 640px window the name and the role sat on top of «Müraciətlər»
   and «Namizədlər». .adm-side already carries `overflow: hidden auto` and a
   styled scrollbar, so refusing to shrink hands the overflow to the scroller
   that was always meant to take it. */
.adm-nav { display: flex; flex-direction: column; gap: var(--adm-nav-gap); flex: 1 0 auto; }
.adm-nav-group, .adm-nav-group-label {
  flex: 0 0 auto;
  padding: 0 10px var(--adm-nav-label-pb); font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700;
  font-size: var(--adm-nav-label-fs);
  line-height: 1; letter-spacing: .16em; text-transform: uppercase; color: var(--adm-side-fg-dim);
  white-space: nowrap;
}
.adm-nav-group + .adm-nav-link, .adm-nav-group-label + .adm-nav-link { margin-top: 0; }
/* Space, not a rule: once every row is a card with an edge of its own, a
   divider between them is one line too many. */
.adm-nav-link + .adm-nav-group, .adm-nav-link + .adm-nav-group-label {
  margin-top: var(--adm-nav-group-mt); padding-top: var(--adm-nav-group-pt);
}
/* Every row is a card of its own — raised, not merely tinted on hover. A flat
   list reads as text; these read as the places they open. */
.adm-nav-link {
  position: relative; display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding: var(--adm-nav-row-pad);
  border: var(--adm-edge); border-radius: 12px; background: var(--bg);
  box-shadow: 0 1px 2px rgba(15, 20, 32, .05), 0 4px 12px -8px rgba(15, 20, 32, .16);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 14px; line-height: 1.2;
  color: var(--ink); text-decoration: none;
  transition: box-shadow .18s var(--ease), transform .18s var(--ease), background-color .18s var(--ease);
}
.adm-nav-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(15, 20, 32, .06), 0 10px 20px -10px rgba(15, 20, 32, .22);
}
.adm-nav-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* The open one is the brand's: filled, and lifted a little further than the
   rest so the eye lands on it before it reads a word. */
/* FILLED, not tinted. It was --brand-soft (#FFF9E8) with a yellow border — a
   white row and a nearly-white row side by side, and you had to look for
   which one was open. The brand yellow is the one thing in the back office
   that should be unmistakable, and this is where it belongs. */
.adm-nav-link.is-active {
  background: var(--brand); border-color: var(--brand-deep);
  box-shadow: 0 2px 5px rgba(15, 20, 32, .08), 0 12px 22px -10px rgba(176, 137, 31, .55);
  color: var(--ink); font-weight: 700;
}

/* Every icon in a chip of its own. It is what separates a list of links from
   a list of PLACES — and in the 72px rail below, the chip is the whole row. */
.adm-nav-ico {
  display: grid; place-items: center; flex: 0 0 auto;
  width: var(--adm-nav-ico); height: var(--adm-nav-ico);
  border-radius: 9px; background: var(--surface-2); color: var(--text);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
/* One tint per group of the menu — the same thing the heading says, in colour. */
.adm-nav-ico--info { background: var(--info-bg); color: var(--info); }
.adm-nav-ico--ok   { background: var(--ok-bg);   color: var(--ok); }
.adm-nav-ico--kg   { background: var(--kg-3);    color: var(--kg-text); }
.adm-nav-ico--warn { background: var(--warn-bg); color: var(--warn); }
.adm-nav-link.is-active .adm-nav-ico { background: var(--ink); color: var(--brand); }
/* the class sits on the <svg> itself in PARTIALS.md, so sizing is one rule */
.adm-nav-icon {
  display: block; flex: 0 0 auto; width: 18px; height: 18px; color: currentColor;
}
.adm-nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-nav-badge, .adm-nav-count {
  margin-left: auto; padding: 3px 7px; border-radius: var(--r-pill); background: var(--surface-2);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700; font-size: 11px; line-height: 1; color: var(--ink);
}
.adm-nav-link.is-active .adm-nav-badge, .adm-nav-link.is-active .adm-nav-count {
  background: var(--ink); color: var(--brand);
}
/* User block pinned to the bottom ----------------------------------------- */
.adm-user, .adm-side-user {
  display: flex; align-items: center; gap: 10px;
  margin-top: var(--adm-user-mt); padding: var(--adm-user-pad);
  border-top: 1px solid var(--line-4);
}
.adm-side-user-avatar, .adm-side .adm-avatar {
  display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: var(--r-pill);
  background: var(--brand); color: var(--ink); font-family: Lexend, system-ui, sans-serif; font-weight: 700;
  font-size: 14px;
}
.adm-user-text, .adm-side-user-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.adm-user-name, .adm-side-user-name {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700; font-size: 13px; line-height: 1.1; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.adm-user-role, .adm-side-user-role {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 11.5px; line-height: 1;
  color: var(--adm-side-fg-dim);
}
.adm-side-user-out {
  display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; margin-left: auto; padding: 0;
  border: 0; border-radius: var(--r-xs); background: transparent; color: var(--adm-side-fg); font: inherit;
  cursor: pointer; transition: background-color .18s var(--ease), color .18s var(--ease);
}
.adm-side-user-out svg { width: 16px; height: 16px; }
.adm-side-user-out:hover { background: var(--adm-hover); color: var(--ink); }
.adm-side-user-out:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* --------------------------------------------------------------------------
3. Main column + top bar
-------------------------------------------------------------------------- */

.adm-main {
  display: flex; flex-direction: column; min-height: 100vh; min-width: 0;
  margin-left: calc(var(--adm-side-w) + var(--adm-gutter) * 2);
  background: var(--surface); transition: margin-left .26s var(--ease);
}
/* THE HEADER. It holds the two things that belong to the shell rather than to
   any one screen: the search, and the screen's own actions hoisted out of the
   page so that the top of every screen has the same shape.

   It is sticky and translucent rather than a solid band — the page scrolls
   under it and stays visible through it, which is what keeps a fixed header
   from reading as a lid. */
.adm-top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px var(--adm-pad);
  background: rgba(233, 238, 245, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}

/* The search takes the room, the actions take what they need. A max-width so
   that on a very wide screen the field stops growing into a runway. */
.adm-find-form { position: relative; flex: 1 1 auto; max-width: 520px; min-width: 0; }
.adm-find-ico {
  position: absolute; top: 50%; left: 13px; transform: translateY(-50%);
  display: grid; place-items: center; color: var(--muted); pointer-events: none;
}
.adm-find-input {
  width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: var(--r-pill);
  background: var(--bg); font-size: 13.5px;
}
.adm-find-input::-webkit-search-cancel-button { cursor: pointer; }

.adm-top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.adm-top-actions:empty { display: none; }

@media (max-width: 768px) {
  .adm-top { gap: 10px; min-height: 56px; border-bottom: 1px solid var(--line-4); }
  /* The burger and the field; the actions drop to their own line rather than
     squeezing a 40px field down to nothing. */
  .adm-top { flex-wrap: wrap; }
  .adm-find-form { max-width: none; }
  .adm-top-actions { margin-left: auto; }
}
/* PARTIALS.md block 8c ships three <span class="burger-line"> children here,
   exactly like the public .burger — column flex, not a single SVG. */
.adm-burger {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  flex: 0 0 auto; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line-5); border-radius: var(--r-xs); background: var(--bg); color: var(--ink);
  font: inherit; cursor: pointer;
}
.adm-burger svg { width: 18px; height: 18px; }
.adm-burger .burger-line { width: 16px; }
.adm-burger:hover { border-color: var(--ink); }
.adm-burger:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-top-title {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; margin-right: auto;
  font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 20px; line-height: 1.2;
  letter-spacing: -.026em; color: var(--ink);
}
.adm-top-sub {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 12.5px; line-height: 1;
  letter-spacing: 0; color: var(--muted);
}
.adm-top-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
/* Top search -------------------------------------------------------------- */
.adm-top-search { position: relative; display: flex; align-items: center; width: 280px; max-width: 100%; }
.adm-top-search-icon {
  position: absolute; left: 12px; display: flex; align-items: center; color: var(--muted); pointer-events: none;
}
.adm-top-search-icon svg { width: 16px; height: 16px; }
/* the input also carries .input from style.css — these must win on both */
.adm-top .adm-top-input {
  box-sizing: border-box; width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--line-3);
  border-radius: var(--r-xs); background: var(--bg); font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500;
  font-size: 13.5px; color: var(--ink); transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.adm-top .adm-top-input::placeholder { color: var(--muted-2); font-weight: 400; }
.adm-top .adm-top-input:hover { border-color: var(--line-3); }
.adm-top .adm-top-input:focus { outline: 0; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(36, 48, 73, .1); }
/* Bell + avatar ----------------------------------------------------------- */
.adm-bell {
  position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line-3); border-radius: var(--r-xs); background: var(--bg); color: var(--ink-2);
  font: inherit; cursor: pointer; transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.adm-bell svg { width: 17px; height: 17px; }
.adm-bell:hover { border-color: var(--ink); }
.adm-bell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-bell-dot {
  position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border: 2px solid var(--bg);
  border-radius: var(--r-pill); background: var(--danger);
}
.adm-avatar {
  display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; font-family: Lexend, system-ui, sans-serif; font-weight: 700;
  font-size: 13.5px; text-decoration: none; overflow: hidden;
}
.adm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.adm-avatar:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Content region ----------------------------------------------------------- */
.adm-content { flex: 1 1 auto; min-width: 0; padding: var(--adm-pad) var(--adm-pad) 46px; }

/* --------------------------------------------------------------------------
4. Grids
-------------------------------------------------------------------------- */

.adm-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--adm-gap);
  margin-bottom: var(--adm-gap);
}
.adm-grid:last-child { margin-bottom: 0; }
.adm-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-grid--wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.adm-grid--narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }

/* --------------------------------------------------------------------------
5. Stat cards
-------------------------------------------------------------------------- */

.adm-stat {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 16px; border: var(--adm-edge);
  border-radius: var(--adm-r); background: var(--bg); box-shadow: var(--adm-lift);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
/* A card lifts a little on hover and no more. The 2px hop plus a heavy shadow
   read as a button; these are not buttons, they are figures. */
.adm-stat:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(15, 20, 32, .05), 0 16px 32px -16px rgba(15, 20, 32, .18); }
.adm-stat-head { display: flex; align-items: center; gap: 12px; }
.adm-stat-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.adm-stat-ico {
  display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand-soft); color: var(--brand-dark);
}
.adm-stat-ico svg { width: 18px; height: 18px; }
.adm-stat-ico--info { background: var(--info-bg); color: var(--info); }
.adm-stat-ico--ok { background: var(--ok-bg); color: var(--ok); }
.adm-stat-ico--kg { background: var(--kg-3); color: var(--kg-text); }
.adm-stat-ico--warn { background: var(--warn-bg); color: var(--warn); }
/* Sentence case beside the figure, not a small-caps banner above it: the
   label is read once, the number every time. */
.adm-stat-label {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 12.5px; line-height: 1.2;
  letter-spacing: 0; text-transform: none; color: var(--muted);
}
.adm-stat-value {
  font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: clamp(22px, 2vw, 28px);
  line-height: 1.05; letter-spacing: -.026em; color: var(--ink);
}
.adm-stat-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px;
}
.adm-stat-delta {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: var(--r-pill);
  background: var(--ok-bg); font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700; font-size: 11.5px;
  line-height: 1; color: var(--ok);
}
.adm-stat-delta svg { width: 11px; height: 11px; }
.adm-stat-delta.badge--danger, .adm-stat-delta.adm-stat-delta--down {
  background: var(--danger-bg); color: var(--danger);
}
.adm-stat-delta.badge--warn { background: var(--warn-bg); color: var(--warn); }
.adm-stat-delta.badge--info { background: var(--info-bg); color: var(--info); }
.adm-stat-note {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 12px; line-height: 1;
  color: var(--muted-2);
}
.adm-spark { display: block; width: 100%; height: 38px; margin-top: 2px; overflow: visible; }
.adm-spark path, .adm-spark polyline {
  fill: none; stroke: var(--brand-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.adm-spark .adm-spark-fill { fill: rgba(255, 198, 41, .16); stroke: none; }
.adm-spark--info path, .adm-spark--info polyline { stroke: var(--info); }
.adm-spark--info .adm-spark-fill { fill: rgba(44, 99, 196, .12); }
.adm-spark--ok path, .adm-spark--ok polyline { stroke: var(--ok); }
.adm-spark--ok .adm-spark-fill { fill: rgba(46, 125, 79, .12); }
.adm-spark--danger path, .adm-spark--danger polyline { stroke: var(--danger); }
.adm-spark--danger .adm-spark-fill { fill: rgba(194, 65, 92, .12); }

/* --------------------------------------------------------------------------
6. Panels
-------------------------------------------------------------------------- */

.adm-panel {
  display: flex; flex-direction: column; min-width: 0; border: var(--adm-edge); border-radius: var(--adm-r);
  background: var(--bg); box-shadow: var(--adm-lift); overflow: hidden;
}
.adm-panel + .adm-panel { margin-top: var(--adm-gap); }
/* ...but not inside a grid, where the next panel is the next COLUMN, not the
   next row. There the margin pushed the second panel 20px down while both
   still ended on the same line, so two side-by-side panels were 20px apart in
   height and visibly misaligned at the top. A grid already spaces its children
   with gap — on both axes — so the adjacency margin is wrong in every case. */
.adm-grid > .adm-panel + .adm-panel { margin-top: 0; }
.adm-panel-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 15px 18px;
  border-bottom: 1px solid var(--line-4);
}
.adm-panel-title {
  min-width: 0; margin-right: auto; font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 16px;
  line-height: 1.25; letter-spacing: -.019em; color: var(--ink);
}
.adm-panel-sub {
  width: 100%; margin-top: -4px; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 400; font-size: 13px;
  line-height: 1.5; color: var(--text-2);
}
.adm-panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.adm-panel-body { padding: 18px; }
.adm-panel-body--flush { padding: 0; }
.adm-panel-body--tight { padding: 12px 14px; }
/* margin-top:auto pins the foot to the bottom of a panel the grid has stretched
   taller than its content — a short panel beside a tall chart used to leave its
   footer strip floating with dead space underneath. A panel at its natural
   height has no free space to absorb, so nothing moves there. */
.adm-panel-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding: 13px 18px;
  border-top: 1px solid var(--line-4); background: var(--surface);
}

/* --------------------------------------------------------------------------
7. Toolbar
-------------------------------------------------------------------------- */

.adm-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: var(--adm-gap); }
.adm-toolbar-title {
  font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 18px; line-height: 1.2;
  letter-spacing: -.026em; color: var(--ink);
}
.adm-toolbar-count {
  padding: 5px 10px; border-radius: var(--r-pill); background: var(--surface-2);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 12.5px; line-height: 1;
  color: var(--text);
}
.adm-toolbar-spacer { margin-left: auto; }
.adm-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* --------------------------------------------------------------------------
8. Filters
-------------------------------------------------------------------------- */

.adm-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--bg); margin-bottom: var(--adm-gap);
}
.adm-filters .dd { min-width: 168px; }
.adm-filters-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.adm-filters-sep { width: 1px; height: 24px; background: var(--line-2); }
.adm-filter-search { position: relative; display: flex; align-items: center; flex: 1 1 220px; min-width: 180px; }
.adm-filter-search svg {
  position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.adm-filter-search input {
  width: 100%; height: 40px; padding: 0 12px 0 36px; border: 1px solid var(--line-3); border-radius: var(--r-xs);
  background: var(--bg); font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 13.5px;
  color: var(--ink); transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.adm-filter-search input::placeholder { color: var(--muted-2); font-weight: 400; }
.adm-filter-search input:focus {
  outline: 0; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(36, 48, 73, .1);
}
.adm-filters-reset {
  margin-left: auto; padding: 8px 12px; border: 0; border-radius: var(--r-xs); background: transparent;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 13px; line-height: 1;
  color: var(--text); cursor: pointer; transition: color .18s var(--ease), background-color .18s var(--ease);
}
.adm-filters-reset:hover { background: var(--surface-2); color: var(--ink); }
.adm-filters-reset:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* The search and what acts on it — «Süz», the count, the reset — travel as
   one group. Each used to wrap on its own, so where the bar ran out of room
   it broke wherever it happened to: at 1440px «Bloglar» put «Filtri sıfırla»
   alone on a second line, «Elanlar» the count and the reset. Now the group
   either fits on the line with the chips and the drop-downs, at no less
   than 460px — a search of about 200px beside its three neighbours, as
   «Namizədlər» had at 1912px — or takes the whole second line, its search as
   wide as that line allows. On a phone it wraps inside itself. */
.adm-filters-find { display: flex; flex: 1 1 460px; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.adm-filters-find .adm-filter-search { flex: 1 1 220px; }
/* «Müəssisələr» has no search box — the owner struck it out; the one at the
   top of every screen finds institutions — and closes its bar with «Yeni
   əlavə et». What is left in the group (Süz, the count, the reset, the
   button) asks only for its own width, so at 1905 it shares the first line
   with the chips and the drop-downs, the reset and the button pushed to the
   end; where it cannot, it takes the next line whole, as the group does. */
.adm-filters-find--bare { flex-basis: auto; }
/* A bar with nothing to filter — «Şəbəkələr», «Paketlər» — is the count
   chips and the screen's one button, pushed to the end as «Yeni əlavə et»
   is on «Müəssisələr». */
.adm-filters-end,
.adm-tabs-end { margin-left: auto; }

/* The way back at the end of a tab strip: an arrow and the words, and on a
   phone the arrow alone. A strip at 375px is one scrolling line, and the
   words left «Siyahıya qayıt» half off the screen. The words stay in the
   link for a screen reader. */
.adm-tabs-end { display: inline-flex; align-items: center; gap: 6px; }
.adm-tabs-end svg { flex: none; width: 15px; height: 15px; }
/* A record's strip ends in the head's three — the way back, the site,
   «Redaktə et»: the first is pushed to the end, the rest follow it. */
.adm-tabs-end + .adm-tabs-end { margin-left: 0; }
@media (max-width: 560px) {
  .adm-tabs-end { padding-left: 10px; padding-right: 10px; }
  .adm-tabs-end-text {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* --------------------------------------------------------------------------
9. Tables
-------------------------------------------------------------------------- */

.table-wrap {
  width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line-5) transparent;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { border-radius: var(--r-pill); background: var(--line-5); }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap--tall { max-height: 62vh; overflow-y: auto; }
.adm-table {
  width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 13.5px; color: var(--text);
}
.adm-table thead th {
  position: sticky; top: 0; z-index: 2; padding: 12px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line-2); font-weight: 700; font-size: 11.5px; line-height: 1.2;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; white-space: nowrap;
}
.adm-table tbody td,
.adm-table tbody th {
  padding: 15px 16px; border-bottom: 1px solid var(--line-4); vertical-align: middle; color: var(--text);
}
/* A row header is a cell, not a heading: without this it took the browser's
   own «bold and CENTRED», so every table whose first column is <th scope=row>
   — the branches list, the networks list — sat its names in mid-column. */
.adm-table tbody th { font-weight: 500; text-align: left; }
.adm-table tbody tr { transition: background-color .16s var(--ease); }
.adm-table tbody tr:hover { background: var(--surface-2); }
.adm-table tbody tr.is-selected { background: var(--brand-soft); }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tfoot td {
  padding: 12px 14px; border-top: 1px solid var(--line-2); background: var(--surface); font-weight: 700;
  color: var(--ink);
}
/* Checkbox column --------------------------------------------------------- */
.adm-table th.adm-col-check, .adm-table td.adm-col-check { width: 44px; padding-right: 0; text-align: left; }
.adm-check {
  appearance: none; -webkit-appearance: none; box-sizing: border-box; display: inline-grid; place-items: center;
  width: 18px; height: 18px; margin: 0; padding: 0; border: 1.5px solid var(--line-5); border-radius: var(--r-ctl);
  background: var(--bg); cursor: pointer;
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
}
.adm-check::after {
  content: ""; width: 9px; height: 5px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg) translate(1px, -1px); opacity: 0; transition: opacity .14s var(--ease);
}
.adm-check:hover { border-color: var(--muted); }
.adm-check:checked, .adm-check:indeterminate { background: var(--brand); border-color: var(--brand-deep); }
.adm-check:checked::after { opacity: 1; }
.adm-check:indeterminate::after {
  width: 9px; height: 0; border-left: 0; border-bottom: 2px solid var(--ink); transform: none; opacity: 1;
}
.adm-check:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Sortable headers --------------------------------------------------------
   The link fills its <th> and carries the cell's padding itself, so the
   whole heading is the target. The <th> must then drop its own: no template
   ever set .is-sortable, so on /admin/muessiseler the two paddings stacked —
   a 61px heading row where every other table has 39, and each heading 14px
   to the right of the column under it. :has() finds the link without the
   class, for the institution panel's <button> headings as much as for the
   admin's anchors. Flex rather than inline-flex: an inline box in the <th>
   sat on a line box and added its strut to the height. */
.adm-table th.is-sortable,
.adm-table thead th:has(> .adm-sort) { padding: 0; }
.adm-sort {
  display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; padding: 12px 16px;
  border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); text-align: left; cursor: pointer;
  transition: color .16s var(--ease);
}
.adm-sort:hover { color: var(--ink); }
.adm-sort:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.adm-sort-ico {
  display: inline-grid; place-items: center; width: 12px; height: 12px; color: var(--muted-3);
  transition: transform .18s var(--ease), color .18s var(--ease);
}
.adm-sort-ico svg { width: 10px; height: 10px; }
.adm-table th[aria-sort="ascending"] .adm-sort, .adm-table th[aria-sort="descending"] .adm-sort {
  color: var(--ink);
}
.adm-table th[aria-sort="ascending"] .adm-sort-ico, .adm-table th[aria-sort="descending"] .adm-sort-ico {
  color: var(--ink);
}
.adm-table th[aria-sort="descending"] .adm-sort-ico { transform: rotate(180deg); }
/* A COLUMN IS READ UP ONE EDGE, and its heading belongs on that edge.

   `.adm-table thead th` is text-align: left for every table in here, while
   `.adm-cell-num` is right and `.adm-cell-actions` is justify-content:
   flex-end. So on twelve screens the heading of a figure column sat over the
   wrong end of its own column — «VAKANSİYA» hard left above a cell whose «10»
   was hard right, with the eye asked to bridge 150px of nothing.

   The heading has to be told, because CSS cannot see from a <th> to the cells
   beneath it: no selector reaches down a column. Hence the class, on the
   heading of every column whose cells are right-aligned.

   Measured, not eyeballed: on /admin/paketler the six figure columns had
   their headings 0px from the right edge of their own cells afterwards, and
   /admin/muessiseler's sortable «Baxış» needed one more correction below. */
.adm-table th.adm-col-num { text-align: right; }
/* The sortable heading is a link filling the <th>, so it needs its main
   axis turned round. Its 16px of padding is the cell's 16px, now that the
   <th> pads nothing — measured: arrow and figures end on the same pixel. */
.adm-table th.adm-col-num .adm-sort { justify-content: flex-end; }

/* The search results: one panel per kind of row, rows as plain links. It is a
   list of places to go, so nothing here is a table — there are no columns to
   line up and every row answers the same one question. */
.adm-find .adm-panel-head--tags .adm-panel-actions { align-items: center; }
.adm-find-more { margin-left: auto; }
.adm-find-list { margin: 0; padding: 0; list-style: none; }
.adm-find-list li + li { border-top: 1px solid var(--line-4); }
.adm-find-row {
  display: block; padding: 11px 16px; color: inherit; text-decoration: none;
  transition: background-color .16s var(--ease);
}
.adm-find-row:hover { background: var(--surface-2); }
.adm-find-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* THE WORK LIST — the dashboard's middle band. Rows, not cards: the page
   already has eight cards, and this is a to-do, read top to bottom. Two
   columns on a wide screen so a row is not a runway from its label to its
   count; the count is the loudest thing in the row because it is the answer. */
.adm-work {
  /* Two columns, not auto-fit: auto-fit gave three at 1440px and left the
     fourth row alone on a line of its own. */
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
  margin: 0; padding: 4px 18px 6px; list-style: none;
}
@media (max-width: 900px) { .adm-work { grid-template-columns: minmax(0, 1fr); } }
.adm-work li { border-bottom: 1px solid var(--line-4); }
.adm-work-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 2px;
  color: inherit; text-decoration: none; border-radius: var(--r-xs);
}
.adm-work-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-work-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-work-label {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700; font-size: 14px; line-height: 1.2;
  color: var(--ink);
}
.adm-work-row:hover .adm-work-label { text-decoration: underline; text-underline-offset: 3px; }
.adm-work-n {
  margin-left: auto; font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 22px;
  line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.adm-work-go {
  flex: 0 0 auto; width: 16px; height: 16px; color: var(--muted);
  transition: transform .16s var(--ease), color .16s var(--ease);
}
.adm-work-row:hover .adm-work-go { transform: translateX(2px); color: var(--ink); }
.adm-work-panel { display: flex; flex-direction: column; }
.adm-work-panel .adm-panel-foot { margin-top: auto; }

/* Cell helpers ------------------------------------------------------------- */
.adm-cell-main {
  display: block; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700; font-size: 13.5px;
  line-height: 1.3; color: var(--ink); text-decoration: none;
}
a.adm-cell-main:hover { text-decoration: underline; text-underline-offset: 2px; }
.adm-cell-sub {
  display: block; margin-top: 3px; font-weight: 500; font-size: 12px; line-height: 1; color: var(--muted);
}
.adm-cell-num {
  font-family: Lexend, system-ui, sans-serif; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink); text-align: right;
}
.adm-cell-media { display: flex; align-items: center; gap: 11px; min-width: 0; }
.adm-thumb {
  display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: var(--r-xs);
  background: linear-gradient(140deg, #0F1420, #243049); color: rgba(255, 255, 255, .78);
  font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 14px; overflow: hidden;
}
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-cell-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.adm-icobtn {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent;
  border-radius: var(--r-ctl); background: transparent; color: var(--text); font: inherit; text-decoration: none;
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.adm-icobtn svg { width: 16px; height: 16px; }
.adm-icobtn:hover { border-color: var(--line-3); background: var(--bg); color: var(--ink); }
.adm-icobtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.adm-icobtn--danger:hover { border-color: var(--danger-bg); background: var(--danger-bg); color: var(--danger); }
.adm-icobtn--ok:hover { border-color: var(--ok-bg); background: var(--ok-bg); color: var(--ok); }
/* The eye of a record the site does not show: a place-holder, not a button. */
.adm-icobtn--off { color: var(--muted); cursor: default; }
.adm-icobtn--off:hover { border-color: transparent; background: transparent; color: var(--muted); }
/* Pager -------------------------------------------------------------------- */
.adm-pager {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 18px;
  border-top: 1px solid var(--line-4); background: var(--bg);
}
.adm-pager-info {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 12.5px; line-height: 1;
  color: var(--muted);
}
.adm-pager-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.adm-pager-btn {
  display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 9px;
  border: 1px solid var(--line-3); border-radius: var(--r-ctl); background: var(--bg);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 13px; line-height: 1;
  color: var(--text); text-decoration: none; cursor: pointer;
  transition: border-color .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease);
}
.adm-pager-btn svg { width: 14px; height: 14px; }
.adm-pager-btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.adm-pager-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.adm-pager-btn.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.adm-pager-gap { padding: 0 4px; color: var(--muted-3); font-size: 13px; }

/* --------------------------------------------------------------------------
10. Tags
-------------------------------------------------------------------------- */

.adm-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700; font-size: 11.5px;
  line-height: 1.4; color: var(--text); white-space: nowrap;
}
.adm-tag svg { width: 11px; height: 11px; }
.adm-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: var(--r-pill); background: currentColor; opacity: .6;
}
.adm-tag--ok { background: var(--ok-bg); color: var(--ok); }
.adm-tag--warn { background: var(--warn-bg); color: var(--warn); }
.adm-tag--danger { background: var(--danger-bg); color: var(--danger); }
.adm-tag--info { background: var(--info-bg); color: var(--info); }
.adm-tag--brand { background: var(--brand-soft); color: var(--brand-dark); }
.adm-tag--kg { background: var(--kg-3); color: var(--kg-text); }
.adm-tag--plain::before { display: none; }

/* --------------------------------------------------------------------------
11. Activity log
-------------------------------------------------------------------------- */

.adm-log { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.adm-log-item {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 0 12px 4px;
  border-bottom: 1px solid var(--line-4);
}
.adm-log-item:last-child { border-bottom: 0; padding-bottom: 0; }
.adm-log-item:first-child { padding-top: 0; }
.adm-log-dot {
  display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; margin-top: 1px;
  border-radius: var(--r-pill); background: var(--surface-2); color: var(--text);
}
.adm-log-dot svg { width: 14px; height: 14px; }
.adm-log-dot--ok { background: var(--ok-bg); color: var(--ok); }
.adm-log-dot--warn { background: var(--warn-bg); color: var(--warn); }
.adm-log-dot--danger { background: var(--danger-bg); color: var(--danger); }
.adm-log-dot--info { background: var(--info-bg); color: var(--info); }
.adm-log-body { min-width: 0; flex: 1 1 auto; }
.adm-log-text {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 13.5px; line-height: 1.5;
  color: var(--text);
}
.adm-log-text b { font-weight: 700; color: var(--ink); }
.adm-log-time {
  display: block; margin-top: 3px; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 12px;
  line-height: 1; color: var(--muted-2);
}

/* --------------------------------------------------------------------------
12. Empty state
-------------------------------------------------------------------------- */

.adm-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 52px 24px 56px; text-align: center;
}
.adm-empty-ico {
  display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 4px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--muted);
}
.adm-empty-ico svg { width: 26px; height: 26px; }
.adm-empty-title {
  font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 17px; line-height: 1.3;
  letter-spacing: -.019em; color: var(--ink);
}
.adm-empty-text {
  max-width: 380px; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 400; font-size: 13.5px;
  line-height: 1.55; color: var(--text-2);
}
.adm-empty-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px;
}

/* --------------------------------------------------------------------------
13. Detail drawer
-------------------------------------------------------------------------- */

/* A centred dialog, not a side sheet. `inset: 0` + `margin: auto` centres the
   box in both axes; `height: fit-content` is what lets the vertical half of
   that work while the height still grows with the content up to max-height.
   The body scrolls inside, so the head and the action footer stay put. */
.adm-drawer {
  position: fixed; inset: 0; margin: auto; z-index: 90; display: flex; flex-direction: column;
  width: min(640px, calc(100vw - 32px)); height: fit-content; max-height: min(85vh, 780px);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--sh-4); overflow: hidden;
  transform: translateY(10px) scale(.985); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .26s var(--ease), opacity .2s var(--ease), visibility .2s var(--ease);
}
.adm-drawer.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
.adm-drawer-head {
  display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-4);
}
.adm-drawer-title {
  min-width: 0; margin-right: auto; font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 18px;
  line-height: 1.25; letter-spacing: -.026em; color: var(--ink);
}
.adm-drawer-sub {
  display: block; margin-top: 4px; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 12.5px;
  line-height: 1; letter-spacing: 0; color: var(--muted);
}
/* Eight short labels with eight small counts. As .adm-kv rows they cost more
   height than the panel around them; as one wrapped row they cost 56px and say
   exactly the same thing. */
.adm-tagcloud {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0; padding: 0;
  list-style: none;
}
.adm-tagcloud .adm-tag b { margin-left: 5px; font-weight: 700; color: var(--ink); }

/* Something a parent wrote, shown back to staff — set as a quotation so it does
   not read as the panel's own copy. */
.adm-drawer-note {
  margin: 0; padding: 10px 12px; border-left: 3px solid var(--line-3);
  border-radius: 0 var(--r-xs) var(--r-xs) 0; background: var(--surface);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 13.5px; line-height: 1.55;
  color: var(--ink); white-space: pre-line; overflow-wrap: anywhere;
}
/* margin-left: auto puts it in the corner. The title's own margin-right
   never could: every drawer wraps the title and its subtitle in a <div>, so
   the auto margin pushed nothing, and «×» sat beside the words — on «Yeni
   xəbər» 270px in from the corner of a 640px card. */
.adm-drawer-close {
  display: grid; place-items: center; flex: 0 0 auto; margin-left: auto; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line-3); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink);
  font: inherit; cursor: pointer; transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.adm-drawer-close svg { width: 15px; height: 15px; }
.adm-drawer-close:hover { border-color: var(--ink); background: var(--surface-2); }
.adm-drawer-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-drawer-body {
  flex: 1 1 auto; min-height: 0; padding: 18px 20px 24px; overflow-y: auto; overscroll-behavior: contain;
}
/* A refusal shown in the drawer it sent back open («Yeni hesab»): the
   page's own «Bildiriş» bar is under the scrim. The tag may wrap here. */
.adm-drawer-alert { margin: 0 0 16px; }
.adm-drawer-alert .adm-tag { white-space: normal; }
/* A field shown, not chosen — «Müəssisə hesabı»'s school: the disabled
   ground, the text still read at full strength. */
.adm-drawer .input[readonly] { background: var(--surface-2); color: var(--text); cursor: default; }
.adm-drawer .input[readonly]:hover { border-color: var(--line-3); }
.adm-drawer-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 20px;
  border-top: 1px solid var(--line-4); background: var(--surface);
}
/* Key/value rows used inside the drawer and detail panels. */
.adm-kv {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px 14px; margin: 0;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 13.5px;
}
.adm-kv-k { font-weight: 600; color: var(--muted); }
.adm-kv-v { margin: 0; font-weight: 500; color: var(--ink); }

/* --------------------------------------------------------------------------
14. Tabs (detail pages)
-------------------------------------------------------------------------- */

/* A ROW of pills, not a pill holding tabs. Each stop is a card of its own —
   the same object the menu rows are — so the strip reads as a set of places
   rather than one control with segments. (The period chooser, .adm-seg, IS
   one control and keeps its track.) */
/* position: relative so the strip is the containing block of what it holds.
   On a phone the record's end buttons hide their words the screen-reader
   way — position: absolute — and with no positioned ancestor inside the
   strip those words were laid out where the strip would have run on, 516px
   along, outside its scroll clip: a phone then drew the whole record at
   375/516 of its size to fit them. */
.adm-tabs {
  position: relative;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: var(--adm-gap);
}
.adm-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px;
  border: var(--adm-edge); border-radius: var(--r-pill); background: var(--bg);
  box-shadow: 0 1px 2px rgba(15, 20, 32, .05);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 13.5px; line-height: 1;
  color: var(--ink); text-decoration: none; cursor: pointer;
  transition: box-shadow .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease);
}
.adm-tab:hover { box-shadow: 0 2px 6px rgba(15, 20, 32, .09); }
.adm-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --------------------------------------------------------------------------
15. Form tweaks inside the admin shell
-------------------------------------------------------------------------- */

.adm .field + .field { margin-top: 14px; }
.adm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
/* The grid owns the spacing through `gap`, so the stacking margin above has to
   go. It needs the `.adm` in front of it: without it this is (0,2,0) against
   the (0,3,0) of `.adm .field + .field`, so it lost and every field but the
   first kept a 14px top margin — which pushed the second column of the first
   row 14px below the first, and gave every later row 28px of separation
   instead of 14. */
.adm .adm-form-grid .field { margin-top: 0; }
/* `gap` separates rows inside one grid; it does nothing between two grids, so
   stacked ones butted together with 0px between them. */
.adm .adm-form-grid + .adm-form-grid { margin-top: 14px; }
.adm-form-grid .field--full { grid-column: 1 / -1; }
.adm-form-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line-4);
}

/* --------------------------------------------------------------------------
16. Admin login (admin/daxil-ol.html)
-------------------------------------------------------------------------- */

.adm-login {
  display: grid; place-items: center; min-height: 100vh; padding: 40px 20px;
  background: radial-gradient(620px 320px at 50% -6%, rgba(255, 198, 41, .18), transparent 70%), var(--surface);
}
.adm-login-card {
  width: 100%; max-width: 420px; padding: 30px 30px 26px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg); box-shadow: var(--sh-3);
}
.adm-login-brand {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--ink);
  text-decoration: none;
}
.adm-login-brand:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.adm-login-brand .adm-brand-mark { width: 36px; height: 36px; }
.adm-login-brand .adm-brand-text { font-size: 20px; color: var(--ink); }
.adm-login-title {
  font-family: Lexend, system-ui, sans-serif; font-weight: 700; font-size: 24px; line-height: 1.2;
  letter-spacing: -.026em; color: var(--ink);
}
.adm-login-sub {
  margin-top: 7px; margin-bottom: 22px; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 400;
  font-size: 14px; line-height: 1.55; color: var(--text-2);
}
.adm-login-form { display: flex; flex-direction: column; gap: 14px; }
/* «Parolunuz təyin edildi» — the setup link or the reset code sent them here. */
.adm-login-note {
  margin: 0; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--ok-bg); color: var(--ok); font-size: 13.5px; font-weight: 600; line-height: 1.45;
}
.adm-login-form .btn-brand { width: 100%; justify-content: center; }
.adm-login-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 13px; color: var(--text);
}
.adm-login-link { font-weight: 600; color: var(--text); text-decoration: none; }
.adm-login-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.adm-login-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-login-note {
  margin-top: 18px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 12.5px;
  line-height: 1.55; color: var(--text-2);
}
.adm-login-note b { font-weight: 700; color: var(--ink); }
.adm-login-foot {
  margin-top: 20px; text-align: center; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500;
  font-size: 12.5px; line-height: 1.5; color: var(--muted);
}
.adm-login-foot a { color: var(--text); text-decoration: none; font-weight: 600; }
.adm-login-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* --------------------------------------------------------------------------
17. Responsive — 1280px
-------------------------------------------------------------------------- */

@media (max-width: 1280px) {
  .adm { --adm-pad: 22px; --adm-gap: 16px; }
  .adm-grid--wide, .adm-grid--narrow { grid-template-columns: minmax(0, 1fr); }
  .adm-search, .adm-top-search { width: 220px; }
}

/* A head that carries only figures: no title to sit beside, so the chips run
   the width of it and the row loses the height a heading needed. */
.adm-panel-head--tags { padding-top: 12px; padding-bottom: 12px; }
.adm-panel-head--tags .adm-panel-actions { flex-wrap: wrap; margin-left: 0; }

/* A segmented period control — the reference's pill row, in our own palette.
   One control, one job: it never holds an action, only a choice between
   mutually exclusive views of the same figure. */
.adm-seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: var(--r-pill); background: var(--surface-2);
}
.adm-seg-btn {
  padding: 5px 12px; border-radius: var(--r-pill);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 12.5px; line-height: 1;
  /* --text, not --muted: this sits on the control's grey track rather than
     on white, where --muted measures 4.40. */
  color: var(--text); text-decoration: none; white-space: nowrap;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.adm-seg-btn:hover { color: var(--ink); }
.adm-seg-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* The macOS segmented control: a white thumb that slides on a grey track,
   not a black pill. The selected segment is raised, not inverted. */
.adm-seg-btn.is-on {
  background: var(--bg); color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 20, 32, .1), 0 0 0 .5px rgba(15, 20, 32, .06);
}

/* --------------------------------------------------------------------------
18. Responsive — 1024px: sidebar becomes a 72px icon rail
-------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .adm { --adm-pad: 20px; }
  .adm-side { width: var(--adm-rail-w); padding: 16px 8px 12px; overflow: visible auto; }
  .adm-main { margin-left: calc(var(--adm-rail-w) + var(--adm-gutter) * 2); }
  .adm-side-head, .adm-brand { justify-content: center; padding: 0; }
  .adm-side .logo-text,
  .adm-brand-text, .adm-nav-text, .adm-nav-badge, .adm-nav-count,
  .adm-user-text, .adm-side-user-meta, .adm-side-user-out { display: none; }
  .adm-nav { gap: 2px; }
  .adm-nav-group, .adm-nav-group-label {
    height: 1px; padding: 0; margin: 6px 12px 8px; overflow: hidden; color: transparent;
    background: var(--adm-hair);
  }
  .adm-nav-link + .adm-nav-group, .adm-nav-link + .adm-nav-group-label { padding-top: 0; }
  .adm-nav-link {
    justify-content: center; padding: 5px 0; border-color: transparent; background: transparent;
    box-shadow: none;
  }
  .adm-nav-link:hover { transform: none; box-shadow: none; }
  .adm-nav-link.is-active { background: transparent; border-color: transparent; box-shadow: none; }
  /* The rail suppresses the row's fill, so the yellow moves back onto the
     chip: the open item is marked in brand yellow either way — by the row
     when there is a row, by the chip when the row is 72px of icon. */
  .adm-nav-link.is-active .adm-nav-ico { background: var(--brand); color: var(--ink); }
  .adm-user, .adm-side-user { justify-content: center; padding: 12px 0 4px; }
  /* Rail tooltips */
  .adm-nav-link[data-tip]::after {
    content: attr(data-tip); position: absolute; top: 50%; left: calc(100% + 12px); z-index: 5; padding: 6px 10px;
    border-radius: var(--r-xs); background: var(--ink-2); box-shadow: var(--sh-1);
    font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 12.5px; line-height: 1; color: #fff;
    white-space: nowrap; transform: translateY(-50%); opacity: 0; pointer-events: none;
    transition: opacity .16s var(--ease);
  }
  .adm-nav-link:hover[data-tip]::after, .adm-nav-link:focus-visible[data-tip]::after { opacity: 1; }
  .adm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid--wide, .adm-grid--narrow { grid-template-columns: minmax(0, 1fr); }
  .adm-top-title { font-size: 18px; }
  .adm-search, .adm-top-search { width: 190px; }
  .adm-drawer { width: min(560px, calc(100vw - 28px)); }
}

/* --------------------------------------------------------------------------
19. Responsive — 768px: off-canvas sidebar
-------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .adm { --adm-pad: 16px; --adm-gap: 14px; }
  /* closed off-canvas sidebar must leave the tab order, like the public .drawer */
  .adm-side {
    width: var(--adm-side-w); max-width: 84vw; padding: 16px 12px 12px; transform: translateX(-110%);
    box-shadow: none; visibility: hidden; pointer-events: none;
    transition: width .26s var(--ease), transform .28s var(--ease), visibility .28s var(--ease);
  }
  /* Off-canvas: the card slides in from the edge and keeps its own margin. */
  .adm-main { margin-left: 0; }
  .adm-side.is-open,
  .adm.is-side-open .adm-side {
    transform: translateX(0); box-shadow: var(--sh-4); visibility: visible; pointer-events: auto;
  }
  .adm-side-close { display: grid; }
  .adm-side-head, .adm-brand { justify-content: space-between; padding: 0 8px; }
  .adm-side .logo-text,
  .adm-brand-text, .adm-nav-text, .adm-nav-badge, .adm-nav-count,
  .adm-user-text, .adm-side-user-meta, .adm-side-user-out { display: block; }
  .adm-side .logo-text { display: block; }
  .adm-nav-badge, .adm-nav-count { display: inline-block; }
  .adm-user-text, .adm-side-user-meta { display: flex; }
  .adm-side-user-out { display: grid; }
  .adm-nav { gap: 2px; }
  .adm-nav-group, .adm-nav-group-label {
    height: auto; padding: 0 10px 8px; margin: 0; overflow: visible; color: var(--muted);
    background: transparent;
  }
  .adm-nav-link + .adm-nav-group, .adm-nav-link + .adm-nav-group-label { padding-top: 18px; }
  .adm-nav-link { justify-content: flex-start; padding: 10px 12px; }
  .adm-nav-link[data-tip]::after { content: none; }
  .adm-user, .adm-side-user { justify-content: flex-start; padding: 14px 10px 4px; }
  .adm-main { margin-left: 0; }
  .adm-burger { display: flex; }
  .adm-top { gap: 10px; padding: 10px var(--adm-pad); }
  .adm-top-title { font-size: 17px; }
  .adm-top-sub { display: none; }
  .adm-search, .adm-top-search { display: none; }
  .adm-grid, .adm-grid--2, .adm-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid--wide, .adm-grid--narrow { grid-template-columns: minmax(0, 1fr); }
  .adm-panel-head { padding: 13px 14px; }
  .adm-panel-body { padding: 14px; }
  .adm-panel-foot, .adm-pager { padding: 12px 14px; }
  .adm-form-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-toolbar-actions { width: 100%; margin-left: 0; }
  .adm-filters { padding: 12px; }
  .adm-filters-sep { display: none; }
  .adm-filters .dd, .adm-filter-search { flex: 1 1 160px; min-width: 140px; }
  .adm-filters-reset { margin-left: 0; }
  .adm-drawer { width: calc(100vw - 20px); max-height: 90vh; border-radius: var(--r-md); }
  .adm-kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .adm-kv-v { margin-bottom: 8px; }
}

/* --------------------------------------------------------------------------
20. Responsive — 560px / 390px
-------------------------------------------------------------------------- */

@media (max-width: 560px) {
  .adm { --adm-pad: 14px; }
  .adm-content { padding: 16px 14px 40px; }
  .adm-grid, .adm-grid--2, .adm-grid--3, .adm-grid--wide, .adm-grid--narrow {
    grid-template-columns: minmax(0, 1fr);
  }
  .adm-stat { padding: 14px 15px 12px; }
  .adm-stat-value { font-size: 26px; }
  .adm-toolbar { gap: 8px; }
  .adm-toolbar-title { font-size: 17px; }
  .adm-pager { gap: 8px; }
  .adm-pager-info { width: 100%; order: 2; }
  .adm-pager-nav { order: 1; margin-left: 0; width: 100%; flex-wrap: wrap; }
  .adm-login-card { padding: 24px 20px 22px; border-radius: var(--r-md); }
  .adm-login-title { font-size: 21px; }
  .adm-empty { padding: 40px 16px 44px; }
}

@media (max-width: 390px) {
  .adm-top-title { font-size: 16px; }
  .adm-bell { display: none; }
  .adm-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .adm-tab { white-space: nowrap; }
}

/* --------------------------------------------------------------------------
21. Print + reduced motion
-------------------------------------------------------------------------- */

@media print {
  .adm-side, .adm-top, .adm-drawer, .adm-scrim, .adm-side-backdrop, .adm-filters, .adm-cell-actions, .adm-pager {
    display: none !important;
  }
  .adm-main { margin-left: 0; }
  .adm-panel { break-inside: avoid; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .adm *,
  .adm *::before,
  .adm *::after,
  .adm-side,
  .adm-scrim,
  .adm-side-backdrop,
  .adm-drawer,
  .adm-login *,
  .adm-login *::before,
  .adm-login *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .adm-stat:hover { transform: none; }
}

/* --------------------------------------------------------------------------
22. Runtime markup — the classes assets/js/admin.js writes into the DOM
    Added by the admin markup-reference pass (COMPONENTS-ADMIN.md, § "CSS added").
    Sections 1–21 were authored for hand-written markup; admin.js generates a
    second, different shape for the same components. Without the rules below
    those components are not merely unstyled, they are broken:
      · the bulk bar is permanently visible reading "0 seçildi";
      · renderPager() replaces .adm-pager-nav/.adm-pager-btn.is-active with
        .adm-pager-btns/.adm-pager-num.is-on, which had no rule at all;
      · drawSpark() emits .adm-spark-area/-line/-dot, and the generic
        `.adm-spark path{fill:none;stroke:…}` rule turns the area fill into a
        stroked outline;
      · drawBars() and AdmToast.toast() emit whole components with no rules;
      · AdmTable's only live-search hook, `input.adm-search`, is display:none
        below 768px because § 19 wrote that rule for a top-bar search.
    Nothing here redefines a token, and nothing overrides a § 1–21 rule except
    where the comment above it says why.
-------------------------------------------------------------------------- */

/* 22.1 Bulk-selection bar --------------------------------------------------
   AdmTable toggles .is-on + aria-hidden on the FIRST .adm-toolbar inside the
   table scope. The § 7 .adm-toolbar is always visible, so the bulk bar needs a
   modifier that starts hidden. Keep the page-level .adm-toolbar outside
   [data-adm-table] or it gets picked up as the bulk bar instead. */
.adm-toolbar--bulk {
  display: none; gap: 10px; margin: 0; padding: 11px 18px; border-bottom: 1px solid var(--line-4);
  background: var(--brand-soft);
}
.adm-toolbar--bulk.is-on { display: flex; }
.adm-toolbar--bulk .adm-toolbar-count { background: var(--bg); color: var(--ink); }
.adm-toolbar--bulk .adm-toolbar-actions { gap: 8px; }

/* 22.2 Table live-search inside .adm-filters -------------------------------
   `input.adm-search` is AdmTable's only search hook. Sections 17–19 shrink it
   to 220/190px and then hide it, because those rules were written for a search
   sitting in .adm-top. A search inside the filters bar must survive them. */
.adm-filter-search .adm-search { display: block; width: 100%; }

/* 22.3 Generated pager -----------------------------------------------------
   renderPager() writes .adm-pager-info + .adm-pager-btns > .adm-pager-btn,
   .adm-pager-num[.is-on], .adm-pager-gap. The authored no-JS shape
   (.adm-pager-nav + .adm-pager-btn.is-active) is already styled in § 9. */
.adm-pager-btns { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.adm-pager-num {
  display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 9px;
  border: 1px solid var(--line-3); border-radius: var(--r-ctl); background: var(--bg);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 13px; line-height: 1;
  color: var(--text); cursor: pointer;
  transition: border-color .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease);
}
.adm-pager-num:hover { border-color: var(--ink); color: var(--ink); }
.adm-pager-num:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-pager-num.is-on { border-color: var(--ink); background: var(--ink); color: #fff; cursor: default; }

/* 22.4 Detail-drawer scrim -------------------------------------------------
   AdmDrawer appends .adm-drawer-scrim to <body> and toggles the `hidden`
   attribute on it (style.css ships [hidden]{display:none!important}), so this
   element only needs its visible state. .adm-scrim in § 1 is the sidebar's. */
.adm-drawer-scrim {
  position: fixed; inset: 0; z-index: 85; background: rgba(15, 20, 32, .55);
  animation: adm-scrim-in .24s var(--ease) both;
}
@keyframes adm-scrim-in { from { opacity: 0; } to { opacity: 1; } }

/* 22.5 Generated sparkline -------------------------------------------------
   drawSpark() replaces the container's contents with
   <svg class="adm-spark is-up|is-down"> containing .adm-spark-area (a closed
   path), .adm-spark-line and .adm-spark-dot, all painted with currentColor.
   The class list on that <svg> is rewritten on every redraw, so the colour
   variant has to live on the [data-adm-spark] CONTAINER, not on the svg. */
[data-adm-spark] { display: block; width: 100%; height: 38px; color: var(--brand-deep); }
[data-adm-spark].adm-spark--info { color: var(--info); }
[data-adm-spark].adm-spark--ok { color: var(--ok); }
[data-adm-spark].adm-spark--danger { color: var(--danger); }
/* beats `.adm-spark path{fill:none;stroke:var(--brand-deep)}` on class count */
.adm-spark .adm-spark-area { fill: currentColor; fill-opacity: .16; stroke: none; }
.adm-spark .adm-spark-line { fill: none; stroke: currentColor; }
.adm-spark .adm-spark-dot { fill: currentColor; stroke: none; }

/* 22.6 Generated bar chart -------------------------------------------------
   drawBars() writes <svg class="adm-bars"> with .adm-bars-base, one
   .adm-bar-group per column holding .adm-bar[.is-peak], .adm-bar-value and
   .adm-bar-label. Every shape paints with currentColor, so the colour is set
   on the element, not on fill/stroke. .is-animated lands on the container. */
[data-adm-bars] { display: block; width: 100%; height: 240px; }
.adm-bars { display: block; width: 100%; height: 100%; overflow: visible; }
.adm-bars-base { color: var(--line-2); }
.adm-bar { color: var(--brand); transition: color .18s var(--ease); }
.adm-bar.is-peak { color: var(--brand-deep); }
.adm-bar-group:hover .adm-bar { color: var(--ink); }
.adm-bar-value {
  color: var(--ink); font-family: Lexend, system-ui, sans-serif; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.adm-bar-label { color: var(--muted); font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; }
[data-adm-bars].is-animated .adm-bar {
  transform-box: fill-box; transform-origin: 50% 100%; animation: adm-bar-in .5s var(--ease) both;
}
@keyframes adm-bar-in { from { transform: scaleY(.02); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

/* 22.7 Toasts --------------------------------------------------------------
   window.admToast(msg, type, action) appends .adm-toasts to <body> and fills
   it with .adm-toast.adm-toast--ok|--danger|--warn|--info holding
   .adm-toast-dot, .adm-toast-msg, an optional .adm-toast-action and
   .adm-toast-close. Enter/exit are the .is-in / .is-out classes. */
.adm-toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column-reverse;
  gap: 10px; width: min(360px, calc(100vw - 40px)); pointer-events: none;
}
.adm-toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 11px 11px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg);
  box-shadow: var(--sh-3); font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600;
  font-size: 13.5px; line-height: 1.4; color: var(--ink); opacity: 0; transform: translateY(12px);
  pointer-events: auto; transition: opacity .24s var(--ease), transform .24s var(--ease);
}
.adm-toast.is-in { opacity: 1; transform: none; }
.adm-toast.is-out { opacity: 0; transform: translateY(12px); }
.adm-toast-dot {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: var(--r-pill); background: var(--ok);
}
.adm-toast--danger .adm-toast-dot { background: var(--danger); }
.adm-toast--warn .adm-toast-dot { background: var(--warn); }
.adm-toast--info .adm-toast-dot { background: var(--info); }
.adm-toast-msg { flex: 1 1 auto; min-width: 0; }
.adm-toast-action {
  flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--line-3); border-radius: var(--r-pill);
  background: var(--bg); font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.adm-toast-action:hover { border-color: var(--ink); background: var(--surface-2); }
.adm-toast-action:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.adm-toast-close {
  display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0;
  border-radius: var(--r-ctl); background: transparent; color: var(--muted); font: inherit; cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.adm-toast-close svg { width: 14px; height: 14px; }
.adm-toast-close:hover { background: var(--surface-2); color: var(--ink); }
.adm-toast-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 560px) {
  .adm-toasts { right: 12px; bottom: 12px; left: 12px; width: auto; }
}

@media print {
  .adm-toasts, .adm-drawer-scrim, .adm-toolbar--bulk { display: none !important; }
}

/* 22.8 Panel that must not clip a dropdown ---------------------------------
   § 6 gives .adm-panel `overflow:hidden` so a table's corners stay rounded.
   That also clips any absolutely-positioned .dd-panel opened inside
   .adm-panel-body, which makes every admin form with a dropdown unusable.
   Form panels opt out; table panels keep the clip. */
.adm-panel--overflow { overflow: visible; }

/* ==========================================================================
   23. Notification panel — opened by the top-bar bell (AdmBell in admin.js).
   ========================================================================== */

.adm-top-actions { position: relative; }

.adm-bell-panel {
  position: absolute; z-index: 80;
  top: calc(100% + 10px); right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 14px 16px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
}
.adm-bell-panel[hidden] { display: none; }

.adm-bell-panel-title {
  margin: 0 0 10px;
  font: 700 13px/1 var(--font-head, Lexend), sans-serif;
  letter-spacing: -.01em;
}
.adm-bell-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.adm-bell-list li {
  display: flex; align-items: center; gap: 9px;
  font: 500 13px/1.4 var(--font-body, Manrope), sans-serif;
  color: var(--text);
}
.adm-bell-all {
  display: block; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line-4);
  font: 600 13px/1 var(--font-body, Manrope), sans-serif;
  color: var(--ink);
}
.adm-bell-all:hover { color: var(--brand-dark); }

/* ==========================================================================
   ADVERTISING RAILS  —  /admin/reklamlar
   --------------------------------------------------------------------------
   One card per creative, each its own <form> so a save touches exactly the row
   the operator edited. The preview keeps the recommended 244 x 860 shape, which
   is the only reliable way to see what will be cropped before publishing.
   ========================================================================== */

/* auto-fit, not auto-fill: a rail holds three creatives, and at 1912px
   auto-fill laid out four tracks and left the fourth empty — a card's width
   of nothing at the end of every rail. auto-fit lets the three share the
   row. A card never grows past 640px, so a rail of one is not a runway.
   And never wider than the rail: min(360px, 100%) — on a 375px phone the
   rail is 300-odd pixels and a 360px floor pushed every card 33px out. */
.adm-ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 18px;
}

.adm-ad {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  grid-template-areas: "shot fields" "foot foot";
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  max-width: 640px;
}

.adm-ad-shot {
  grid-area: shot;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 244 / 860;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.adm-ad-shot img { width: 100%; height: 100%; object-fit: cover; }
/* A paused creative still has to be legible enough to judge, so it is dimmed
   rather than greyed out entirely. */
.adm-ad-shot.is-off { opacity: .38; }

.adm-ad-none {
  padding: 0 8px;
  font: 600 11px/1.4 var(--font-body, Manrope), sans-serif;
  text-align: center;
  color: var(--muted);
}

.adm-ad-fields { grid-area: fields; display: grid; gap: 12px; align-content: start; }
/* The rail and the order side by side: the rail is a word, the order a
   number of one or two digits. Half and half cut «Sol rels» to «Sol re…»
   while the order box stood two-thirds empty. */
.adm-ad-fields .adm-form-grid { grid-template-columns: minmax(0, 1fr) 84px; gap: 12px; }

.adm-ad-foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-4);
}
.adm-ad-foot .adm-icobtn { margin-left: auto; }

@media (max-width: 640px) {
  .adm-ad { grid-template-columns: 86px minmax(0, 1fr); }
}

/* ==========================================================================
   INSTITUTION ACCOUNT  —  setup link panel on /admin/muessise-detal
   ========================================================================== */

.adm-hesab .adm-panel-note {
  margin: 0;
  font: 400 13.5px/1.6 var(--font-body, Manrope), sans-serif;
  color: var(--text-2);
}

/* The field is read-only and long; it gets the room and the button stays put. */
.adm-copy { display: flex; gap: 8px; align-items: center; margin: 8px 0 10px; }
.adm-copy .input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.adm-copy .btn-brand { flex: none; }

.adm-hesab .adm-panel-foot { display: flex; align-items: center; gap: 12px; }
.adm-hesab .adm-panel-foot form { margin: 0; }

/* ==========================================================================
   LOCKED PROFILE  (.adm-lock)  —  read mode on /admin/muessise-detal
   --------------------------------------------------------------------------
   A disabled fieldset is the right mechanism — nothing inside it can be
   focused or submitted — but the browser's default rendering greys the values
   into near-illegibility. The record still has to be readable, so the lock is
   shown by removing the affordances (borders, carets, hover) rather than by
   fading the content.
   ========================================================================== */

.adm-lock { min-width: 0; margin: 0; padding: 0; border: 0; }

.adm-lock.is-locked .input,
.adm-lock.is-locked .textarea,
.adm-lock.is-locked select {
  border-color: transparent;
  background: var(--surface-2);
  color: var(--ink);
  opacity: 1;
  -webkit-text-fill-color: var(--ink);
  cursor: default;
}
.adm-lock.is-locked select { appearance: none; }

/* Checkboxes cannot lose their box, so they lose their contrast instead —
   ticked stays obvious, unticked recedes. */
.adm-lock.is-locked input[type="checkbox"],
.adm-lock.is-locked input[type="radio"] { opacity: .55; }

.adm-lock.is-locked .field-hint { opacity: .7; }
.adm-lock.is-locked .btn-ghost,
.adm-lock.is-locked .btn-brand { display: none; }

/* An empty value in read mode is a fact worth showing, not a blank box. */
.adm-lock.is-locked .input:placeholder-shown { color: var(--muted-3); -webkit-text-fill-color: var(--muted-3); }

/* ==========================================================================
   MODERATION QUEUE  (.adm-novbe)  —  /admin/tesdiq
   Three buckets, one table. The decision controls live in the last cell so the
   operator never leaves the row they are judging.
   ========================================================================== */

.adm-novbe td { vertical-align: middle; }

.adm-novbe-act {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
/* The reason is optional and usually skipped, so it gets the space it needs
   without pushing the two buttons off the row. */
.adm-novbe-act .input { flex: 1 1 150px; min-width: 110px; max-width: 220px; font-size: 12.5px; }
.adm-novbe-act .btn-brand,
.adm-novbe-act .btn-ghost { flex: none; white-space: nowrap; }

@media (max-width: 1100px) {
  .adm-novbe-act { flex-wrap: wrap; }
  .adm-novbe-act .input { flex: 1 1 100%; max-width: none; }
}


/* ==========================================================================
   PROFILE GALLERY  (.adm-ph)  —  /admin/muessise-detal
   --------------------------------------------------------------------------
   Thumbnails, not rows: the operator is choosing which picture leads and in
   what order the rest follow, which is a question about the pictures. The
   sixth onward are dimmed — the profile header shows five.
   ========================================================================== */

.adm-ph {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adm-ph-i {
  position: relative;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface-2);
  overflow: hidden;
  cursor: grab;
}
.adm-ph-i:active { cursor: grabbing; }
.adm-ph-i.is-dragging { opacity: .4; }
.adm-ph-i.is-cover { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.adm-ph-i.is-hidden img { opacity: .42; }

.adm-ph-i img { display: block; width: 100%; height: 100%; object-fit: cover; }

.adm-ph-n {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: rgba(15, 20, 32, .66);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.adm-ph-tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--brand);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink);
}
.adm-ph-tag--dim { background: rgba(15, 20, 32, .66); color: #fff; }

/* The two buttons appear on the thumbnail you are pointing at — a delete icon
   on every tile reads as a warning across the whole gallery. */
.adm-ph-act {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s var(--ease);
}
.adm-ph-i:hover .adm-ph-act,
.adm-ph-act:focus-within { opacity: 1; }

.adm-ph-b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: var(--r-ctl);
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  cursor: pointer;
}
.adm-ph-b:hover { background: #fff; }
.adm-ph-b--danger:hover { background: var(--danger); color: #fff; }

.adm-ph-save { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; }
.adm-ph-empty { margin: 0; font-size: 13px; color: var(--muted); }

.adm-ph-up { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; }
.adm-ph-up .input { flex: 1 1 260px; max-width: 420px; height: 38px; padding: 7px 10px; font-size: 13px; }
.adm-ph-up .btn-brand { flex: none; }

@media (max-width: 560px) {
  .adm-ph { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  /* No hover on touch. */
  .adm-ph-act { opacity: 1; }
}


/* ==========================================================================
   FILTER MANAGER  (.fm)  —  /admin/filtrler
   --------------------------------------------------------------------------
   Master–detail, two panels of equal standing: the list of filter groups and
   the one that is open. The list is rows inside a panel, not free-floating
   cards — a card each turned seven filters into seven boxes and the eye had
   nothing to follow. The whole row is the link; the switch and the grip sit
   above it so they keep their own jobs.
   ========================================================================== */

.fm {
  display: grid;
  /* The list keeps a comfortable fixed width and the editor takes whatever is
     left — capping the pair only left dead space down the right of a wide
     screen. */
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.fm-edit { display: flex; flex-direction: column; gap: 16px; }

/* --- panel shell (both columns) ------------------------------------------ */

.fm-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(15, 20, 32, .04);
  overflow: hidden;
}

.fm-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-4);
  background: var(--surface);
}
.fm-panel-title {
  margin: 0;
  font: 700 15px/1.3 var(--font-head, Lexend), sans-serif;
  color: var(--ink);
}
.fm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}
.fm-head-link { margin-left: auto; }

.fm-body { padding: 16px; }

.fm-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-top: 1px solid var(--line-4);
  background: var(--surface);
}
.fm-foot-note { font-size: 12px; color: var(--muted); }

/* --- the list of groups --------------------------------------------------- */

.fm-rows { margin: 0; padding: 0; list-style: none; }

.fm-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 8px;
  border-bottom: 1px solid var(--line-4);
  transition: background .16s var(--ease);
}
.fm-row:hover { background: var(--surface); }
.fm-row.is-dragging { opacity: .4; background: var(--surface-2); }

/* Open wins over off: which one you are editing matters more than its state.
   The brand bar is drawn inside the row so it survives the hover fill. */
.fm-row.is-open { background: var(--brand-soft); }
.fm-row.is-open::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
}

.fm-grip {
  display: inline-flex;
  flex: none;
  position: relative;
  z-index: 2;
  padding: 4px 2px;
  color: var(--line-5);
  cursor: grab;
}
.fm-row:hover .fm-grip { color: var(--muted-3); }
.fm-row:active .fm-grip { cursor: grabbing; }

/* The stretched link: anywhere that is not the switch opens the group. */
.fm-row-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 0;
  text-decoration: none;
}
.fm-row-link::after { content: ""; position: absolute; inset: 0; }
.fm-row-link:focus-visible { outline: none; }
.fm-row-link:focus-visible::after { outline: 2px solid var(--ink); outline-offset: -3px; border-radius: var(--r-ctl); }

.fm-row-name {
  font: 700 14px/1.3 var(--font-head, Lexend), sans-serif;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fm-row.is-off .fm-row-name { color: var(--muted); }
.fm-row-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fm-row-off {
  margin-left: 6px;
  font-weight: 700;
  color: var(--danger);
}

.fm-order-save {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-4);
  background: var(--brand-soft);
}
.fm-order-note { font-size: 12px; font-weight: 700; color: var(--brand-dark); }

.fm-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
}
.fm-add:hover { background: var(--brand-soft); }
.fm-add-plus { font-size: 16px; line-height: 1; color: var(--brand-dark); }

/* --- switch --------------------------------------------------------------
   Shared by a group row (a submit button) and an option row (a checkbox that
   saves with the rest of the table). */

.fm-sw-btn {
  position: relative;
  z-index: 2;
  display: block;
  flex: none;
  width: 36px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--line-5);
  cursor: pointer;
  transition: background .18s var(--ease);
}
.fm-sw-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 20, 32, .3);
  transition: transform .18s var(--ease);
}
.fm-sw-btn.is-on,
.fm-sw-input:checked + .fm-sw-btn { background: var(--brand); }
.fm-sw-btn.is-on .fm-sw-knob,
.fm-sw-input:checked + .fm-sw-btn .fm-sw-knob { transform: translateX(15px); }
.fm-sw-btn:focus-visible,
.fm-sw-input:focus-visible + .fm-sw-btn { outline: 2px solid var(--ink); outline-offset: 2px; }

.fm-sw--cell { display: inline-flex; margin: 0; cursor: pointer; }

/* --- the open group's head ------------------------------------------------ */

.fm-head { gap: 8px; }
.fm-title-in {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  font: 700 15px/1 var(--font-head, Lexend), sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.fm-head-scope { flex: 0 0 auto; width: 152px; height: 38px; font-size: 13px; }

/* The rule above was written for a native <select>, where height and font-size
   land on the control itself. The filter-group header is the site's own .dd
   dropdown now, and on that the same two properties stop at the WRAPPER: the
   trigger keeps its own 11px padding and 14.5px type, stands 41px in a 38px
   row, and sits a little proud of the title input beside it. Size the control,
   not the box around it. */
.fm-head-scope .dd-trigger {
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 13px;
}

.fm-del-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-3);
  border-radius: var(--r-ctl);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.fm-del-btn:hover { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }

/* --- forms ---------------------------------------------------------------- */

.fm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fm-grid .field { margin-top: 0; }

.fm-info {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 780px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--r-xs);
  background: var(--surface);
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--text-2);
}
.fm-info-ico { flex: none; margin-top: 1px; color: var(--muted-2); }
.fm-info-ico svg { display: block; width: 15px; height: 15px; }

/* --- the option table ----------------------------------------------------- */

.fm-table { width: 100%; border-collapse: collapse; }
.fm-table th {
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line-4);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted-2);
}
.fm-table td { padding: 5px 10px; vertical-align: middle; }
.fm-table tbody tr { border-bottom: 1px solid var(--line-4); }
.fm-table tbody tr:last-child { border-bottom: 0; }
.fm-table tbody tr:hover { background: var(--surface); }
.fm-table tr.is-dragging { opacity: .4; }
.fm-table th:first-child, .fm-table td:first-child { padding-left: 0; }
.fm-table th:last-child, .fm-table td:last-child { padding-right: 0; }
.fm-table .input { height: 36px; font-size: 13.5px; }
.fm-table .input:not(:focus) { border-color: transparent; background: transparent; }
.fm-table tbody tr:hover .input:not(:focus) { border-color: var(--line-3); background: var(--bg); }
.fm-table .input[readonly] { color: var(--text); }

.fm-th-grip, .fm-td-grip { width: 22px; }
.fm-th-n,   .fm-td-n     { width: 76px; }
.fm-th-sw,  .fm-td-sw    { width: 76px; }
.fm-th-act, .fm-td-act   { width: 40px; text-align: right; }

.fm-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.fm-auto { font-size: 11.5px; color: var(--muted-2); }

/* The icon button only appears on the row you are pointing at — five delete
   buttons down the edge of a quiet table read as a warning. */
.fm-td-act .adm-icobtn { opacity: 0; transition: opacity .15s var(--ease); }
.fm-table tbody tr:hover .adm-icobtn,
.fm-td-act .adm-icobtn:focus-visible { opacity: 1; }

.fm-addrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-3);
}
.fm-addrow .input { flex: 1 1 auto; height: 38px; }
.fm-addrow .btn-ghost { flex: none; }

/* --- bounds (a filter with limits instead of options) --------------------- */

.fm-bounds { display: flex; flex-wrap: wrap; gap: 14px 16px; }
.fm-bounds .field { flex: 1 1 180px; max-width: 240px; margin-top: 0; }

.fm-unit { position: relative; }
.fm-unit .input { padding-right: 46px; }
.fm-unit-t {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  pointer-events: none;
}

/* --- empty state ---------------------------------------------------------- */

.fm-empty { padding: 26px 20px; border: 1px dashed var(--line-3); border-radius: var(--r-xs); text-align: center; }
.fm-empty-t { margin: 0; font: 700 14px/1.3 var(--font-head, Lexend), sans-serif; color: var(--ink); }
.fm-empty-d { margin: 6px auto 0; max-width: 340px; font-size: 12.8px; line-height: 1.6; color: var(--muted); }

@media (max-width: 1080px) {
  .fm { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .fm-grid { grid-template-columns: minmax(0, 1fr); }
  .fm-head { flex-wrap: wrap; }
  .fm-title-in { flex-basis: 100%; }
  .fm-head-scope { flex: 1 1 auto; width: auto; }
  .fm-th-n, .fm-td-n { width: 56px; }
  .fm-th-sw, .fm-td-sw { width: 52px; }
  /* No hover on touch, so the row controls have to be there from the start. */
  .fm-td-act .adm-icobtn { opacity: 1; }
  .fm-table .input:not(:focus) { border-color: var(--line-3); background: var(--bg); }
}

/* --------------------------------------------------------------------------
26. Şəbəkələr — the network manager
    The page reuses .adm-grid--narrow, .adm-panel, .adm-table and .adm-empty.
    Only the row list, the two inline forms and the one explanatory paragraph
    have no equivalent already in this file, so only those are declared here.
-------------------------------------------------------------------------- */

/* The open network's two stacked panels, under the list. */
/* A network's own page: its form and its branches, one under the other. No
   top margin now that the list is not above it — the page head is. */
.sb-main { display: flex; flex-direction: column; gap: var(--adm-gap); min-width: 0; }
/* What a network is, said where one is made: the head of «Yeni şəbəkə». */
.sb-drawer-hint { margin: 0 0 14px; }

/* .sb-list is the plain stacked-card column; /admin/mesajlar uses it too. The
   rail that went with it — .sb-item/.sb-link/.sb-name/.sb-meta — is gone with
   the split layout it belonged to: the networks are a table now. */
.sb-list { display: flex; flex-direction: column; gap: 2px; margin: 0 0 14px; padding: 0; list-style: none; }

/* An add row: the field grows, the button sits on its baseline. */
.sb-form { display: flex; align-items: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-4); }
.sb-form .field { flex: 1 1 auto; margin-top: 0; min-width: 0; }
.sb-form .btn-brand, .sb-form .btn-ghost { flex: none; margin-bottom: 1px; }
.sb-form--wide { flex-wrap: wrap; margin-top: 16px; }
.sb-form--wide .field { flex: 1 1 240px; }

/* Inside the branch table the same row is a rename box, with no top border. */
.adm-table .sb-form { padding-top: 0; border-top: 0; }

.sb-sub { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- messages
   /admin/mesajlar is .adm-table with one cell that behaves differently: the
   message itself. It wraps rather than sitting on one line, it is given the
   width left over, and it is never clipped — a long message is a tall row.
   -------------------------------------------------------------------------- */
.adm-msg td { vertical-align: top; }

/* Who wrote and what about are short and known: they get the width they need
   and no more, on one line each, so the leftover goes to the message. */
.adm-msg-who { min-width: 196px; }
.adm-msg-who .adm-cell-main, .adm-msg-who .adm-cell-sub { white-space: nowrap; }
.adm-msg-subject { white-space: nowrap; }

.adm-msg-body {
  width: 45%; min-width: 260px; white-space: normal;
  font-size: 13px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere;
}
.adm-msg .adm-cell-sub { display: block; }
.adm-msg a.adm-cell-sub { color: var(--muted); text-decoration: none; }
.adm-msg a.adm-cell-sub:hover { color: var(--ink); text-decoration: underline; }
.adm-msg .btn-ghost { white-space: nowrap; }

/* The two-way choice on the create form: a single institution, or a branch. */
.md-kind { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check.md-kind-opt {
  align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line-3);
  border-radius: var(--r-sm); background: var(--bg);
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.check.md-kind-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.check.md-kind-opt:focus-within { border-color: var(--ink); }
.check.md-kind-opt input { margin-top: 0; }
.check.md-kind-opt b {
  display: block; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700;
  font-size: 13px; line-height: 1.3; color: var(--ink);
}
.md-kind-note {
  display: block; margin-top: 2px; font-family: Manrope, Lexend, system-ui, sans-serif;
  font-weight: 500; font-size: 11.5px; line-height: 1.35; color: var(--muted);
}
@media (max-width: 640px) { .md-kind { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------------------
23. The back office's shell — after SurdoTV's control panel
    Scoped to .adm--staff, which only the admin's layout puts on <body>: the
    institution panel shares this file and every class below, and keeps its
    own look until somebody decides otherwise.

    What was taken from SurdoTV, and why each one:
    - A sidebar ATTACHED to the left edge, full height, divided from the page
      by a line — not a card floating in a gutter. It is always there; it
      should look like the frame, not like content.
    - A page head: the screen's own name, large, with its figures under it and
      its actions beside it. Every screen's top looked the same before.
    - Crisp 1px borders on a light ground instead of soft shadows on a
      slightly-less-light ground. Separation you can see, not infer.
    - Four figures, then a two-by-two grid of cards, on the dashboard.
    What was NOT taken: SurdoTV's indigo and its Inter. EduNav's yellow and
    its Manrope/Lexend are the brand, and the brand stays.
-------------------------------------------------------------------------- */

.adm--staff {
  --st-bg: #F4F5FA;
  --st-side: #F6F6F9;
  --st-line: #E6E8F0;
  --st-rule: #E3E4EA;
  --st-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --st-lift: 0 2px 4px rgba(16, 24, 40, .06), 0 6px 14px rgba(16, 24, 40, .07);

  /* The shared card tokens, re-pointed: every .adm-panel on every screen
     picks these up without a rule of its own. */
  --adm-edge: 1px solid var(--st-line);
  --adm-lift: var(--st-shadow);
  --adm-r: 12px;
  background: var(--st-bg);
}

/* ---- the frame ----------------------------------------------------------- */
.adm--staff .adm-side {
  top: 0; left: 0; bottom: 0;
  padding: 14px 14px 10px;
  background: var(--st-side);
  border: 0; border-right: 1px solid var(--st-line); border-radius: 0;
  box-shadow: none;
}
.adm--staff .adm-main { margin-left: var(--adm-side-w); background: var(--st-bg); }

/* THE BRAND AND THE SEARCH ARE A PAIR. The brand is a card, made like a menu
   row — white, a 14px corner, a hairline and a soft shadow — and the search
   field opposite it is the same card: one height (--st-head), the same top
   offset (--st-head-top), the same corner and edge. So the top of the screen
   reads as one line across the sidebar and the bar instead of a logo that
   floats and a field that sits lower. The bar is exactly as tall as that
   line needs: the card and an even margin above and below it. */
.adm--staff { --st-head: 52px; --st-head-top: 12px; }
.adm--staff .adm-side { padding-top: var(--st-head-top); }
.adm--staff .adm-side-head { min-height: var(--st-head); margin-bottom: 16px; padding: 0; gap: 8px; }
.adm--staff .adm-side .logo {
  display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0;
  height: var(--st-head); padding: 0 12px 0 6px;
  background: var(--bg); border: 1px solid var(--st-line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .04);
  transition: box-shadow .15s var(--ease);
}
.adm--staff .adm-side .logo:hover {
  box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 6px 14px rgba(16, 24, 40, .07);
}
.adm--staff .adm-side .logo-mark { width: 38px; height: 38px; border-radius: 10px; }
.adm-side-brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.1; }
.adm--staff .adm-side .logo-text { font-size: 16px; }
.adm-side-brand-sub {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 11.5px;
  letter-spacing: 0; color: var(--adm-side-fg-dim); white-space: nowrap;
}

/* THE MENU, in SurdoTV's proportions: 56px rows with 8px between them, a
   36px chip, a 14.5px label, a rule and real space between groups.

   This gave up the fit the menu had — sixteen rows at this size were taller
   than a laptop window, as SurdoTV's own twelve are. So the brand stays put
   and only the list under it scrolls, and admin.js brings the open row into
   view on load. The height scale in section 1 still drives the institution
   panel; here these values replace it, and the steps below this block give
   the back office its own — the menu fits again down to a 600px window. */
/* The owner then asked for the rows a little lower: 46px instead of 56 —
   a 32px chip, 6px above and below it, 6px between rows and 12px around a
   group's rule. Still a card per row; three more rows in a laptop window. */
.adm--staff {
  --adm-side-w: 264px;
  --adm-nav-row-pad: 6px 12px 6px 6px;
  --adm-nav-ico: 32px;
  --adm-nav-gap: 6px;
  --adm-nav-label-fs: 11px;
  --adm-nav-label-pb: 2px;
  --adm-nav-group-mt: 12px;
  --adm-nav-group-pt: 12px;
  --adm-user-mt: 8px;
  --adm-user-pad: 12px 6px 2px;
}
/* THE MENU FITS THE WINDOW. The owner asked for the whole menu in the
   sidebar, no scrollbar, and the design kept. At the size above, fourteen
   rows and four headings are 887px of list under 90px of brand and margin
   — a window 977px tall; on the owner's own, 1905 x 905, «Ayarlar» and half
   of «Reklamlar» were below the fold.

   So, as the institution panel's menu does in section 1, the metrics step
   down as the window gets shorter: the same white card per row, the same
   pastel chip, label, headings and rules — a little less air in each. Each
   step is measured against the SHORTEST window it serves (list + brand ≤
   that height): 979–900 has 42px rows, 899–820 38px, 819–740 34px, 739–660
   30px, 659–600 28px. Below 600 a row would be smaller than a finger, so
   the list scrolls there, as it did everywhere before. A row added to the
   menu means measuring these again.

   The sidebar and the 72px rail only. A phone's drawer keeps its rows as
   they were, finger-sized, and scrolls: fourteen of them never fit a phone,
   and shrinking them there would only make them harder to hit. */
@media (min-width: 769px) and (max-height: 979px) {
  .adm--staff {
    --adm-nav-row-pad: 5px 12px 5px 6px; --adm-nav-ico: 30px; --adm-nav-gap: 5px;
    --adm-nav-group-mt: 9px; --adm-nav-group-pt: 9px;
  }
}
@media (min-width: 769px) and (max-height: 899px) {
  .adm--staff {
    --adm-nav-row-pad: 4px 12px 4px 6px; --adm-nav-ico: 28px; --adm-nav-gap: 4px;
    --adm-nav-group-mt: 7px; --adm-nav-group-pt: 7px;
    --st-row-r: 13px; --st-chip-r: 8px;
  }
}
@media (min-width: 769px) and (max-height: 819px) {
  .adm--staff {
    --adm-nav-row-pad: 3px 12px 3px 6px; --adm-nav-ico: 26px; --adm-nav-gap: 3px;
    --adm-nav-label-pb: 1px; --adm-nav-group-mt: 6px; --adm-nav-group-pt: 6px;
    --st-row-r: 12px; --st-icon: 16px;
  }
}
@media (min-width: 769px) and (max-height: 739px) {
  .adm--staff {
    --adm-nav-row-pad: 2px 12px 2px 6px; --adm-nav-ico: 24px; --adm-nav-gap: 2px;
    --adm-nav-label-fs: 10px; --adm-nav-group-mt: 5px; --adm-nav-group-pt: 5px;
    --st-row-r: 11px; --st-chip-r: 7px; --st-icon: 15px;
  }
  .adm--staff .adm-side-head { margin-bottom: 10px; }
}
@media (min-width: 769px) and (max-height: 659px) {
  .adm--staff { --adm-nav-row-pad: 1px 12px 1px 6px; --adm-nav-group-mt: 4px; --adm-nav-group-pt: 4px; }
}
.adm--staff .adm-side { overflow: hidden; }
.adm--staff .adm-nav {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  /* Room for the open row's ring and the cards' shadows, which a scroll
     container would otherwise clip at its edges. */
  margin: 0 -8px; padding: 4px 8px 10px;
  scrollbar-width: thin; scrollbar-color: #D6D8E2 transparent;
}
.adm--staff .adm-nav::-webkit-scrollbar { width: 6px; }
.adm--staff .adm-nav::-webkit-scrollbar-thumb { border-radius: 3px; background: #D6D8E2; }

.adm--staff .adm-nav-group {
  padding-left: 4px; padding-right: 4px;
  font-weight: 600; letter-spacing: .08em; color: var(--adm-side-fg-dim);
}
.adm--staff .adm-nav-link + .adm-nav-group { border-top: 1px solid var(--st-rule); }

.adm--staff .adm-nav-link {
  gap: 12px; background: var(--bg); border: 1px solid transparent; border-radius: var(--st-row-r, 14px);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .04);
  font-weight: 500; font-size: 14.5px; color: var(--ink);
}
.adm--staff .adm-nav-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 6px 14px rgba(16, 24, 40, .07);
}
.adm--staff .adm-nav-ico { border-radius: var(--st-chip-r, 9px); }
.adm--staff .adm-nav-icon { width: var(--st-icon, 17px); height: var(--st-icon, 17px); }

/* The open row. It was a yellow ring round a white card; the owner asked for
   another colour. Now it is the one dark card in a white column — EduNav's
   ink, the colour of the site's own buttons — with white words and the
   yellow kept for its chip, so the open screen reads at a glance and the
   brand is still in it. */
.adm--staff .adm-nav-link.is-active {
  background: var(--ink); border-color: var(--ink);
  box-shadow: 0 2px 4px rgba(15, 20, 32, .16), 0 6px 14px rgba(15, 20, 32, .14);
  font-weight: 600; color: #fff;
}
.adm--staff .adm-nav-link.is-active:hover { transform: none; }
.adm--staff .adm-nav-link.is-active:focus-visible { outline-color: var(--brand); }
.adm--staff .adm-nav-link.is-active .adm-nav-ico { background: var(--brand); color: var(--ink); }
.adm--staff .adm-nav-link.is-active .adm-nav-badge { background: var(--brand); color: var(--ink); }

/* Pastel chips, one per row — SurdoTV's own eight. */
.adm-tint--blue   { background: #E8ECFC; color: #4F63D2; }
.adm-tint--violet { background: #EFE9FC; color: #7C4FD2; }
.adm-tint--amber  { background: #FBF1D9; color: #A8780A; }
.adm-tint--sand   { background: #F5EBDC; color: #A06C33; }
.adm-tint--green  { background: #E4F0E2; color: #4C8A4A; }
.adm-tint--teal   { background: #DFF2F0; color: #2B8A80; }
.adm-tint--rose   { background: #FBE6E8; color: #C2414F; }
.adm-tint--slate  { background: #ECEEF3; color: #58607A; }

.adm-nav-chev {
  flex: 0 0 auto; margin-left: auto; width: 15px; height: 15px; color: #A6ABBB;
  transition: transform .15s var(--ease), color .15s var(--ease);
}
.adm-nav-badge + .adm-nav-chev { margin-left: 0; }
.adm--staff .adm-nav-link:hover .adm-nav-chev { transform: translateX(2px); color: var(--muted); }
.adm--staff .adm-nav-link.is-active .adm-nav-chev { color: rgba(255, 255, 255, .75); }

/* The account at the foot, on the same rule as the groups. */
.adm--staff .adm-user { border-top-color: var(--st-rule); }

/* ---- the bar: a row of cards ---------------------------------------------- */
/* Each thing in the bar is a card of its own, the twin of the brand card
   across from it — one height (--st-head), one top (--st-head-top), the same
   corner, edge and shadow — with even space between them; the search card
   takes the width the others leave. Around them the bar is the page's own
   ground, frosted, so content scrolling up under it does not show through. */
.adm--staff .adm-top {
  min-height: 0; padding: var(--st-head-top) var(--adm-pad);
  background: rgba(244, 245, 250, .86);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 0;
}
.adm-top-row { display: flex; flex: 1 1 auto; align-items: center; gap: 10px; min-width: 0; height: var(--st-head); }

.adm-top-row > .adm-burger,
.adm-top-row > .adm-find-form,
.adm-top-date,
.adm--staff .adm-top-actions > .adm-bell,
.adm--staff .adm-top-actions > .adm-top-link,
.adm-top-user {
  height: var(--st-head);
  background: var(--bg); border: 1px solid var(--st-line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .04);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease);
}
/* The cards that do something lift a little under the pointer, like the
   menu rows do. */
.adm--staff .adm-top-actions > .adm-bell:hover,
.adm--staff .adm-top-actions > .adm-top-link:hover {
  border-color: #D9DCE6; color: var(--ink);
  box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 6px 14px rgba(16, 24, 40, .07);
}

/* The search card: the field is the card, and the ring is the card's. */
.adm--staff .adm-find-form { flex: 1 1 auto; max-width: none; }
.adm-top-row > .adm-find-form:focus-within { border-color: var(--brand-deep); box-shadow: 0 0 0 3px var(--brand-soft); }
.adm--staff .adm-find-input {
  height: 100%; padding-left: 46px; border: 0; border-radius: 14px;
  background: transparent; box-shadow: none; font-size: 14px;
}
.adm--staff .adm-find-input:focus { outline: 0; border: 0; box-shadow: none; }
.adm--staff .adm-find-ico { left: 17px; }
.adm--staff .adm-find-ico svg { width: 17px; height: 17px; }

.adm-top-date {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 0 16px;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 13px;
  color: var(--text); white-space: nowrap;
}
.adm-top-date svg { color: var(--muted); }

.adm--staff .adm-top-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: 0; padding-left: 0; }

.adm--staff .adm-bell {
  display: grid; place-items: center; width: var(--st-head); padding: 0; color: var(--text);
}
.adm-bell-count {
  position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  border: 2px solid var(--bg); border-radius: 999px; box-sizing: content-box;
  background: var(--danger); color: #fff;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700; font-size: 10.5px; line-height: 18px;
  text-align: center; transform: translate(30%, -40%);
}

/* The panel, under the card rather than under the button. */
.adm--staff .adm-bell-panel {
  top: calc(100% + 10px); right: 0; width: min(330px, calc(100vw - 24px));
  padding: 14px 14px 10px; border: 1px solid var(--st-line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
}
.adm--staff .adm-bell-panel-title {
  margin: 0 0 8px; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 14px;
  color: var(--ink);
}
.adm--staff .adm-bell-list { gap: 2px; }
.adm-bell-list a {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 -6px; padding: 8px 6px;
  border-radius: 10px; color: var(--ink); text-decoration: none;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 13.5px;
}
.adm-bell-list a:hover { background: var(--st-bg); }
.adm-bell-list a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.adm-bell-n {
  flex: 0 0 auto; min-width: 36px; padding: 3px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--ink); text-align: center;
  font-family: Lexend, system-ui, sans-serif; font-weight: 600; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.adm-bell-empty { margin: 0 0 4px; font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 13px; color: var(--text); }
.adm--staff .adm-bell-all { margin-top: 8px; padding-top: 10px; text-decoration: none; }
.adm--staff .adm-bell-all:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.adm-top-link {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: 10px; color: var(--text); text-decoration: none;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 13.5px;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.adm-top-link:hover { color: var(--ink); }
.adm-top-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The account: who is signed in, and the way out. */
.adm-top-user { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 0 6px 0 8px; }
.adm-top-user .adm-avatar {
  width: 34px; height: 34px; background: var(--brand); color: var(--ink); font-size: 13px;
}
.adm-top-user-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.1; }
.adm-top-user-name {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 13.5px; color: var(--ink);
  white-space: nowrap;
}
.adm-top-user-role { font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 11.5px; color: var(--text); white-space: nowrap; }
.adm-top-out {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  color: var(--text); text-decoration: none; transition: background-color .15s var(--ease), color .15s var(--ease);
}
.adm-top-out:hover { background: #FDECEC; color: var(--danger); }
.adm-top-out:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 1279px) { .adm-top-date { display: none; } }
@media (max-width: 1099px) { .adm-top-user-text { display: none; } .adm-top-user { gap: 6px; } }

/* ---- the page head -------------------------------------------------------- */
.adm--staff .adm-content { padding-top: 28px; }
.adm-page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 0 0 22px;
}
.adm-page-head-text { min-width: 0; }
.adm-page-title {
  margin: 0; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 700; font-size: 24px;
  line-height: 1.2; letter-spacing: -.02em; color: var(--ink);
}
.adm-page-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 7px; }
/* The count line reads as the sentence under the title, not as a chip. */
.adm-page-sub .adm-toolbar-count {
  padding: 0; background: none; border-radius: 0;
  font-weight: 500; font-size: 13.5px; line-height: 1.4; color: var(--text);
}
.adm-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---- the dashboard -------------------------------------------------------- */
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.dash-kpi {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center;
  padding: 18px; background: var(--bg); border: var(--adm-edge); border-radius: 14px;
  box-shadow: var(--adm-lift); color: inherit; text-decoration: none;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
a.dash-kpi:hover { transform: translateY(-1px); box-shadow: var(--st-lift); }
a.dash-kpi:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dash-kpi .dash-kpi-ico {
  grid-row: 1 / 4; align-self: start; width: 48px; height: 48px; border-radius: 13px;
}
.dash-kpi .dash-kpi-ico svg { width: 22px; height: 22px; }
.dash-kpi-label, .dash-kpi-value, .dash-kpi-foot { grid-column: 2; min-width: 0; }
.dash-kpi-label {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 13.5px; color: var(--text);
}
.dash-kpi-value {
  font-family: Lexend, system-ui, sans-serif; font-weight: 600; font-size: 26px; line-height: 1.15;
  letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.dash-kpi-foot {
  margin-top: 6px; font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 12.5px; line-height: 1.35;
  color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Stretched, not start-aligned: two cards side by side end on the same line,
   or the grid reads as ragged even when every card inside it is tidy. */
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dash-grid .adm-panel + .adm-panel { margin-top: 0; }
.dash-card { padding: 20px 22px; }
.dash-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-card-title {
  margin: 0; font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 15.5px;
  letter-spacing: -.01em; color: var(--ink);
}
.dash-card-sub { margin: 4px 0 0; font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 12.5px; color: var(--muted); }
.dash-card-note { margin: 12px 0 0; }
.dash-link {
  display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 13px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.dash-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Without a page head the figures sit as close under the bar as the cards
   sit under each other: 12px of bar margin + 8px here = the grid's 20. */
.adm--staff .adm-content--bare { padding-top: 8px; }

/* Quick links: a row of small cards, made like the menu rows they echo —
   without the «›»: six cards share the row, and at 1440px the chevron left
   «Yeni vakansiya» 74px for 98px of name. The whole card is the link. Six
   across only from 1400px, where every label measured whole; three below. */
.dash-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.dash-quick-item {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px 10px 10px;
  background: var(--bg); border: var(--adm-edge); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .04);
  color: var(--ink); text-decoration: none;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 14px;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease), border-color .15s var(--ease);
}
.dash-quick-item:hover {
  transform: translateY(-1px); border-color: #D9DCE6;
  box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 6px 14px rgba(16, 24, 40, .07);
}
.dash-quick-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dash-quick-ico { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; }
.dash-quick-ico svg { width: 19px; height: 19px; }
.dash-quick-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1399px) { .dash-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .dash-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* The work list inside a half-width card: one column, no inner padding. */
.dash-card .adm-work { grid-template-columns: minmax(0, 1fr); padding: 0; }
.dash-card .adm-work li:last-child { border-bottom: 0; }
.dash-card .adm-work-row { padding: 11px 0; }

/* Horizontal bars. */
.dash-hbars { display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; list-style: none; }
.dash-hbars li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px; align-items: center; gap: 12px; }
.dash-hbars-name {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 13.5px; color: var(--ink);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-hbars-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.dash-hbars-track { height: 10px; border-radius: 999px; background: #EEF0F5; overflow: hidden; }
.dash-hbars-track > span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--brand); }
.dash-hbars-value {
  text-align: right; font-family: Lexend, system-ui, sans-serif; font-weight: 500; font-size: 13.5px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}

/* Short lists: a monogram, a name with a line under it, a figure or a date. */
.dash-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.dash-list li {
  display: flex; align-items: center; gap: 12px; margin: 0 -8px; padding: 7px 8px; border-radius: 10px;
  transition: background-color .15s var(--ease);
}
.dash-list li:hover { background: #FAFBFF; }
.dash-list .adm-thumb { width: 34px; height: 34px; font-size: 12.5px; }
.dash-list-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.dash-list-title {
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 500; font-size: 14px; color: var(--ink);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-list-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.dash-list-meta {
  display: flex; align-items: center; gap: 6px; font-family: Manrope, Lexend, system-ui, sans-serif;
  font-size: 12.5px; color: var(--muted); overflow: hidden; white-space: nowrap;
}
.dash-list-n {
  flex: 0 0 auto; font-family: Lexend, system-ui, sans-serif; font-weight: 600; font-size: 15px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.dash-list-aside { flex: 0 0 auto; font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---- tables ----------------------------------------------------------------- */
/* Rows a step lower, as the dashboard's lists and the menu went: 12px above
   and below a cell instead of 15, and a 36px monogram instead of 38. On
   /admin/muessiseler at 1630 x 905 that is eight rows on the first screen
   instead of seven; the rows of every other list drop by 6 to 8px. */
.adm--staff .adm-table tbody td,
.adm--staff .adm-table tbody th { padding-top: 12px; padding-bottom: 12px; }
.adm--staff .adm-table .adm-thumb { width: 36px; height: 36px; font-size: 13px; }
/* A badge standing as a cell's second line («Panel hesabı yoxdur» under a
   school on /admin/namizedler) is drawn the height of that line, not of a
   free-standing badge: at 6px of padding it was 23px where the sub line is
   12, and it made every row of the list 68px where the others are 57-61. */
.adm--staff .adm-cell-sub .badge { padding: 2px 7px; }

/* The settings: the key, then the value as wide as the table allows, then
   the one button. Left to the browser, «Əməliyyat» took 330px for a 32px
   button and every value box stopped 300px short of it. */
.adm-table--settings th:first-child { width: 30%; }
.adm-table--settings th:last-child { width: 1%; }

/* ---- weights ---------------------------------------------------------------- */
/* The owner asked why every word was bold. Counted on eight screens, more
   of the text was set at 600 and over than at 400 — on «Xəbərlər» 971
   characters at 700 against 293 at 400 — because every name, label, tag and
   heading had been given its own emphasis, and so none of them had any.
   SurdoTV's panel, the reference, sets most of its text at 400 and 500.

   So in the back office the scale is: 400 for what is read, 500 for names
   and labels (the menu, table names, list names, chips), 600 for headings,
   figures, tags and the open row, 700 for the page title alone. The rules
   of this section above already follow it; these bring the parts shared
   with the institution panel into line, scoped so that panel keeps its own. */
.adm--staff .adm-cell-main,
.adm--staff .adm-cell-num,
.adm--staff .adm-work-label,
.adm--staff .adm-stat-label,
.adm--staff .adm-tab,
.adm--staff .chip,
.adm--staff .btn-ghost,
.adm--staff .fm-row-name { font-weight: 500; }
.adm--staff .adm-panel-title,
.adm--staff .adm-table thead th,
.adm--staff .adm-sort,
.adm--staff .adm-work-n,
.adm--staff .adm-stat-value,
.adm--staff .adm-thumb,
.adm--staff .adm-avatar,
.adm--staff .badge,
.adm--staff .adm-tag,
.adm--staff .adm-tab.is-active,
.adm--staff .btn-brand,
.adm--staff .fm-panel-title,
.adm--staff .fm-title-in,
.adm--staff .fm-badge,
.adm--staff .fm-row-off,
.adm--staff .fm-order-note,
.adm--staff .fm-add,
.adm--staff .fm-table th,
.adm--staff .fm-n,
.adm--staff .fm-unit-t,
.adm--staff .fm-empty-t,
.adm--staff b,
.adm--staff strong { font-weight: 600; }

/* A file box like the rest of the form: its button drawn as a ghost button,
   not the browser's grey bevel. The words beside it — «No file chosen» —
   are the browser's own and follow its language. */
.adm--staff input[type="file"].input { padding: 6px 12px 6px 6px; height: auto; min-height: 40px; font-size: 13px; color: var(--text); }
.adm--staff input[type="file"].input::file-selector-button {
  margin-right: 10px; padding: 6px 12px; border: 1px solid var(--line-3); border-radius: var(--r-ctl);
  background: var(--bg); font: 500 13px/1.2 Manrope, Lexend, system-ui, sans-serif; color: var(--ink); cursor: pointer;
  transition: border-color .16s var(--ease);
}
.adm--staff input[type="file"].input::file-selector-button:hover { border-color: var(--ink); }

/* ---- the dashboard on one screen ------------------------------------------ */
/* The owner asked for the dashboard to fit one screen. So on a window wide
   enough for the two-column grid and tall enough to read it, the page is
   exactly the window: the bar and the figures and the quick links take what
   they need, and the four cards share what is left in two equal rows. If a
   list is longer than its card has room for, it scrolls inside the card —
   nothing is cut off and nothing is hidden. Below 1200 x 720 the dashboard
   scrolls like any other page, because squeezed further the cards would be
   windows onto two rows each.

   The spacing tightens here only: 14px between bands instead of 20, and
   smaller card padding. (No screen has a footer now — the owner struck it.) */
@media (min-width: 1200px) and (min-height: 720px) {
  .adm--fit .adm-main { height: 100vh; min-height: 0; overflow: hidden; }
  .adm--fit .adm-content { display: flex; flex-direction: column; min-height: 0; padding-bottom: 14px; overflow: hidden; }
  .adm--fit .dash { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }

  .adm--fit .dash-kpis { flex: 0 0 auto; gap: 14px; margin-bottom: 14px; }
  .adm--fit .dash-kpi { padding: 14px 16px; }
  .adm--fit .dash-kpi .dash-kpi-ico { width: 44px; height: 44px; }
  .adm--fit .dash-kpi-value { font-size: 24px; }
  .adm--fit .dash-kpi-foot { margin-top: 4px; }

  .adm--fit .dash-quick { flex: 0 0 auto; margin-bottom: 14px; }
  .adm--fit .dash-quick-item { padding: 8px 12px 8px 8px; }
  .adm--fit .dash-quick-ico { width: 34px; height: 34px; }

  .adm--fit .dash-grid { flex: 1 1 auto; min-height: 0; gap: 14px; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .adm--fit .dash-card { min-height: 0; padding: 16px 18px; }
  .adm--fit .dash-card-head { flex: 0 0 auto; margin-bottom: 8px; }
  /* A list that scrolls down must be told not to scroll sideways: with
     overflow-y set, overflow-x computes to auto, and the work list's «›»
     steps 2px right on hover — past the list's edge. That gave a sideways
     scrollbar on hover, which on Windows takes height, which then gave a
     vertical one too: both bars appeared whenever a row was pointed at.
     The work list keeps 4px of room either side for that step and for the
     focus ring (2px offset, 2px wide), so neither is clipped. */
  .adm--fit .dash-card > .adm-work,
  .adm--fit .dash-card > .dash-hbars,
  .adm--fit .dash-card > .dash-list,
  .adm--fit .dash-card > .adm-empty {
    flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: #D6D8E2 transparent;
  }
  .adm--fit .dash-card > .adm-work { margin: 0 -4px; padding: 0 4px; }
  /* 7px, not 8: at 1630 x 905 four rows left the list 0.4px to spare, so a
     window a hair shorter scrolled it. Now there are 8px. */
  .adm--fit .dash-card .adm-work-row { padding: 7px 0; }
  .adm--fit .dash-hbars { gap: 9px; padding-top: 4px; }
  /* Five rows of a list in the half of the grid that is left: measured at
     1440 x 900 the lists had 214px and the rows wanted 268 and 284 — the
     second one taller because the status badge in its line under the name
     is 22px high. So the rows lose their gaps and most of their padding, the
     two lines are set at 1.3, and the badge is made the height of its line. */
  /* Each row reaches 8px past the list on either side so its hover ground
     lines up with the card's text; the list takes those 8px as its own
     padding, so the ground is not clipped by overflow-x above. */
  .adm--fit .dash-list { gap: 0; margin: 0 -8px; padding: 0 8px; }
  .adm--fit .dash-list li { padding: 3px 8px; }
  .adm--fit .dash-list .adm-thumb { width: 30px; height: 30px; font-size: 12px; }
  .adm--fit .dash-list-body { gap: 1px; }
  .adm--fit .dash-list-title,
  .adm--fit .dash-list-meta { line-height: 1.3; }
  .adm--fit .dash-list-meta .badge { padding: 2px 7px; }
}

/* ---- narrower windows ----------------------------------------------------- */
@media (max-width: 1199px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1099px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The 72px rail: the frame keeps its line, the words and the cards go.
   Its own range (769–1024px), so the drawer below 769px is simply the full
   menu again rather than a list of things to undo. */
@media (max-width: 1024px) {
  .adm--staff .adm-main { margin-left: var(--adm-rail-w); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .adm--staff .adm-side { padding: var(--st-head-top) 8px 12px; }
  .adm--staff .adm-side .logo { justify-content: center; padding: 0; }
  .adm-side-brand, .adm-nav-chev { display: none; }
  /* No visible scrollbar in a 72px rail: it took 6px of the 56 and pushed
     every chip off centre. The wheel and the keyboard still scroll it. */
  .adm--staff .adm-nav { margin: 0; padding: 2px 0 8px; scrollbar-width: none; }
  .adm--staff .adm-nav::-webkit-scrollbar { display: none; }
  .adm--staff .adm-nav-link + .adm-nav-group { border-top: 0; padding-top: 0; margin-top: 6px; }
  .adm--staff .adm-nav-link,
  .adm--staff .adm-nav-link.is-active {
    justify-content: center; padding: 4px 0; background: transparent; border-color: transparent; box-shadow: none;
  }
  .adm--staff .adm-nav-link:hover { transform: none; box-shadow: none; }
}

/* The drawer: full height from the edge, with a shadow while it is open. */
@media (max-width: 768px) {
  .adm--staff .adm-main { margin-left: 0; }
  .adm--staff .adm-side { padding: var(--st-head-top) 14px 10px; }
  .adm--staff.is-side-open .adm-side { box-shadow: 0 0 40px rgba(15, 20, 32, .3); }
  /* A phone: the card keeps the burger, the search, the bell and the way
     out; the date, the names and the site link give way. */
  .adm--staff .adm-top { flex-wrap: nowrap; padding: 8px 12px; }
  .adm-top-row { gap: 8px; height: 48px; }
  .adm-top-row > .adm-burger,
  .adm-top-row > .adm-find-form,
  .adm--staff .adm-top-actions > .adm-bell,
  .adm-top-user { height: 48px; }
  .adm-top-row > .adm-burger { display: flex; width: 48px; }
  .adm--staff .adm-top-actions > .adm-bell { display: grid; width: 48px; }
  .adm--staff .adm-find-input { padding-left: 36px; font-size: 13.5px; }
  .adm--staff .adm-find-ico { left: 12px; }
  .adm--staff .adm-top-link { display: none; }
  .adm-top-user { padding: 0 4px 0 6px; gap: 2px; }
  .adm-page-title { font-size: 20px; }
  .adm-page-head { margin-bottom: 18px; }
  .adm-top-link span { display: none; }
  .dash-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-kpi { padding: 14px; }
  .dash-kpi-value { font-size: 23px; }
  .dash-hbars li { grid-template-columns: 100px minmax(0, 1fr) 32px; }
  .dash-list-aside { display: none; }
}

/* ==========================================================================
   The editorial editor — /admin/xeberler, /elanlar, /bloglar

   WordPress's two columns: the writing on the left (title, the rich-text
   box, the summary), what is decided about it on the right in boxes
   (publishing, category, header image, the rest). One column below 1100px,
   with the boxes after the text.
   ========================================================================== */

.ed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.ed-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ed-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.adm .ed-main .field + .field,
.adm .ed-box .field + .field { margin-top: 0; }

.ed-title { height: 50px; font-family: Lexend, system-ui, sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }

.ed-box {
  display: flex; flex-direction: column; gap: 12px; padding: 14px 15px 15px;
  border: 1px solid var(--line-4); border-radius: var(--r-md); background: var(--bg);
}
.ed-box-title {
  margin: 0; font-family: Lexend, system-ui, sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: -.01em; color: var(--ink);
}

/* A story's day and hour side by side: the hour is the narrow one. */
.ed-when { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 10px; }
.adm .ed-when .field + .field { margin-top: 0; }
.ed-when-hint { margin: -4px 0 0; }

.ed-cover { margin: 0; overflow: hidden; border-radius: var(--r-sm); aspect-ratio: 16 / 9; background: var(--surface-2); }
.ed-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ed-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.ed-file { height: auto; padding: 9px 10px; font-size: 13px; }

/* «Görünüş»: a choice in pictures, as WordPress's layout pickers — the
   create form's radio cards (.md-kind-opt) made into tiles. The radio is the
   control, out of sight but not out of reach; the tile is what is seen. */
.ed-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ed-pick--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ed-pick-opt { position: relative; display: block; min-width: 0; cursor: pointer; }
.ed-pick-input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.ed-pick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; padding: 9px 6px 8px;
  border: 1px solid var(--line-3); border-radius: var(--r-sm); background: var(--bg);
  font-family: Manrope, Lexend, system-ui, sans-serif; font-weight: 600; font-size: 11.5px; line-height: 1.25;
  color: var(--text); text-align: center;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.ed-pick-tile svg { display: block; width: 100%; max-width: 60px; height: auto; color: var(--muted); }
.ed-pick-opt:hover .ed-pick-tile { border-color: var(--brand); background: var(--brand-soft); }
.ed-pick-input:checked + .ed-pick-tile {
  border-color: var(--ink); background: var(--brand-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink);
}
.ed-pick-input:checked + .ed-pick-tile svg { color: var(--ink); }
.ed-pick-input:focus-visible + .ed-pick-tile { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 1100px) {
  .ed-layout { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   The rich-text box (admin-editor.js). Toolbar on top, the writing surface
   under it, both inside one bordered card that takes the input's focus ring.
   The surface's type follows the public .prose, so a heading looks here as
   it will on the article.
   -------------------------------------------------------------------------- */

.rte {
  border: 1px solid var(--line-3); border-radius: var(--r-ctl); background: var(--bg);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.rte:focus-within { border-color: var(--brand-deep); box-shadow: 0 0 0 3px var(--brand-soft); }

.rte-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px;
  border-bottom: 1px solid var(--line-4); border-radius: var(--r-ctl) var(--r-ctl) 0 0; background: var(--surface-2);
}
.rte-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--line-3); }
.rte-btn {
  display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 7px;
  border: 1px solid transparent; border-radius: var(--r-xs); background: transparent; color: var(--text);
  font: 600 12.5px/1 Manrope, Lexend, system-ui, sans-serif; cursor: pointer;
}
.rte-btn svg { width: 16px; height: 16px; }
.rte-btn:hover { background: var(--bg); border-color: var(--line-3); color: var(--ink); }
.rte-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.rte-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rte-btn--text { padding: 0 10px; }
.rte-block {
  height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--line-3); border-radius: var(--r-xs);
  background: var(--bg); color: var(--ink); font: 600 12.5px/1 Manrope, Lexend, system-ui, sans-serif; cursor: pointer;
}

.rte-area {
  min-height: 340px; max-height: 70vh; overflow-y: auto; padding: 16px 18px;
  font-family: Manrope, Lexend, system-ui, sans-serif; font-size: 15px; line-height: 1.75; color: var(--text);
  outline: none;
}
.rte-area > :first-child { margin-top: 0; }
.rte-area p { margin: 0 0 14px; }
.rte-area h2 { margin: 24px 0 10px; font-family: Lexend, system-ui, sans-serif; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; color: var(--ink); }
.rte-area h3 { margin: 20px 0 8px; font-family: Lexend, system-ui, sans-serif; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.rte-area ul, .rte-area ol { margin: 0 0 14px; padding-left: 24px; }
.rte-area ul { list-style: disc; }
.rte-area ol { list-style: decimal; }
.rte-area li { margin-bottom: 6px; }
.rte-area blockquote {
  margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--brand-soft); color: var(--ink-2);
}
.rte-area a { color: var(--info); text-decoration: underline; text-underline-offset: 3px; }
.rte-area figure { margin: 4px 0 18px; }
.rte-area img { display: block; max-width: 100%; height: auto; border-radius: var(--r-sm); cursor: pointer; }
.rte-area img:hover { outline: 2px solid var(--brand); outline-offset: 2px; }
.rte-area img.is-selected { outline: 2px solid var(--brand-deep); outline-offset: 2px; }

/* A YouTube video: 16:9, and in the editor a block — its player ignores the
   pointer here, so a click selects it rather than playing it. «Ön baxış»
   shows it playing. */
.rte-area figure.video { cursor: pointer; }
.rte-area figure.video iframe {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0;
  border-radius: var(--r-sm); background: #000; pointer-events: none;
}
.rte-area figure.video:hover iframe { outline: 2px solid var(--brand); outline-offset: 2px; }
.rte-area figure.video.is-selected iframe { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.rte-area figcaption { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Widths the resize handle sets (RichText::SIZE): a figure's share of the
   column, its picture filling it; a lone picture's own. Narrower than the
   column, a figure stands in the middle of it. */
.rte-area figure[class*="w-"] img, .prose figure[class*="w-"] img { width: 100%; }
.rte-area figure[class*="w-"], .rte-area img[class*="w-"] { margin-left: auto; margin-right: auto; }
.rte-area .w-20 { width: 20%; } .rte-area .w-30 { width: 30%; } .rte-area .w-40 { width: 40%; }
.rte-area .w-50 { width: 50%; } .rte-area .w-60 { width: 60%; } .rte-area .w-70 { width: 70%; }
.rte-area .w-80 { width: 80%; } .rte-area .w-90 { width: 90%; }

/* The picture's bar and corner handle, over the text, in the wrapper. */
.rte { position: relative; }
.rte-imgtools {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 9px; background: var(--ink); box-shadow: 0 6px 18px rgba(15, 20, 32, .28);
}
.rte-imgtools button {
  min-width: 30px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent;
  color: #fff; font: 700 12px/1 Manrope, Lexend, system-ui, sans-serif; cursor: pointer;
}
.rte-imgtools button:hover { background: rgba(255, 255, 255, .14); }
.rte-imgtools button[aria-pressed="true"] { background: var(--brand); color: var(--ink); }
.rte-imgtools button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rte-imgtools-sep { width: 1px; height: 18px; margin: 0 3px; background: rgba(255, 255, 255, .22); }
/* One on each side edge, mid-height: drag it out or in. */
.rte-handle {
  position: absolute; z-index: 4; width: 12px; height: 32px; border: 2px solid #fff; border-radius: 6px;
  background: var(--brand-deep); box-shadow: 0 1px 4px rgba(15, 20, 32, .35); cursor: ew-resize; touch-action: none;
}

/* Left or right: the picture stands on that side and the text flows past
   it, as on the article (style.css). Narrower than the column only. */
.rte-area figure.al-left, .rte-area img.al-left { float: left; margin: 4px 20px 12px 0; }
.rte-area figure.al-right, .rte-area img.al-right { float: right; margin: 4px 0 12px 20px; }
.rte-area::after { content: ""; display: table; clear: both; }
.rte-sizetag {
  position: absolute; z-index: 4; padding: 3px 7px; border-radius: 6px; background: var(--ink); color: #fff;
  font: 700 11.5px/1.2 Manrope, Lexend, system-ui, sans-serif; pointer-events: none;
}
.rte-dropline { position: absolute; z-index: 4; height: 3px; border-radius: 2px; background: var(--brand-deep); pointer-events: none; }
.rte-area strong { font-weight: 700; color: var(--ink); }
.rte-area .ta-center { text-align: center; }
.rte-area .ta-right { text-align: right; }
.rte-area.is-empty::before {
  content: attr(data-placeholder); float: left; height: 0; color: var(--muted-3); pointer-events: none;
}

/* «HTML»: the textarea itself, for whoever wants the tags. */
.rte-source {
  display: block; width: 100%; min-height: 340px; border: 0; border-radius: 0 0 var(--r-ctl) var(--r-ctl);
  padding: 14px 16px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink); background: var(--bg); resize: vertical; box-shadow: none;
}
.rte-source:focus { outline: none; box-shadow: none; }
.rte-note { margin: 6px 2px 0; font-size: 12px; color: var(--muted); }
