/* Mu Abanico — design system for the public site and the admin.
   Dark forged-metal look: blue-black stone, parchment text, one gilded accent.
   Loaded after app.css, so the legacy editor classes below inherit the theme. */

:root {
  color-scheme: dark;
  --ink: #0d1016;
  --ink-2: #0a0d12;
  --slab: #151a23;
  --slab-2: #1c2330;
  --slab-3: #232c3c;
  --rule: #2a3242;
  --text: #e6e1d6;
  --muted: #9aa1ad;
  --gold: #d2a64a;
  --gold-hi: #e9c877;
  --gold-dim: #8a6b2c;
  --exc: #4fd38a;
  --warn: #e0a43a;
  --crit: #e5604f;
  --blue: #7fb2ff;
  --display: "Marcellus SC", "Trajan Pro", Georgia, serif;
  --body: "Alegreya Sans", "Gill Sans", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 6px;

  /* legacy app.css tokens, re-pointed so every old editor follows the theme */
  --bg: var(--ink);
  --card: var(--slab);
  --accent: var(--gold);
  --danger: var(--crit);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { background: var(--ink); color: var(--text); }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; text-wrap: balance; margin: 0; color: var(--text); }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.08; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.15; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { margin: 0; }
code, kbd { font-family: var(--mono); font-size: .86em; background: var(--slab-2); padding: 1px 5px; border-radius: 3px; }
hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); margin: 0; }
img { max-width: 100%; }
::selection { background: var(--gold-dim); color: var(--text); }

.eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.muted, .text-muted { color: var(--muted) !important; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- buttons ---------- */
.btn, .button-link, .link-button, button.btn, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); letter-spacing: .05em; font-size: .92rem; line-height: 1.2;
  padding: 8px 16px; border-radius: var(--r); border: 1px solid var(--gold-dim);
  color: var(--text); background: var(--slab-2); cursor: pointer; text-decoration: none;
  transition: filter .15s, background .15s, border-color .15s;
}
.btn:hover, .button-link:hover, .link-button:hover { filter: brightness(1.12); color: var(--text); }
.btn.gold, .btn-primary, button[type=submit].primary {
  background: linear-gradient(180deg, #e4bd63, #b98a31); color: #1a1205 !important; border-color: var(--gold-hi);
  box-shadow: inset 0 1px 0 #fff3, 0 8px 22px -12px var(--gold);
}
.btn.ghost { background: transparent; }
.btn.danger { border-color: color-mix(in srgb, var(--crit) 55%, transparent); color: #ffb3a6; background: color-mix(in srgb, var(--crit) 10%, var(--slab-2)); }
.btn.sm, .btn-sm { padding: 5px 11px; font-size: .8rem; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; filter: none; }
@media (prefers-reduced-motion: reduce) { .btn, .button-link { transition: none; } }

/* ---------- pills / tags ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .74rem; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--exc) 15%, transparent); color: var(--exc); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.off { background: color-mix(in srgb, var(--crit) 16%, transparent); color: var(--crit); }
.pill.idle { background: var(--slab-2); color: var(--muted); }
.gm-mark { font-family: var(--mono); font-size: .66rem; padding: 1px 5px; border-radius: 3px; background: #3a1a12; color: #ff9b7a; margin-left: 6px; letter-spacing: .06em; vertical-align: middle; }
.cls { font-family: var(--mono); font-size: .7rem; padding: 1px 6px; border-radius: 3px; background: var(--slab-2); color: var(--muted); white-space: nowrap; }

/* ---------- surfaces ---------- */
.card, .panel { background: var(--slab); border: 1px solid var(--rule); border-radius: 8px; padding: 16px 18px; display: grid; gap: 12px; align-content: start; min-width: 0; color: var(--text); }
.card + .card { margin-top: 0; }
.card-sub { color: var(--muted); font-size: .9rem; }
.card h2, .card h3 { font-size: 1.15rem; }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.panel-h h3, .panel-h h2 { font-size: 1.05rem; }
.panel-h a { font-size: .84rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- alerts ---------- */
.alert { border: 1px solid var(--rule); border-left: 3px solid var(--gold); background: var(--slab-2); color: var(--text); padding: 10px 14px; border-radius: 6px; }
.alert.success, .alert-success { border-left-color: var(--exc); }
.alert.error, .alert.danger, .alert-danger { border-left-color: var(--crit); }
.alert.warning, .alert-warning { border-left-color: var(--warn); }
.editor-message { font-size: .9rem; color: var(--muted); }
.editor-message.success { color: var(--exc); }
.editor-message.error { color: var(--crit); }

/* ---------- forms ---------- */
.field { display: grid; gap: 5px; }
.field > label, label.field-label { font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], input[type=datetime-local], input[type=date], input[type=time], input:not([type]), select, textarea, .form-control {
  background: var(--slab-2) !important; color: var(--text) !important; border: 1px solid var(--rule) !important; border-radius: 5px; padding: 8px 10px; font-family: var(--body); font-size: .95rem; min-width: 0; max-width: 100%;
}
input:focus, select:focus, textarea:focus, .form-control:focus { border-color: var(--gold-dim) !important; outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent) !important; }
input[type=number], .mono-input { font-family: var(--mono); font-variant-numeric: tabular-nums; }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); }
::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.hint { font-size: .78rem; color: var(--muted); }

