:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e4e7ec;
  --canvas: #f5f7fb;
  --panel: #ffffff;
  --nav: #101828;
  --nav-soft: #1d2939;
  --primary: #3064e8;
  --primary-dark: #224fbd;
  --success: #12805c;
  --danger: #c73737;
  --warning: #b26a00;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(16, 24, 40, 0.06);
}

html { font-size: 14px; min-height: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
code, pre, .code-input { font-family: "Cascadia Code", Consolas, monospace; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; color: #d0d5dd; background: linear-gradient(180deg, #101828 0%, #0b1220 100%); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; color: white; padding: 0 8px 28px; }
.brand:hover { color: white; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #5b8cff, #7047eb); font-size: 21px; font-weight: 800; box-shadow: 0 8px 22px rgba(74, 105, 225, .35); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .1px; }
.brand small { color: #98a2b3; font-size: 9px; letter-spacing: 1.8px; margin-top: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-label { color: #667085; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; padding: 18px 12px 7px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 9px; color: #b9c0cc; font-weight: 550; transition: .18s ease; }
.side-nav a span { width: 20px; color: #8da5df; font-size: 17px; text-align: center; }
.side-nav a:hover { color: white; background: var(--nav-soft); transform: translateX(2px); }
.sidebar-footer { margin-top: auto; display: flex; gap: 10px; align-items: center; border: 1px solid #253044; border-radius: 10px; padding: 12px; background: rgba(255,255,255,.025); }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { color: #e4e7ec; font-size: 12px; }
.sidebar-footer small { color: #667085; font-size: 10px; }
.worker-dot { width: 9px; height: 9px; border-radius: 50%; background: #2dd4a4; box-shadow: 0 0 0 4px rgba(45,212,164,.12); }

.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; padding: 0 34px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.sidebar-toggle { display: none; border: 0; background: none; font-size: 22px; }
.environment { color: #475467; font-size: 12px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.environment span { width: 7px; height: 7px; background: #2abf91; border-radius: 50%; }
.topbar-meta { display: flex; align-items: center; gap: 20px; font-size: 12px; color: var(--muted); }
.topbar-meta strong { color: var(--ink); border-left: 1px solid var(--line); padding-left: 20px; }
.main-content { width: 100%; max-width: 1680px; margin: 0 auto; padding: 34px; flex: 1; }
footer { padding: 18px 34px 28px; color: #98a2b3; font-size: 11px; }
footer span { color: #667085; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.page-heading h1 { font-size: 28px; line-height: 1.2; margin: 5px 0 7px; font-weight: 730; letter-spacing: -.5px; }
.page-heading p { color: var(--muted); margin: 0; max-width: 760px; }
.eyebrow { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.heading-actions { display: flex; gap: 9px; }
.heading-actions form, .actions form { display: inline; margin: 0; }

.btn { border-radius: 8px; font-weight: 650; padding: .58rem 1rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); box-shadow: 0 5px 14px rgba(48,100,232,.18); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.form-control, .form-select { border-color: #d0d5dd; border-radius: 8px; min-height: 41px; }
.form-control:focus, .form-select:focus { border-color: #84a5f5; box-shadow: 0 0 0 3px rgba(48,100,232,.1); }
.form-label { color: #344054; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.form-text { color: #98a2b3; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-card { position: relative; overflow: hidden; min-height: 137px; padding: 20px 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.metric-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #98a2b3; }
.metric-card.accent-blue::before { background: #3478f6; }.metric-card.accent-violet::before { background: #7b61dd; }.metric-card.accent-green::before { background: #20a57a; }.metric-card.accent-red::before { background: #e25555; }
.metric-card > span { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-card > strong { font-size: 30px; line-height: 1; margin: 14px 0 11px; letter-spacing: -.7px; }
.metric-card a, .metric-card small { margin-top: auto; font-size: 11px; color: var(--muted); }
.metric-card a { color: var(--primary); font-weight: 650; }
.metric-status { font-size: 14px !important; }

.content-grid { display: grid; gap: 18px; }.dashboard-grid { grid-template-columns: minmax(0, 2.4fr) minmax(280px, .8fr); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid #eef0f4; }
.panel-heading h2 { font-size: 15px; margin: 0 0 4px; font-weight: 720; }
.panel-heading p { color: var(--muted); font-size: 11px; margin: 0; }
.panel-heading > a { font-size: 12px; font-weight: 650; }
.data-table { margin: 0; white-space: nowrap; }
.data-table thead th { padding: 11px 16px; color: #667085; background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .45px; text-transform: uppercase; }
.data-table tbody td { padding: 13px 16px; border-color: #eef0f4; font-size: 12px; }
.data-table tbody tr:hover { background: #fbfcff; }
.data-table td strong, .data-table td small { display: block; }.data-table td strong { color: #263145; font-size: 12px; }.data-table td small { color: #98a2b3; margin-top: 3px; }
.actions { text-align: right; min-width: 190px; }.actions > * { margin-left: 9px !important; font-size: 11px; }.link-button { border: 0; padding: 0; color: var(--primary); background: transparent; font: inherit; }.link-button:hover { color: var(--primary-dark); text-decoration: underline; }
.empty-state { padding: 45px 20px; text-align: center; color: #98a2b3; }
.preview-table { max-height: 520px; }

.status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 750; letter-spacing: .1px; background: #f2f4f7; color: #475467; }
.status-succeeded, .status-active { color: #067647; background: #ecfdf3; }.status-running { color: #175cd3; background: #eff8ff; }.status-failed { color: #b42318; background: #fef3f2; }.status-partialsuccess, .status-draft { color: #b54708; background: #fffaeb; }.status-skipped, .status-paused { color: #475467; background: #f2f4f7; }

.health-panel { padding-bottom: 14px; }.health-item { display: flex; gap: 12px; padding: 16px 20px 0; }.health-item strong, .health-item small { display: block; }.health-item strong { font-size: 12px; }.health-item small { color: var(--muted); font-size: 10px; margin-top: 3px; }.health-icon { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 8px; font-weight: 800; }.health-icon.success { color: var(--success); background: #ecfdf3; }.health-icon.warning { color: var(--warning); background: #fffaeb; }.health-icon.neutral { color: #475467; background: #f2f4f7; }.health-panel > .btn { margin-left: 20px; width: calc(100% - 40px) !important; }

.form-panel { padding: 0 24px; }.form-section { padding: 25px 0; border-bottom: 1px solid #eef0f4; }.form-section-title { display: flex; gap: 12px; margin-bottom: 20px; }.form-section-title > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--primary); background: #eef3ff; font-weight: 750; }.form-section-title h2 { font-size: 14px; margin: 0 0 3px; }.form-section-title p { font-size: 11px; color: var(--muted); margin: 0; }.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 0; }.mapping-list { display: flex; flex-wrap: wrap; gap: 8px; }.mapping-list > span { padding: 7px 10px; border-radius: 7px; background: #f5f7fb; color: #475467; font-size: 11px; }.mapping-list small { color: #98a2b3; margin-left: 4px; }
.configuration-note { display: flex; gap: 12px; margin-top: 22px; padding: 14px 16px; border: 1px solid #fedf89; border-radius: 9px; color: #7a2e0e; background: #fffaeb; font-size: 11px; }.configuration-note strong { flex: 0 0 auto; }.configuration-note span { color: #93370d; }.auth-fields-disabled { opacity: .48; pointer-events: none; }
.filter-panel { padding: 20px 22px; }.code-panel pre { margin: 0; max-height: 70vh; padding: 22px; color: #d1e0ff; background: #111827; overflow: auto; font-size: 12px; line-height: 1.65; }.checkpoint-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }.checkpoint-grid > div { padding: 18px 22px; background: white; }.checkpoint-grid span, .checkpoint-grid code { display: block; }.checkpoint-grid span { color: var(--muted); font-size: 10px; margin-bottom: 7px; text-transform: uppercase; }.checkpoint-grid code { color: #344054; white-space: normal; word-break: break-all; }.json-preview { max-width: 700px; max-height: 260px; padding: 12px; background: #111827; color: #d1e0ff; white-space: pre-wrap; }

@media (max-width: 1180px) { .metric-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .app-shell { display: block; }.sidebar { position: fixed; left: -270px; width: 250px; transition: left .22s ease; }.sidebar-open .sidebar { left: 0; box-shadow: 20px 0 40px rgba(0,0,0,.18); }.sidebar-toggle { display: block; }.topbar { padding: 0 18px; }.environment { display: none; }.main-content { padding: 24px 18px; }.page-heading { align-items: flex-start; flex-direction: column; }.metric-grid { grid-template-columns: 1fr; }.checkpoint-grid { grid-template-columns: 1fr; }.topbar-meta span { display: none; } footer { padding: 18px; }
}
