/* ─────────────────────────────────────────────────────────
   Administration back office.
   Every rule is nested under .shell (the root of AdminLayout) so the generic class names used
   here (.btn, .field, .panel…) never leak into the sign-in pages styled by app.css, and win over
   app.css inside the back office.
───────────────────────────────────────────────────────── */

@keyframes adm-spin { to { transform: rotate(360deg); } }
@keyframes adm-fade { from { opacity: 0; } }
@keyframes adm-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes adm-shimmer { to { background-position: -200% 0; } }

.shell {
  --color-ink: #0e1626;
  --color-ink-soft: #2a3142;
  --color-text: #1a1f2c;
  --color-text-muted: #6b7280;
  --color-text-faint: #9aa0a8;
  --line: #e6e7ea;
  --line-strong: #d8dbe0;
  --input-bg: #f1f2f4;
  --bg: #f5f6f7;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --danger-border: #f0c2bd;
  --success: #1b7a4b;
  --success-soft: #e9f6ef;
  --success-border: #bfe4cf;
  --warn: #9a6212;
  --warn-soft: #fdf3e2;
  --info: #2456a6;
  --info-soft: #e8effb;
  --focus: 0 0 0 3px rgba(14, 22, 38, .18);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sidebar-w: 248px;

  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;

  a { color: var(--color-ink); }
  a:hover { color: var(--color-ink-soft); }
  button, input, select, textarea { font: inherit; }
  code, .mono { font-family: var(--mono); font-size: 12.5px; }
  .ti { font-size: 18px; line-height: 1; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* ── Shell ─────────────────────────────────────────── */
  .sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 18px 12px 14px; background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
  .sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px; color: var(--color-ink); text-decoration: none; min-height: 36px; }
  .sidebar__brand img { height: 44px; width: auto; margin: -13px -5px; }
  .sidebar__tag { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-muted); padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; }
  .sidebar__mono { display: none; width: 36px; height: 36px; border-radius: 8px; background: var(--color-ink); color: #fff; font-weight: 600; font-size: 15px; place-items: center; }
  .nav { display: flex; flex-direction: column; gap: 18px; flex: 1 1 auto; }
  .nav__group { display: flex; flex-direction: column; gap: 2px; }
  .nav__label { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-faint); padding: 0 10px 6px; }
  .nav__link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; color: var(--color-text-muted); text-decoration: none; font-weight: 500; font-size: 13.5px; }
  .nav__link .ti { font-size: 18px; flex: 0 0 18px; }
  .nav__link:hover { background: #f1f2f4; color: var(--color-ink); }
  .nav__link.active { background: #eceef1; color: var(--color-ink); font-weight: 600; }
  .nav__link:focus-visible { outline: none; box-shadow: var(--focus); }
  .nav__count { margin-left: auto; font-size: 11.5px; color: var(--color-text-faint); font-variant-numeric: tabular-nums; font-weight: 500; }
  .nav__count--warn { color: var(--warn); font-weight: 600; }
  .sidebar__foot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
  .version { font-size: 11px; color: var(--color-text-faint); padding: 2px 10px; }
  .avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--color-ink); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
  .avatar--lg { width: 44px; height: 44px; flex-basis: 44px; font-size: 14px; }
  .scrim { display: none; }
  .main { min-width: 0; display: flex; flex-direction: column; }
  .topbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 32px; background: rgba(245, 246, 247, .88); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
  .topbar .topbar__menu, .topbar .topbar__collapse { display: none; }
  .topbar__collapse { margin-left: -10px; }
  .crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-text-muted); min-width: 0; flex: 1; }
  .crumbs a { color: var(--color-text-muted); text-decoration: none; white-space: nowrap; }
  .crumbs a:hover { color: var(--color-ink); }
  .crumbs .ti { font-size: 14px; color: var(--color-text-faint); }
  .crumbs__current { color: var(--color-ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 32px 64px; }

  /* ── Page head ─────────────────────────────────────── */
  .page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 24px; }
  .page-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; color: var(--color-ink); }
  .page-head p { margin: 6px 0 0; color: var(--color-text-muted); font-size: 13.5px; max-width: 64ch; text-wrap: pretty; }
  .page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .back { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--color-text-muted); text-decoration: none; margin-bottom: 8px; }
  .back:hover { color: var(--color-ink); }

  /* ── Buttons (letter-spacing/text-transform reset the sign-in .btn of app.css) ── */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 6px; border: 1px solid transparent; font-size: 13px; font-weight: 600; letter-spacing: normal; text-transform: none; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .14s, border-color .14s, color .14s, transform .08s; background: none; color: var(--color-ink); }
  .btn .ti { font-size: 16px; }
  .btn:active { transform: translateY(1px); }
  .btn:focus-visible { outline: none; box-shadow: var(--focus); }
  .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
  .btn--primary { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }
  .btn--primary:hover { background: #1a2336; color: #fff; }
  .btn--secondary { background: #fff; border-color: var(--line-strong); }
  .btn--secondary:hover { background: #f7f8f9; border-color: #c2c6cd; color: var(--color-ink); }
  .btn--ghost { color: var(--color-ink-soft); }
  .btn--ghost:hover { background: #eceef1; color: var(--color-ink); }
  .btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
  .btn--danger:hover { background: #9a1d14; color: #fff; }
  .btn--danger-ghost { color: var(--danger); }
  .btn--danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
  .btn--sm { height: 32px; padding: 0 10px; font-size: 12.5px; }
  .btn--icon { width: 38px; padding: 0; }
  .btn--sm.btn--icon { width: 32px; }
  .spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: adm-spin .7s linear infinite; display: inline-block; }

  /* ── Panel ─────────────────────────────────────────── */
  .panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px rgba(14, 22, 38, .04); min-width: 0; }
  .panel + .panel { margin-top: 16px; }
  .panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .panel__head h2 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--color-ink); }
  .panel__head p { margin: 2px 0 0; font-size: 12.5px; color: var(--color-text-muted); }
  .panel__body { padding: 20px; }
  .panel__foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--color-text-muted); display: flex; gap: 8px; align-items: flex-start; }
  .panel__foot .ti { font-size: 15px; margin-top: 1px; }

  /* ── Toolbar ───────────────────────────────────────── */
  .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .search { position: relative; flex: 1 1 220px; max-width: 340px; }
  .search .ti { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--color-text-faint); pointer-events: none; }
  .search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border: 1px solid transparent; border-radius: 6px; background: var(--input-bg); font-size: 13px; color: var(--color-text); outline: none; transition: background .12s, border-color .12s, box-shadow .12s; }
  .search input:hover { background: #ecedf0; }
  .search input:focus { background: #fff; border-color: var(--color-ink); box-shadow: var(--focus); }
  .seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 7px; background: #eef0f2; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 5px; background: none; font-size: 12.5px; font-weight: 500; color: var(--color-text-muted); cursor: pointer; white-space: nowrap; }
  .seg button:hover { color: var(--color-ink); }
  .seg button[aria-pressed="true"] { background: #fff; color: var(--color-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(14, 22, 38, .1); }
  .seg button:focus-visible { outline: none; box-shadow: var(--focus); }
  .seg button[disabled] { cursor: not-allowed; opacity: .55; }
  .seg .n { font-size: 11px; color: var(--color-text-faint); font-variant-numeric: tabular-nums; }
  .toolbar__count { margin-left: auto; font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; }

  /* ── Table ─────────────────────────────────────────── */
  .tbl-wrap { overflow-x: auto; }
  .tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  .tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); padding: 10px 16px; background: #fafbfb; border-bottom: 1px solid var(--line); white-space: nowrap; }
  .tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .tbl tbody tr:last-child td { border-bottom: 0; }
  .tbl tbody tr:hover td { background: #fafbfc; }
  .tbl tr.is-clickable { cursor: pointer; }
  .tbl tr.is-dirty td { background: #fffbf3; }
  .tbl tr.is-muted td { color: var(--color-text-muted); }
  .tbl .col-actions { width: 1%; white-space: nowrap; text-align: right; }
  .cell-title { font-weight: 600; color: var(--color-ink); line-height: 1.35; }
  .cell-sub { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
  .cell-sub code { font-size: 11.5px; }
  .cell-nowrap { white-space: nowrap; }
  .cell-inline { display: inline-flex; gap: 6px; align-items: center; }
  .row-actions { display: inline-flex; gap: 4px; justify-content: flex-end; align-items: center; }
  .locked { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--color-text-faint); white-space: nowrap; }
  .locked .ti { font-size: 14px; }
  a.locked { text-decoration: none; }
  a.locked:hover { color: var(--color-ink); }
  .uri { font-family: var(--mono); font-size: 12px; color: var(--color-ink-soft); overflow-wrap: anywhere; }
  .more { font-size: 11.5px; color: var(--color-text-muted); margin-top: 2px; }

  /* ── Badges & chips ────────────────────────────────── */
  .badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #eef0f3; color: #4a5568; white-space: nowrap; }
  .badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .badge--success { background: var(--success-soft); color: var(--success); }
  .badge--warn { background: var(--warn-soft); color: var(--warn); }
  .badge--danger { background: var(--danger-soft); color: var(--danger); }
  .badge--info { background: var(--info-soft); color: var(--info); }
  .badge--agent { background: #f0edf8; color: #5b4199; }
  .claims { margin: 0; padding: 12px; border-radius: 6px; background: #f5f6f7; border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--color-ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
  .chips { display: flex; flex-wrap: wrap; gap: 4px; }
  .chip { font-family: var(--mono); font-size: 11.5px; padding: 1px 6px; border-radius: 4px; background: #f1f2f4; color: var(--color-ink-soft); white-space: nowrap; }

  /* ── Dashboard ─────────────────────────────────────── */
  .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
  .stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--color-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
  .stat:hover { border-color: #c9cdd3; box-shadow: 0 4px 14px rgba(14, 22, 38, .06); color: var(--color-ink); }
  .stat:focus-visible { outline: none; box-shadow: var(--focus); }
  .stat__top { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); }
  .stat__top .ti { font-size: 18px; color: var(--color-text-faint); }
  .stat__value { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .stat__value--muted { color: var(--color-text-faint); }
  .stat__meta { font-size: 12.5px; color: var(--color-text-muted); }
  .bar { display: flex; gap: 2px; height: 4px; border-radius: 2px; overflow: hidden; background: #eef0f3; margin-top: 6px; }
  .bar span { display: block; height: 100%; }
  .dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .dash-grid .panel + .panel { margin-top: 0; }
  .dash-grid + .panel { margin-top: 16px; }
  .list { list-style: none; margin: 0; padding: 0; }
  .list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
  .list li:last-child { border-bottom: 0; }
  .list--scroll { max-height: 432px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .list--scroll:focus-visible { outline: none; box-shadow: inset var(--focus); }
  .list__main { flex: 1; min-width: 0; }
  .list__end { text-align: right; }
  .list__icon { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; display: grid; place-items: center; background: #f1f2f4; color: var(--color-ink-soft); }
  .list__icon .ti { font-size: 17px; }
  .list__icon--warn { background: var(--warn-soft); color: var(--warn); }
  .list a.list__link { font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }

  /* ── Forms ─────────────────────────────────────────── */
  .form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
  .aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 76px; }
  .aside .panel + .panel { margin-top: 0; }
  .section { padding: 20px 24px; border-bottom: 1px solid var(--line); }
  .section:last-child { border-bottom: 0; }
  .section__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--color-ink); }
  .section__desc { margin: 3px 0 16px; font-size: 13px; color: var(--color-text-muted); text-wrap: pretty; }
  .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
  .field:last-child { margin-bottom: 0; }
  .label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--color-ink-soft); }
  .label .opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--color-text-faint); margin-left: 4px; }
  .input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; background: var(--input-bg); font-size: 14px; color: var(--color-text); outline: none; transition: background .12s, border-color .12s, box-shadow .12s; appearance: none; -webkit-appearance: none; min-width: 0; }
  .input::placeholder { color: var(--color-text-faint); }
  .input:hover { background: #ecedf0; }
  .input:focus { background: #fff; border-color: var(--color-ink); box-shadow: var(--focus); }
  .input[disabled] { background: #f7f8f9; border: 1px dashed var(--line-strong); color: var(--color-text-muted); cursor: not-allowed; }
  .input.mono { font-family: var(--mono); font-size: 13px; }
  textarea.input { height: auto; padding: 10px 12px; font-family: var(--mono); font-size: 13px; line-height: 1.6; resize: vertical; }
  select.input { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
  .field.is-invalid .input { background: #fff; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }
  .hint { font-size: 12.5px; color: var(--color-text-muted); line-height: 1.45; margin: 0; text-wrap: pretty; }
  .err { font-size: 12.5px; color: var(--danger); line-height: 1.45; margin: 0; display: flex; gap: 5px; align-items: flex-start; }
  .err .ti { font-size: 14px; margin-top: 2px; }
  .section > .err { margin-top: 10px; }
  .ok { font-size: 12.5px; color: var(--success); display: flex; gap: 5px; align-items: center; margin: 0; }
  .ok .ti { font-size: 14px; }
  .grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
  .input-wrap { position: relative; }
  .input-wrap .input { padding-right: 44px; }
  .input-wrap .btn { position: absolute; right: 4px; top: 4px; height: 32px; width: 32px; padding: 0; }
  .cb { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; border: 1px solid #c2c6cd; border-radius: 4px; background: #fff; display: inline-grid; place-items: center; cursor: pointer; transition: background .12s, border-color .12s; }
  .cb:hover { border-color: var(--color-ink); }
  .cb:focus-visible { outline: none; box-shadow: var(--focus); }
  .cb:checked { background: var(--color-ink); border-color: var(--color-ink); }
  .cb:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
  .options { display: grid; gap: 8px; }
  .option { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .12s, background .12s; }
  .option:hover { border-color: #b9bec6; }
  .option.is-on { border-color: var(--color-ink); background: #fafbfc; }
  .option__title { font-weight: 600; color: var(--color-ink); font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .option__desc { display: block; font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; text-wrap: pretty; }
  .tchips { display: flex; flex-wrap: wrap; gap: 8px; }
  .tchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-family: var(--mono); font-size: 12.5px; color: var(--color-ink-soft); cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
  .tchip .ti { font-size: 14px; }
  .tchip:hover { border-color: #b9bec6; }
  .tchip[aria-pressed="true"] { background: var(--color-ink); border-color: var(--color-ink); color: #fff; }
  .tchip:focus-visible { outline: none; box-shadow: var(--focus); }
  .switch { appearance: none; -webkit-appearance: none; position: relative; width: 36px; height: 20px; flex: 0 0 36px; margin: 0; border-radius: 999px; background: #c8ccd2; cursor: pointer; transition: background .15s; }
  .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
  .switch:checked { background: var(--success); }
  .switch:checked::after { transform: translateX(16px); }
  .switch:focus-visible { outline: none; box-shadow: var(--focus); }
  .switch[disabled] { cursor: progress; opacity: .6; }
  .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .switch-row label { cursor: pointer; }
  .kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13px; }
  .kv dt { color: var(--color-text-muted); white-space: nowrap; }
  .kv dd { margin: 0; color: var(--color-ink); overflow-wrap: anywhere; min-width: 0; }
  .danger-zone { border-color: var(--danger-border); }
  .danger-zone .panel__head { border-bottom-color: var(--danger-border); }
  .danger-zone .panel__head h2 { color: var(--danger); }
  .dz-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .dz-row + .dz-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .dz-row strong { display: block; font-size: 13px; color: var(--color-ink); }
  .dz-row span { font-size: 12.5px; color: var(--color-text-muted); }

  /* ── Action bar ────────────────────────────────────── */
  .actionbar { position: sticky; bottom: 16px; z-index: 15; margin-top: 20px; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(14, 22, 38, .10); }
  .actionbar__msg { font-size: 13px; color: var(--color-text-muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
  .actionbar__msg .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: 0 0 8px; }
  .actionbar__btns { display: flex; gap: 8px; margin-left: auto; }

  /* ── Secret reveal ─────────────────────────────────── */
  .secret { border: 1px solid var(--success-border); background: var(--success-soft); border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; animation: adm-pop .2s; }
  .secret h2 { margin: 0 0 4px; font-size: 14.5px; color: var(--success); display: flex; align-items: center; gap: 8px; }
  .secret p { margin: 0 0 12px; font-size: 13px; color: #245c3f; }
  .secret__row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
  .secret__row > span { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #245c3f; }
  .copybox { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 4px 4px 12px; min-width: 0; min-height: 42px; }
  .copybox code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12.5px; color: var(--color-ink); }
  .secret .copybox { border-color: var(--success-border); }
  .secret__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
  .check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; color: var(--color-ink); }
  .after-secret { display: flex; gap: 8px; flex-wrap: wrap; }

  /* ── Guide ─────────────────────────────────────────── */
  .steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
  .steps li { counter-increment: s; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.5; }
  .steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: #eef0f3; color: var(--color-ink); font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
  .callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 6px; background: var(--warn-soft); color: #6f470c; font-size: 12.5px; line-height: 1.45; margin-top: 16px; }
  .callout .ti { font-size: 16px; margin-top: 1px; flex: 0 0 16px; }
  .guide-toggle { display: none; }
  .guide-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
  .guide-link .ti { font-size: 14px; }

  /* ── Provider cards ────────────────────────────────── */
  .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
  .pcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 8px; min-width: 0; transition: opacity .15s; }
  .pcard__head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 18px 14px 20px; }
  .pcard__logo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--color-ink); }
  .pcard__logo .ti { font-size: 22px; }
  .pcard__title { flex: 1; min-width: 0; }
  .pcard__name { font-weight: 600; color: var(--color-ink); font-size: 15px; line-height: 1.3; }
  .pcard__body { padding: 0 20px 16px; }
  .pcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: #fafbfb; border-radius: 0 0 8px 8px; }
  .pcard__foot label { font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 10px; }
  .pcard.is-off .pcard__logo { color: var(--color-text-faint); }

  /* ── Menu ──────────────────────────────────────────── */
  .menu { position: relative; }
  .menu__pop { position: absolute; right: 0; top: calc(100% + 4px); min-width: 190px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(14, 22, 38, .14); z-index: 30; animation: adm-pop .12s; }
  .menu__item { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 5px; background: none; font-size: 13px; color: var(--color-ink); cursor: pointer; text-align: left; text-decoration: none; white-space: nowrap; }
  .menu__item .ti { font-size: 16px; color: var(--color-text-muted); }
  .menu__item:hover, .menu__item:focus-visible { background: #f1f2f4; outline: none; color: var(--color-ink); }
  .menu__item--danger, .menu__item--danger .ti { color: var(--danger); }
  .menu__item--danger:hover { background: var(--danger-soft); color: var(--danger); }
  .menu__sep { height: 1px; background: var(--line); margin: 4px; }

  /* ── Dialog ────────────────────────────────────────── */
  .overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(14, 22, 38, .42); animation: adm-fade .15s; }
  .dialog { width: 100%; max-width: 440px; padding: 24px; background: #fff; border-radius: 12px; box-shadow: 0 24px 64px rgba(14, 22, 38, .28); animation: adm-pop .18s; }
  .dialog__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); margin-bottom: 14px; }
  .dialog__icon .ti { font-size: 20px; }
  .dialog h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--color-ink); }
  .dialog p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--color-text-muted); text-wrap: pretty; }
  .dialog p strong { color: var(--color-ink); font-weight: 600; }
  .dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

  /* ── Empty / skeleton ──────────────────────────────── */
  .empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 48px 24px; color: var(--color-text-muted); font-size: 13px; }
  .empty > .ti { font-size: 28px; color: var(--color-text-faint); margin-bottom: 6px; }
  .empty h3 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--color-ink); }
  .empty p { margin: 0; max-width: 44ch; text-wrap: pretty; }
  .empty .btn { margin-top: 10px; }
  .skel { height: 12px; border-radius: 4px; background: linear-gradient(90deg, #eef0f3 0%, #f7f8f9 50%, #eef0f3 100%); background-size: 200% 100%; animation: adm-shimmer 1.2s linear infinite; }
  .skel-rows { padding: 8px 16px; }
  .skel-rows div { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .skel-rows div:last-child { border-bottom: 0; }

  /* ── Account links ─────────────────────────────────── */
  .usercard { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .usercard__meta { flex: 1; min-width: 160px; }
  .usercard__name { font-weight: 600; font-size: 15px; color: var(--color-ink); }
  .usercard__sub { font-size: 12.5px; color: var(--color-text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
  .search-row { display: flex; gap: 8px; align-items: flex-start; max-width: 520px; }
  .search-row .field { flex: 1; margin: 0; }
  .add-link { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; gap: 8px; align-items: start; }
  .tbl-wrap--split { border-top: 1px solid var(--line); }

  .muted { color: var(--color-text-faint); }
  .align-field { margin-top: 23px; }

  /* ── Responsive ────────────────────────────────────── */
  @media (max-width: 1100px) and (min-width: 761px) {
    .hide-md { display: none; }
  }

  @media (min-width: 861px) {
    & { transition: grid-template-columns .2s ease; }
    &.is-rail { --sidebar-w: 68px; }
    &.is-rail .sidebar { padding: 16px 10px; align-items: stretch; }
    &.is-rail .sidebar__brand { justify-content: center; padding: 0; }
    &.is-rail .sidebar__brand img, &.is-rail .sidebar__tag, &.is-rail .nav__label, &.is-rail .nav__link span, &.is-rail .nav__count, &.is-rail .version { display: none; }
    &.is-rail .sidebar__mono { display: grid; }
    &.is-rail .nav__link { justify-content: center; padding: 0; position: relative; }
    &.is-rail .nav__link .nav__count--warn { display: block; position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); font-size: 0; }
    &.is-rail .nav__group { gap: 4px; }
    &.is-rail .nav__group + .nav__group { border-top: 1px solid var(--line); padding-top: 14px; }
    .topbar .topbar__collapse { display: inline-flex; }
  }

  @media (max-width: 1024px) {
    .form-layout { grid-template-columns: minmax(0, 1fr); }
    .aside { position: static; }
    .dash-grid { grid-template-columns: minmax(0, 1fr); }
    .guide-toggle { display: flex; }
  }

  @media (max-width: 860px) {
    & { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 288px); z-index: 120; transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
    &.nav-open .sidebar { transform: none; box-shadow: 0 0 48px rgba(14, 22, 38, .25); }
    &.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(14, 22, 38, .4); animation: adm-fade .15s; }
    .topbar { padding: 0 12px 0 8px; gap: 6px; }
    .topbar .topbar__menu { display: inline-flex; }
    .content { padding: 20px 16px 48px; }
    .crumbs a, .crumbs .ti { display: none; }
    .crumbs__current { font-weight: 600; }
  }

  @media (max-width: 760px) {
    .tbl thead { display: none; }
    .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
    .tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .tbl tbody tr:last-child { border-bottom: 0; }
    .tbl td { padding: 0; border: 0; min-width: 0; }
    .tbl tbody tr:hover td, .tbl tr.is-dirty td { background: none; }
    .tbl tr.is-dirty { background: #fffbf3; }
    .tbl td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-faint); }
    .tbl td.td-primary, .tbl td.td-wide { grid-column: 1 / -1; }
    .tbl td.td-primary::before { display: none; }
    .tbl td.col-actions { grid-column: 1 / -1; width: auto; text-align: left; }
    .tbl td.col-actions:empty { display: none; }
    .tbl td.col-actions .row-actions { justify-content: flex-start; flex-wrap: wrap; }
    .tbl td.col-actions .btn--sm { height: 36px; }
    .tbl td.td-primary { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .toolbar__count { display: none; }
    .add-link { grid-template-columns: minmax(0, 1fr); }
    .add-link .align-field { margin-top: 0; height: 42px; }
  }

  @media (max-width: 640px) {
    .page-head { margin-bottom: 18px; }
    .page-head h1 { font-size: 20px; }
    .page-head__actions { width: 100%; }
    .page-head__actions .btn { flex: 1; height: 42px; }
    .search { max-width: none; flex-basis: 100%; }
    .toolbar { padding: 12px; }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .section { padding: 18px 16px; }
    .panel__head { padding: 14px 16px; }
    .panel__body { padding: 16px; }
    .list li { padding: 12px 16px; }
    .actionbar { bottom: 0; margin: 20px -16px 0; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
    .actionbar__btns { width: 100%; }
    .actionbar__btns .btn { flex: 1; height: 44px; }
    .overlay { place-items: end stretch; padding: 0; }
    .dialog { max-width: none; border-radius: 16px 16px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
    .dialog__actions { flex-direction: column-reverse; }
    .dialog__actions .btn { width: 100%; height: 44px; }
    .search-row { flex-direction: column; align-items: stretch; max-width: none; }
    .search-row .btn { height: 42px; margin-top: 0; }
    .stat__value { font-size: 26px; }
    .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
    .stat { padding: 14px; }
    .stat__meta { font-size: 12px; }
  }

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