/* Aimon dashboard — stylesheet.
 *
 * Dark-first: this is an operations console that lives on an analyst's second
 * monitor and on wall displays, both of which are almost always dark. A light
 * palette is provided for anyone who prefers it.
 *
 * No build step, no CSS framework. The whole surface is a sidebar, a few cards,
 * two table shapes and one drawer.
 */

:root {
  --bg: #0a0e13;
  --panel: #111820;
  --panel-2: #161f29;
  --raised: #1c2733;
  --sunk: #0d131a;

  --ink: #e8edf3;
  --ink-2: #c2ccd8;
  --muted: #8695a6;
  --faint: #64717f;

  --line: #1f2a36;
  --line-2: #2b3a49;

  --amber: #f5a524;
  --teal: #35c5d4;
  --green: #43c97f;
  --red: #ef6b5e;
  --violet: #9b8cf5;

  --amber-dim: rgba(245, 165, 36, .13);
  --teal-dim: rgba(53, 197, 212, .13);
  --green-dim: rgba(67, 201, 127, .13);
  --red-dim: rgba(239, 107, 94, .13);
  --violet-dim: rgba(155, 140, 245, .13);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --r: 10px;
  --r-sm: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -14px rgba(0,0,0,.6);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f4f7; --panel: #fff; --panel-2: #f7f9fb; --raised: #eef1f5; --sunk: #e8ecf1;
    --ink: #0e141b; --ink-2: #35414f; --muted: #5c6a7a; --faint: #8b97a5;
    --line: #dde3ea; --line-2: #c6cfd9;
    --amber: #a86a05; --teal: #0a6f7c; --green: #17743c; --red: #b3302a; --violet: #5a48c0;
    --amber-dim: rgba(168,106,5,.09); --teal-dim: rgba(10,111,124,.09);
    --green-dim: rgba(23,116,60,.09); --red-dim: rgba(179,48,42,.09);
    --violet-dim: rgba(90,72,192,.09);
  }
}

/* ---------------------------------------------------------------------------
 * The `hidden` attribute must actually hide.
 *
 * `hidden` works through a UA default of `[hidden] { display: none }`, and ANY
 * author rule that sets `display` on the same element wins — author styles beat
 * UA styles. So `.drawer { display: flex }` silently defeated `<aside hidden>`,
 * leaving the detail panel permanently open over every page while the JS happily
 * reported it as closed.
 *
 * This must stay ABOVE the component rules and carry !important, because those
 * rules set `display` themselves. Every element in this app that toggles via
 * `hidden` (drawer, scrim, filter bar, toast, pair card, views) depends on it.
 * --------------------------------------------------------------------------- */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
h1 { font-size: 1.35rem; }
h2 { font-size: .95rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.small { font-size: .8rem; }
button { font: inherit; }

/* ------------------------------------------------------------ layout */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex: 0 0 232px; background: var(--panel);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.logo { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.15rem; border-bottom: 1px solid var(--line); }
.logo-mark { font-size: 1.35rem; color: var(--amber); line-height: 1; }
.logo-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em; }
.logo-sub { font-size: .68rem; color: var(--faint); text-transform: uppercase; letter-spacing: .09em; }

.nav { padding: .7rem .6rem; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: .65rem; width: 100%;
  background: none; border: none; color: var(--muted); text-align: left;
  padding: .55rem .65rem; border-radius: var(--r-sm); cursor: pointer; font-size: .89rem;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--panel-2); color: var(--ink); }
.nav-item.active { background: var(--raised); color: var(--ink); font-weight: 500; }
.nav-item.active .nav-ico { color: var(--amber); }
.nav-ico { width: 1.1em; text-align: center; opacity: .9; }
.nav-badge {
  margin-left: auto; font-family: var(--mono); font-size: .7rem; color: var(--faint);
  background: var(--sunk); padding: .05rem .35rem; border-radius: 4px;
}

.sidebar-foot { padding: .9rem 1.15rem; border-top: 1px solid var(--line); }
.conn { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); }
.conn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.conn.bad .conn-dot { background: var(--red); }
.conn.bad { color: var(--red); }
.conn-meta { font-size: .68rem; color: var(--faint); margin-top: .3rem; word-break: break-all; }

