/* ====================================================================
   Purpose : The Zanus brand controls the public pages and the dashboard compose from.
   Detail  : The pill call to action, the 8px button set, links, the live
             status, labels, badges, panels, tabs, fields, the toggle, the
             table, and the code well. Generic by construction: a page
             positions these, never restyles them. Red is a signal only:
             live, the request's path, errors, destructive actions. One
             .cta per screen; every other action is a .btn or a .link.
             Property order: layout, position, size, spacing, overflow,
             visual, typography, interaction, animation.
   ==================================================================== */

/* ====================================================================
   Kind    : Component
   Name    : .container
   Purpose : The page measure.
   ==================================================================== */
.container { position: relative; z-index: 1; width: 100%; max-width: var(--measure-brand); margin: 0 auto; padding: 0 var(--gutter-brand); }

/* ====================================================================
   Kind    : Component
   Name    : .label
   Purpose : Small uppercase mono caption; the signal modifier marks a step on the request's path.
   ==================================================================== */
.label { color: var(--color-paper-faint); font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.label--signal { color: var(--color-signal-bright); }

/* ====================================================================
   Kind    : Component
   Name    : .status
   Purpose : Live health pill; the dot and the text follow data-state from shared/scripts/status.js.
   ==================================================================== */
.status { display: inline-flex; align-items: center; gap: 9px; color: var(--color-paper-muted); font: 500 12px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.status__dot { position: relative; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--color-paper-faint); }
/* .status__dot::after: the ring that leaves the dot while the platform is live */
.status__dot::after { content: ""; position: absolute; inset: -5px; border: 1px solid var(--color-signal); border-radius: 50%; opacity: 0; }
.status[data-state="ok"] { color: var(--color-paper); }
.status[data-state="ok"] .status__dot { background: var(--color-signal); box-shadow: var(--shadow-signal); }
.status[data-state="ok"] .status__dot::after { animation: ping 2.2s var(--ease-expo) infinite; }
.status[data-state="degraded"] .status__dot { background: var(--color-caution); }
.status[data-state="down"] { color: var(--color-signal-text); }
.status[data-state="down"] .status__dot { background: var(--color-signal); }

/* ====================================================================
   Kind    : Component
   Name    : .cta
   Purpose : The one main action on a screen: a white pill with a red arrow.
   ==================================================================== */
.cta { display: inline-flex; align-items: center; gap: 14px; height: 50px; padding: 0 10px 0 24px; border-radius: 999px; background: var(--color-paper); color: var(--color-ink); font: 500 15px/1 var(--font-brand); white-space: nowrap; cursor: pointer; transition: background-color 0.3s, transform 0.4s var(--ease-expo); }
.cta:hover { background: var(--color-paper-bright); transform: scale(1.03); }
.cta:active { background: var(--color-press); transform: scale(0.97); }
.cta__arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--color-signal-bright); color: var(--color-paper-bright); transition: transform 0.4s var(--ease-expo); }
.cta__arrow svg { width: 14px; height: 14px; }
.cta:hover .cta__arrow { transform: rotate(-45deg); }
.cta--small { height: 38px; padding: 0 16px; font-size: 14px; }

/* ====================================================================
   Kind    : Component
   Name    : .link
   Purpose : A quiet text action whose arrow steps forward on hover.
   ==================================================================== */
.link { display: inline-flex; align-items: center; gap: 10px; color: var(--color-paper); font-size: 15px; white-space: nowrap; }
.link__arrow { transition: transform 0.4s var(--ease-expo); }
.link:hover .link__arrow { transform: translateX(4px); }

/* ====================================================================
   Kind    : Component
   Name    : .btn
   Purpose : The 8px control set for everything that is not the one main action.
   ==================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius-control); font: 500 14px/1 var(--font-brand); white-space: nowrap; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gradient-button); color: var(--color-ink); box-shadow: inset 0 1px 0 var(--color-paper-bright), 0 1px 2px rgba(0, 0, 0, 0.4); }
.btn--primary:hover { box-shadow: inset 0 1px 0 var(--color-paper-bright), 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 0 4px var(--color-signal-haze), 0 8px 24px -8px rgba(254, 0, 0, 0.6); }
.btn--primary:active { background: var(--color-press); }
.btn--secondary { border-color: var(--color-line-strong); background: var(--color-graphite-raised); color: var(--color-paper); }
.btn--secondary:hover { border-color: var(--color-line-hover); background: var(--color-graphite-high); }
.btn--secondary:active { background: var(--color-graphite); }
.btn--danger { border-color: var(--color-signal-border); background: var(--color-signal-tint); color: var(--color-signal-text); }
.btn--danger:hover { border-color: var(--color-signal-bright); }

/* ====================================================================
   Kind    : Component
   Name    : .badge
   Purpose : A small mono chip; with a dot it carries a state, red only when live.
   ==================================================================== */
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 8px; border: 1px solid var(--color-line-strong); border-radius: 999px; color: var(--color-paper-soft); font: 500 11.5px/1.2 var(--font-mono); letter-spacing: 0.04em; white-space: nowrap; }
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-paper-faint); }
.badge--live { color: var(--color-paper); }
.badge--live::before { background: var(--color-signal); box-shadow: 0 0 8px var(--color-signal); }

