:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #18212f;
  background: #eef2f6;
  font-synthesis: none;
  --ink: #18212f;
  --muted: #667085;
  --line: #d9e0e8;
  --panel: #ffffff;
  --nav: #12202c;
  --teal: #087f72;
  --teal-dark: #06675d;
  --cyan: #dff7f2;
  --red: #b42318;
  --amber: #a15c00;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #eef2f6; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
code { font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }
[hidden] { display: none !important; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #12202c; }
.login-panel { width: min(420px, 100%); padding: 38px; background: #fff; border-top: 4px solid var(--teal); box-shadow: 0 24px 80px rgba(0, 0, 0, .28); }
.brand-mark { display: grid; place-items: center; width: 54px; height: 54px; background: var(--teal); color: #fff; font-weight: 800; font-size: 18px; }
.brand-mark--small { width: 38px; height: 38px; font-size: 13px; }
.eyebrow { margin: 22px 0 5px; color: var(--teal); font-size: 11px; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: 31px; line-height: 1.25; }
.login-copy { margin: 12px 0 28px; color: var(--muted); font-size: 14px; }
label { display: block; margin: 15px 0 7px; color: #344054; font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 43px; border: 1px solid #cfd7e2; background: #fff; padding: 9px 11px; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 114, .12); }
.form-error { min-height: 19px; margin: 7px 0 0; color: var(--red); font-size: 12px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid transparent; padding: 8px 15px; text-decoration: none; font-weight: 750; font-size: 13px; }
.primary-button { width: 100%; margin-top: 18px; background: var(--teal); color: #fff; }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button { background: #fff; border-color: #cfd7e2; color: #344054; }
.secondary-button:hover { border-color: #98a2b3; background: #f8fafc; }
.danger-button { border: 1px solid #f0b4ae; background: #fff5f4; color: var(--red); padding: 7px 10px; font-weight: 700; font-size: 12px; }
.success-button { border: 1px solid #9bd7ce; background: #ecfdf9; color: var(--teal-dark); padding: 7px 10px; font-weight: 700; font-size: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--nav); color: #fff; padding: 24px 16px 16px; }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 0 7px 27px; border-bottom: 1px solid rgba(255, 255, 255, .11); }
.brand-row strong, .brand-row span { display: block; }
.brand-row strong { font-size: 15px; }
.brand-row span { margin-top: 2px; color: #9fb0bd; font-size: 11px; }
nav { display: grid; gap: 4px; margin-top: 24px; }
.nav-item { width: 100%; min-height: 42px; border: 0; background: transparent; color: #b8c4cd; padding: 0 13px; text-align: left; font-size: 13px; font-weight: 650; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.is-active { background: #1d3543; color: #fff; box-shadow: inset 3px 0 var(--teal); }
.logout-button { margin-top: auto; min-height: 40px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #cbd5dc; }
.workspace { min-width: 0; padding: 0 34px 48px; }
.topbar { min-height: 99px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.topbar .eyebrow { margin: 0 0 4px; }
h2 { margin: 0; font-size: 23px; }
.runtime { display: grid; grid-template-columns: 8px auto; align-items: center; gap: 0 8px; color: #344054; font-size: 12px; }
.runtime code { grid-column: 2; margin-top: 3px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 4px rgba(18, 183, 106, .12); }
.view { display: none; padding-top: 28px; }
.view.is-active { display: block; }
.flash { margin-top: 20px; border-left: 3px solid var(--teal); background: #fff; padding: 13px 15px; color: #344054; font-size: 13px; box-shadow: 0 3px 14px rgba(16, 24, 40, .05); }
.flash.is-error { border-color: var(--red); color: var(--red); }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.summary-card { min-height: 122px; border: 1px solid var(--line); background: var(--panel); padding: 19px; }
.summary-card span { color: var(--muted); font-size: 12px; font-weight: 650; }
.summary-card strong { display: block; margin-top: 12px; font-size: 30px; line-height: 1; }
.summary-card small { display: block; margin-top: 10px; color: #8b96a5; font-size: 11px; }
.section-heading { min-height: 65px; margin-top: 25px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.section-heading h3 { margin: 0; font-size: 16px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.table-shell { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
table { width: 100%; min-width: 790px; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e7ecf2; padding: 13px 14px; text-align: left; vertical-align: middle; }
th { background: #f7f9fb; color: #667085; font-size: 11px; text-transform: uppercase; font-weight: 800; }
td { color: #344054; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
.cell-title { display: block; color: #17202d; font-weight: 700; }
.cell-subtitle { display: block; max-width: 320px; margin-top: 3px; color: #7b8796; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; min-height: 24px; border-radius: 12px; padding: 3px 9px; background: #f2f4f7; color: #475467; font-size: 10px; font-weight: 800; }
.badge--success { background: #e7f8f2; color: #067647; }
.badge--pending { background: #fff3da; color: var(--amber); }
.badge--failed { background: #feeceb; color: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.empty-state { border: 1px dashed #c8d1dc; background: rgba(255,255,255,.56); padding: 30px; color: var(--muted); text-align: center; font-size: 13px; }
.activity-list { display: grid; gap: 9px; }
.activity-item { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); background: #fff; padding: 12px 15px; }
.activity-item strong { display: block; font-size: 13px; }
.activity-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.split-layout { display: grid; grid-template-columns: minmax(290px, 360px) minmax(0, 1fr); gap: 26px; }
.form-panel { align-self: start; border: 1px solid var(--line); background: #fff; padding: 0 21px 22px; }
.form-panel .section-heading { margin-top: 0; }
.integration-list { display: grid; grid-template-columns: 220px minmax(0, 1fr); margin: 0; border: 1px solid var(--line); background: #fff; }
.integration-list dt, .integration-list dd { min-height: 49px; margin: 0; padding: 14px 17px; border-bottom: 1px solid #e7ecf2; }
.integration-list dt { color: var(--muted); font-size: 12px; font-weight: 700; background: #f7f9fb; }
.integration-list dd { min-width: 0; overflow-wrap: anywhere; font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }
.integration-list dt:last-of-type, .integration-list dd:last-of-type { border-bottom: 0; }
.notice { margin-top: 15px; display: flex; gap: 14px; border-left: 3px solid var(--amber); background: #fff; padding: 14px 16px; font-size: 12px; }
.notice span { color: var(--muted); }

@media (max-width: 1050px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-layout { grid-template-columns: 1fr; }
  .form-panel { max-width: none; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; padding: 14px; }
  .brand-row { padding: 0 3px 13px; }
  nav { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
  .nav-item { padding: 0 5px; text-align: center; font-size: 11px; }
  .logout-button { margin-top: 12px; }
  .workspace { padding: 0 15px 30px; }
  .topbar { min-height: 90px; align-items: flex-start; padding: 17px 0; }
  .runtime { max-width: 44%; }
  .runtime code { overflow-wrap: anywhere; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .summary-card { min-height: 104px; padding: 15px; }
  .summary-card strong { font-size: 25px; }
  .integration-list { grid-template-columns: 1fr; }
  .integration-list dt { border-bottom: 0; min-height: auto; padding-bottom: 4px; }
  .integration-list dd { padding-top: 5px; }
  .activity-item { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 430px) {
  .login-panel { padding: 28px 22px; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: 1fr; }
  .topbar { display: block; }
  .runtime { max-width: none; margin-top: 12px; }
  .section-heading { align-items: flex-start; }
}
