/* Certus Deploy — operations console styles. Server-rendered; no build step. */

:root {
  /* Brand */
  --primary: #121A3B;
  --secondary: #012069;
  --blue: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #002EA8;
  --cyan: #00CAFF;
  --navy-950: #020817;
  --navy-900: #07142E;
  --navy-800: #0A1F44;

  /* Surfaces & ink */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F3F6FB;
  --ink: #0B1430;
  --ink-2: #334155;
  --muted: #5B6B82;
  --line: #E3E8F0;
  --line-strong: #CBD5E1;

  /* Semantic */
  --error: #EF4444;
  --success: #22C55E;
  --warning: #F59E0B;
  --info: #0EA5E9;

  /* Type */
  /* System font stacks only — no external font requests (see CSP). */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Shape & depth */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(2, 8, 23, 0.05);
  --shadow-2: 0 1px 2px rgba(2, 8, 23, 0.04), 0 12px 32px -16px rgba(7, 20, 46, 0.18);
  --ring: 0 0 0 3px rgba(0, 202, 255, 0.45);
  --sidebar-w: 256px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--font-mono); font-size: 0.86em; }
code { color: var(--secondary); }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-ok { color: #15803D; }
.text-err { color: #B91C1C; }
.text-warn { color: #B45309; font-weight: 600; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 0.6rem 1rem; border-radius: var(--r-sm);
}
.skip-link:focus { top: 1rem; }

/* ---------- Shell ---------- */

.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 1.75rem;
  padding: 1.35rem 0.9rem 1.1rem;
  color: #A9B6CE;
  background:
    radial-gradient(120% 40% at 0% 0%, rgba(0, 202, 255, 0.12), transparent 60%),
    radial-gradient(rgba(148, 178, 230, 0.07) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--primary) 100%);
  border-right: 1px solid rgba(0, 202, 255, 0.08);
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.45rem; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; color: #fff; }
.brand-text small { font-size: 0.76rem; color: #7F8FAD; letter-spacing: 0.01em; }
.brand-mark { position: relative; display: inline-grid; width: 38px; height: 38px; flex: none; overflow: hidden; border-radius: 10px; }
.brand-mark svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 10px rgba(0, 202, 255, 0.25)); }
.brand-mark::after {
  content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg) translateX(0); opacity: 0;
  animation: glint 1.4s 0.35s var(--ease) 1 both;
}
.brand:hover .brand-mark::after { animation: glint 0.9s var(--ease) 1 both; }
@keyframes glint {
  0% { transform: skewX(-20deg) translateX(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: skewX(-20deg) translateX(420%); opacity: 0; }
}

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: 10px;
  color: #B4C0D6; font-weight: 500; font-size: 0.94rem;
  transition: background-color 0.15s, color 0.15s;
}
.nav a .mdi { font-size: 1.2rem; color: #6F82A6; transition: color 0.15s; }
.nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; text-decoration: none; }
.nav a:hover .mdi { color: #C9D6EE; }
.nav a.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.32), rgba(37, 99, 235, 0.08));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
}
.nav a.active .mdi { color: var(--cyan); }
.nav a.active::before {
  content: ""; position: absolute; left: -0.9rem; top: 22%; bottom: 22%; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 202, 255, 0.8);
}
.nav-section {
  margin: 1.1rem 0 0.35rem; padding: 0 0.75rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #5D6F92;
}

