/* ============================================================================
   panel.css — instrument-panel SUPPLEMENT for pldrop-panel.
   Loads AFTER pldrop-ui.css (the canonical design system) and only adds the
   application-specific components: live panes, alert rows, machined progress
   consoles, module grids and terminal chrome. All colors come from the
   pldrop-ui.css CSS variables (--void/--panel/--hair/--signal/--auth/--rust…).
   No CDN. Plain CSS.
   ============================================================================ */

/* ---- generic helpers still referenced by templates ---- */
.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.sub a { color: var(--auth); }
.empty { color: var(--dim); font-family: var(--mono); font-size: 12px;
  letter-spacing: .02em; padding: 12px 0; }
.note { color: var(--dim); font-size: 12px; font-family: var(--mono);
  line-height: 1.6; margin-top: 12px; }
.sep { border: 0; border-top: 1px solid var(--hair); margin: 18px 0; }
form.inline { display: inline; margin: 0; }
.pad-panel { padding: 22px; }

/* page heading rhythm: nameplate -> big heading */
.page-head { margin: 6px 0 26px; }
.page-head .nameplate { display: block; margin-bottom: 10px; }

/* ---- section panels (card-with-heading wrapper) ---- */
.panel.sec { margin-bottom: 22px; padding: 20px 22px; }
.panel.sec > h2 { font-size: 15px; letter-spacing: -.01em; margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px; }
.panel.sec > h2 .sub { display: inline; font-size: 11px; margin: 0;
  color: var(--dim); font-weight: 400; letter-spacing: 0; }