.content { flex: 1; min-width: 0; padding: 1.3rem 1.6rem 4rem; max-width: 1680px; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.page-sub { margin: .2rem 0 0; color: var(--muted); font-size: .86rem; }
.page-actions { display: flex; gap: .5rem; align-items: center; }

/* ------------------------------------------------------------ cards */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1rem 1.15rem; margin-bottom: 1rem;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.card-note { font-size: .75rem; color: var(--faint); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1080px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------ KPIs */
.kpi-row { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); margin-bottom: 1rem; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: .85rem .95rem; position: relative; overflow: hidden;
}
.kpi::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--line-2); }
.kpi.amber::after { background: var(--amber); }
.kpi.teal::after { background: var(--teal); }
.kpi.green::after { background: var(--green); }
.kpi.red::after { background: var(--red); }
.kpi-n { font-size: 1.65rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.kpi-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-top: .25rem; }
.kpi-sub { font-size: .74rem; color: var(--muted); margin-top: .2rem; }

/* ------------------------------------------------------------ charts */
.chart-holder { min-height: 120px; }
.chart-holder svg { display: block; width: 100%; height: auto; }
.chart-empty { color: var(--faint); font-size: .84rem; padding: 2rem 0; text-align: center; }

.bars { display: flex; flex-direction: column; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; gap: .7rem; align-items: center; }
.bar-label { font-size: .84rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--sunk); border-radius: 3px; height: 8px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--teal); min-width: 2px; transition: width .35s ease; }
.bar-fill.amber { background: var(--amber); }
.bar-fill.red { background: var(--red); }
.bar-fill.violet { background: var(--violet); }
.bar-val { font-family: var(--mono); font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .855rem; }
.tbl th {
  text-align: left; padding: .45rem .65rem; font-family: var(--mono); font-weight: 500;
  font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--panel-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-family: var(--mono); font-size: .8rem; }
.cell-2 { line-height: 1.25; }
.cell-2 .sub { font-size: .74rem; color: var(--faint); }
.empty-row { padding: 2.5rem 1rem; text-align: center; color: var(--faint); }
.empty-row strong { display: block; color: var(--ink-2); margin-bottom: .3rem; font-weight: 500; }