/* ---------- tables ---------- */
table, .table { width: 100%; border-collapse: collapse; font-size: .92rem; color: var(--text); background: transparent; }
th, .table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; border-bottom: 1px solid var(--rule); background: transparent; }
td, .table td { padding: 8px 10px; border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); font-variant-numeric: tabular-nums; background: transparent; color: var(--text); }
tbody tr:hover td { background: color-mix(in srgb, var(--slab-2) 60%, transparent); }
td.n, th.n { text-align: right; font-family: var(--mono); }
.table-wrap { overflow-x: auto; }

/* ---------- toggle switch ---------- */
.switch { position: relative; display: inline-block; width: 42px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--slab-3); border: 1px solid var(--rule); transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--gold); border-color: var(--gold-hi); }
.switch input:checked + span::after { transform: translateX(19px); background: #1a1205; }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- language toggle ---------- */
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; font-family: var(--mono); font-size: .72rem; }
.lang a { padding: 3px 8px; color: var(--muted); }
.lang a[aria-current=true] { background: var(--slab-2); color: var(--gold); }

/* =================================================================
   PUBLIC SITE
   ================================================================= */
.pub-wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.pub-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ink-2) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.pub-nav .pub-wrap { display: flex; align-items: center; gap: 22px; padding-block: 12px; }
.brand { font-family: var(--display); color: var(--gold); font-size: 1.15rem; letter-spacing: .1em; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand svg { width: 22px; height: 22px; flex: none; }
.pub-links { display: flex; gap: 20px; margin-right: auto; }
.pub-links a { color: var(--text); font-size: .95rem; }
.pub-links a[aria-current=page] { color: var(--gold); }
.pub-actions { display: flex; align-items: center; gap: 10px; }
.srv-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .78rem; color: var(--exc); white-space: nowrap; margin-right: 4px; }
.srv-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.srv-status .srv-count { color: var(--muted); }
.srv-status .srv-count:not(:empty)::before { content: "· "; }
.srv-status.off { color: var(--crit); }
.srv-status.unknown { color: var(--muted); }
@media (max-width: 1100px) { .srv-status .srv-label { display: none; } .srv-status .srv-count:not(:empty)::before { content: ""; } }
@media (max-width: 520px) { .srv-status .srv-count { display: none; } .srv-status { margin-right: 0; } .pub-nav .pub-wrap { gap: 12px; } }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); color: var(--text); border-radius: 5px; padding: 5px 9px; font-size: 1rem; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; margin-left: auto; }
  .pub-links, .pub-actions .hide-sm { display: none; }
  .pub-nav.open .pub-links { display: grid; position: absolute; top: 100%; left: 0; right: 0; background: var(--ink-2); border-bottom: 1px solid var(--rule); padding: 12px max(16px, env(safe-area-inset-left, 0px)); gap: 12px; }
}