.sidebar-footer { display: grid; gap: 0.1rem; padding: 0.9rem 0.6rem 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.sidebar-org { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; color: #D5DEEE; }
.sidebar-host { font-family: var(--font-mono); font-size: 0.7rem; color: #5D6F92; }

.workspace { display: flex; flex-direction: column; min-width: 0; }

.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 60px; padding: 0 2rem;
  background: rgba(248, 250, 252, 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); min-width: 0; }
.crumbs .mdi { color: var(--line-strong); }
.crumb-current { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.user-menu { display: flex; align-items: center; gap: 0.65rem; }
.user-menu form { margin: 0; }
.user-meta { display: grid; line-height: 1.2; text-align: right; }
.user-email { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.user-role { font-size: 0.74rem; color: var(--muted); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 10px; font-family: var(--font-display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em;
  color: #fff; background: linear-gradient(135deg, var(--blue) 0%, var(--secondary) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.avatar-light { color: var(--secondary); background: #E6EEFF; box-shadow: inset 0 0 0 1px #CFDCFA; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted);
  cursor: pointer; font-size: 1.1rem; transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.icon-btn:hover { color: #B91C1C; border-color: #FECACA; background: #FEF2F2; }

.content { width: 100%; max-width: 1360px; padding: 1.75rem 2rem 3.5rem; outline: none; }

/* ---------- Page header ---------- */

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-header h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1.2;
  letter-spacing: -0.025em; color: var(--primary);
}
.page-sub { margin-top: 0.35rem; color: var(--muted); max-width: 70ch; }
.title-row { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 0.3rem; margin-bottom: 0.4rem; font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.back-link:hover { color: var(--blue-700); text-decoration: none; }
.actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }

/* ---------- Buttons ---------- */

.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  height: 40px; padding: 0 1rem; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--primary);
  font: 600 0.9rem/1 var(--font); white-space: nowrap; cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn .mdi { font-size: 1.1rem; }
.btn:hover { text-decoration: none; border-color: #94A3B8; background: #FBFCFE; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--ring); border-radius: 10px; }
.btn-primary { background: var(--blue); border-color: var(--blue-700); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 16px -8px rgba(37, 99, 235, 0.7); }
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-800); }
.btn-deploy {
  background: var(--navy-900); border-color: var(--navy-900); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 202, 255, 0.35), 0 8px 20px -10px rgba(0, 202, 255, 0.6);
}
.btn-deploy .mdi { color: var(--cyan); }
.btn-deploy:hover { background: var(--secondary); border-color: var(--secondary); }
.btn-quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: #B91C1C; border-color: #FECACA; }
.btn-danger:hover { background: #FEF2F2; border-color: #FCA5A5; }
.btn-sm { height: 32px; padding: 0 0.7rem; font-size: 0.82rem; border-radius: 8px; }
.btn-sm .mdi { font-size: 1rem; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form { display: inline; margin: 0; }

/* ---------- Panels ---------- */

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); margin-bottom: 1.25rem; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.005em; color: var(--primary); }
.panel-sub { margin-top: 0.15rem; font-size: 0.84rem; color: var(--muted); }
.panel-pad { padding: 1rem 1.25rem; }

.grid-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.25rem; align-items: start; }
.grid-aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 1.25rem; align-items: start; }

/* ---------- Metrics (dashboard) ---------- */

.metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(0, 202, 255, 0.14), transparent 55%),
    linear-gradient(135deg, var(--navy-900) 0%, var(--primary) 55%, var(--secondary) 100%);
  box-shadow: 0 20px 40px -24px rgba(2, 8, 23, 0.65);
  color: #fff;
}
.metric { position: relative; padding: 1.3rem 1.4rem 1.2rem; animation: rise 0.55s var(--ease) both; }
.metric + .metric { border-left: 1px solid rgba(255, 255, 255, 0.08); }
.metric:nth-child(2) { animation-delay: 0.06s; }
.metric:nth-child(3) { animation-delay: 0.12s; }
.metric:nth-child(4) { animation-delay: 0.18s; }
.metric::before {
  content: ""; position: absolute; left: 1.4rem; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--metric-c, var(--cyan)); box-shadow: 0 0 14px var(--metric-c, var(--cyan));
}
.metric-running { --metric-c: var(--cyan); }
.metric-queued { --metric-c: var(--warning); }
.metric-ok { --metric-c: var(--success); }
.metric-fail { --metric-c: var(--error); }
.metric-label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; font-weight: 500; color: #B9C6DE; }
.metric-label .mdi { font-size: 1.1rem; color: var(--metric-c); }
.metric-value {
  margin-top: 0.45rem; font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.metric-foot { margin-top: 0.5rem; font-size: 0.78rem; color: #8193B4; }
.live-dot { position: relative; width: 8px; height: 8px; margin-left: 0.25rem; border-radius: 50%; background: var(--cyan); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--cyan); animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(3); opacity: 0; } }