/* live pane header: <lamp> title ....... aux  */
.pane-title { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; }
.pane-title h2 { margin: 0; }
.pane-title .aux { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* legacy live-dot -> instrument lamp (auth-cyan, pulsing) */
.live-dot { display: inline-block; height: 7px; width: 7px; border-radius: 50%;
  background: var(--auth); vertical-align: middle; margin-right: 8px;
  box-shadow: 0 0 8px -1px var(--auth); animation: lamp 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce){ .live-dot { animation: none; } }

/* ---- count chips (dashboard) ---- */
.badge.count { color: var(--signal); border-color: var(--signaldim);
  min-width: 22px; justify-content: center; }
.badge.count.zero { color: var(--dim); border-color: var(--hair); }
.badge.online { color: var(--auth); border-color: var(--authdim); }
.badge.offline { color: var(--muted); border-color: var(--hair); }
.badge.status { color: var(--bone); border-color: var(--hairlit); }
/* severities */
.badge.high, .badge.critical { color: var(--rust); border-color: #5b2117; }
.badge.medium { color: var(--signal); border-color: var(--signaldim); }
.badge.low, .badge.info { color: var(--muted); border-color: var(--hair); }
/* job statuses */
.badge.queued { color: var(--muted); border-color: var(--hair); }
.badge.running { color: var(--signal); border-color: var(--signaldim); }
.badge.done { color: var(--auth); border-color: var(--authdim); }
.badge.failed { color: var(--rust); border-color: #5b2117; }
.badge.killed { color: var(--rust); border-color: #5b2117; }
/* module tags */
.badge.tag-sensitive { color: var(--rust); border-color: #5b2117; }
.badge.tag-ok { color: var(--auth); border-color: var(--authdim); }
.badge.tag-locked { color: var(--signal); border-color: var(--signaldim); }

/* ---- alert rows (activation / access / alerts / authorizations) ---- */
.alert-row { position: relative; border: 1px solid var(--hair);
  border-left: 2px solid var(--hairlit); background: rgba(18,23,26,.5);
  padding: 13px 15px; margin-bottom: 10px; border-radius: 2px; }
.alert-row:last-child { margin-bottom: 0; }
.alert-row.high, .alert-row.critical { border-left-color: var(--rust); }
.alert-row.medium { border-left-color: var(--signal); }
.alert-row.low { border-left-color: var(--auth); }
.alert-row strong { font-weight: 700; }
.alert-row .reason { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.alert-row .reason.mono, .alert-row .reason:last-child { font-family: var(--mono); }
.alert-row .actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- audit / event feed ---- */
.feed { max-height: 340px; overflow-y: auto; }
.feed .row { display: flex; gap: 14px; padding: 8px 0;
  border-bottom: 1px solid rgba(29,37,41,.5); font-size: 12.5px; align-items: baseline; }
.feed .row:last-child { border-bottom: 0; }
.feed .kind { color: var(--auth); min-width: 150px; font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: var(--ls); }
.feed .when { color: var(--dim); min-width: 160px; font-family: var(--mono); font-size: 11px; }
.feed .mono { color: var(--muted); word-break: break-word; }

/* ---- flash / error notices ---- */
.flash { display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  margin-bottom: 14px; font-size: 13px; border: 1px solid var(--hair);
  border-left: 2px solid var(--signal); background: rgba(255,164,36,.05); border-radius: 2px; }
.flash.error { border-left-color: var(--rust); background: rgba(255,90,60,.06); color: var(--bone); }
.flash.success { border-left-color: var(--auth); background: rgba(63,224,200,.05); }
.errornote { color: var(--rust); font-family: var(--mono); font-size: 12px;
  border: 1px solid #5b2117; background: rgba(255,90,60,.06); padding: 9px 12px;
  border-radius: 2px; margin-bottom: 14px; }

/* ---- login ---- */
.login-actions { margin-top: 6px; }
.dev-box form { margin: 0 0 8px; }
.dev-box form:last-child { margin-bottom: 0; }

/* ---- storage / config forms ---- */
fieldset.grp { border: 1px solid var(--hair); border-radius: 2px; padding: 16px;
  margin: 16px 0 0; }
fieldset.grp legend { font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: var(--ls); color: var(--signal); padding: 0 6px; }
label.check { display: flex; align-items: center; gap: 8px; text-transform: none;
  letter-spacing: 0; font-family: var(--sans); font-size: 13px; color: var(--muted); }
label.check input { width: auto; }
.inline-form { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin: 0; }

/* mono pre blocks (config preview / results / loot) */
.config-preview, .results-json, .loot-pre {
  background: var(--void); border: 1px solid var(--hair); border-radius: 2px;
  padding: 13px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  overflow-x: auto; color: var(--muted); margin: 12px 0 0; }
.results-json { color: var(--bone); white-space: pre-wrap; word-break: break-word; }
.loot-pre { white-space: pre-wrap; max-height: 480px; overflow-y: auto; color: var(--bone); }

/* ============================================================================
   pentester-only components
   ============================================================================ */

/* attack console module grid */
.cat-block { margin-bottom: 26px; }
.cat-block > h2 { font-size: 14px; margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; }
.cat-block > h2::before { content: ""; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.mod-card { background: var(--panel); padding: 16px; display: flex; flex-direction: column;
  gap: 8px; transition: background .15s ease; }
.mod-card:hover { background: var(--raise); }
.mod-card .mod-name { font-weight: 700; font-size: 14px; display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap; }
.mod-card .mod-desc { color: var(--muted); font-size: 12.5px; flex: 1; line-height: 1.5; }
.mod-card .btn { align-self: flex-start; margin-top: 2px; }
.mod-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* config form */
.cfg-form { max-width: 460px; }

/* live job console */
.progress-bar { height: 4px; background: var(--void); border: 1px solid var(--hair);
  overflow: hidden; margin: 12px 0; }
.progress-bar > span { display: block; height: 100%; background: var(--signal);
  transition: width .35s ease; box-shadow: 0 0 10px -1px var(--signal); }
.job-console { background: var(--void); border: 1px solid var(--hair); border-radius: 2px;
  padding: 14px; font-family: var(--mono); font-size: 12px; max-height: 400px;
  overflow-y: auto; line-height: 1.6; margin-top: 4px; }
.job-console .ln { white-space: pre-wrap; }
.job-console .ln.error { color: var(--rust); }
.job-console .ln.warn { color: var(--signal); }
.job-console .ln.info { color: var(--muted); }
.job-console .ln.ok { color: var(--auth); }

/* web-SSH terminal chrome */
.term-card { padding: 0; overflow: hidden; }
.term-head { display: flex; align-items: center; gap: 9px; padding: 11px 16px;
  border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: var(--ls); color: var(--muted);
  background: var(--raise); }
.term-head .sim-tag { margin-left: auto; color: var(--signal); text-transform: none;
  letter-spacing: 0; font-size: 10px; }
#terminal { padding: 10px; background: #05070A; min-height: 380px; }

/* ============================================================================
   Customer console — left rail + the surfaces it switches between.
   The rail is generated from apps/portal/console.py::NAV, so adding a section
   never touches this file.
   ============================================================================ */
.console { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 26px;
  align-items: start; }
@media (max-width: 900px) { .console { grid-template-columns: 1fr; } }

.rail { position: sticky; top: 74px; border: 1px solid var(--hair);
  background: rgba(12,15,17,.82); padding: 14px 0 10px; }
@media (max-width: 900px) { .rail { position: static; } }
.rail > .nameplate { display: block; padding: 0 16px 12px;
  border-bottom: 1px solid var(--hair); }
.rail nav { display: flex; flex-direction: column; padding-top: 8px; }
.rail nav a { padding: 8px 16px; border-left: 2px solid transparent; color: var(--muted); }
.rail nav a:hover { background: var(--raise); color: var(--bone); text-decoration: none; }
.rail nav a.active { border-left-color: var(--signal); color: var(--bone);
  background: rgba(255,164,36,.055); }
.rail nav a .lbl { display: block; font-size: 13.5px; font-weight: 600; }
.rail nav a .hint { display: block; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: var(--ls); color: var(--dim); text-transform: uppercase; margin-top: 1px; }
.rail .rail-foot { padding: 12px 16px 2px; margin-top: 8px; border-top: 1px solid var(--hair); }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--hair); border: 1px solid var(--hair); margin-bottom: 22px; }
@media (max-width: 700px) { .kpis { grid-template-columns: 1fr; } }
.kpi { background: var(--panel); padding: 16px 18px; }
.kpi .n { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.kpi .n.auth { color: var(--auth); } .kpi .n.signal { color: var(--signal); }
.kpi .n.rust { color: var(--rust); } .kpi .n.dim { color: var(--dim); }
.kpi .cap { display: block; margin-top: 7px; }

/* A licence, shown as a term rather than a row of fields */
.lic { border: 1px solid var(--hair); background: var(--panel); padding: 16px 18px;
  margin-bottom: 12px; }
.lic:last-child { margin-bottom: 0; }
.lic .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lic .serial { font-family: var(--mono); font-size: 13px; color: var(--bone); font-weight: 600; }
.lic .key { font-family: var(--mono); font-size: 11px; color: var(--auth);
  letter-spacing: .04em; }
.lic .meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; }
.lic .meta div { min-width: 104px; }
.lic .meta .v { font-family: var(--mono); font-size: 12px; color: var(--bone); margin-top: 3px; }
.lic .meta .v.dim { color: var(--dim); }
.term { margin-top: 14px; }
.term .bar { height: 4px; background: var(--hair); position: relative; overflow: hidden; }
.term .bar i { position: absolute; inset: 0 auto 0 0; background: var(--auth); }
.term .bar i.expiring { background: var(--signal); }
.term .bar i.expired { background: var(--rust); }
.term .cap { display: flex; justify-content: space-between; margin-top: 6px; }

/* Empty states carry the next action, never just an apology */
.blank { border: 1px dashed var(--hair); padding: 26px 22px; text-align: center; }
.blank p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }

/* ============================================================================
   STORE + PRODUCT SIGN-IN — the two surfaces a stranger sees before they are a
   customer: /portal/order/ (pre-order) and /portal/login/ (console sign-in).

   Appended here rather than in pldrop-ui.css on purpose: pldrop-ui.css is the
   canonical system VENDORED into every panel, so a store component added there
   is a component every other project has to carry. These are app-specific, and
   every value below still comes from the pldrop-ui.css tokens.

   These pages are wrapped in <label> elements, which pldrop-ui.css styles as
   mono/uppercase/10px form labels — hence the explicit resets on .plan and
   .authorise. They are not decoration; without them the plan card renders as a
   field caption.
   ============================================================================ */

/* ---- store shell ---------------------------------------------------------- */
.store { max-width: 1040px; margin: 0 auto; }
.store-head { margin: 2px 0 18px; }
.store-head .nameplate { display: block; margin-bottom: 10px; }
.store-head h1 { margin: 0 0 10px; }
.store-lede { color: var(--muted); font-size: 14.5px; line-height: 1.6;
  max-width: 62ch; margin: 0; }

/* Where the buyer is in the purchase, in three words. A store tells you how
   many steps are left; a form does not. */
.steps { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 20px;
  font-family: var(--mono); font-size: 10px; letter-spacing: var(--ns);
  text-transform: uppercase; color: var(--dim); }
.steps span { display: inline-flex; align-items: center; gap: 7px; }
.steps span::before { content: ""; height: 5px; width: 5px; background: var(--hair); }
.steps .done { color: var(--muted); }
.steps .done::before { background: var(--hairlit); }
.steps .now { color: var(--signal); }
.steps .now::before { background: var(--signal); }

/* The pre-order truth, carried ABOVE the price instead of in small print under
   the button. A buyer who discovers the wait after paying is a refund. */
.preorder-strip { display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--signaldim); border-left-width: 2px;
  background: rgba(255,164,36,.06); padding: 13px 16px; margin: 0 0 22px;
  font-size: 13px; line-height: 1.6; }
.preorder-strip .lamp { margin-top: 7px; flex: 0 0 auto; }
.preorder-strip b { color: var(--signal); }

/* ---- plan cards ----------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--hair); border: 1px solid var(--hair); }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

.plan { display: flex; flex-direction: column; background: var(--panel);
  padding: 20px 20px 0; margin: 0; cursor: pointer; transition: background .15s ease;
  font-family: var(--sans); font-size: 14px; letter-spacing: 0;
  text-transform: none; color: var(--bone); }
.plan:hover { background: var(--raise); }
.plan:has(input:checked) { background: rgba(255,164,36,.05);
  box-shadow: inset 0 0 0 1px var(--signaldim); }

.plan-head .nameplate { display: block; }
.plan-name { font-size: 16px; font-weight: 800; letter-spacing: -.02em;
  line-height: 1.25; margin: 7px 0 0; }

/* The price is the loudest thing on the page. */
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.price .cur { font-family: var(--mono); font-size: 12px; color: var(--muted);
  letter-spacing: var(--ls); }
.price .amt { font-size: clamp(2.4rem, 7vw, 3rem); font-weight: 800;
  letter-spacing: -.04em; line-height: .95; }
.price .was { font-size: 15.5px; color: var(--muted); text-decoration: line-through;
  text-decoration-thickness: 1px; }
.price-foot { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 9px 0 0; }

/* Unmissable, and per plan — the wait is a property of the product, not of the page. */
.ship { display: flex; align-items: center; gap: 9px; margin: 16px 0 0;
  padding: 9px 12px; border: 1px solid var(--signaldim);
  background: rgba(255,164,36,.06); color: var(--signal);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: var(--ls);
  text-transform: uppercase; }

/* One line per item, so the two plans can be read down the page side by side.
   The marker is a NEUTRAL square, never a tick: some catalogue lines state an
   absence ("No Wi-Fi testing"), and a tick beside an absence is a lie. */
.spec { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.spec li { position: relative; padding: 9px 0 9px 19px; font-size: 13px; line-height: 1.5;
  border-bottom: 1px solid rgba(29,37,41,.55); }
.spec li:last-child { border-bottom: 0; }
.spec li::before { content: ""; position: absolute; left: 2px; top: 15px;
  height: 5px; width: 5px; background: var(--hairlit); }

/* The pick row sits at the card's foot and is pushed down, so two plans with
   different numbers of lines still line their controls up. */
.plan-foot { margin: auto -20px 0; padding: 13px 20px; border-top: 1px solid var(--hair);
  display: flex; align-items: center; gap: 10px; font-family: var(--mono);
  font-size: 10px; letter-spacing: var(--ns); text-transform: uppercase;
  color: var(--muted); }
.plan:has(input:checked) .plan-foot { color: var(--signal); background: rgba(255,164,36,.05); }
.plan-foot input[type="radio"] { width: 17px; height: 17px; margin: 0; flex: 0 0 auto;
  accent-color: var(--signal); cursor: pointer; }

/* ---- the details half of the checkout ------------------------------------- */
.buy-panel { border: 1px solid var(--hair); background: rgba(12,15,17,.82);
  padding: 20px 22px; margin-top: 22px; }
.buy-panel > h2 { font-size: 15px; margin: 0 0 3px; }
.buy-panel > .sub { margin: 0 0 18px; font-size: 12.5px; }
.buy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
@media (max-width: 640px) { .buy-grid { grid-template-columns: 1fr; } }

/* Authorisation is a deliberate act: never pre-ticked, and never a line of
   small print the eye slides past. */
.authorise { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 0;
  border: 1px solid var(--hair); border-left: 2px solid var(--signal);
  background: rgba(255,164,36,.045); padding: 14px 16px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; line-height: 1.6; letter-spacing: 0;
  text-transform: none; color: var(--bone); }
.authorise input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0 0;
  flex: 0 0 auto; accent-color: var(--signal); cursor: pointer; }

.buy-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.btn-buy { font-size: 14px; padding: 12px 20px; }
.buy-cta .note { margin: 0; max-width: 46ch; }
@media (max-width: 640px) {
  .btn-buy { width: 100%; justify-content: center; }
  .buy-cta { gap: 12px; }
}

/* What a stranger needs answered before typing a card number. */
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--hair); border: 1px solid var(--hair); margin-top: 22px; }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } }
.trust > div { background: var(--panel); padding: 15px 16px; }
.trust .nameplate { display: block; margin-bottom: 7px; }
.trust p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

