:root {
  color-scheme: light;
  --canvas: #f5f6fb;
  --paper: #fff;
  --ink: #1d2340;
  --muted: #59617a;
  --line: #e0e4ef;
  --brand: #5240c5;
  --brand-hover: #4331a9;
  --lavender: #efedff;
  --nav: #1c2038;
  --nav-ink: #eef0ff;
  --nav-muted: #b7bdd8;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(34 38 76 / .04), 0 8px 25px rgb(34 38 76 / .045);
  font: 16px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid #7366dc; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 3.2vw, 2.85rem); line-height: 1.12; font-weight: 780; letter-spacing: -.05em; }
h2 { font-size: 1.2rem; line-height: 1.35; letter-spacing: -.025em; }
h3 { font-size: 1.08rem; line-height: 1.35; letter-spacing: -.018em; }
p { overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.workspace { display: grid; grid-template-columns: 234px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; min-width: 0; height: 100dvh; padding: 28px 18px 18px; background: var(--nav); color: var(--nav-ink); }
.brand { display: inline-flex; gap: 11px; align-items: center; color: inherit; width: fit-content; font-size: 1.34rem; line-height: 1; letter-spacing: -.04em; font-weight: 780; }
.brand:hover { text-decoration: none; }
.sidebar .brand { margin: 0 8px 44px; }
.brand-icon { display: grid; width: 36px; aspect-ratio: 1; place-items: center; border-radius: 11px; background: #6654e2; color: #fff; font-size: 1.05rem; font-weight: 800; box-shadow: inset 0 0 0 1px #ffffff38; }
.navigation { display: grid; gap: 6px; }
.navigation a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; min-height: 44px; border-radius: 10px; color: var(--nav-muted); font-weight: 650; }
.navigation a:hover { color: white; text-decoration: none; background: #ffffff10; }
.navigation a.current { background: #343351; color: #f5f2ff; }
.navigation a span { width: 20px; font-size: 1.15rem; color: #bdb1ff; text-align: center; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 16px 1px 0; border-top: 1px solid #ffffff22; }
.account-avatar { display: grid; place-items: center; width: 30px; aspect-ratio: 1; background: #3c365c; color: #f2ecff; border-radius: 50%; font-size: .86rem; font-weight: 750; flex: 0 0 auto; }
.account-name { min-width: 0; font-size: .82rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot form { margin-left: auto; }
.logout { border: 0; background: transparent; padding: 5px 3px; font-size: .875rem; color: var(--nav-muted); cursor: pointer; }
.logout:hover { color: white; }

.content { width: min(1510px,100%); margin: 0 auto; padding: 42px clamp(22px,4vw,58px) 64px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 32px; }
.page-head p { color: var(--muted); margin-top: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head p { font-size: .875rem; color: var(--muted); margin-top: 3px; }
.button, button:not(.logout):not(.icon-button) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; background: var(--brand); color: white; font-size: .875rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.button:hover, button:not(.logout):not(.icon-button):hover { background: var(--brand-hover); text-decoration: none; }
.button.secondary, button.secondary:not(.logout):not(.icon-button), button.quiet:not(.logout):not(.icon-button) { color: var(--ink); background: var(--paper); border-color: var(--line); }
.button.secondary:hover, button.secondary:not(.logout):not(.icon-button):hover, button.quiet:not(.logout):not(.icon-button):hover { background: var(--lavender); }
.actions, .links, .inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.subtle-link { font-weight: 700; font-size: .875rem; }
.count { display: inline-grid; place-items: center; min-width: 25px; padding: 3px 8px; border-radius: 30px; color: #494080; background: var(--lavender); font-size: .78rem; font-weight: 750; line-height: 1.15; vertical-align: middle; }
.panel, .metric, .project-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel { padding: 20px; margin-bottom: 16px; }
.overview { margin-bottom: 32px; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.metric { --metric-ink: #5c49ce; padding: 17px 18px; }
.metric-ram { --metric-ink: #177d79; }
.metric-disk { --metric-ink: #3464b4; }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.metric-label { color: var(--metric-ink); font-size: .875rem; font-weight: 750; }
.metric strong { font-size: clamp(1.3rem,2.4vw,1.9rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric strong small { font-size: .56em; margin-left: 2px; color: var(--muted); }
.metric p { margin-top: 6px; color: var(--muted); font-size: .82rem; }
progress { appearance: none; display: block; width: 100%; height: 6px; margin-top: 12px; border: 0; border-radius: 99px; overflow: hidden; background: #ecedf5; color: var(--metric-ink); }
progress::-webkit-progress-bar { background: #ecedf5; }
progress::-webkit-progress-value { background: var(--metric-ink); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--metric-ink); border-radius: 99px; }
.review { margin-bottom: 28px; }
.project-list { margin-top: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,235px),1fr)); gap: 14px; }
.project-card { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.project-card:hover { border-color: #bcb3ed; box-shadow: 0 8px 26px rgb(42 34 95 / .10); }
.project-card-main { flex: 1; padding: 19px 19px 17px; }
.project-avatar { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border-radius: 12px; margin-bottom: 12px; font-size: .88rem; font-weight: 800; background: #eee9ff; color: #5538ac; }
.tint-1 { background: #e5f5f2; color: #146962; }
.tint-2 { background: #e8efff; color: #2f56a0; }
.tint-3 { background: #f9ebf2; color: #993d71; }
.project-card h3 a { color: var(--ink); }
.project-card p { margin: 5px 0 13px; color: var(--muted); font-size: .875rem; }
.domain { display: inline-block; font-size: .84rem; max-width: 100%; overflow-wrap: anywhere; }
.project-card footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #fbfbfe; border-top: 1px solid var(--line); padding: 11px 19px; font-size: .85rem; color: var(--muted); }
.search { min-width: min(100%,225px); }
.search input { background: var(--paper); }
.empty { border: 1px dashed #cbd0e1; border-radius: 12px; padding: 16px; color: var(--muted); }

.breadcrumb { display: inline-block; margin-bottom: 14px; font-weight: 650; font-size: .875rem; }
.project-meta { margin: -10px 0 28px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 7px; background: var(--lavender); color: #453b86; font-size: .78rem; font-weight: 750; }
.board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 0 24px; align-items: start; }
.column { --lane-color: #77819d; background: #eceef6; border: 1px solid #e3e6f0; border-radius: 13px; min-width: 0; padding: 11px; min-height: 112px; }
.lane-1 { --lane-color: #3c64c0; }
.lane-2 { --lane-color: #95641a; }
.lane-3 { --lane-color: #258164; }
.column h2 { display: flex; align-items: center; gap: 7px; font-size: .93rem; margin-bottom: 11px; }
.column h2::before, .service-dot { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--lane-color); }
.column h2 span { margin-left: auto; color: var(--muted); font-size: .82rem; }
.task { padding: 11px; border: 1px solid #dfe3ef; border-radius: 10px; background: var(--paper); overflow-wrap: anywhere; scroll-margin-top: 14px; }
.task + .task { margin-top: 9px; }
.task > * + * { margin-top: 6px; }
.task p, .task .links { font-size: .875rem; }
.task button:not(.logout):not(.icon-button) { white-space: normal; min-height: 38px; width: 100%; }
.task:target { outline: 2px solid var(--brand); }
.preserve { white-space: pre-wrap; }
.muted { color: var(--muted); }
.small { font-size: .83rem; }
.mono, pre, code { font-family: ui-monospace, SFMono-Regular, monospace; }
summary { cursor: pointer; font-weight: 720; }
details.panel[open] > summary { margin-bottom: 14px; }
.plain { list-style: none; margin: 8px 0 0; padding: 0; }
.plain li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }

.stack { display: grid; gap: 14px; align-items: start; }
.stack button { justify-self: start; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
label { display: grid; gap: 5px; font-size: .875rem; font-weight: 660; color: var(--muted); }
input, textarea, select { color: var(--ink); background: #fcfcff; border: 1px solid #cfd4e3; border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
.inline { align-items: end; }
dialog { border: 1px solid var(--line); border-radius: 17px; padding: 0; background: var(--paper); color: var(--ink); width: min(94vw,640px); max-height: 92dvh; box-shadow: 0 24px 80px #1c20384d; }
dialog::backdrop { background: #1a1e35a3; }
.dialog-body { padding: 23px; }
.icon-button { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); width: 38px; height: 38px; font-size: 1.35rem; cursor: pointer; }
.icon-button:hover { background: var(--lavender); }

.ops-layout { display: grid; grid-template-columns: minmax(170px,235px) minmax(0,1fr); gap: 15px; align-items: start; }
.service-list nav { display: grid; gap: 5px; margin-top: 12px; }
.service-list nav a { display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 8px; color: var(--ink); font-size: .875rem; overflow-wrap: anywhere; }
.service-list nav a:hover, .service-list nav a[aria-current] { background: var(--lavender); color: var(--brand-hover); text-decoration: none; }
.service-dot { background: #39846c; width: 7px; height: 7px; }
.log-panel pre, .token { display: block; overflow: auto; padding: 14px; border-radius: 9px; background: var(--nav); color: #e9ebfb; font-size: .85rem; }
.log-panel pre { margin: 0; max-height: min(58vh,560px); min-height: 135px; white-space: pre-wrap; overflow-wrap: anywhere; }

.guest-header { max-width: 1020px; margin: 0 auto; padding: 22px 24px 0; }
.guest .content { max-width: 1020px; padding-inline: 24px; }
.login-layout { display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 23px; background: white; box-shadow: var(--shadow); min-height: 475px; }
.login-brand { display: flex; flex-direction: column; justify-content: center; position: relative; isolation: isolate; overflow: hidden; padding: 38px; color: white; background: linear-gradient(145deg,#27214f,#46369e); }
.login-brand h1 { font-size: clamp(2.2rem,4.2vw,4.5rem); }
.login-brand p { margin-top: 12px; color: #e4dfff; }
.login-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.login-art span { position: absolute; width: 320px; aspect-ratio: 1; border-radius: 75px; border: 1px solid #ccbeff65; transform: rotate(38deg); }
.login-art span:nth-child(1) { right: -152px; top: -135px; background: #a690ff23; }
.login-art span:nth-child(2) { right: -161px; bottom: -155px; background: #a690ff13; }
.login-art span:nth-child(3) { right: -178px; bottom: -136px; }
.login { align-self: center; padding: 38px; }
.login h2 { font-size: 1.55rem; }
.login p { color: var(--muted); margin: 4px 0 20px; }
.login .stack button { width: 100%; }
.error { color: #a42949 !important; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: 192px minmax(0,1fr); }
  .sidebar { padding-inline: 12px; }
  .account-name { font-size: .75rem; }
  .board { grid-template-columns: repeat(4,minmax(185px,1fr)); overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .column { scroll-snap-align: start; }
}
@media (max-width: 760px) {
  .workspace { display: block; }
  .sidebar { position: static; height: auto; display: grid; grid-template-columns: 1fr auto; gap: 11px; padding: 14px 18px 9px; }
  .sidebar .brand { margin: 0; }
  .navigation { order: 2; grid-column: 1/-1; display: flex; gap: 4px; }
  .navigation a { min-height: 40px; font-size: .87rem; }
  .sidebar-foot { margin: 0; border: 0; padding: 0; }
  .account-name, .account-avatar { display: none; }
  .content { padding: 25px 18px 48px; }
  .page-head { align-items: flex-start; margin-bottom: 22px; }
  .page-head > .actions { justify-content: flex-end; }
  .board { grid-template-columns: 1fr; overflow-x: visible; scroll-snap-type: none; }
  .column { min-height: auto; }
  .ops-layout { grid-template-columns: 1fr; }
  .service-list nav { grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); }
  .login-layout { grid-template-columns: 1fr; min-height: 0; }
  .login-brand,.login { padding: 25px; }
}
@media (max-width: 440px) {
  .page-head { flex-wrap: wrap; }
  .metrics { gap: 6px; }
  .metric { padding: 10px 8px; border-radius: 11px; }
  .metric-top { display: grid; gap: 4px; }
  .metric p { font-size: .75rem; }
  .responsive-head { flex-wrap: wrap; }
  .field-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
