/* ===================================================================
   APP CHROME — extends the vendored blueprint tokens (styles/tokens.css,
   loaded first — see index.html) into a dense, operational console
   register. System font stack instead of the marketing site's Big
   Shoulders Display — a console you stare at all day wants legibility
   over character; color/motif carry the identity here instead of type.
   See the origincloud-console-design skill for the full rationale.

   Palette (--copper/--blue/--sage/--gold/--coral and their -soft
   variants, --line/--line-strong/--line-bright) lives in tokens.css,
   not here — don't hand-type a hex value for one of those roles in
   this file. See the origincloud-product-design skill.
   =================================================================== */
:root {
  --ink: #101318;
  --surface-0: #14171d; /* app chrome: topbar, sidebar */
  --surface-1: #191d24; /* raised: cards, table */
  --surface-2: #20242c; /* nested: hover rows, inputs */
  --surface-3: #262b34; /* active/pressed */

  --text: #ede9e0;
  --text-soft: #b7b3a8;
  --text-muted: #7c8089;

  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.6);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.mono {
  font-family: var(--mono);
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  font-family: inherit;
}
*:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 1px;
}
::selection {
  background: var(--copper-soft);
  color: var(--text);
}

svg.icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===================== APP SHELL ===================== */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  grid-template-rows: 52px 1fr;
  grid-template-areas: "topbar topbar" "sidebar main";
  height: 100vh;
}

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--surface-0);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding-right: 14px;
  margin-right: 2px;
  border-right: 1px solid var(--line);
}
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--text);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.brand .product {
  color: var(--text-muted);
  font-weight: 500;
}
.brand .product::before {
  content: "/";
  margin: 0 6px;
  color: var(--text-muted);
}