/* ---- checkout (pay page) --------------------------------------------------- */
.checkout { max-width: 640px; margin: 0 auto; }
.checkout .summary { border: 1px solid var(--hair); background: rgba(12,15,17,.82);
  padding: 18px 20px; margin-bottom: 18px; }
.checkout .summary .nameplate { display: block; margin-bottom: 12px; }
.sum-row { display: flex; justify-content: space-between; gap: 18px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid rgba(29,37,41,.55); font-size: 13px; }
.sum-row:last-child { border-bottom: 0; }
.sum-row .k { color: var(--muted); }
.sum-row .v { text-align: right; }
.sum-row.total { border-top: 1px solid var(--hair); border-bottom: 0; margin-top: 4px;
  padding-top: 13px; }
.sum-row.total .v { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }

/* ---- product sign-in ------------------------------------------------------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px; }
.signin-inner { width: 100%; max-width: 392px; }
.signin-brand { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.signin-brand .brand { font-size: 19px; }
.signin-card h1 { font-size: 20px; margin: 0 0 5px; }
.signin-card .sub { font-size: 12.5px; margin: 0 0 18px; }
.signin-help { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.signin-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hair);
  font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.signin-note { margin: 16px 2px 0; font-family: var(--mono); font-size: 10px;
  letter-spacing: var(--ls); text-transform: uppercase; color: var(--dim); }