.hero { background: radial-gradient(120% 140% at 0% 0%, #1d2a44 0%, transparent 55%), radial-gradient(90% 120% at 100% 100%, #2b2312 0%, transparent 50%), var(--ink); border-bottom: 1px solid var(--rule); }
.hero .pub-wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: center; padding-block: 56px; }
.hero p.lead { color: var(--muted); margin-top: 12px; max-width: 48ch; font-size: 1.12rem; }
.hero .cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero .btn { font-size: 1.02rem; padding: 11px 22px; }
.status { background: var(--slab); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; display: grid; gap: 14px; }
.status .line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.status .k { color: var(--muted); font-size: .88rem; }
.status .v { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rates div { background: var(--slab-2); border-radius: 6px; padding: 9px 11px; display: grid; gap: 2px; }
.rates b { font-family: var(--mono); font-size: 1.1rem; color: var(--gold); font-weight: 600; }
.rates span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.page-head { padding-block: 40px 8px; display: grid; gap: 8px; }
.page-head p { color: var(--muted); max-width: 62ch; }
.pub-main { padding-block: 28px 56px; display: grid; gap: 28px; }
.cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; }
.cols > * { min-width: 0; }
.news-item { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px dashed var(--rule); }
.news-item small { font-family: var(--mono); color: var(--muted); font-size: .72rem; letter-spacing: .06em; }
.news-item p { color: var(--muted); font-size: .95rem; }
.news-body { max-width: 70ch; display: grid; gap: 14px; }
.news-body img { border-radius: 6px; }
.ev { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.ev .v { font-family: var(--mono); color: var(--gold); font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 5px; color: var(--muted); font-size: .88rem; }
.tabs a[aria-current=page], .tabs a.active { border-color: var(--gold-dim); color: var(--gold); background: var(--slab-2); }
.auth { max-width: 420px; margin: 48px auto; width: 100%; }
.empty { color: var(--muted); padding: 18px 0; }
.pub-foot { border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem; }
.pub-foot .pub-wrap { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-block: 22px; }
@media (max-width: 820px) {
  .hero .pub-wrap, .cols { grid-template-columns: 1fr; }
  .hero .pub-wrap { padding-block: 36px; }
}

/* =================================================================
   ADMIN SHELL
   ================================================================= */
.adm { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink-2); border-right: 1px solid var(--rule); padding: 18px 12px 24px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: 2px 8px 6px; font-size: 1.02rem; }
.side .grp { display: grid; gap: 1px; }
.side .grp > span { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dim); padding: 0 8px 5px; }
.side a.nav { color: var(--muted); padding: 6px 9px; border-radius: 5px; display: flex; justify-content: space-between; align-items: center; font-size: .93rem; }
.side a.nav:hover { color: var(--text); background: color-mix(in srgb, var(--slab-2) 60%, transparent); }
.side a.nav[aria-current=page] { background: var(--slab-2); color: var(--text); box-shadow: inset 2px 0 0 var(--gold); }
.side a.nav em { font-style: normal; font-family: var(--mono); font-size: .7rem; color: var(--exc); }
.side .foot { margin-top: auto; display: grid; gap: 10px; padding: 0 8px; font-size: .84rem; }
.main { padding: 22px 28px 48px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.crumbs { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.crumbs h1 { font-size: 1.6rem; }
.crumbs small { color: var(--muted); font-family: var(--mono); font-size: .74rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--slab); border: 1px solid var(--rule); border-radius: 8px; padding: 13px 15px; display: grid; gap: 4px; }
.kpi span { color: var(--muted); font-size: .78rem; }
.kpi b { font-family: var(--mono); font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi small { font-size: .76rem; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .btn { justify-content: flex-start; font-family: var(--body); letter-spacing: 0; font-size: .9rem; }
.log { font-family: var(--mono); font-size: .78rem; color: var(--muted); display: grid; gap: 5px; }
.log b { color: var(--text); font-weight: 400; }
.save-bar { position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--gold-dim); border-radius: 8px; background: color-mix(in srgb, var(--gold) 7%, var(--slab)); font-size: .9rem; box-shadow: 0 16px 40px -18px #000; flex-wrap: wrap; }
.save-bar .warn { color: var(--warn); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--gold-dim); border-radius: 7px; background: color-mix(in srgb, var(--gold) 6%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: .76rem; padding: 4px 9px; border-radius: 4px; background: var(--slab-2); border: 1px solid var(--rule); color: var(--muted); cursor: pointer; user-select: none; display: inline-flex; gap: 6px; align-items: center; }
.chip:has(input:checked) { color: var(--exc); border-color: color-mix(in srgb, var(--exc) 45%, transparent); }
.chip input { accent-color: var(--exc); margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.btn.adm-toggle { display: none; }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .adm.open .side { transform: none; box-shadow: 20px 0 60px #000a; }
  .btn.adm-toggle { display: inline-flex; }
  .main { padding: 16px max(16px, env(safe-area-inset-left, 0px)) 40px; }
  .grid2, .actions { grid-template-columns: 1fr; }
}

/* admin pages without the sidebar (login, password) */
.adm-solo { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.adm-solo .card { width: min(420px, 100%); }

/* ---------- legacy editor overrides ---------- */
/* The sidebar replaces the old navigation rows; only page actions marked .keep
   (New news item, New account, vault editors, back to the account) stay. */
.admin-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.admin-links a:not(.keep) { display: none !important; }
.admin-links a.keep::before { content: none !important; }
.admin-links a.keep { margin: 0; }
.main > .card, .main > section.card { margin: 0; }
.simple-list li { border-bottom: 1px solid var(--rule); }
.spawn-editor, .spawn-form, .spawn-list, .spawn-toolbar { color: var(--text); }
.spawn-list { background: var(--slab-2) !important; border-color: var(--rule) !important; }
.bg-white, .bg-light { background: var(--slab) !important; color: var(--text) !important; }
.text-dark { color: var(--text) !important; }
.border { border-color: var(--rule) !important; }
.tab-btn { background: var(--slab-2); color: var(--muted); border: 1px solid var(--rule); border-radius: 5px; padding: 6px 12px; cursor: pointer; font-family: var(--body); }
.tab-btn.active, .tab-btn[aria-selected=true] { color: var(--gold); border-color: var(--gold-dim); }
.custom-note { color: var(--muted); }
legend { font-family: var(--display); color: var(--gold); }
fieldset { border: 1px solid var(--rule); border-radius: 6px; }

.toggle-row, .toggle-row h3, .toggle-row p { text-align: left; }
.toggle-row > div { display: grid; gap: 4px; }

/* app.css turns every form into a column; keep row layouts as rows */
.row, form.row, .toggle-row { flex-direction: row; }
form.inline { display: inline-flex; flex-direction: row; gap: 0; margin: 0; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }

/* Mu Abanico: account vault (read-only, 8 x 15 like the game) */
.vault-card { margin-top: 18px; }
.vault-grid {
  --cell: 34px;
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  grid-template-rows: repeat(var(--rows), var(--cell));
  width: max-content;
  max-width: 100%;
  background-color: #0d0b08;
  background-image:
    linear-gradient(to right, rgba(210,166,74,.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(210,166,74,.12) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  border: 1px solid var(--gold-dim);
  margin-block: 8px;
}
.vault-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 70, 110, .28);
  outline: 1px solid rgba(120, 140, 200, .25);
  outline-offset: -1px;
  cursor: help;
}
.vault-item.exc { background: rgba(40, 140, 60, .25); outline-color: rgba(90, 200, 110, .45); }
.vault-item img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: auto; }
.vault-item:focus-visible { outline: 2px solid var(--gold); }
.vault-count {
  position: absolute; right: 2px; bottom: 0;
  font: 600 11px/1.2 system-ui, sans-serif; color: #f3e3b4;
  text-shadow: 0 0 2px #000, 0 0 2px #000;
}
@media (max-width: 380px) { .vault-grid { --cell: 30px; } }

/* Admin search bars: one row, input grows */
.search-row { display: flex; gap: 8px; align-items: center; margin-block: 4px 14px; }
.search-row input { flex: 1; min-width: 0; margin: 0; }
.search-row .btn { flex: none; width: auto; margin: 0; }

/* Settings: registration mode + invite link */
.reg-modes { border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 10px; padding: 10px 14px; margin-block: 14px; }
.reg-modes legend { padding-inline: 6px; }
.reg-mode { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.reg-mode input { margin-top: 4px; flex: none; width: auto; }
.invite-link { width: 100%; margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; }

/* ---------- admin consistency pass ---------- */
/* Page title block: title + what the page edits, actions on the right */
.crumbs-t { display: grid; gap: 2px; min-width: 0; }
.crumbs-t small { font-family: var(--body); font-size: .85rem; }
.crumbs-t small code { font-size: .78rem; }
.crumbs .admin-links { margin-left: auto; }

/* One-row bars (search, add, create) even inside app.css column forms */
.search-row, form.search-row { flex-direction: row; flex-wrap: nowrap; }

/* Table action cells: plain inline links, not full-width buttons.
   (.actions is also the dashboard's quick-action grid; cells are not.) */
td.actions { display: table-cell; white-space: nowrap; text-align: right; }
td.actions > *, td.actions form { display: inline-flex; vertical-align: middle; margin: 0 0 0 14px; gap: 0; }
td.actions .link-button, td.actions a {
  background: none; border: 0; padding: 0; width: auto; box-shadow: none;
  font-family: var(--body); letter-spacing: 0; font-size: .9rem; color: var(--gold);
}
td.actions form .link-button, td.actions .link-button.danger { color: #f0a090; }
td.actions .link-button:hover, td.actions a:hover { text-decoration: underline; filter: none; }

/* Submit buttons in page forms keep their natural width (login keeps full width) */
.main form > button[type=submit] { align-self: flex-start; min-width: 160px; }