.env-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-soft);
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: var(--surface-1);
}
.env-switch .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(109, 178, 142, 0.55);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(109, 178, 142, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(109, 178, 142, 0);
  }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--copper), #a8542a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #1a0f08;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.sidebar {
  grid-area: sidebar;
  background: var(--surface-0);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
}
.org-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  margin-bottom: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-1);
  cursor: pointer;
}
.org-switch .sq {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--blue-soft);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--blue);
  font-weight: 700;
  flex-shrink: 0;
}
.org-switch .name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
}
.org-switch .sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}
.org-switch svg.icon {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}
.org-switch-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.org-switch-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 4px 6px 6px;
}
.org-switch-back {
  cursor: pointer;
  color: var(--blue);
}
.org-switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
}
.org-switch-item:hover {
  background: var(--surface-2);
}
.org-switch-item svg.icon {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}
.org-switch-empty {
  padding: 8px 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.nav-scroll {
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  margin-bottom: 1px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 13px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-item svg.icon {
  color: var(--text-muted);
}
.nav-item:hover {
  background: var(--surface-1);
  color: var(--text);
}
.nav-item.active {
  background: var(--copper-soft);
  color: var(--text);
  border-left-color: var(--copper);
  font-weight: 600;
}
.nav-item.active svg.icon {
  color: var(--copper);
}
.nav-item .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.nav-group {
  margin-top: 16px;
}
.nav-group-label {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 9px 6px;
}
.nav-pinned {
  margin-bottom: 4px;
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.main {
  grid-area: main;
  overflow-y: auto;
  background: var(--ink);
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
}
.topline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}
.topline a {
  color: var(--text-muted);
}
.topline a:hover {
  color: var(--blue);
}
.topline .sep {
  opacity: 0.5;
}
.topline .region-chip {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 3px 10px;
  background: var(--surface-1);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px 18px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.page-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  max-width: 620px;
}
.page-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.view-body {
  padding: 0 28px 40px;
}

/* ===================== BADGE: preview-data notice ===================== */
.preview-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 28px 18px;
  padding: 8px 12px;
  border: 1px solid var(--gold-soft);
  background: var(--gold-soft);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: 12.5px;
  font-family: var(--mono);
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}
.btn svg.icon {
  width: 15px;
  height: 15px;
}
.btn-primary {
  background: var(--copper);
  color: #221206;
}
.btn-primary:hover {
  background: #ef8a4e;
}
.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--line-bright);
}
.btn-ghost {
  background: transparent;
  color: var(--text-soft);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn-danger-ghost {
  background: transparent;
  color: var(--coral);
  border-color: rgba(217, 88, 75, 0.3);
}
.btn-danger-ghost:hover {
  background: var(--coral-soft);
}
.btn-danger {
  /* Reuses --ink (already a token) for on-coral text and derives the
     hover shade with color-mix() instead of hand-typing a new hex —
     see origincloud-console#35 for why that matters here. */
  background: var(--coral);
  color: var(--ink);
  border-color: transparent;
}
.btn-danger:hover {
  background: color-mix(in srgb, var(--coral) 82%, white);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===================== BADGES / STATUS ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px 3px 7px;
  border-radius: 100px;
  text-transform: uppercase;
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.badge.running {
  background: var(--sage-soft);
  color: var(--sage);
}
.badge.running .dot {
  background: var(--sage);
  animation: pulse 2.4s ease-in-out infinite;
}
.badge.stopped {
  background: rgba(124, 128, 137, 0.14);
  color: var(--text-muted);
}
.badge.stopped .dot {
  background: var(--text-muted);
}
.badge.error {
  background: var(--coral-soft);
  color: var(--coral);
}
.badge.error .dot {
  background: var(--coral);
}
.badge.pending {
  background: var(--gold-soft);
  color: var(--gold);
}
.badge.pending .dot {
  background: var(--gold);
  animation: pulse 1.6s ease-in-out infinite;
}
.badge.creating {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge.creating .dot {
  background: var(--blue);
  animation: pulse 1.6s ease-in-out infinite;
}

/* ===================== PANEL / CARD ===================== */
.panel {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.panel::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--line-bright);
  border-left: 2px solid var(--line-bright);
}
.panel::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--line-bright);
  border-right: 2px solid var(--line-bright);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 980px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.stat-tile {
  padding: 16px 18px;
}
.stat-tile .lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.stat-tile .val {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-tile .delta {
  margin-top: 6px;
  font-size: 12px;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-tile .delta.up {
  color: var(--sage);
}
.stat-tile .delta.down {
  color: var(--coral);
}
.stat-tile .delta.flat {
  color: var(--text-muted);
}

/* ===================== TOOLBAR ===================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-1);
  min-width: 240px;
  color: var(--text-muted);
  font-size: 13px;
}
.search-input svg.icon {
  width: 14px;
  height: 14px;
}
.search-input input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  width: 100%;
  font-family: var(--sans);
}
.search-input input::placeholder {
  color: var(--text-muted);
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: var(--surface-1);
  font-size: 12.5px;
  color: var(--text-soft);
  cursor: pointer;
}
.filter-chip:hover {
  border-color: var(--line-bright);
}
.toolbar .spacer {
  flex: 1;
}

/* ===================== TABLE ===================== */
.table-wrap {
  overflow-x: auto;
}
table.dtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.dtable th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.dtable td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.dtable tbody tr {
  cursor: pointer;
  transition: background 0.1s ease;
}
table.dtable tbody tr:hover {
  background: var(--surface-2);
}
table.dtable tbody tr:last-child td {
  border-bottom: none;
}
td.num,
th.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.cell-primary {
  font-weight: 600;
}
.cell-sub {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 1px;
}
.copyable-id {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}
.copyable-id-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.copyable-id-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.copyable-id-btn svg.icon {
  width: 13px;
  height: 13px;
}
.copyable-id-btn:hover {
  opacity: 1;
  background: var(--surface-2);
  color: var(--text);
}
.copyable-id-btn .copyable-id-check {
  color: var(--sage);
}
.error-note {
  color: var(--coral);
  font-size: 12.5px;
  margin: 0 0 12px;
}
.error-note-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(217, 88, 75, 0.3);
  background: var(--coral-soft);
  max-width: 460px;
}
.error-note-headline {
  color: var(--text);
  font-size: 13px;
  margin: 0 0 8px;
}
.error-note-details {
  margin-bottom: 10px;
}
.error-note-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  user-select: none;
}
.error-note-details summary:hover {
  color: var(--text-soft);
}
.error-note-details p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  word-break: break-word;
}
.row-menu {
  width: 34px;
  text-align: right;
}
.table-pager {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.table-pager .spacer {
  flex: 1;
}

/* ===================== TABLE SKELETON ===================== */
.skel-bar {
  height: 12px;
  width: 70%;
  max-width: 160px;
  border-radius: 3px;
  background: var(--surface-2);
  animation: skel-pulse 1.4s ease-in-out infinite;
}
.skel-row td:first-child .skel-bar {
  width: 85%;
  max-width: 220px;
}
@keyframes skel-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* ===================== TOAST ===================== */
.toast-stack {
  position: fixed;
  top: 68px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-1);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--text);
  animation: toast-in 0.15s ease;
}
.toast-success {
  border-left: 3px solid var(--sage);
}
.toast-error {
  border-left: 3px solid var(--coral);
}
.toast-dismiss {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}
.toast-dismiss:hover {
  color: var(--text);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================== MODAL ===================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 11, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: modal-fade-in 0.12s ease;
}
.modal-panel {
  width: 100%;
  max-width: 380px;
  margin: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-1);
  box-shadow: var(--shadow);
}
.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.modal-message {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0 0 18px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state .ic {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.empty-state .ic svg.icon {
  width: 24px;
  height: 24px;
  color: var(--text-soft);
}
.empty-state h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 15px;
}
.empty-state p {
  margin: 0 0 18px;
  max-width: 380px;
  font-size: 13px;
}

/* ===================== TABS ===================== */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 20px;
}
.tab {
  padding: 9px 4px;
  margin-right: 22px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--text);
  border-bottom-color: var(--copper);
  font-weight: 600;
}