/* ------------------------------------------------------------ pills */
.pill {
  display: inline-block; font-family: var(--mono); font-size: .655rem; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase; padding: .14rem .42rem;
  border-radius: 4px; white-space: nowrap;
}
.pill.teal { background: var(--teal-dim); color: var(--teal); }
.pill.amber { background: var(--amber-dim); color: var(--amber); }
.pill.green { background: var(--green-dim); color: var(--green); }
.pill.red { background: var(--red-dim); color: var(--red); }
.pill.violet { background: var(--violet-dim); color: var(--violet); }
.pill.grey { background: var(--raised); color: var(--muted); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.live { background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.dot.idle { background: var(--faint); }

/* ------------------------------------------------------------ toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-bottom: .9rem; }
.search { position: relative; flex: 0 1 320px; }
.search-ico { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: .95rem; }
.search input, .sel {
  width: 100%; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink);
  padding: .45rem .7rem .45rem 1.9rem; border-radius: var(--r-sm); font-size: .875rem;
}
.sel { padding-left: .7rem; width: auto; }
.search input:focus, .sel:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.chip {
  background: var(--panel); border: 1px solid var(--line-2); color: var(--muted);
  padding: .42rem .8rem; border-radius: 999px; cursor: pointer; font-size: .82rem;
}
.chip:hover { color: var(--ink); }
.chip[data-on="true"] { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.count { font-size: .8rem; margin-left: auto; }

/* ------------------------------------------------------------ devices */
.device-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.dev {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.05rem; cursor: pointer; transition: border-color .14s, transform .14s;
}
.dev:hover { border-color: var(--teal); transform: translateY(-1px); }
.dev-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.dev-host { font-weight: 600; font-size: .95rem; }
.dev-id { font-family: var(--mono); font-size: .7rem; color: var(--faint); }
.dev-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin: .7rem 0; }
.dev-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.dev-stat .v { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dev-stat .l { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.cap { display: flex; align-items: center; gap: .4rem; }
.cap-bar { width: 46px; height: 5px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.cap-fill { height: 100%; background: var(--green); }
.cap-fill.warn { background: var(--amber); }
.cap-fill.bad { background: var(--red); }

/* ------------------------------------------------------------ deploy */
.deploy-lead { color: var(--ink-2); margin: 0 0 .9rem; }
.platform-row { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.plat {
  display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; text-align: left;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink);
  padding: .75rem .9rem; border-radius: var(--r-sm); cursor: pointer; position: relative;
}
.plat:hover { border-color: var(--teal); }
.plat.on { border-color: var(--amber); background: var(--amber-dim); }
.plat.off { opacity: .45; cursor: not-allowed; }
.plat-name { font-weight: 600; font-size: .9rem; }
.plat-meta { font-family: var(--mono); font-size: .68rem; color: var(--faint); }
.plat-tag {
  position: absolute; top: .5rem; right: .6rem; font-size: .6rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--teal); background: var(--teal-dim); padding: .1rem .3rem; border-radius: 3px;
}

.cmd-box { display: flex; gap: .6rem; align-items: stretch; }
.cmd {
  flex: 1; margin: 0; background: var(--sunk); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .8rem .9rem; font-family: var(--mono);
  font-size: .8rem; color: var(--ink); overflow-x: auto; white-space: pre;
}
.btn-primary {
  background: var(--teal); color: var(--bg); border: none; border-radius: var(--r-sm);
  padding: 0 1.1rem; font-weight: 600; font-size: .85rem; cursor: pointer; white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.08); }
.deploy-note { font-size: .8rem; margin: .7rem 0 0; }

.pair { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .9rem; }
.pair.done { color: var(--green); }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; flex: 0 0 auto; }
.pair.done .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(820px, 96vw);
  background: var(--panel); border-left: 1px solid var(--line-2);
  z-index: 60; display: flex; flex-direction: column; box-shadow: var(--shadow);
  animation: slide .18s ease;
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--panel);
}
.drawer-sub { margin: .2rem 0 0; font-size: .8rem; color: var(--muted); font-family: var(--mono); }
.btn-icon { background: none; border: none; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: .2rem .4rem; border-radius: 4px; }
.btn-icon:hover { color: var(--ink); background: var(--raised); }
.drawer-body { overflow-y: auto; padding: 1.1rem 1.2rem 4rem; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: .5rem; margin-bottom: 1.1rem; }
.fact { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem .65rem; }
.fact .k { font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.fact .v { font-size: .87rem; margin-top: .15rem; word-break: break-word; }

.section-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint); margin: 1.3rem 0 .6rem; display: flex; align-items: center; gap: .6rem;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.banner { border-radius: var(--r-sm); padding: .6rem .8rem; font-size: .84rem; margin-bottom: .8rem; border: 1px solid; }
.banner.warn { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.banner.red { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.banner.info { background: var(--teal-dim); border-color: var(--teal); color: var(--teal); }

/* ---------------------- transcript (the demo centrepiece) ------------ */
.turns { display: flex; flex-direction: column; gap: .7rem; }
.turn { display: flex; gap: .6rem; max-width: 92%; }
.turn.out { align-self: flex-start; }
.turn.in { align-self: flex-end; flex-direction: row-reverse; }

.avatar {
  width: 27px; height: 27px; flex: 0 0 auto; border-radius: 7px;
  display: grid; place-items: center; font-size: .7rem; font-weight: 700;
  font-family: var(--mono);
}
.turn.out .avatar { background: var(--amber-dim); color: var(--amber); }
.turn.in .avatar { background: var(--teal-dim); color: var(--teal); }

.bubble { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: .6rem .8rem; min-width: 0; }
.turn.out .bubble { border-left: 2px solid var(--amber); }
.turn.in .bubble { border-right: 2px solid var(--teal); }
.bubble.blocked { border-color: var(--red); background: var(--red-dim); }

.bubble-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .35rem; }
.bubble-when { font-family: var(--mono); font-size: .68rem; color: var(--faint); margin-left: auto; }
.bubble-text { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: .87rem; line-height: 1.55; }
.bubble-foot { margin-top: .45rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.trunc { font-size: .72rem; color: var(--faint); font-style: italic; }

.event-line {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .4rem .7rem; background: var(--sunk); border: 1px dashed var(--line-2);
  border-radius: var(--r-sm); font-size: .8rem; color: var(--muted);
}
.event-line .when { margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--faint); }

/* ------------------------------------------------------------ misc */
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  background: var(--raised); border: 1px solid var(--line-2); color: var(--ink);
  padding: .55rem 1rem; border-radius: 999px; font-size: .85rem; z-index: 90; box-shadow: var(--shadow);
}
.skeleton { background: linear-gradient(90deg, var(--panel-2) 25%, var(--raised) 50%, var(--panel-2) 75%);
  background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: var(--r-sm); }
