:root {
  color-scheme: light;
  --hc-cloud-blue: #176bff;
  --hc-cloud-blue-strong: #0f54ff;
  --hc-agent-navy: #071d4e;
  --hc-agent-navy-strong: #001640;
  --hc-verified-mint: #19cd9b;
  --hc-completed: #0a8f69;
  --hc-failed: #c93434;
  --hc-waiting: #a76700;
  --hc-cancelled: #596579;
  --hc-not-run: #7b8494;
  --hc-canvas: #f7f9fd;
  --hc-surface: #fff;
  --hc-surface-subtle: #eff4ff;
  --hc-text: #07162f;
  --hc-text-muted: #58657a;
  --hc-border: #d9e1ec;
  --hc-focus: #176bff;
  --hc-shadow-raised: 0 10px 30px rgb(7 22 47 / 10%);
  font-family: Inter, "HarmonyOS Sans SC", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--hc-text);
  background: var(--hc-canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 12% 8%, rgb(23 107 255 / 11%) 0, transparent 32%), var(--hc-canvas); }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.topbar { height: 76px; padding: 0 clamp(24px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: rgb(255 255 255 / 88%); border-bottom: 1px solid var(--hc-border); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; min-width: 160px; }
.brand img { display: block; width: 174px; height: 55px; object-fit: contain; object-position: left center; }
.shell { max-width: 1180px; margin: 0 auto; padding: clamp(48px, 8vw, 104px) 28px; }
.login-layout { display: grid; grid-template-columns: 1.2fr minmax(320px, .8fr); gap: clamp(48px, 8vw, 110px); align-items: center; }
.intro h1, #dashboard-title { margin: 12px 0 20px; color: var(--hc-agent-navy); font-size: clamp(42px, 6vw, 72px); font-weight: 650; line-height: 1.06; letter-spacing: -.055em; }
.intro > p:not(.eyebrow) { max-width: 600px; color: var(--hc-text-muted); font-size: 18px; line-height: 1.7; }
.eyebrow { margin: 0; color: var(--hc-cloud-blue); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.status-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 30px 0 0; list-style: none; }
.status-legend li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--hc-border); border-radius: 999px; background: rgb(255 255 255 / 76%); color: var(--hc-text-muted); font-size: 13px; }
.status-legend li span { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 800; line-height: 1; }
.status-legend .completed { color: var(--hc-completed); }
.status-legend .failed { color: var(--hc-failed); }
.status-legend .waiting { color: var(--hc-waiting); }
.status-legend .cancelled { color: var(--hc-cancelled); }
.status-legend .not-run { color: var(--hc-not-run); }
.card { padding: 34px; border: 1px solid var(--hc-border); border-radius: 24px; background: rgb(255 255 255 / 95%); box-shadow: 0 28px 70px rgb(7 29 78 / 13%); }
.card h2 { margin: 10px 0 28px; font-size: 28px; letter-spacing: -.03em; }
label { display: block; margin: 18px 0 8px; color: var(--hc-text-muted); font-size: 14px; font-weight: 680; }
input, select, textarea { width: 100%; padding: 0 14px; color: var(--hc-text); border: 1px solid var(--hc-border); border-radius: 12px; outline: none; background: #fbfcff; transition: border-color .15s, box-shadow .15s; }
input, select { height: 48px; }
textarea { min-height: 132px; padding-top: 13px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--hc-focus); box-shadow: 0 0 0 4px rgb(23 107 255 / 13%); }
button { border: 0; border-radius: 12px; cursor: pointer; font-weight: 720; }
button:focus-visible { outline: 3px solid rgb(23 107 255 / 28%); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: .6; }
.primary { width: 100%; min-height: 50px; margin-top: 26px; color: #fff; background: linear-gradient(180deg, var(--hc-cloud-blue), var(--hc-cloud-blue-strong)); box-shadow: 0 10px 24px rgb(23 107 255 / 25%); }
.primary.no-top { margin-top: 0; }
.secondary { min-height: 44px; padding: 10px 16px; color: var(--hc-agent-navy); background: var(--hc-surface-subtle); }
.message { min-height: 22px; margin: 16px 0 0; color: var(--hc-text-muted); font-size: 14px; }
.muted, .section-heading p { color: var(--hc-text-muted); }
.section-heading { display: flex; justify-content: space-between; margin: 58px 0 20px; }
.section-heading h2 { margin: 0 0 6px; font-size: 24px; }
.section-heading p { margin: 0; }
.workspace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.workspace-card { position: relative; min-height: 170px; padding: 25px; border: 1px solid var(--hc-border); border-radius: 20px; background: var(--hc-surface); box-shadow: var(--hc-shadow-raised); }
.workspace-card h3 { margin: 0 0 18px; font-size: 21px; }
.role { display: inline-block; padding: 6px 10px; border-radius: 999px; color: var(--hc-cloud-blue); background: var(--hc-surface-subtle); font-size: 12px; font-weight: 750; }
.workspace-id { margin: 24px 0 0; color: var(--hc-not-run); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; overflow-wrap: anywhere; }
.provider-section { margin-top: 64px; padding-top: 10px; border-top: 1px solid var(--hc-border); }
.provider-layout { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 20px; align-items: start; }
.card.compact { padding: 26px; border-radius: 20px; box-shadow: var(--hc-shadow-raised); }
.provider-list { display: grid; gap: 14px; }
.provider-card, .empty-state { margin: 0; padding: 22px; border: 1px solid var(--hc-border); border-radius: 18px; background: var(--hc-surface); }
.provider-card h3 { margin: 0 0 8px; }
.provider-card p { margin: 0 0 16px; color: var(--hc-text-muted); }
.provider-card .agent-update-status { margin: 8px 0 0; font-size: 13px; }
.provider-card code { display: block; margin-bottom: 16px; color: var(--hc-text-muted); font-size: 12px; }
.provider-card .verification-state { margin: 14px 0 10px; font-size: 13px; }
.verify-provider { width: 100%; margin-top: 4px; }
.empty-state { color: var(--hc-not-run); }
.pairing-result { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--hc-surface-subtle); text-align: center; }
.pairing-result code { display: block; color: var(--hc-cloud-blue-strong); font-size: 18px; font-weight: 800; letter-spacing: .08em; overflow-wrap: anywhere; }
.pairing-result p { margin: 8px 0 0; font-size: 12px; }
.nested-form { margin-top: 26px; padding-top: 8px; border-top: 1px solid var(--hc-border); }
.project-list { margin-top: 14px; }
.danger { min-height: 44px; margin-top: 14px; padding: 9px 12px; color: var(--hc-failed); background: #fff0f0; }
.task-layout { display: grid; grid-template-columns: minmax(320px, 410px) 1fr; gap: 20px; align-items: start; }
.task-detail { padding: 26px; border: 1px solid var(--hc-border); border-radius: 20px; background: var(--hc-surface); box-shadow: var(--hc-shadow-raised); }
.task-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.task-summary h3 { max-width: 620px; margin: 8px 0; font-size: 22px; line-height: 1.35; }
.task-summary p { margin: 0; }
.task-status { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: var(--hc-waiting); background: #fff7e8; font-size: 12px; font-weight: 800; }
.task-status.completed { color: var(--hc-completed); background: #eafaf5; }
.task-status.failed { color: var(--hc-failed); background: #fff0f0; }
.task-status.cancelled { color: var(--hc-cancelled); background: #eef1f5; }
.task-steps { display: grid; gap: 10px; margin-top: 22px; }
.task-step { padding: 16px; border: 1px solid var(--hc-border); border-radius: 14px; background: #fbfcff; }
.task-step header { display: flex; justify-content: space-between; gap: 14px; }
.task-step h4 { margin: 0; font-size: 15px; }
.task-step p { margin: 8px 0 0; color: var(--hc-text-muted); font-size: 13px; line-height: 1.5; }
.task-step code { display: inline-block; margin-top: 10px; color: var(--hc-cloud-blue-strong); font-size: 11px; }
.task-actions { display: flex; gap: 10px; margin-top: 18px; }
.task-actions .primary, .task-actions .danger { width: auto; margin-top: 0; padding: 10px 18px; }
.task-log-panel { margin-top: 18px; border: 1px solid #233b6a; border-radius: 16px; overflow: hidden; background: #07162f; color: #dce8ff; }
.log-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid rgb(220 232 255 / 16%); }
.log-heading h4 { margin: 0; font-size: 14px; }
.log-heading span { color: #9eb1d3; font-size: 11px; }
.task-log-panel pre { max-height: 300px; margin: 0; padding: 16px; overflow: auto; color: #dce8ff; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-result { margin-top: 18px; padding: 20px; border: 1px solid #9ee2cf; border-radius: 16px; background: #effcf8; }
.task-result h4 { margin: 6px 0 10px; font-size: 18px; }
.task-result p { margin: 7px 0 0; line-height: 1.55; }
.approval-card { margin-top: 18px; padding: 20px; border: 1px solid #f1c267; border-radius: 16px; background: #fffbf2; }
.approval-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.approval-heading h4 { margin: 6px 0 0; font-size: 18px; }
.risk-badge { padding: 7px 10px; border-radius: 999px; color: #8b4f00; background: #ffe9b8; font-size: 12px; font-weight: 800; }
.approval-card > p { margin: 12px 0 0; line-height: 1.55; }
.approval-card pre { max-height: 240px; margin: 14px 0 0; padding: 14px; overflow: auto; border: 1px solid var(--hc-border); border-radius: 12px; background: #fff; color: var(--hc-agent-navy); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.approval-expiry { color: var(--hc-waiting); font-size: 13px; }
.approval-card textarea { min-height: 74px; }
.approval-actions { display: flex; gap: 10px; margin-top: 14px; }
.approval-actions .primary, .approval-actions .danger { width: auto; margin-top: 0; padding: 10px 18px; }

@media (max-width: 760px) {
  .login-layout { grid-template-columns: 1fr; }
  .intro h1 { font-size: 42px; }
  .shell { padding-top: 48px; }
  .card { padding: 26px; }
  .provider-layout { grid-template-columns: 1fr; }
  .task-layout { grid-template-columns: 1fr; }
  .task-summary, .task-actions, .approval-actions { flex-direction: column; }
  .task-actions button, .approval-actions button { width: 100% !important; }
}