/* ===================== SPEC LIST ===================== */
.spec-list {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
}
.spec-list .k {
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}
.spec-list .v {
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 980px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
.panel-pad {
  padding: 20px 22px;
}
.panel-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
}
.panel-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* ===================== FORMS ===================== */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}
.form-control {
  width: 100%;
  padding: 8px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-family: var(--sans);
  outline: none;
}
.form-control:focus {
  border-color: var(--copper);
}
.form-control-invalid {
  border-color: var(--coral);
}
.field-error {
  font-size: 12px;
  color: var(--coral);
  margin: 5px 0 0;
}
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237c8089' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}

.radio-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 780px) {
  .radio-cards {
    grid-template-columns: 1fr 1fr;
  }
}
.radio-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 13px;
  cursor: pointer;
  background: var(--surface-2);
}
.radio-card input {
  position: absolute;
  top: 12px;
  right: 12px;
}
.radio-card .name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.radio-card .spec {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.radio-card.selected {
  border-color: var(--copper);
  background: var(--copper-soft);
}

.create-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 980px) {
  .create-layout {
    grid-template-columns: 1fr;
  }
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.summary-row .k {
  color: var(--text-muted);
}
.summary-row .v {
  font-family: var(--mono);
}

/* ===================== CHARTS ===================== */
.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 70px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.bar-row .lbl {
  font-size: 12.5px;
  color: var(--text-soft);
}
.bar-track {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
}
.bar-row .amt {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--copper);
  margin: 0 0 6px;
}

/* ===================== COMMAND PALETTE ===================== */
.cmdk-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 13, 0.6);
  backdrop-filter: blur(2px);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.cmdk {
  width: 100%;
  max-width: 560px;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cmdk-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.cmdk-input svg.icon {
  color: var(--text-muted);
}
.cmdk-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: var(--sans);
}
.cmdk-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 6px;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}
.cmdk-item:hover,
.cmdk-item.sel {
  background: var(--surface-2);
}
.cmdk-item svg.icon {
  color: var(--text-muted);
  width: 15px;
  height: 15px;
}
.cmdk-item .path {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.cmdk-foot {
  display: flex;
  gap: 14px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-muted);
}
.cmdk-foot kbd {
  font-family: var(--mono);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 4px;
}

/* ===================== AUTH SCREEN ===================== */
.auth-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
}
.auth-card {
  width: 340px;
  padding: 28px 26px;
  text-align: center;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