@keyframes sh { to { background-position: -200% 0; } }
.sk-kpi { height: 76px; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; }
  .logo { border-bottom: none; border-right: 1px solid var(--line); }
  .nav { flex-direction: row; padding: .5rem; }
  .nav-item { white-space: nowrap; }
  .sidebar-foot { display: none; }
  .content { padding: 1rem; }
}

/* ------------------------------------------------------------ auth gate */
.gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--bg);
}
.gate-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 2rem 2.2rem; width: min(360px, 92vw); text-align: center; box-shadow: var(--shadow);
}
.gate-mark { font-size: 2rem; color: var(--amber); line-height: 1; }
.gate-card h2 { margin: .4rem 0 .3rem; font-size: 1.25rem; }
.gate-card p { margin: 0 0 1.2rem; }
.gate-input {
  width: 100%; background: var(--sunk); border: 1px solid var(--line-2); color: var(--ink);
  padding: .6rem .75rem; border-radius: var(--r-sm); font-size: .9rem; font-family: var(--mono);
}
.gate-input:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.gate-btn { width: 100%; margin-top: .7rem; padding: .6rem 0; }
.gate-err { color: var(--red); font-size: .8rem; min-height: 1.1em; margin: .6rem 0 0 !important; }

/* ------------------------------------------------- device card footer */
.dev-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line);
}
.dev-cta { font-size: .8rem; color: var(--teal); font-weight: 500; }
.dev-details {
  background: none; border: 1px solid var(--line-2); color: var(--muted);
  padding: .22rem .6rem; border-radius: 5px; font-size: .78rem; cursor: pointer;
}
.dev-details:hover { color: var(--ink); border-color: var(--muted); }
.dev:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ------------------------------------------------- active filter bar */
.filter-bar {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  background: var(--teal-dim); border: 1px solid var(--teal);
  border-radius: var(--r-sm); padding: .5rem .8rem; margin-bottom: .8rem; font-size: .85rem;
}
.fb-label { color: var(--muted); }
.filter-bar strong { color: var(--ink); }
.fb-clear, .fb-link {
  background: none; border: 1px solid var(--teal); color: var(--teal);
  padding: .18rem .6rem; border-radius: 5px; font-size: .78rem; cursor: pointer;
}
.fb-clear { margin-left: auto; }
.fb-link { border-color: var(--line-2); color: var(--muted); }
.fb-clear:hover, .fb-link:hover { filter: brightness(1.15); }

/* The signed-in user on a device card. Sits between the hostname and the id:
   more prominent than the id (an analyst looks for the person, not the uuid),
   less prominent than the hostname. */
.dev-user {
  font-size: .84rem;
  color: var(--ink-2);
  margin-top: .12rem;
}
.dev-user:empty { display: none; }

/* ===================================================== plugin form */

.plugin-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: .95rem 1.1rem;
  margin-top: .9rem;
}
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
/* The endpoint list and the notes read as one long line, so they span. */
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .82rem; color: var(--ink-2); }

.field input, .field textarea {
  width: 100%; background: var(--sunk); border: 1px solid var(--line-2); color: var(--ink);
  padding: .5rem .7rem; border-radius: var(--r-sm); font-size: .875rem;
  font-family: var(--sans);
}
.field textarea { font-family: var(--mono); font-size: .82rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }

.field-hint { margin: .1rem 0 0; font-size: .78rem; color: var(--muted); line-height: 1.45; }
.field-error { margin: .1rem 0 0; font-size: .78rem; color: var(--red); }
/* A red ring, never colour alone: the message underneath carries the meaning. */
.field input.invalid, .field textarea.invalid { border-color: var(--red); }

.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: .8rem; }
.form-msg { font-size: .82rem; color: var(--muted); }
.form-msg.good { color: var(--green); }
.form-msg.bad { color: var(--red); }

/* A disabled plugin stays legible — it is configuration an operator will come
   back to — but must not read as active. */
.row-off td { opacity: .55; }
.row-actions { display: flex; align-items: center; gap: .4rem; justify-content: flex-end; }

@media (max-width: 720px) {
  .plugin-form { grid-template-columns: 1fr; }
}