/* ---------- Tables ---------- */

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.table th {
  position: sticky; top: 0; z-index: 1;
  padding: 0.65rem 1rem; text-align: left; white-space: nowrap;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.table td { padding: 0.8rem 1rem; border-bottom: 1px solid #EEF2F7; vertical-align: middle; color: var(--ink-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:nth-child(even) td { background: #FBFCFE; }
.table tbody tr { transition: background-color 0.12s; }
.table tbody tr:hover td { background: #F0F5FF; }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.table-compact td { padding: 0.6rem 1rem; }
.row-dim td { color: var(--muted); }
.row-dim td code { color: var(--muted); text-decoration: line-through; }
.cell-link { font-weight: 600; color: var(--primary); }
.cell-link:hover { color: var(--blue-700); }
.cell-link.mono { font-weight: 500; font-size: 0.82rem; }
.cell-sub { display: block; margin-top: 0.1rem; font-size: 0.8rem; color: var(--muted); }
code.sha { padding: 0.1rem 0.4rem; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
code.path { color: var(--ink-2); }
.filter-empty { padding: 1.5rem; text-align: center; color: var(--muted); }

/* ---------- Badges, chips, states ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; height: 24px; padding: 0 0.55rem 0 0.4rem;
  border-radius: 6px; border: 1px solid transparent;
  font: 600 0.78rem/1 var(--font); letter-spacing: 0.01em; white-space: nowrap;
}
.badge .mdi { font-size: 0.95rem; }
.badge-success { background: #ECFDF3; color: #166534; border-color: #BBF7D0; }
.badge-error { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.badge-info { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.badge-warn { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.badge-muted { background: #F1F5F9; color: #475569; border-color: #E2E8F0; }

.env {
  display: inline-flex; align-items: center; height: 22px; padding: 0 0.5rem; border-radius: 6px;
  font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.04em;
  color: var(--secondary); background: #EAF0FF; border: 1px solid #D3DEFB;
}
.env-lg { height: 26px; font-size: 0.78rem; vertical-align: middle; }

.state { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.84rem; font-weight: 500; white-space: nowrap; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; }
.state-on { color: #166534; }
.state-on .state-dot { background: var(--success); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
.state-off { color: var(--muted); }
.state-off .state-dot { background: transparent; border: 2px solid #94A3B8; }
h1 .state { font-family: var(--font); font-size: 0.85rem; letter-spacing: 0; }

.trigger { display: inline-flex; align-items: center; gap: 0.3rem; font: 500 0.86rem/1 var(--font); color: var(--ink-2); }
.trigger .mdi { font-size: 1rem; color: var(--muted); }
.trigger-MANUAL .mdi { color: #B45309; }

.role { display: inline-flex; align-items: center; gap: 0.3rem; height: 24px; padding: 0 0.55rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.role-admin { color: var(--secondary); background: #EAF0FF; }
.role-viewer { color: var(--ink-2); background: #F1F5F9; }
.you { margin-left: 0.25rem; padding: 0.05rem 0.4rem; border-radius: 5px; font-size: 0.7rem; font-weight: 600; color: #0369A1; background: #E0F2FE; vertical-align: middle; }

.person { display: flex; align-items: center; gap: 0.7rem; }
.person-name { font-weight: 600; color: var(--ink); }

.action-tag { font: 600 0.74rem/1.4 var(--font-mono); color: var(--secondary); padding: 0.15rem 0.45rem; border-radius: 5px; background: #F1F5FF; white-space: nowrap; }
.entity { font-size: 0.86rem; font-weight: 500; color: var(--ink-2); }
.actor-pipeline { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; color: var(--secondary); }
.actor-pipeline .mdi { color: var(--blue); }
.target {
  display: inline-flex; align-items: center; height: 22px; padding: 0 0.5rem; border-radius: 6px;
  font: 600 0.78rem/1 var(--font-mono); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line);
}
.target-dark { color: #fff; background: rgba(0, 202, 255, 0.12); border-color: rgba(0, 202, 255, 0.35); }

/* ---------- Empty states ---------- */

.empty-state { display: grid; justify-items: center; gap: 0.5rem; padding: 3.25rem 1.5rem 3.5rem; text-align: center; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--primary); }
.empty-state p { max-width: 46ch; color: var(--muted); }
.empty-state .btn { margin-top: 0.75rem; }
.empty-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 0.5rem; border-radius: 16px;
  font-size: 1.7rem; color: var(--blue);
  background: radial-gradient(circle at 30% 25%, #FFFFFF, #E7EEFF 70%);
  box-shadow: inset 0 0 0 1px #D6E1FB, 0 10px 24px -14px rgba(37, 99, 235, 0.6);
}
.empty-compact { padding: 2rem 1.25rem 2.25rem; }
.empty-compact .empty-icon { width: 44px; height: 44px; font-size: 1.35rem; border-radius: 12px; }

/* ---------- Alerts ---------- */

.alert {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.85rem 1rem; margin-bottom: 1.25rem; border-radius: var(--r);
  border: 1px solid; border-left-width: 4px; font-size: 0.92rem;
}
.alert > .mdi { font-size: 1.25rem; line-height: 1.2; }
.alert-success { background: #F0FDF4; color: #14532D; border-color: #BBF7D0; border-left-color: var(--success); }
.alert-success > .mdi { color: #16A34A; }
.alert-error { background: #FEF2F2; color: #7F1D1D; border-color: #FECACA; border-left-color: var(--error); }
.alert-error > .mdi { color: #DC2626; }
.alert-info { background: #EFF6FF; color: #0C2A66; border-color: #BFDBFE; border-left-color: var(--info); }
.alert-info > .mdi { color: #0EA5E9; }

.secret-reveal {
  position: relative; margin-bottom: 1.5rem; padding: 1.25rem 1.35rem; border-radius: var(--r-lg);
  color: #E7EDF8;
  background:
    repeating-linear-gradient(-45deg, rgba(245, 158, 11, 0.07) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, var(--navy-900), var(--primary));
  border: 1px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12), 0 20px 40px -24px rgba(2, 8, 23, 0.7);
}
.secret-head { display: flex; gap: 0.85rem; align-items: flex-start; }
.secret-head > .mdi { font-size: 1.7rem; color: var(--warning); line-height: 1; }
.secret-head h2 { font-size: 1.05rem; font-weight: 700; color: #FFF7E6; }
.secret-head p { margin-top: 0.2rem; font-size: 0.88rem; color: #B9C6DE; }
.secret-head code { color: #FCD34D; }
.secret-value {
  display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0 0.75rem; padding: 0.6rem 0.6rem 0.6rem 1rem;
  border-radius: var(--r); background: var(--navy-950); border: 1px solid rgba(255, 255, 255, 0.1);
}
.secret-value .key { flex: 1; min-width: 0; font-size: 0.95rem; color: #fff; word-break: break-all; user-select: all; }
.btn-copy { flex: none; background: var(--warning); border-color: #D97706; color: var(--navy-950); box-shadow: none; }
.btn-copy:hover { background: #FBBF24; border-color: #D97706; }
.btn-copy.is-copied { background: var(--success); border-color: #16A34A; }
.secret-dismiss { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.86rem; font-weight: 600; color: #93C5FD; }

/* ---------- Key/value & facts ---------- */

.kv { margin: 0; padding: 0.4rem 1.25rem 0.9rem; }
.kv > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; padding: 0.6rem 0; border-bottom: 1px dashed #E9EEF5; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { font-size: 0.84rem; color: var(--muted); }
.kv dd { margin: 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; min-width: 0; color: var(--ink); }
.kv-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
.kv-2col > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

.exec-strip {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: stretch;
  margin-bottom: 1.25rem; border-radius: var(--r-lg); overflow: hidden;
  background: var(--navy-950); color: #DCE6F6; box-shadow: var(--shadow-2);
  border: 1px solid #0F2350;
}
.exec-cmd { display: grid; align-content: center; gap: 0.35rem; padding: 1.1rem 1.35rem; background: linear-gradient(90deg, rgba(0, 202, 255, 0.07), transparent); }
.exec-label { font-size: 0.76rem; font-weight: 600; color: #6F82A6; }
.exec-path { display: flex; align-items: center; gap: 0.45rem; }
.exec-path .mdi { color: var(--cyan); font-size: 1.15rem; }
.exec-path code { font-size: 0.95rem; color: #E7EEFA; word-break: break-all; }
.exec-target { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: #8193B4; }
.exec-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.exec-facts > div { padding: 1.1rem 1rem; border-left: 1px solid rgba(255, 255, 255, 0.07); }
.exec-facts dt { font-size: 0.74rem; color: #6F82A6; }
.exec-facts dd { margin: 0.3rem 0 0; font-weight: 600; color: #fff; }
.exec-facts .text-warn { color: #FCD34D; }

.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
}
.facts > div { padding: 0.95rem 1.2rem; min-width: 0; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt { font-size: 0.78rem; color: var(--muted); }
.facts dd { margin: 0.3rem 0 0; font-size: 1.05rem; font-weight: 600; color: var(--primary); }

.status-hero { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.status-hero .badge { height: 32px; padding: 0 0.8rem 0 0.6rem; font-size: 0.8rem; border-radius: 8px; }
.status-hero .badge .mdi { font-size: 1.15rem; }

/* ---------- Terminal ---------- */

.terminal {
  margin-bottom: 1.25rem; border-radius: var(--r-lg); overflow: hidden;
  background: var(--navy-950); border: 1px solid #10224A;
  box-shadow: 0 24px 48px -28px rgba(2, 8, 23, 0.85), inset 0 1px 0 rgba(0, 202, 255, 0.12);
}
.terminal-bar {
  display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1rem;
  background: linear-gradient(180deg, #0B1A3A, var(--navy-900)); border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.terminal-title { display: flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; font-weight: 600; color: #E7EEFA; white-space: nowrap; }
.terminal-title .mdi { color: var(--cyan); font-size: 1.1rem; }
.terminal-cmd { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; color: #6F82A6; }
.t-dim { color: #5D6F92; }
.t-accent { color: var(--cyan); }
.terminal-follow { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: #8193B4; cursor: pointer; user-select: none; }
.terminal-follow input { accent-color: var(--cyan); }
.terminal-screen { position: relative; }
.terminal-screen::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(0, 202, 255, 0.06), transparent 70%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}
.terminal-body {
  margin: 0; min-height: 340px; max-height: 64vh; overflow: auto; padding: 1rem 1.2rem 1.25rem;
  font: 400 0.82rem/1.65 var(--font-mono); color: #D3DEF0; white-space: pre-wrap; word-break: break-word;
  background: transparent; tab-size: 4;
  scrollbar-color: #1E3566 transparent;
}
.terminal-body:empty::before { content: "Aguardando o primeiro registro…"; color: #4B5D80; }
.terminal-body::selection { background: rgba(0, 202, 255, 0.3); color: #fff; }
.terminal-body:focus-visible { box-shadow: inset var(--ring); border-radius: 0; }
.terminal-foot {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem;
  font: 500 0.76rem/1.2 var(--font-mono); color: #8193B4;
  background: var(--navy-900); border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.terminal.is-live .terminal-foot { color: var(--cyan); }
.cursor { display: inline-block; width: 8px; height: 14px; background: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Forms ---------- */

.form-layout { max-width: 880px; }
.form-section { padding: 1.35rem 1.4rem 1.5rem; overflow: visible; }
.form-section-head { margin-bottom: 1.1rem; }
.form-section-head h2 { font-size: 1.02rem; font-weight: 600; color: var(--primary); }
.form-section-head p { margin-top: 0.15rem; font-size: 0.86rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.span-2 { grid-column: 1 / -1; }
.field { display: grid; gap: 0.35rem; align-content: start; min-width: 0; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--ink); }
.optional { margin-left: 0.25rem; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.hint { font-size: 0.8rem; color: var(--muted); }
.hint code { font-size: 0.78rem; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 42px; padding: 0.55rem 0.8rem;
  font: 400 0.92rem/1.4 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input.mono, textarea.mono { font-family: var(--font-mono); font-size: 0.85rem; }
textarea { resize: vertical; min-height: 84px; }
input::placeholder, textarea::placeholder { color: #94A3B8; }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #94A3B8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
input:user-invalid, textarea:user-invalid { border-color: var(--error); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }
select {
  appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235B6B82'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 20px;
}
.select-sm { min-height: 32px !important; width: auto !important; padding: 0.25rem 2rem 0.25rem 0.6rem !important; font-size: 0.84rem !important; border-radius: 8px !important; }

.input-group { display: flex; align-items: stretch; }
.input-group input { min-width: 0; border-radius: 0; }
.input-group > :first-child { border-radius: 10px 0 0 10px; }
.input-group > :last-child { border-radius: 0 10px 10px 0; }
.addon {
  display: inline-flex; align-items: center; padding: 0 0.75rem; flex: none;
  font-size: 0.85rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-strong);
}
.input-group .addon:first-child { border-right: 0; }
.input-group .addon:last-child { border-left: 0; }

.toggle-list { display: grid; gap: 0.6rem; }
.toggle {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.8rem 0.95rem; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: border-color 0.15s, background-color 0.15s;
}
.toggle:hover { border-color: var(--line-strong); background: #FBFCFE; }
.toggle input {
  appearance: none; position: relative; flex: none; width: 40px; height: 24px; margin: 0; cursor: pointer;
  border-radius: 999px; background: #CBD5E1; transition: background-color 0.18s;
}
.toggle input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(2, 8, 23, 0.3); transition: transform 0.18s var(--ease);
}
.toggle input:checked { background: var(--blue); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle input:focus-visible { box-shadow: var(--ring); border-radius: 999px; }
.toggle-text { display: grid; line-height: 1.3; }
.toggle-text strong { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.toggle-text span { font-size: 0.82rem; color: var(--muted); }

.form-actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; justify-content: flex-end; gap: 0.6rem; padding: 0.9rem 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0), var(--bg) 35%);
}
.form-actions-inset { position: static; padding: 0.9rem 1.25rem; background: var(--surface-2); border-top: 1px solid var(--line); }
.form-panel { position: sticky; top: 76px; }

.inline-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form input:not([type="hidden"]) { flex: 1; min-width: 160px; width: auto; }
.panel-pad.inline-form { border-bottom: 1px solid var(--line); background: var(--surface-2); }

.search { position: relative; display: block; }
.search .mdi { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.15rem; pointer-events: none; }
.search input { width: 300px; padding-left: 2.2rem; }

/* ---------- SSH profiles ---------- */

.profile-list { list-style: none; margin: 0; padding: 0; }
.profile { display: grid; gap: 0.8rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.profile:last-child { border-bottom: 0; }
.profile form { margin: 0; }
.profile-main { display: flex; align-items: center; gap: 0.8rem; }
.profile-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; font-size: 1.3rem; color: var(--cyan); background: var(--navy-900); }
.profile-name { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-weight: 600; color: var(--ink); }
.profile-host code { color: var(--ink-2); }
.profile-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1.5rem; margin: 0; }
.profile-facts > div { display: contents; }
.profile-facts dt { font-size: 0.8rem; color: var(--muted); padding: 0.15rem 0; }
.profile-facts dd { margin: 0; font-size: 0.86rem; padding: 0.15rem 0; min-width: 0; }

/* ---------- Dialog ---------- */

.dialog {
  width: min(520px, calc(100vw - 2rem)); padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 80px -24px rgba(2, 8, 23, 0.55), 0 0 0 1px rgba(2, 8, 23, 0.08);
}
.dialog::backdrop { background: rgba(2, 8, 23, 0.62); backdrop-filter: blur(3px); }
.dialog[open] { animation: rise 0.22s var(--ease) both; }
.dialog form { margin: 0; }
.dialog-head { display: flex; align-items: center; gap: 0.8rem; padding: 1.35rem 1.5rem 0.75rem; }
.dialog-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; font-size: 1.3rem; color: var(--cyan); background: var(--navy-900); }
.dialog-head h2 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; color: var(--primary); }
.dialog-facts { margin: 0.5rem 1.5rem 0; border-radius: var(--r); background: var(--navy-950); color: #DCE6F6; overflow: hidden; }
.dialog-facts > div { padding: 0.75rem 1rem; }
.dialog-facts > div + div { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.dialog-facts dt { font-size: 0.74rem; color: #6F82A6; }
.dialog-facts dd { margin: 0.2rem 0 0; }
.dialog-facts code { color: #fff; font-size: 0.9rem; word-break: break-all; }
.dialog-note { padding: 0.9rem 1.5rem 0; font-size: 0.85rem; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 1.2rem 1.5rem 1.35rem; }
.dialog-wide { width: min(820px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.dialog-steps { margin: 0.4rem 1.5rem 0.8rem; padding-left: 1.25rem; color: var(--ink); font-size: 0.9rem; line-height: 1.55; }
.script-toolbar { display: flex; gap: 0.5rem; padding: 0 1.5rem; }
.script-block {
  margin: 0.75rem 1.5rem; padding: 1rem; max-height: 42vh; overflow: auto;
  border-radius: var(--r); background: var(--navy-950); color: #DCE6F6;
  font-size: 0.78rem; line-height: 1.45; white-space: pre; tab-size: 2;
}
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.75rem; }
.inline-form { margin-top: 0.9rem; display: grid; gap: 0.5rem; }
.check-list { list-style: none; margin: 0.6rem 0 0; padding: 0; font-size: 0.84rem; }
.check-list li { padding: 0.15rem 0; }
.check-OK { color: #15803D; }
.check-WARN { color: #B45309; }
.check-FAIL { color: #B91C1C; }
.compact { margin: 0.4rem 0 0; font-size: 0.84rem; }
.text-muted { color: var(--muted); }

/* ---------- Login ---------- */

.login-body {
  min-height: 100vh; color: #E7EDF8;
  background:
    radial-gradient(60% 50% at 0% 0%, rgba(0, 202, 255, 0.16), transparent 60%),
    radial-gradient(50% 60% at 100% 100%, rgba(37, 99, 235, 0.22), transparent 60%),
    radial-gradient(rgba(148, 178, 230, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-800) 100%);
}
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.login-hero { display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem; padding: 2.5rem clamp(1.5rem, 6vw, 5.5rem); }
.brand-lg .brand-mark { width: 46px; height: 46px; border-radius: 12px; }
.brand-lg .brand-text strong { font-size: 1.2rem; }
.login-copy { max-width: 560px; animation: rise 0.7s 0.1s var(--ease) both; }
.login-copy h1 {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.04; letter-spacing: -0.035em; color: #fff;
}
.login-copy h1 .hl { color: var(--cyan); }
.login-copy > p { margin-top: 1.1rem; font-size: 1.08rem; line-height: 1.6; color: #A9B6CE; max-width: 46ch; }
.btn-hero {
  height: 54px; margin-top: 2rem; padding: 0 1.4rem; gap: 0.6rem; border-radius: 12px;
  font-size: 1rem; color: var(--navy-950); background: var(--cyan); border-color: #33D5FF;
  box-shadow: 0 0 0 1px rgba(0, 202, 255, 0.35), 0 18px 40px -16px rgba(0, 202, 255, 0.75);
}
.btn-hero .mdi { font-size: 1.25rem; }
.btn-hero .mdi-arrow-right { transition: transform 0.2s var(--ease); }
.btn-hero:hover { background: #3DD8FF; border-color: #7AE5FF; }
.btn-hero:hover .mdi-arrow-right { transform: translateX(3px); }
.btn-hero:focus-visible { box-shadow: 0 0 0 3px var(--navy-950), 0 0 0 6px var(--cyan); }
.login-note { display: flex; align-items: center; gap: 0.4rem; margin-top: 1rem; font-size: 0.84rem; color: #7F8FAD; }
.login-foot { font: 500 0.76rem/1 var(--font-mono); color: #4F6188; }
.alert-on-dark { margin: 1.5rem 0 0; background: rgba(239, 68, 68, 0.12); color: #FECACA; border-color: rgba(239, 68, 68, 0.35); border-left-color: var(--error); }
.alert-on-dark > .mdi { color: #F87171; }

.login-visual {
  position: relative; display: grid; place-items: center; padding: 3rem;
  border-left: 1px solid rgba(0, 202, 255, 0.08);
  background: radial-gradient(70% 60% at 50% 50%, rgba(37, 99, 235, 0.16), transparent 70%);
}
.pipeline { position: relative; display: grid; gap: 0.85rem; width: min(400px, 100%); }
.pipeline::before {
  content: ""; position: absolute; left: 25px; top: 26px; bottom: 26px; width: 2px;
  background: linear-gradient(180deg, rgba(0, 202, 255, 0.6), rgba(34, 197, 94, 0.6));
}
.pipe-step {
  position: relative; display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 1rem 0.7rem 0.55rem;
  border-radius: 14px; background: rgba(7, 20, 46, 0.75); border: 1px solid rgba(148, 178, 230, 0.12);
  backdrop-filter: blur(6px);
  animation: step-in 0.5s var(--ease) both, step-glow 6s ease-in-out infinite;
}
.pipe-step > .mdi {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px;
  font-size: 1.2rem; color: var(--cyan); background: var(--navy-950); border: 1px solid rgba(0, 202, 255, 0.3);
}
.pipe-step strong { display: block; font: 600 0.95rem/1.3 var(--font); color: #E7EEFA; }
.pipe-step small { font-size: 0.76rem; color: #7F8FAD; }
.pipe-final > .mdi { color: var(--success); border-color: rgba(34, 197, 94, 0.4); }
.pipe-step:nth-child(1) { animation-delay: 0.2s, 0.8s; }
.pipe-step:nth-child(2) { animation-delay: 0.3s, 2s; }
.pipe-step:nth-child(3) { animation-delay: 0.4s, 3.2s; }
.pipe-step:nth-child(4) { animation-delay: 0.5s, 4.4s; }
.pipe-step:nth-child(5) { animation-delay: 0.6s, 5.6s; }
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes step-glow {
  0%, 22%, 100% { border-color: rgba(148, 178, 230, 0.12); box-shadow: none; }
  8% { border-color: rgba(0, 202, 255, 0.55); box-shadow: 0 0 24px -6px rgba(0, 202, 255, 0.55); }
}

/* ---------- Motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-enter > * { animation: rise 0.42s var(--ease) both; }
.page-enter > *:nth-child(2) { animation-delay: 0.04s; }
.page-enter > *:nth-child(3) { animation-delay: 0.08s; }
.page-enter > *:nth-child(n+4) { animation-delay: 0.12s; }
.page-enter > dialog { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0s !important; transition-duration: 0.001ms !important;
  }
  .live-dot::after, .cursor, .mdi-spin { animation: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1480px) {
  .grid-split { grid-template-columns: minmax(0, 1fr); }
  .grid-split .kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
}

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .grid-split, .grid-aside { grid-template-columns: minmax(0, 1fr); }
  .form-panel { position: static; }
  .exec-strip { grid-template-columns: minmax(0, 1fr); }
  .exec-facts > div:first-child { border-left: 0; }
  .exec-facts { border-top: 1px solid rgba(255, 255, 255, 0.07); }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center;
    gap: 1rem; padding: 0.65rem 1rem; overflow: visible;
    border-right: 0; border-bottom: 1px solid rgba(0, 202, 255, 0.12);
  }
  .brand { padding: 0; }
  .brand-text small, .sidebar-footer { display: none; }
  .nav { flex-direction: row; align-items: center; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding: 0.5rem 0.7rem; font-size: 0.88rem; }
  .nav a.active::before { left: 22%; right: 22%; top: auto; bottom: -0.65rem; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .nav-section { display: none; }
  .appbar { position: static; padding: 0 1rem; height: 54px; }
  .content { padding: 1.25rem 1rem 3rem; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kv-2col, .grid-split .kv { grid-template-columns: minmax(0, 1fr); }
  .kv-2col > div:nth-last-child(2):nth-child(odd) { border-bottom: 1px dashed #E9EEF5; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-visual { display: none; }
}

@media (max-width: 640px) {
  .nav a span:not(.mdi) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .nav a .mdi { font-size: 1.3rem; }
  .brand-text { display: none; }
  .user-meta { display: none; }
  .page-header h1 { font-size: 1.4rem; }
  .page-header { align-items: flex-start; }
  .metric { padding: 1.1rem 1rem 1rem; }
  .metric::before { left: 1rem; }
  .metric-value { font-size: 2rem; }
  .metric-foot { font-size: 0.72rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .exec-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exec-facts > div:nth-child(3) { border-left: 0; }
  .kv > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .search input { width: 100%; }
  .actions { width: 100%; }
  .status-hero { align-items: flex-start; }
  .secret-value { flex-direction: column; align-items: stretch; }
  .login-hero { padding: 1.75rem 1.25rem; }
}
