
:root {
  --ink: #f4f5f7;
  --muted: #9ca5b4;
  --faint: #697384;
  --canvas: #080a0d;
  --surface: #101319;
  --surface-raised: #151922;
  --surface-soft: #0d1015;
  --line: #242a35;
  --line-strong: #333b49;
  --accent: #bdff2f;
  --accent-soft: rgba(189,255,47,.12);
  --blue: #6b9dff;
  --blue-soft: rgba(107,157,255,.12);
  --amber: #ffc15b;
  --red: #ff6b72;
  --green: #62d493;
  --shadow: 0 22px 70px rgba(0,0,0,.35);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.login-body {
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 14% 12%, rgba(189,255,47,.09), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(107,157,255,.08), transparent 28%),
    var(--canvas);
}

.login-shell {
  width: min(1080px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 64px;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(255,255,255,.025), transparent 55%),
    var(--surface-soft);
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  left: -210px;
  top: -210px;
  border: 1px solid rgba(189,255,47,.28);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(189,255,47,.025), 0 0 0 160px rgba(189,255,47,.015);
}

.brand-mark {
  position: absolute;
  top: 54px;
  left: 64px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(189,255,47,.45);
  border-radius: 15px;
  color: var(--accent);
  background: rgba(189,255,47,.07);
  font-size: 23px;
  font-weight: 800;
  transform: rotate(-8deg);
}

.brand-mark span { transform: rotate(8deg); }
.eyebrow {
  margin: 0 0 7px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .16em;
}

.login-brand h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(42px, 5vw, 67px);
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: .98;
}