/* ====================================================================
   Kind    : Component
   Name    : .panel
   Purpose : The raised graphite surface every card and tile is made of.
   ==================================================================== */
.panel { position: relative; overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius-panel); background: var(--gradient-panel); box-shadow: var(--shadow-panel); }
.panel__bar { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 18px; border-bottom: 1px solid var(--color-line); }
.panel__title { font-weight: 500; }
.panel__title span { color: var(--color-paper-faint); }
.panel__actions { display: flex; gap: 8px; margin-left: auto; }

/* ====================================================================
   Kind    : Component
   Name    : .tabs
   Purpose : A row of views inside a panel; the active one is underlined in red.
   ==================================================================== */
.tabs { display: flex; gap: 22px; padding: 0 18px; overflow-x: auto; border-bottom: 1px solid var(--color-line); }
.tabs__tab { position: relative; padding: 11px 0; color: var(--color-paper-muted); font-size: 13.5px; white-space: nowrap; }
.tabs__tab.is-active { color: var(--color-paper); }
.tabs__tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--color-signal-bright); }

/* ====================================================================
   Kind    : Component
   Name    : .field
   Purpose : A labelled input on black with a white focus ring.
   ==================================================================== */
.field { display: block; }
.field__label { display: block; margin-bottom: 6px; color: var(--color-paper-muted); font-size: 12.5px; }
.input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-control); outline: none; background: var(--color-ink); color: var(--color-paper); font: 400 14px var(--font-brand); transition: border-color 0.15s, box-shadow 0.15s; }
.input::placeholder { color: var(--color-paper-faint); }
.input:focus { border-color: var(--color-paper); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
.input--mono { color: var(--color-silver); font: 400 13px var(--font-mono); }

/* ====================================================================
   Kind    : Component
   Name    : .toggle
   Purpose : A checkbox drawn as a switch; red when on, works without a script.
   ==================================================================== */
.toggle { display: inline-flex; align-items: center; gap: 10px; height: 36px; color: var(--color-paper-muted); font-size: 13.5px; cursor: pointer; }
.toggle__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle__track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--color-graphite-high); box-shadow: inset 0 0 0 1px var(--color-line-strong); transition: background-color 0.2s; }
/* .toggle__track::after: the knob */
.toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--color-paper-bright); transition: transform 0.25s var(--ease-expo); }
.toggle__input:checked + .toggle__track { background: var(--color-signal-bright); box-shadow: none; }
.toggle__input:checked + .toggle__track::after { transform: translateX(14px); }
.toggle__input:focus-visible + .toggle__track { outline: 2px solid var(--color-paper); outline-offset: 2px; }

/* ====================================================================
   Kind    : Component
   Name    : .table
   Purpose : Rows of records inside a panel: mono captions, hairline rules, a hover wash.
   ==================================================================== */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { padding: 10px 18px; border-bottom: 1px solid var(--color-line); color: var(--color-paper-faint); font: 500 10.5px var(--font-mono); letter-spacing: 0.14em; text-align: left; text-transform: uppercase; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--color-line); }
.table tbody tr { transition: background-color 0.15s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.table tr:last-child td { border-bottom: 0; }
.table__mono { color: var(--color-silver); font: 400 12.5px var(--font-mono); }

/* ====================================================================
   Kind    : Component
   Name    : .code
   Purpose : A black well for configuration and code; keys in white, values in red, a caret when typing.
   ==================================================================== */
.code { padding: 16px 18px; overflow: hidden; border: 1px solid var(--color-line); border-radius: 10px; background: var(--color-well); color: var(--color-paper-muted); font: 400 13px/1.8 var(--font-mono); white-space: pre-wrap; word-break: break-all; }
.code__key { color: var(--color-paper); }
.code__value { color: var(--color-signal-bright); }
.code__caret { display: inline-block; width: 7px; height: 14px; vertical-align: -2px; background: var(--color-paper); animation: blink 1s steps(1) infinite; }

/* ====================================================================
   Kind    : Component
   Name    : responsive
   Purpose : The one snap a shared control honours: 720 tightens the code well so a URL fits a phone.
   ==================================================================== */
@media (max-width: 720px) {
  .code { padding: 14px; font-size: 12px; }
}