.login-intro {
  max-width: 590px;
  margin: 28px 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.login-principle {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  max-width: 560px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.login-principle p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.pulse-dot { width: 8px; height: 8px; margin-top: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.login-panel { display: flex; flex-direction: column; justify-content: center; gap: 34px; padding: 58px; border-left: 1px solid var(--line); }
.login-panel h2 { margin: 0 0 8px; font-size: 31px; letter-spacing: -.035em; }
.login-panel > div > p:last-child { margin: 0; color: var(--muted); line-height: 1.6; }
.stack-form { display: grid; gap: 20px; }
.stack-form label { display: grid; gap: 8px; color: #cbd1db; font-size: 13px; font-weight: 650; }
.stack-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  background: var(--canvas);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.stack-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.primary-button, .quiet-button, .icon-button, .danger-button, .operation-card button {
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: transform .12s, background .12s, border-color .12s, opacity .12s;
}
.primary-button {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 17px;
  background: var(--accent);
  color: #101400;
  font-weight: 780;
}
.primary-button:hover { transform: translateY(-1px); background: #ceff64; }
.primary-button:disabled, button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.security-note { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.6; }
.form-error { min-height: 18px; margin: -5px 0 0; color: var(--red); font-size: 12px; line-height: 1.5; }

.manager-body { overflow-x: hidden; }
.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(8,10,13,.92);
  backdrop-filter: blur(18px);
}
.product-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark-small { position: relative; inset: auto; width: 36px; height: 36px; border-radius: 10px; font-size: 16px; }
.product-lockup > span:last-child { display: grid; gap: 2px; }
.product-lockup strong { font-size: 14px; letter-spacing: -.01em; }
.product-lockup small { color: var(--faint); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
}
.state-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.state-enabled span { background: var(--green); box-shadow: 0 0 0 4px rgba(98,212,147,.12); }
.state-disabled span { background: var(--amber); box-shadow: 0 0 0 4px rgba(255,193,91,.12); }
.quiet-button, .icon-button {
  padding: 9px 12px;
  border-color: var(--line);
  background: var(--surface);
  color: #cdd3dc;
  font-size: 12px;
  font-weight: 650;
}
.quiet-button:hover, .icon-button:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.icon-button { width: 36px; height: 36px; padding: 0; font-size: 17px; }
.workspace { display: grid; grid-template-columns: 226px minmax(0,1fr); padding-top: 68px; min-height: 100vh; }
.sidebar {
  position: fixed;
  top: 68px;
  left: 0;
  bottom: 0;
  width: 226px;
  display: flex;
  flex-direction: column;
  padding: 25px 15px 18px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}
.nav-label { margin: 0 12px 10px; color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 620; }
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.03); }
.nav-item.active { color: var(--ink); background: var(--surface-raised); box-shadow: inset 2px 0 0 var(--accent); }
.nav-icon { width: 17px; color: var(--faint); text-align: center; font-size: 14px; }
.nav-item.active .nav-icon { color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 18px 12px 2px; border-top: 1px solid var(--line); }
.sidebar-foot .nav-label { margin-left: 0; }
.sidebar-foot strong, .sidebar-foot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { margin-top: 4px; color: var(--faint); font-size: 10px; }
.content { grid-column: 2; min-width: 0; padding: 42px clamp(28px,4vw,60px) 70px; }
.page-section { display: none; max-width: 1500px; margin: 0 auto; }
.page-section.active { display: block; animation: enter .18s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h1 { margin: 0 0 7px; font-size: clamp(29px,3vw,42px); font-weight: 670; letter-spacing: -.045em; }
.section-heading > div > p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric-card {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.metric-card > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-card strong { margin-top: 17px; font-size: 29px; font-weight: 650; letter-spacing: -.04em; }
.metric-card small { color: var(--faint); font-size: 10px; }
.split-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 16px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.panel-heading a { color: var(--accent); font-size: 11px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 10px 14px; color: var(--faint); background: rgba(255,255,255,.015); text-align: left; font-size: 9px; letter-spacing: .11em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-top: 1px solid var(--line); color: #c5ccd6; vertical-align: middle; }
.data-table tbody tr:hover { background: rgba(255,255,255,.015); }
.data-table button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-raised); color: #d8dde5; font-size: 10px; cursor: pointer; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }
.truncate { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--muted); font-size: 9px; font-weight: 780; letter-spacing: .05em; text-transform: uppercase; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-running, .status-active, .status-succeeded, .status-complete, .status-verified { color: var(--green); background: rgba(98,212,147,.09); }
.status-requested, .status-leased, .status-created, .status-captured { color: var(--blue); background: var(--blue-soft); }
.status-paused, .status-blocked, .status-landing { color: var(--amber); background: rgba(255,193,91,.1); }
.status-failed, .status-cancelled, .status-corrupt { color: var(--red); background: rgba(255,107,114,.1); }
.detail-stack { display: grid; gap: 0; padding: 7px 20px 16px; }
.detail-row { display: grid; gap: 4px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: var(--faint); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.detail-row strong { overflow-wrap: anywhere; color: #d5dae2; font-size: 12px; font-weight: 580; }
.loading-block { min-height: 90px; display: grid; place-items: center; color: var(--faint); font-size: 12px; }
.empty-state { padding: 44px 20px; color: var(--faint); text-align: center; font-size: 12px; }
.compact-button { min-height: 38px; padding: 0 14px; font-size: 12px; }
.operation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.operation-card { min-height: 205px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.operation-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 23px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 16px; }
.operation-card h2 { margin: 0 0 7px; font-size: 15px; }
.operation-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.operation-card button { align-self: flex-start; margin-top: auto; padding: 7px 10px; border-color: var(--line); background: var(--surface-raised); color: var(--ink); font-size: 10px; font-weight: 700; }
.operation-card button:hover { border-color: var(--accent); color: var(--accent); }
.operations-history { margin-top: 16px; }
.recovery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.danger-panel { padding-bottom: 20px; border-color: rgba(255,107,114,.25); }
.danger-panel > p { max-width: 780px; margin: 19px 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.danger-text { color: var(--red); }
.danger-button { margin-left: 20px; padding: 9px 12px; border-color: rgba(255,107,114,.4); background: rgba(255,107,114,.08); color: #ff969b; font-size: 11px; font-weight: 700; }
dialog { width: min(510px,calc(100vw - 36px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
dialog form { padding: 23px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
#operation-description { margin: 14px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast-region { position: fixed; z-index: 50; right: 22px; bottom: 22px; display: grid; gap: 9px; pointer-events: none; }
.toast { max-width: 390px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-raised); box-shadow: var(--shadow); color: #dce1e8; font-size: 12px; line-height: 1.5; animation: toast-in .2s ease-out; }
.toast.error { border-color: rgba(255,107,114,.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .operation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .split-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-body { padding: 0; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .login-brand { min-height: 330px; padding: 110px 30px 36px; }
  .login-brand h1 { font-size: 42px; }
  .brand-mark { left: 30px; top: 35px; }
  .login-panel { padding: 38px 30px 50px; border-left: 0; border-top: 1px solid var(--line); }
  .topbar { padding: 0 14px; }
  .topbar-actions .quiet-button { display: none; }
  .state-pill { margin-right: 0; }
  .workspace { display: block; }
  .sidebar { position: fixed; z-index: 19; top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 59px; flex-direction: row; justify-content: space-around; padding: 7px; border-top: 1px solid var(--line); border-right: 0; }
  .nav-label, .sidebar-foot { display: none; }
  .nav-item { flex: 1; justify-content: center; gap: 5px; padding: 8px 4px; font-size: 9px; }
  .nav-item.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .content { padding: 30px 16px 90px; }
  .section-heading { align-items: flex-start; }
  .section-heading > button { flex: 0 0 auto; }
  .metric-grid, .operation-grid, .recovery-grid { grid-template-columns: 1fr; }
}
