:root {
  --ink: #172033;
  --muted: #697386;
  --subtle: #8b95a7;
  --line: #e7e9ef;
  --line-strong: #d9dce5;
  --surface: #ffffff;
  --canvas: #f5f6f8;
  --brand: #5b5bd6;
  --brand-dark: #4848bd;
  --brand-soft: #ededff;
  --green: #16805d;
  --green-soft: #e9f7f1;
  --orange: #b8610b;
  --orange-soft: #fff4e8;
  --red: #c23b42;
  --red-soft: #fff0f0;
  --blue: #2563eb;
  --blue-soft: #edf4ff;
  --shadow: 0 16px 50px rgba(29, 35, 58, .12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-width: 320px; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.boot-screen {
  min-height: 100vh; display: grid; place-content: center; justify-items: center;
  color: var(--muted); gap: 14px;
}
.boot-mark, .brand-mark {
  display: grid; place-items: center; color: white; background: linear-gradient(145deg, #6d6de2, #4646b6);
  font-weight: 800; box-shadow: 0 8px 20px rgba(91, 91, 214, .24);
}
.boot-mark { width: 44px; height: 44px; border-radius: 13px; }

.login-page {
  min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .94fr) minmax(520px, 1.06fr);
  background: #fff;
}
.login-panel { display: flex; flex-direction: column; min-height: 100vh; padding: 36px 8vw; }
.login-brand { display: flex; align-items: center; gap: 11px; font-weight: 730; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
.login-card { width: min(420px, 100%); margin: auto 0; }
.login-eyebrow { font-size: 12px; color: var(--brand); font-weight: 750; letter-spacing: .12em; margin: 0 0 12px; }
.login-card h1 { font-size: 34px; letter-spacing: -.04em; margin: 0 0 10px; }
.login-card > p { color: var(--muted); line-height: 1.7; margin: 0 0 34px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 650; color: #3f4859; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  border-radius: 9px; outline: none; transition: border .15s, box-shadow .15s;
}
.input, .select { height: 42px; padding: 0 12px; }
.textarea { padding: 11px 12px; min-height: 112px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,91,214,.12); }
.login-button { width: 100%; height: 44px; margin-top: 8px; }
.login-tip { margin-top: 22px; font-size: 12px; color: var(--subtle); }
.demo-credential {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: -12px 0 22px;
}
.demo-credential div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8f8fb; }
.demo-credential span { display: block; margin-bottom: 5px; color: var(--subtle); font-size: 10px; }
.demo-credential strong { color: var(--ink); font-size: 15px; letter-spacing: .02em; }
.login-visual {
  margin: 18px; border-radius: 24px; overflow: hidden; position: relative;
  background: radial-gradient(circle at 78% 15%, rgba(255,255,255,.12), transparent 28%), linear-gradient(145deg, #242645, #3d3e72 55%, #5555ad);
  color: #fff; display: flex; align-items: center; padding: 8%;
}
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.login-visual::before { width: 420px; height: 420px; right: -180px; top: -120px; }
.login-visual::after { width: 300px; height: 300px; left: -150px; bottom: -190px; }
.visual-content { width: min(580px, 100%); position: relative; z-index: 1; }
.visual-kicker { color: #bfc0ff; font-size: 13px; letter-spacing: .1em; font-weight: 700; }
.visual-content h2 { font-size: clamp(36px, 4vw, 58px); line-height: 1.12; letter-spacing: -.045em; margin: 18px 0 20px; max-width: 8em; }
.visual-content > p { color: rgba(255,255,255,.67); line-height: 1.8; max-width: 470px; }
.visual-metrics { display: flex; gap: 14px; margin-top: 46px; }
.visual-metric { flex: 1; max-width: 170px; padding: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.11); border-radius: 13px; backdrop-filter: blur(8px); }
.visual-metric strong { display: block; font-size: 26px; margin-bottom: 6px; }
.visual-metric span { font-size: 12px; color: rgba(255,255,255,.61); }

.button {
  border: 1px solid transparent; border-radius: 8px; height: 36px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 650; font-size: 13px;
  transition: background .15s, border .15s, transform .1s; white-space: nowrap;
}
.button:active { transform: translateY(1px); }
.button.primary { color: #fff; background: var(--brand); }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { color: #40485a; background: #fff; border-color: var(--line-strong); }
.button.secondary:hover { background: #f8f8fb; }
.button.ghost { color: var(--muted); background: transparent; padding: 0 9px; }
.button.ghost:hover { background: #eff0f4; color: var(--ink); }
.button.danger { color: var(--red); background: var(--red-soft); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.viewer-chip {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border-radius: 7px;
  color: #5a6073; background: #f0f1f4; border: 1px solid #e2e4ea; font-size: 11px; font-weight: 650;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0,1fr); }
.sidebar {
  background: #202235; color: #e9eaf0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar-brand { height: 66px; padding: 0 20px; display: flex; align-items: center; gap: 11px; font-weight: 720; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.nav-group { padding: 18px 11px 0; }
.nav-title { color: #7f8498; padding: 0 10px 8px; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.nav-item {
  width: 100%; height: 39px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: #aeb2c0;
  display: flex; align-items: center; gap: 11px; text-align: left; font-size: 13px; margin-bottom: 3px;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: rgba(111,111,226,.22); }
.nav-symbol { width: 18px; text-align: center; font-size: 15px; color: #9397aa; }
.nav-item.active .nav-symbol { color: #b7b7ff; }
.nav-count { margin-left: auto; font-size: 11px; color: #7f8498; }
.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-user { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; width: 100%; padding: 8px; color: #fff; background: transparent; border: 0; border-radius: 8px; text-align: left; }
.sidebar-user:hover { background: rgba(255,255,255,.06); }
.sidebar-user small { display: block; color: #8f93a5; margin-top: 2px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }

.main { min-width: 0; }
.topbar {
  height: 66px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 28px; gap: 18px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px);
}
.mobile-menu { display: none; }
.breadcrumb { color: var(--subtle); font-size: 13px; }
.breadcrumb strong { color: var(--ink); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-box { width: 240px; height: 36px; position: relative; }
.search-box input { width: 100%; height: 100%; padding: 0 12px 0 35px; border: 1px solid var(--line); border-radius: 8px; background: #f7f7f9; outline: none; }
.search-box input:focus { background: #fff; border-color: var(--brand); }
.search-symbol { position: absolute; left: 12px; top: 8px; color: var(--subtle); }
.content { padding: 28px; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 23px; }
.page-head h1 { font-size: 24px; letter-spacing: -.025em; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.page-head .button { margin-left: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 18px; min-height: 118px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 52px; height: 3px; border-radius: 3px; background: var(--accent, var(--brand)); left: 18px; bottom: 0; }
.stat-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, var(--brand)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--brand)) 12%, transparent); }
.stat-value { font-size: 30px; font-weight: 720; letter-spacing: -.04em; margin: 17px 0 3px; }
.stat-note { font-size: 11px; color: var(--subtle); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(290px,.75fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; min-width: 0; }
.panel-head { min-height: 57px; padding: 0 17px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 14px; }
.panel-head p { margin: 0; color: var(--subtle); font-size: 11px; }
.panel-head .button { margin-left: auto; }
.panel-body { padding: 17px; }
.progress-row { margin-bottom: 19px; }
.progress-row:last-child { margin-bottom: 0; }
.progress-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.progress-meta span:first-child { font-weight: 600; }
.progress-meta span:last-child { color: var(--subtle); }
.progress-track { height: 6px; background: #eff0f4; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--brand); }
.project-mini { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 11px; padding: 12px 2px; border-bottom: 1px solid #f0f1f4; }
.project-mini:last-child { border-bottom: 0; }
.project-color { width: 9px; height: 32px; border-radius: 5px; }
.project-mini strong { display: block; font-size: 13px; margin-bottom: 3px; }
.project-mini small { color: var(--subtle); }
.project-mini .mini-count { font-size: 12px; color: var(--muted); }

.toolbar { background: #fff; border: 1px solid var(--line); border-radius: 10px 10px 0 0; min-height: 57px; padding: 10px 13px; display: flex; align-items: center; gap: 9px; }
.toolbar .select, .toolbar .input { width: auto; min-width: 140px; height: 34px; font-size: 12px; }
.toolbar .input { flex: 1; max-width: 280px; }
.toolbar-count { margin-left: auto; color: var(--subtle); font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: #fff; }
.issue-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.issue-table th { height: 40px; padding: 0 13px; background: #f9f9fb; color: var(--subtle); font-size: 11px; font-weight: 650; text-align: left; border-bottom: 1px solid var(--line); }
.issue-table td { height: 57px; padding: 0 13px; border-bottom: 1px solid #f0f1f3; font-size: 12px; color: #4a5364; }
.issue-table tr:last-child td { border-bottom: 0; }
.issue-table tbody tr { cursor: pointer; transition: background .12s; }
.issue-table tbody tr:hover { background: #fafaff; }
.issue-key { color: var(--brand); font-weight: 700; }
.issue-title { color: var(--ink); font-weight: 600; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person { display: inline-flex; align-items: center; gap: 7px; }
.person .avatar { width: 25px; height: 25px; font-size: 10px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 5px; font-size: 11px; font-weight: 620; white-space: nowrap; }
.badge.status-open { background: #f0f1f4; color: #596174; }
.badge.status-todo { background: var(--blue-soft); color: var(--blue); }
.badge.status-in_progress { background: var(--orange-soft); color: var(--orange); }
.badge.status-verify { background: #f1efff; color: #6654c5; }
.badge.status-closed { background: var(--green-soft); color: var(--green); }
.badge.status-invalid { background: var(--red-soft); color: var(--red); }
.priority { display: inline-flex; align-items: center; gap: 6px; }
.priority::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--priority-color, #8b95a7); }
.priority-p0 { --priority-color: #d0383e; color: #a82b31; }
.priority-p1 { --priority-color: #dd7d1c; }
.priority-p2 { --priority-color: #3975d5; }
.priority-p3 { --priority-color: #8b95a7; }

.board-tip {
  min-height: 40px; padding: 10px 14px; display: flex; align-items: center; gap: 8px;
  color: var(--muted); background: #fafaff; border: 1px solid var(--line); border-top: 0; font-size: 11px;
}
.board-tip span { color: var(--brand); font-size: 15px; }
.board-scroll { overflow-x: auto; padding: 14px 0 8px; }
.issue-board { min-width: 1500px; display: grid; grid-template-columns: repeat(6, minmax(232px, 1fr)); gap: 12px; align-items: start; }
.board-column {
  --column-color: #8b95a7; min-height: 520px; padding: 10px; background: #eef0f4;
  border: 1px solid transparent; border-radius: 11px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.board-column.status-column-todo { --column-color: var(--blue); }
.board-column.status-column-in_progress { --column-color: var(--orange); }
.board-column.status-column-verify { --column-color: #6654c5; }
.board-column.status-column-closed { --column-color: var(--green); }
.board-column.status-column-invalid { --column-color: var(--red); }
.board-column.drag-over { background: #e8e8ff; border-color: #a7a7ef; box-shadow: inset 0 0 0 1px rgba(91,91,214,.12); }
.board-column-head { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 4px 8px; color: #4e5768; font-size: 12px; }
.board-column-head strong { color: var(--ink); }
.board-column-head > span:last-child { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.72); font-size: 10px; }
.board-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--column-color); }
.board-card-list { display: grid; gap: 9px; }
.board-card {
  padding: 12px; background: #fff; border: 1px solid #dfe2e9; border-radius: 9px; box-shadow: 0 1px 2px rgba(30,36,56,.04);
  cursor: grab; transition: border-color .15s, box-shadow .15s, transform .15s, opacity .15s;
}
.board-card:hover { border-color: #c2c4ea; box-shadow: 0 5px 16px rgba(44,49,76,.08); transform: translateY(-1px); }
.board-card:active { cursor: grabbing; }
.board-card.dragging { opacity: .35; transform: rotate(1deg) scale(.98); }
.board-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-card-top .priority { font-size: 10px; }
.board-card h3 { margin: 10px 0 13px; color: var(--ink); font-size: 12px; line-height: 1.55; font-weight: 650; }
.board-project { display: flex; align-items: center; gap: 6px; color: var(--subtle); font-size: 10px; }
.board-project .project-color { width: 5px; height: 15px; }
.board-card footer { margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f1f4; display: flex; align-items: center; justify-content: space-between; color: var(--subtle); font-size: 10px; }
.board-card footer .person { font-size: 10px; }
.board-card footer .person .avatar { width: 22px; height: 22px; font-size: 9px; }
.board-empty { height: 84px; border: 1px dashed #d7dae2; border-radius: 8px; display: grid; place-items: center; color: #9ca3b1; font-size: 11px; }

.workflow-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.workflow-path { min-height: 48px; margin: 14px 0; padding: 9px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.workflow-path span { padding: 7px 10px; border-radius: 6px; color: #4d5668; background: #f4f5f8; font-size: 11px; }
.workflow-path b { color: var(--brand); font-weight: 500; }
.workflow-table-wrap { border-top: 1px solid var(--line); border-radius: 10px; }
.workflow-table { min-width: 1080px; }
.workflow-category { display: inline-flex; min-height: 24px; padding: 0 8px; align-items: center; border-radius: 5px; color: #5c6373; background: #f1f2f5; font-size: 10px; }
.workflow-status-pending { color: var(--blue); background: var(--blue-soft); }
.workflow-status-approved { color: var(--orange); background: var(--orange-soft); }
.workflow-status-rejected { color: var(--red); background: var(--red-soft); }
.workflow-status-completed { color: var(--green); background: var(--green-soft); }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.workflow-actions .button { height: 29px; padding: 0 9px; font-size: 10px; }
.workflow-form-note { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; background: #fafafd; font-size: 10px; }
.workflow-form-note span { width: 20px; height: 20px; margin-right: 5px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); font-size: 9px; }
.workflow-form-note b { margin: 0 8px; color: var(--brand); font-weight: 500; }
.workflow-detail-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.workflow-detail-grid > div { min-height: 66px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fafafd; }
.workflow-detail-grid > div > span:first-child { display: block; margin-bottom: 7px; color: var(--subtle); font-size: 9px; }
.workflow-detail-grid strong { font-size: 11px; }
.workflow-description, .workflow-records { margin-top: 20px; }
.workflow-description h3, .workflow-records h3 { margin: 0 0 10px; color: #4b5364; font-size: 12px; }
.workflow-description p { margin: 0; padding: 12px; color: var(--muted); background: #fafafd; border-radius: 8px; font-size: 11px; line-height: 1.75; }
.workflow-detail-admin { display: flex; justify-content: flex-end; margin: 12px 0; }
.workflow-record { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f1f4; }
.workflow-record:last-child { border-bottom: 0; }
.workflow-record strong { display: block; color: #4e5768; font-size: 11px; }
.workflow-record time { display: block; margin-top: 4px; color: var(--subtle); font-size: 9px; }

.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-symbol { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 15px; background: #f0f0ff; color: var(--brand); font-size: 22px; }
.empty-state h3 { color: var(--ink); margin: 0 0 8px; font-size: 15px; }
.empty-state p { margin: 0 0 18px; font-size: 12px; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(240px,1fr)); gap: 15px; }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 18px; min-height: 180px; display: flex; flex-direction: column; }
.project-card-head { display: flex; align-items: center; gap: 10px; }
.project-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; border-radius: 9px; font-weight: 700; }
.project-card h3 { margin: 0; font-size: 14px; }
.project-card code { color: var(--subtle); font-size: 10px; }
.project-card > p { color: var(--muted); line-height: 1.6; font-size: 12px; min-height: 39px; }
.project-card-meta { display: flex; align-items: center; margin-top: auto; padding-top: 14px; border-top: 1px solid #f0f1f4; color: var(--subtle); font-size: 11px; }
.project-card-meta strong { color: var(--ink); font-size: 18px; margin-right: 5px; }
.webhook-state { margin-left: auto; color: var(--green); }
.webhook-state.off { color: var(--subtle); }

.project-guide-hero {
  display: grid; grid-template-columns: minmax(280px, .8fr) minmax(520px, 1.2fr); align-items: center; gap: 34px;
  padding: 27px; margin-bottom: 18px; border-radius: 13px; color: #fff;
  background: linear-gradient(135deg, #292b4b, #464780); box-shadow: 0 10px 28px rgba(35, 38, 71, .12);
}
.guide-kicker { color: #bfc0ff; font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.project-guide-hero h2 { margin: 9px 0; font-size: 22px; letter-spacing: -.02em; }
.project-guide-hero p { margin: 0; max-width: 580px; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.75; }
.workflow-map { display: flex; align-items: center; justify-content: center; gap: 8px; }
.workflow-map span { padding: 11px 13px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: rgba(255,255,255,.08); font-size: 11px; white-space: nowrap; }
.workflow-map b { color: #aeb0f2; font-weight: 500; }
.guide-toc {
  position: sticky; top: 77px; z-index: 12; margin: 0 0 14px; padding: 8px; display: flex; gap: 5px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.94); box-shadow: 0 5px 18px rgba(34,39,63,.05); backdrop-filter: blur(10px);
}
.guide-toc a { flex: 0 0 auto; padding: 7px 9px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 10px; }
.guide-toc a:hover { color: var(--brand); background: var(--brand-soft); }
.guide-section { margin-top: 18px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.guide-section[id], .project-guide-hero[id] { scroll-margin-top: 130px; }
.guide-section-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 17px; }
.guide-section-head > div { display: flex; align-items: center; gap: 9px; }
.guide-section-head > div > span { min-width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-weight: 750; }
.guide-section-head h2 { margin: 0; font-size: 15px; }
.guide-section-head > p { margin: 3px 0 0 auto; color: var(--subtle); font-size: 11px; }
.capability-grid, .page-module-grid, .security-grid, .operations-grid { display: grid; grid-template-columns: repeat(3, minmax(190px,1fr)); gap: 10px; }
.capability-grid article, .page-module-grid article, .security-grid article, .operations-grid article {
  min-height: 105px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fafafd;
}
.capability-grid strong, .page-module-grid strong, .security-grid strong, .operations-grid strong { color: var(--ink); font-size: 12px; }
.capability-grid p, .page-module-grid p, .security-grid p, .operations-grid p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.scope-note { margin-top: 10px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 12px; border-radius: 8px; color: #6f551d; background: #fff8e9; border: 1px solid #f0dfb9; font-size: 10px; line-height: 1.65; }
.scope-note strong { flex: 0 0 auto; color: #925f0b; }
.usage-step-list { display: grid; grid-template-columns: repeat(3, minmax(200px,1fr)); gap: 10px; }
.usage-step-list article { padding: 14px; display: flex; gap: 11px; border: 1px solid var(--line); border-radius: 9px; }
.usage-step-list article > span { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); font-size: 10px; font-weight: 700; }
.usage-step-list h3 { margin: 2px 0 6px; font-size: 12px; }
.usage-step-list p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.workflow-rule-table { margin-top: 18px; }
.workflow-rule-table > h3, .subsection-title { margin: 0 0 10px; color: #434c5e; font-size: 12px; }
.subsection-title { margin-top: 20px; }
.architecture-flow { display: grid; grid-template-columns: minmax(130px,1fr) auto minmax(130px,1fr) auto minmax(130px,1fr) auto minmax(130px,1fr); align-items: center; gap: 10px; }
.architecture-flow > b { color: #a4a9b6; text-align: center; font-weight: 500; }
.architecture-node { min-height: 82px; padding: 15px; display: grid; align-content: center; gap: 7px; border: 1px solid #e2e4eb; border-radius: 9px; background: #fafafd; }
.architecture-node strong { color: var(--ink); font-size: 12px; }
.architecture-node span { color: var(--subtle); font-size: 10px; line-height: 1.5; }
.request-flow { margin-top: 13px; display: grid; grid-template-columns: repeat(5, minmax(140px,1fr)); gap: 8px; }
.request-flow > div { padding: 11px; display: flex; gap: 8px; border-radius: 8px; background: #f5f6f9; }
.request-flow span { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 5px; color: var(--brand); background: #fff; font-size: 9px; font-weight: 700; }
.request-flow p { margin: 1px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.build-step-grid { display: grid; grid-template-columns: repeat(3, minmax(180px,1fr)); gap: 10px; }
.build-step { min-height: 146px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; }
.build-step > span { color: var(--brand); font-size: 10px; font-weight: 750; }
.build-step h3 { margin: 11px 0 7px; font-size: 13px; }
.build-step p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.file-map { display: grid; grid-template-columns: repeat(2, minmax(240px,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.file-map > div { min-height: 48px; padding: 0 13px; display: flex; align-items: center; gap: 14px; background: #fafafd; }
.file-map code { min-width: 125px; color: var(--brand); font-size: 10px; font-weight: 650; }
.file-map span { color: var(--muted); font-size: 11px; }
.guide-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
.guide-table { width: 100%; min-width: 720px; border-collapse: collapse; background: #fff; }
.guide-table th { padding: 10px 12px; color: var(--subtle); background: #f8f8fa; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; font-weight: 700; }
.guide-table td { padding: 11px 12px; border-bottom: 1px solid #f0f1f4; color: #566071; font-size: 10px; line-height: 1.55; vertical-align: top; }
.guide-table tr:last-child td { border-bottom: 0; }
.guide-table code { color: var(--brand); font-size: 9px; }
.relation-line { min-height: 48px; margin-top: 10px; padding: 8px 13px; display: flex; align-items: center; gap: 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fafafd; white-space: nowrap; }
.relation-line span { padding: 6px 8px; border-radius: 6px; color: #50586b; background: #fff; border: 1px solid var(--line); font-size: 9px; }
.relation-line b { color: var(--brand); font-size: 9px; }
.method { display: inline-flex; min-width: 40px; height: 21px; align-items: center; justify-content: center; border-radius: 5px; font-size: 8px; font-weight: 750; }
.method-get { color: #176a51; background: #e9f7f1; }
.method-post { color: #315eb0; background: #edf4ff; }
.method-patch { color: #9a5b13; background: #fff4e8; }
.guide-detail-text { margin: 13px 0 0; padding: 12px 14px; border-left: 3px solid #b9b9ef; color: var(--muted); background: #fafafd; font-size: 10px; line-height: 1.75; }
.guide-detail-text code { color: var(--brand); }
.code-sample-grid { display: grid; grid-template-columns: repeat(3, minmax(220px,1fr)); gap: 10px; }
.code-sample { min-width: 0; overflow: hidden; border: 1px solid #30334c; border-radius: 9px; background: #202235; }
.code-sample header { height: 37px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid rgba(255,255,255,.08); }
.code-sample header span { color: #c3c4ff; font-size: 10px; font-weight: 700; }
.code-sample header code { margin-left: auto; color: #777d91; font-size: 9px; }
.code-sample pre { min-height: 145px; margin: 0; padding: 13px; overflow: auto; color: #d8d9e5; font-size: 10px; line-height: 1.7; tab-size: 2; }
.deploy-note { min-height: 47px; margin-top: 10px; padding: 9px 13px; display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fafafd; }
.deploy-note strong { font-size: 11px; }
.deploy-note code { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.run-grid { display: grid; grid-template-columns: repeat(2, minmax(280px,1fr)); gap: 10px; }
.run-card { min-width: 0; overflow: hidden; border-radius: 9px; background: #202235; }
.run-card header { height: 42px; padding: 0 13px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.run-card header strong { color: #fff; font-size: 11px; }
.run-card header span { margin-left: auto; color: #81869a; font-size: 9px; }
.run-card pre { min-height: 145px; margin: 0; padding: 14px; overflow: auto; color: #d8d9e5; font-size: 10px; line-height: 1.7; }
.server-path-list { display: grid; grid-template-columns: repeat(2, minmax(260px,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.server-path-list > div { min-height: 47px; padding: 8px 12px; display: flex; align-items: center; gap: 12px; background: #fafafd; }
.server-path-list code { min-width: 205px; color: var(--brand); font-size: 9px; }
.server-path-list span { color: var(--muted); font-size: 10px; }
.project-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 15px; }
.project-guide-card { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.project-guide-card header { display: flex; align-items: center; gap: 10px; }
.project-guide-card h3 { margin: 0 0 3px; font-size: 14px; }
.project-guide-card code { color: var(--subtle); font-size: 10px; }
.project-guide-card > p { min-height: 39px; margin: 14px 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.project-guide-card dl { display: flex; gap: 24px; padding: 12px 0; margin: 0; border-top: 1px solid #f0f1f4; }
.project-guide-card dl div { display: flex; align-items: baseline; gap: 7px; }
.project-guide-card dt { color: var(--subtle); font-size: 10px; }
.project-guide-card dd { margin: 0; color: var(--ink); font-size: 16px; font-weight: 700; }
.guide-issue {
  width: 100%; min-height: 46px; margin-top: 2px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fafafd; color: #4e5768; text-align: left; font-size: 11px;
}
.guide-issue:hover { border-color: #c7c8ed; background: #f8f8ff; }
.guide-issue > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-empty { min-height: 46px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--subtle); font-size: 11px; }

.profile-panel { width: min(760px, 100%); overflow: hidden; }
.profile-summary { padding: 20px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.profile-summary .avatar { width: 42px; height: 42px; font-size: 15px; }
.profile-summary strong { display: block; margin-bottom: 4px; font-size: 14px; }
.profile-summary span { color: var(--subtle); font-size: 11px; }
.profile-form { padding: 22px; }
.profile-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.readonly-notice { margin: 20px; padding: 16px; display: flex; gap: 12px; color: #4e5768; background: #fafaff; border: 1px solid #e2e2fb; border-radius: 9px; }
.readonly-notice > span { color: var(--brand); }
.readonly-notice strong { color: var(--ink); font-size: 13px; }
.readonly-notice p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.settings-grid { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 18px; }
.settings-menu { align-self: start; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px; }
.settings-menu button { width: 100%; height: 38px; border: 0; background: transparent; border-radius: 7px; text-align: left; padding: 0 11px; color: var(--muted); font-size: 12px; }
.settings-menu button.active { color: var(--brand); background: var(--brand-soft); font-weight: 650; }
.member-list { padding: 0; }
.member-row { display: grid; grid-template-columns: minmax(180px,1fr) minmax(140px,.6fr) 120px 100px; gap: 15px; align-items: center; padding: 13px 17px; border-bottom: 1px solid #f0f1f4; font-size: 12px; }
.member-row:last-child { border-bottom: 0; }
.member-main { display: flex; align-items: center; gap: 10px; }
.member-main strong { display: block; color: var(--ink); margin-bottom: 2px; }
.member-main small, .member-muted { color: var(--subtle); }
.role-chip { justify-self: start; background: #f1f2f5; color: #596174; border-radius: 5px; padding: 5px 8px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(23,27,42,.42); display: grid; place-items: center; padding: 20px; animation: fadeIn .14s ease-out; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 13px; background: #fff; box-shadow: var(--shadow); animation: riseIn .18s ease-out; }
.modal.wide { width: min(760px, 100%); }
.modal-head { min-height: 62px; padding: 0 21px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 16px; margin: 0; }
.modal-head p { margin: 4px 0 0; color: var(--subtle); font-size: 11px; }
.close-button { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 20px; }
.close-button:hover { background: #f1f2f5; }
.modal-body { padding: 20px 21px 5px; }
.form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-row.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.modal-foot { min-height: 64px; padding: 12px 21px; display: flex; justify-content: flex-end; align-items: center; gap: 9px; border-top: 1px solid var(--line); }
.file-drop { border: 1px dashed var(--line-strong); border-radius: 9px; padding: 15px; background: #fafafd; color: var(--muted); font-size: 12px; }
.file-drop input { width: 100%; margin-top: 8px; }
.help { color: var(--subtle); font-size: 11px; line-height: 1.5; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(23,27,42,.3); animation: fadeIn .14s ease-out; }
.drawer { width: min(820px, calc(100vw - 40px)); height: 100vh; margin-left: auto; background: #fff; box-shadow: -12px 0 40px rgba(31,37,59,.14); overflow: auto; animation: slideIn .2s ease-out; }
.drawer-head { height: 67px; padding: 0 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 2; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.drawer-head .issue-key { font-size: 13px; }
.drawer-head .close-button { margin-left: auto; }
.drawer-body { padding: 24px; }
.issue-detail-title { font-size: 22px; line-height: 1.35; letter-spacing: -.02em; margin: 0 0 18px; }
.issue-layout { display: grid; grid-template-columns: minmax(0,1.5fr) 260px; gap: 28px; }
.detail-section { margin-bottom: 27px; }
.detail-section h3 { font-size: 12px; margin: 0 0 11px; color: #4b5364; }
.description-box { min-height: 92px; white-space: pre-wrap; line-height: 1.75; color: #4e5768; font-size: 13px; border: 1px solid transparent; border-radius: 8px; padding: 10px; margin-left: -10px; }
.description-box:hover { background: #fafafd; border-color: var(--line); }
.description-box.readonly:hover { background: transparent; border-color: transparent; }
.attachment-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.attachment { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.attachment:hover { border-color: #c7c8ed; background: #fafaff; }
.attachment-icon { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.attachment span { overflow: hidden; }
.attachment strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment small { color: var(--subtle); font-size: 10px; }
.image-preview { grid-column: span 2; display: block; padding: 0; overflow: hidden; }
.image-preview img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.detail-side { border-left: 1px solid var(--line); padding-left: 20px; }
.property { margin-bottom: 16px; }
.property label { display: block; color: var(--subtle); font-size: 10px; margin-bottom: 6px; }
.property .select { height: 34px; font-size: 12px; }
.property-value { min-height: 30px; display: flex; align-items: center; font-size: 12px; }
.workflow { display: flex; flex-wrap: wrap; gap: 7px; }
.workflow .button { height: 31px; font-size: 11px; }
.activity-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 15px; }
.activity-tabs button { border: 0; background: transparent; padding: 9px 3px; margin-right: 20px; color: var(--subtle); font-size: 12px; border-bottom: 2px solid transparent; }
.activity-tabs button.active { color: var(--brand); border-color: var(--brand); font-weight: 650; }
.timeline-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; position: relative; padding-bottom: 16px; }
.timeline-item::before { content: ""; position: absolute; width: 1px; background: var(--line); left: 13px; top: 27px; bottom: 0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: #f0f1f4; color: var(--muted); font-size: 10px; }
.timeline-content { font-size: 12px; color: #515a6a; line-height: 1.5; padding-top: 3px; }
.timeline-content strong { color: var(--ink); }
.timeline-content time { display: block; color: var(--subtle); font-size: 10px; margin-top: 3px; }
.comment { display: flex; gap: 10px; margin-bottom: 15px; }
.comment-body { flex: 1; background: #f8f8fa; border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.comment-meta { display: flex; justify-content: space-between; color: var(--subtle); font-size: 10px; margin-bottom: 4px; }
.comment-meta strong { color: var(--ink); }
.comment-box { display: flex; gap: 8px; margin-top: 15px; }
.comment-box .input { flex: 1; }

#toast-stack { position: fixed; right: 20px; top: 82px; z-index: 300; display: grid; gap: 9px; }
.toast { width: min(360px, calc(100vw - 40px)); background: #202235; color: #fff; padding: 12px 14px; border-radius: 9px; box-shadow: var(--shadow); font-size: 12px; animation: slideIn .18s ease-out; }
.toast.error { background: #9f2f35; }
.toast.success { background: #146b50; }
.loading-line { height: 2px; position: fixed; z-index: 400; top: 0; left: 0; right: 0; overflow: hidden; }
.loading-line::after { content: ""; display: block; height: 100%; width: 28%; background: var(--brand); animation: loading 1s infinite ease-in-out; }
.hidden { display: none !important; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(460%); } }

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, minmax(240px,1fr)); }
  .project-guide-hero { grid-template-columns: 1fr; }
  .workflow-map { justify-content: flex-start; }
  .architecture-flow { grid-template-columns: repeat(4, minmax(145px,1fr)); overflow-x: auto; }
  .architecture-flow > b { display: none; }
  .capability-grid, .page-module-grid, .security-grid, .operations-grid, .usage-step-list { grid-template-columns: repeat(2, minmax(220px,1fr)); }
  .request-flow { grid-template-columns: repeat(5, 180px); overflow-x: auto; }
  .build-step-grid, .code-sample-grid { grid-template-columns: repeat(2, minmax(220px,1fr)); }
}

@media (max-width: 780px) {
  .login-page { grid-template-columns: 1fr; }
  .login-panel { padding: 25px; }
  .login-visual { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; width: 224px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 0 15px; }
  .search-box { display: none; }
  .content { padding: 18px 14px; }
  .page-head { align-items: center; }
  .page-head p { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .project-guide-grid { grid-template-columns: 1fr; }
  .workflow-map { overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }
  .guide-toc { top: 72px; }
  .guide-section { padding: 16px; }
  .guide-section-head { display: block; }
  .guide-section-head > p { margin-top: 8px; line-height: 1.5; }
  .architecture-flow { grid-template-columns: repeat(4, 165px); }
  .capability-grid, .page-module-grid, .security-grid, .operations-grid, .usage-step-list,
  .build-step-grid, .code-sample-grid, .file-map, .run-grid, .server-path-list { grid-template-columns: 1fr; }
  .server-path-list code { min-width: 155px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-menu { display: flex; }
  .member-row { grid-template-columns: 1fr 100px; }
  .member-row > :nth-child(2), .member-row > :nth-child(4) { display: none; }
  .issue-layout { grid-template-columns: 1fr; }
  .workflow-detail-grid { grid-template-columns: repeat(2,1fr); }
  .detail-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .drawer { width: 100vw; }
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 103px; padding: 14px; }
  .stat-value { font-size: 25px; margin-top: 13px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .select { flex: 1; min-width: 110px; }
  .toolbar .input { max-width: none; width: 100%; flex-basis: 100%; }
  .toolbar-count { display: none; }
  .issue-board { min-width: 1320px; grid-template-columns: repeat(6, 208px); }
  .board-column { min-height: 430px; }
  .workflow-path { overflow-x: auto; }
  .workflow-path span { flex: 0 0 auto; }
  .workflow-detail-grid { grid-template-columns: 1fr; }
  .form-row, .form-row.three { grid-template-columns: 1fr; gap: 0; }
  .modal-backdrop { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; border-radius: 15px 15px 0 0; }
  .attachment-grid { grid-template-columns: 1fr; }
  .image-preview { grid-column: span 1; }
}

/* HIG-inspired desktop product refresh */
:root {
  color-scheme: light;
  --text-primary: #1d1d1f;
  --text-secondary: #515154;
  --text-tertiary: #626267;
  --bg-canvas: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --fill-subtle: #f0f0f3;
  --fill-hover: #e9e9ed;
  --separator: #dedee3;
  --separator-strong: #b8b8bf;
  --focus-ring: #0068d4;
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --subtle: var(--text-tertiary);
  --line: var(--separator);
  --line-strong: var(--separator-strong);
  --surface: var(--bg-surface);
  --canvas: var(--bg-canvas);
  --brand: #0068d4;
  --brand-dark: #0057b7;
  --brand-soft: #eaf3ff;
  --blue: #0068d4;
  --blue-soft: #eaf3ff;
  --green: #0b6b4f;
  --green-soft: #e9f7f1;
  --orange: #934a00;
  --orange-soft: #fff3e5;
  --red: #b4232a;
  --red-soft: #fff0f0;
  --shadow: 0 24px 70px rgba(28, 28, 30, .18);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Segoe UI", sans-serif;
}

body { color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { letter-spacing: normal; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.sr-only {
  width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
.skip-link {
  position: fixed; z-index: 500; top: 10px; left: 12px; padding: 10px 14px; border-radius: 10px;
  color: #fff; background: var(--brand); text-decoration: none; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
[aria-invalid="true"] { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(180, 35, 42, .14) !important; }

.boot-mark, .brand-mark {
  background: linear-gradient(145deg, #0a84ff, #0068d4);
  box-shadow: 0 6px 16px rgba(0, 104, 212, .2);
}

.login-page { grid-template-columns: minmax(430px, .92fr) minmax(540px, 1.08fr); }
.login-panel { padding: 40px 8vw; }
.login-brand { font-size: 15px; font-weight: 650; }
.login-card { width: min(430px, 100%); }
.login-eyebrow {
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
}
.login-card h1 { margin-bottom: 12px; font-size: 38px; font-weight: 720; letter-spacing: -.035em; }
.login-card > p { margin-bottom: 36px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.demo-credential { gap: 12px; margin: -12px 0 25px; }
.demo-credential div { padding: 14px 16px; border-radius: 12px; background: #f7f7f8; }
.demo-credential span { margin-bottom: 6px; font-size: 11px; }
.demo-credential strong { font-size: 16px; }
.password-input { position: relative; }
.password-input .input { padding-right: 64px; }
.password-input button {
  position: absolute; right: 6px; top: 6px; height: 32px; padding: 0 9px; border: 0; border-radius: 8px;
  color: var(--brand); background: transparent; font-size: 12px; font-weight: 600;
}
.password-input button:hover { background: var(--brand-soft); }
.login-button { height: 44px; }
.login-tip { font-size: 12px; line-height: 1.55; }
.login-visual {
  margin: 14px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 17%, rgba(255, 255, 255, .16), transparent 28%),
    linear-gradient(145deg, #10335e, #0068d4 72%, #0a84ff);
}
.login-visual::before, .login-visual::after { border-color: rgba(255, 255, 255, .15); }
.visual-kicker { color: rgba(255, 255, 255, .72); font-size: 13px; letter-spacing: .06em; }
.visual-content h2 { max-width: 9em; margin: 20px 0; font-size: clamp(38px, 4vw, 60px); font-weight: 720; }
.visual-content > p { max-width: 480px; color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.75; }

/* Focused sign-in experience */
.login-page {
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr);
  background: var(--canvas);
}
.login-panel {
  min-height: 100dvh;
  width: 100%;
  padding: clamp(30px, 5vw, 72px);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 9%, rgba(0, 104, 212, .08), transparent 35%),
    var(--canvas);
}
.login-shell { width: min(440px, 100%); }
.login-brand {
  margin-bottom: 24px;
  gap: 12px;
  color: var(--ink);
}
.login-brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.login-brand-copy { display: grid; gap: 2px; }
.login-brand-copy strong { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.login-brand-copy small { color: var(--subtle); font-size: 11px; font-weight: 500; }
.login-card {
  width: 100%;
  margin: 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 20px 55px rgba(28, 28, 30, .1);
}
.login-heading { margin-bottom: 24px; }
.login-environment {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 650;
}
.login-environment > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}
.login-card .login-heading h1 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 720;
  letter-spacing: -.035em;
}
.login-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.demo-credential {
  display: block;
  margin: 0 0 23px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--fill-subtle);
}
.demo-credential div { padding: 0; border: 0; border-radius: 0; background: transparent; }
.demo-credential-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.demo-credential-head strong { color: var(--ink); font-size: 12px; font-weight: 650; }
.demo-credential-head > span {
  display: inline-flex;
  margin: 0;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 650;
}
.demo-credential-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.demo-credential-values > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.demo-credential-values small { color: var(--subtle); font-size: 10px; }
.demo-credential-values strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  letter-spacing: .02em;
}
.login-fields { margin-top: 2px; }
.login-card .login-field { gap: 8px; margin-bottom: 15px; }
.login-card .login-field label { color: var(--text-primary); font-size: 12px; font-weight: 620; }
.login-input-wrap { position: relative; }
.login-input-wrap .input {
  height: 48px;
  padding-right: 14px;
  padding-left: 43px;
  border-radius: 12px;
  font-size: 14px;
}
.login-field-icon {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--subtle);
  transform: translateY(-50%);
  pointer-events: none;
}
.login-field-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.login-card .password-input .input { padding-right: 68px; padding-left: 43px; }
.login-card .password-input button {
  right: 6px;
  top: 5px;
  min-width: 50px;
  height: 38px;
  border-radius: 9px;
}
.login-card > .login-error {
  margin: -1px 0 14px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--red) 28%, transparent);
  border-radius: 10px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 12px;
  line-height: 1.5;
}
.login-card > .login-button {
  width: 100%;
  height: 48px;
  margin-top: 3px;
  padding: 0 17px;
  justify-content: space-between;
  border-radius: 12px;
  font-size: 14px;
}
.login-button:disabled { cursor: wait; opacity: .72; }
.login-card > .login-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.55;
}
.login-tip > span { flex: 0 0 auto; color: var(--green); }
.login-footer { margin: 17px 0 0; color: var(--subtle); font-size: 10px; text-align: center; }
.login-visual {
  min-height: calc(100svh - 28px);
  margin: 14px;
  padding: clamp(48px, 7vw, 96px);
  isolation: isolate;
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 13%, rgba(64, 156, 255, .36), transparent 28%),
    linear-gradient(145deg, #0d315b, #005dbd 65%, #0a84ff);
}
.login-visual::before {
  width: 520px;
  height: 520px;
  right: -210px;
  top: -190px;
  border-color: rgba(255, 255, 255, .14);
}
.login-visual::after {
  width: 360px;
  height: 360px;
  left: -190px;
  bottom: -230px;
  border-color: rgba(255, 255, 255, .11);
}
.login-visual .visual-content { width: min(640px, 100%); }
.login-visual .visual-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
}
.visual-kicker > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #63d4ad;
  box-shadow: 0 0 0 4px rgba(99, 212, 173, .15);
}
.login-visual .visual-content h2 {
  max-width: 10em;
  margin: 20px 0 18px;
  font-size: clamp(40px, 4.2vw, 58px);
  line-height: 1.1;
}
.login-visual .visual-content > p {
  max-width: 520px;
  color: rgba(255, 255, 255, .76);
  font-size: 15px;
  line-height: 1.75;
}
.login-flow {
  max-width: 650px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 50px 0 0;
  padding: 0;
  list-style: none;
}
.login-flow li {
  min-width: 0;
  padding: 14px 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
}
.login-flow li > span { display: block; color: rgba(255, 255, 255, .5); font-size: 10px; }
.login-flow strong { display: block; margin-top: 12px; color: #fff; font-size: 14px; }
.login-flow small { display: block; margin-top: 4px; color: rgba(255, 255, 255, .62); font-size: 11px; }
.visual-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.visual-foot span {
  padding: 6px 9px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .76);
  background: rgba(0, 0, 0, .12);
  font-size: 10px;
}

@media (max-width: 980px) {
  .login-page { grid-template-columns: minmax(0, 1fr); }
  .login-visual { display: none; }
}

.input, .select, .textarea {
  border-color: var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.input, .select { height: 44px; padding: 0 13px; }
.textarea { min-height: 120px; padding: 12px 13px; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 104, 212, .14);
}
.field { gap: 9px; margin-bottom: 20px; }
.field label { color: #3a3a3c; font-size: 13px; font-weight: 600; }
.field-help { margin-top: -2px; color: var(--subtle); font-size: 12px; line-height: 1.5; }

.button {
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .1s ease, box-shadow .16s ease;
}
.button.primary { background: var(--brand); box-shadow: 0 1px 2px rgba(0, 56, 112, .18); }
.button.secondary { color: #3a3a3c; background: rgba(255, 255, 255, .92); border-color: var(--line-strong); }
.button.secondary:hover { background: #f2f2f4; }
.button.ghost { color: var(--muted); }
.button.ghost:hover { color: var(--ink); background: #eaeaee; }
.button.danger { color: #b4232a; background: #fff1f0; border-color: #ffd3d0; }
.button.danger:hover { color: #941b21; background: #ffe7e5; border-color: #ffc5c1; }

.app-shell { grid-template-columns: 236px minmax(0, 1fr); }
.sidebar {
  color: var(--ink);
  background: rgba(246, 246, 248, .94);
  border-right: 1px solid rgba(60, 60, 67, .12);
  backdrop-filter: saturate(180%) blur(22px);
}
.sidebar > nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sidebar-scrim { display: none; }
.sidebar-brand {
  height: 64px;
  padding: 0 18px;
  border-bottom-color: rgba(60, 60, 67, .1);
  font-size: 15px;
  font-weight: 650;
}
.sidebar-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
.nav-group { padding: 18px 10px 0; }
.nav-title {
  padding: 0 10px 8px;
  color: #626267;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}
.nav-item {
  height: 42px;
  margin-bottom: 3px;
  padding: 0 11px;
  gap: 10px;
  border-radius: 10px;
  color: #515154;
  font-size: 13px;
  transition: color .14s ease, background-color .14s ease;
}
.nav-item:hover { color: var(--ink); background: rgba(118, 118, 128, .09); }
.nav-item.active { color: #0057b7; background: #e3f0ff; font-weight: 600; }
.nav-symbol { color: #6e6e73; font-size: 15px; }
.nav-item.active .nav-symbol { color: var(--brand); }
.nav-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #6e6e73;
  background: rgba(118, 118, 128, .1);
  font-size: 11px;
}
.nav-item.active .nav-count { color: #0057b7; background: rgba(0, 104, 212, .1); }
.sidebar-footer { padding: 10px; border-top-color: rgba(60, 60, 67, .1); }
.sidebar-user { color: var(--ink); border-radius: 10px; }
.sidebar-user:hover { background: rgba(118, 118, 128, .09); }
.sidebar-user small { color: var(--subtle); font-size: 11px; }

.topbar {
  height: 64px;
  padding: 0 32px;
  border-bottom-color: rgba(60, 60, 67, .12);
  background: rgba(255, 255, 255, .84);
  backdrop-filter: saturate(180%) blur(22px);
}
.breadcrumb { color: var(--subtle); font-size: 13px; }
.search-box { width: 280px; height: 38px; }
.search-box input {
  padding: 0 38px 0 36px;
  border-color: rgba(60, 60, 67, .16);
  border-radius: 10px;
  background: rgba(118, 118, 128, .08);
  font-size: 13px;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  width: 28px; height: 28px; padding: 0; position: absolute; right: 5px; top: 5px; border: 0; border-radius: 50%;
  color: var(--muted); background: transparent; font-size: 17px; line-height: 1;
}
.search-clear:hover { color: var(--ink); background: var(--fill-hover); }
.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 104, 212, .12);
}
.search-symbol { top: 8px; color: #6e6e73; }
.content { max-width: 1440px; padding: 34px 36px 48px; }
.page-head { align-items: center; margin-bottom: 26px; }
.page-head h1 { margin-bottom: 7px; font-size: 28px; font-weight: 720; letter-spacing: -.03em; }
.page-head p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.stat-grid, .workflow-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}
.stat-card {
  min-height: 132px;
  padding: 22px;
  border: 0;
  border-radius: 0;
}
.stat-card::after, .stat-dot { display: none; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { margin: 17px 0 4px; font-size: 34px; font-weight: 700; }
.stat-note { color: var(--subtle); font-size: 12px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.7fr) minmax(280px, .72fr); gap: 20px; }
.panel { border-radius: 16px; }
.panel-head { min-height: 64px; padding: 0 20px; }
.panel-head h2 { font-size: 15px; font-weight: 650; }
.panel-head p { margin-top: 3px; font-size: 12px; }
.panel-body { padding: 20px; }
.progress-row { margin-bottom: 20px; }
.progress-meta { margin-bottom: 10px; font-size: 13px; }
.progress-track { height: 5px; background: #ededf0; }
.project-mini { padding: 13px 2px; }
.project-mini strong { font-size: 13px; }
.project-mini small, .project-mini .mini-count { font-size: 12px; }

.toolbar {
  min-height: 62px;
  padding: 11px 14px;
  border-radius: 14px 14px 0 0;
  gap: 10px;
}
.toolbar .select, .toolbar .input { min-width: 132px; height: 38px; font-size: 13px; }
.toolbar .input { max-width: 300px; }
.table-wrap { border-radius: 0 0 14px 14px; }
.issue-table { min-width: 840px; }
.dashboard-grid .issue-table { min-width: 620px; }
.issue-table th { height: 44px; padding: 0 14px; color: var(--subtle); font-size: 12px; }
.issue-table td { height: 64px; padding: 0 14px; color: #515154; font-size: 13px; }
.issue-table tbody tr { transition: background-color .12s ease; }
.issue-table tbody tr:hover { background: #f7faff; }
.table-primary-action {
  width: 100%; padding: 3px 0; border: 0; border-radius: 6px; color: inherit; background: transparent;
  text-align: start; cursor: pointer;
}
.table-primary-action .issue-key, .table-primary-action .issue-title { display: block; }
.table-primary-action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.issue-key { font-weight: 650; }
.issue-title { font-weight: 600; }
.badge { height: 26px; padding: 0 9px; border-radius: 999px; font-size: 11px; }

.board-tip { min-height: 44px; padding: 11px 14px; font-size: 12px; }
.board-scroll { padding-top: 16px; }
.board-column { border-radius: 14px; background: #ededf0; }
.board-column-head { height: 40px; font-size: 13px; }
.board-card { padding: 14px; border-radius: 12px; }
.board-card:focus-visible, .project-card[role="button"]:focus-visible, .table-wrap:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.board-card h3 { font-size: 13px; }
.board-project, .board-card footer, .board-card footer .person { font-size: 11px; }
.board-empty { color: #5f636b; }

.workflow-stat-grid { margin-bottom: 0; }
.workflow-path {
  min-height: 54px;
  margin: 16px 0;
  padding: 10px 15px;
  border-radius: 14px;
}
.workflow-path span { padding: 8px 11px; border-radius: 8px; font-size: 12px; }
.workflow-table-wrap { border-radius: 14px; }
.workflow-table { min-width: 900px; }
.workflow-category { min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 11px; }
.workflow-actions { gap: 6px; }
.workflow-actions .button { height: 32px; padding: 0 10px; font-size: 11px; }
.workflow-form-note { min-height: 50px; border-radius: 10px; font-size: 11px; }
.workflow-detail-grid { gap: 10px; }
.workflow-detail-grid > div { min-height: 76px; padding: 13px; border-radius: 10px; }
.workflow-detail-grid > div > span:first-child { margin-bottom: 8px; font-size: 11px; }
.workflow-detail-grid strong { font-size: 13px; }
.workflow-description h3, .workflow-records h3 { font-size: 13px; }
.workflow-description p { padding: 14px; border-radius: 10px; font-size: 13px; }
.workflow-record { padding: 12px 0; }
.workflow-record strong { font-size: 12px; }
.workflow-record time { margin-top: 5px; font-size: 11px; }
.workflow-return-warning {
  margin-bottom: 20px;
  padding: 15px 16px;
  border: 1px solid #ffd3d0;
  border-radius: 12px;
  color: #8f1f25;
  background: #fff5f4;
}
.workflow-return-warning strong { display: block; margin-bottom: 6px; font-size: 14px; }
.workflow-return-warning p { margin: 0; color: #7d3b3f; font-size: 13px; line-height: 1.6; }

.project-card, .project-guide-card, .guide-section { border-radius: 16px; }
.project-card { padding: 20px; }
.project-card h3, .project-guide-card h3 { font-size: 15px; }
.project-card code, .project-guide-card code { font-size: 11px; }
.project-card > p, .project-guide-card > p { font-size: 13px; }
.project-guide-hero {
  padding: 30px;
  border-radius: 18px;
  background: linear-gradient(135deg, #17385f, #0068d4);
}
.guide-kicker { color: rgba(255, 255, 255, .9); font-size: 11px; letter-spacing: .07em; }
.project-guide-hero h2 { margin: 10px 0; font-size: 25px; }
.project-guide-hero p { color: rgba(255, 255, 255, .88); font-size: 13px; }
.guide-toc { top: 75px; border-radius: 12px; }
.guide-toc a { padding: 8px 10px; border-radius: 8px; font-size: 11px; }
.guide-section { padding: 24px; }
.guide-section-head { margin-bottom: 20px; }
.guide-section-head > div > span { min-width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.guide-section-head h2 { font-size: 18px; }
.guide-section-head > p { font-size: 12px; }
.capability-grid article, .page-module-grid article, .security-grid article, .operations-grid article,
.usage-step-list article, .architecture-node, .build-step {
  border-radius: 12px;
  background: #fafafa;
}
.capability-grid strong, .page-module-grid strong, .security-grid strong, .operations-grid strong,
.architecture-node strong, .usage-step-list h3 { font-size: 13px; }
.capability-grid p, .page-module-grid p, .security-grid p, .operations-grid p,
.usage-step-list p, .architecture-node span, .request-flow p, .guide-detail-text { font-size: 11px; }
.guide-table th { font-size: 11px; }
.guide-table td { font-size: 12px; }
.guide-table code, .file-map code, .server-path-list code { font-size: 11px; }

.profile-panel, .settings-menu { border-radius: 14px; }
.profile-summary strong { font-size: 15px; }
.profile-summary span, .readonly-notice p { font-size: 12px; }
.member-row { min-height: 62px; font-size: 13px; }
.role-chip { border-radius: 999px; }

.modal-backdrop {
  padding: 24px;
  background: rgba(28, 28, 30, .38);
  backdrop-filter: blur(10px);
}
.modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 18px;
}
.modal.wide { width: min(780px, 100%); }
.modal-head { min-height: 72px; flex: 0 0 auto; padding: 0 24px; }
.modal-head h2 { font-size: 18px; }
.modal-head p { margin-top: 5px; font-size: 12px; }
.close-button { width: 34px; height: 34px; border-radius: 50%; background: #ededf0; font-size: 19px; }
.close-button:hover { background: #e2e2e7; }
.modal-body { flex: 1 1 auto; overflow: auto; padding: 24px 24px 6px; }
.modal-foot { min-height: 70px; flex: 0 0 auto; padding: 14px 24px; background: rgba(255, 255, 255, .94); }
.file-drop { padding: 17px; border-radius: 12px; background: #fafafa; }

.drawer-backdrop { background: rgba(28, 28, 30, .28); backdrop-filter: blur(5px); }
.drawer { width: min(760px, calc(100vw - 32px)); box-shadow: -18px 0 60px rgba(28, 28, 30, .14); }
.drawer-head { height: 70px; padding: 0 26px; }
.drawer-body { padding: 28px; }
.issue-detail-title { font-size: 24px; }
.description-box:is(button) { width: calc(100% + 10px); color: #4e5768; background: transparent; text-align: start; cursor: pointer; font: inherit; }
.detail-section h3 { font-size: 13px; }
.detail-side { padding-left: 24px; }
.property label { font-size: 11px; }
.property-value { font-size: 13px; }
.timeline-content, .comment-body { font-size: 13px; }
.timeline-content time, .comment-meta { font-size: 11px; }

.toast { padding: 13px 15px; border-radius: 12px; background: #2c2c2e; font-size: 13px; }

@supports not ((backdrop-filter: blur(1px))) {
  .sidebar { background: #f6f6f8; }
  .topbar, .drawer-head, .modal-foot { background: #fff; }
}

@media (max-width: 1080px) {
  .content { padding: 30px 28px 42px; }
  .stat-grid, .workflow-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .workflow-table { min-width: 880px; }
}

@media (max-width: 780px) {
  .login-page { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .login-panel, .login-card { width: 100%; min-width: 0; }
  .login-panel {
    min-height: 100dvh;
    display: block;
    padding: 20px 16px max(24px, env(safe-area-inset-bottom));
  }
  .login-shell { margin: 0 auto; }
  .login-brand { margin-bottom: 18px; }
  .login-card { padding: 26px 22px; border-radius: 18px; }
  .login-card .login-heading h1 { font-size: 29px; }
  .login-input-wrap .input { font-size: 16px; }
  .login-visual { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    width: min(288px, calc(100vw - 52px));
    height: 100dvh;
    box-shadow: 18px 0 48px rgba(28, 28, 30, .16);
    transition: transform .2s ease;
  }
  .sidebar-scrim {
    display: block; position: fixed; inset: 0; z-index: 50; border: 0; opacity: 0; pointer-events: none;
    background: rgba(28, 28, 30, .28); transition: opacity .2s ease;
  }
  body.sidebar-visible { overflow: hidden; }
  body.sidebar-visible .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .topbar { padding: 0 16px; gap: 10px; }
  .breadcrumb { display: none; }
  .topbar-actions { min-width: 0; flex: 1; margin-left: 0; }
  .search-box { display: block; width: auto; min-width: 0; flex: 1; }
  .content { padding: 24px 16px 38px; }
  .page-head { align-items: flex-start; flex-wrap: wrap; margin-bottom: 22px; }
  .page-head p { display: block; }
  .page-head h1 { font-size: 25px; }
  .toolbar { flex-wrap: wrap; border-radius: 14px; }
  .toolbar .input { max-width: none; flex: 1 1 100%; }
  .toolbar .select { flex: 1 1 130px; }
  .toolbar-count { width: 100%; margin: 0; }
  .board-scroll { overflow: visible; }
  .issue-board { min-width: 0; grid-template-columns: 1fr; }
  .board-column { min-height: auto; }
  .table-wrap[aria-label] { overflow: visible; border: 0; background: transparent; }
  .table-wrap[aria-label] .issue-table { min-width: 0; display: block; background: transparent; }
  .table-wrap[aria-label] .issue-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .table-wrap[aria-label] .issue-table tbody { display: grid; gap: 12px; }
  .table-wrap[aria-label] .issue-table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(118px, .72fr); gap: 7px 18px;
    padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  }
  .table-wrap[aria-label] .issue-table td { height: auto; padding: 2px 0; border: 0; }
  .table-wrap[aria-label] .issue-table td:first-child {
    grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  }
  .table-wrap[aria-label] .issue-table td::before {
    content: attr(data-label); display: block; margin-bottom: 4px; color: var(--subtle); font-size: 11px; font-weight: 600;
  }
  .table-wrap[aria-label] .issue-table td[data-label=""]::before { display: none; }
  .table-wrap[aria-label] .workflow-table td:last-child { grid-column: 1 / -1; padding-top: 9px; }
  .project-guide-hero { padding: 24px; }
  .guide-section { padding: 20px; }
  .modal-backdrop { padding: 16px; }
  .drawer { width: 100vw; }
}

@media (max-width: 520px) {
  .login-panel { padding-right: 14px; padding-left: 14px; }
  .login-card { padding: 24px 20px; }
  .login-heading { margin-bottom: 21px; }
  .demo-credential { padding: 13px 14px; }
  .stat-grid, .workflow-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .stat-card { min-height: 116px; padding: 17px; }
  .stat-value { margin-top: 14px; font-size: 29px; }
  .toolbar { border-radius: 14px; }
  .table-wrap { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; }
  .modal-backdrop { padding: 0; }
  .modal, .modal.wide {
    width: 100%;
    max-height: 92vh;
    border: 0;
    border-radius: 18px 18px 0 0;
  }
  .modal-head, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .modal-body { padding: 20px 18px 5px; }
  .workflow-detail-grid { grid-template-columns: 1fr; }
  .quick-create-label { display: none; }
  #quick-create { width: 42px; padding: 0; }
}

@media (pointer: coarse) {
  .button, .close-button, .nav-item, .settings-menu button, .activity-tabs button,
  .workflow-actions .button, .search-clear, .password-input button, .toolbar .input,
  .toolbar .select, .search-box input, .table-primary-action { min-width: 44px; min-height: 44px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --text-primary: #f5f5f7;
    --text-secondary: #d1d1d6;
    --text-tertiary: #aeaeb2;
    --bg-canvas: #1c1c1e;
    --bg-surface: #242426;
    --bg-elevated: #2c2c2e;
    --fill-subtle: #2c2c2e;
    --fill-hover: #3a3a3c;
    --separator: #3a3a3c;
    --separator-strong: #545458;
    --focus-ring: #409cff;
    --brand: #0a84ff;
    --brand-dark: #409cff;
    --brand-soft: #0b2d50;
    --blue: #409cff;
    --blue-soft: #0b2d50;
    --green: #63d4ad;
    --green-soft: #12382f;
    --orange: #ffb25a;
    --orange-soft: #432a0e;
    --red: #ff6961;
    --red-soft: #451f22;
    --shadow: 0 28px 80px rgba(0, 0, 0, .48);
  }
  body, .login-page, .login-panel { background: var(--canvas); }
  .demo-credential div, .profile-summary, .settings-menu, .project-card, .project-guide-card,
  .guide-section, .panel, .stat-card, .toolbar, .table-wrap, .workflow-path, .modal, .drawer {
    color: var(--ink);
    background: var(--surface);
  }
  .demo-credential { background: var(--fill-subtle); }
  .demo-credential div { border-color: transparent; background: transparent; }
  .field label { color: var(--text-primary); }
  .input, .select, .textarea {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--bg-elevated);
  }
  .input::placeholder, .textarea::placeholder, .search-box input::placeholder { color: var(--text-tertiary); }
  .button.primary { background: #0068d4; }
  .button.secondary { color: var(--ink); border-color: var(--line-strong); background: var(--bg-elevated); }
  .button.secondary:hover, .button.ghost:hover, .close-button:hover { background: var(--fill-hover); }
  .button.danger { color: #ff7b73; border-color: #6b3033; background: var(--red-soft); }
  .viewer-chip, .role-chip, .workflow-category { color: var(--muted); border-color: var(--line); background: var(--fill-subtle); }
  .sidebar {
    background: rgba(36, 36, 38, .92);
    border-right-color: var(--line);
  }
  .sidebar-brand, .sidebar-footer { border-color: var(--line); }
  .nav-title, .sidebar-user small { color: var(--subtle); }
  .nav-item { color: var(--muted); }
  .nav-item:hover, .sidebar-user:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
  .nav-item.active { color: #d9ecff; background: #0b3a67; }
  .nav-symbol, .nav-count { color: var(--subtle); }
  .nav-item.active .nav-symbol, .nav-item.active .nav-count { color: #79baff; }
  .topbar, .drawer-head {
    border-color: var(--line);
    background: rgba(28, 28, 30, .84);
  }
  .search-box input { color: var(--ink); border-color: var(--line); background: rgba(118, 118, 128, .2); }
  .search-clear { color: var(--subtle); }
  .stat-grid, .workflow-stat-grid { border-color: var(--line); background: var(--line); }
  .panel-head, .modal-head, .modal-foot, .profile-summary { border-color: var(--line); }
  .modal-foot { background: rgba(36, 36, 38, .95); }
  .progress-track { background: var(--fill-hover); }
  .project-mini, .issue-table td, .member-row, .workflow-record, .timeline-item::before,
  .board-card footer, .activity-tabs { border-color: var(--line); }
  .issue-table th, .guide-table th { color: var(--subtle); background: #202022; }
  .issue-table td, .guide-table td { color: var(--muted); }
  .issue-table tbody tr:hover { background: #17283a; }
  .table-primary-action { color: var(--ink); }
  .priority-p0 { color: #ff7b73; --priority-color: #ff6961; }
  .badge.status-open { color: #d1d1d6; background: #3a3a3c; }
  .badge.status-verify { color: #b8adff; background: #29234a; }
  .board-tip, .workflow-form-note, .workflow-detail-grid > div, .workflow-description p,
  .capability-grid article, .page-module-grid article, .security-grid article, .operations-grid article,
  .usage-step-list article, .architecture-node, .build-step, .file-drop, .readonly-notice,
  .description-box:hover, .comment-body {
    color: var(--muted);
    border-color: var(--line);
    background: var(--bg-elevated);
  }
  .description-box, .timeline-content { color: var(--muted); }
  .detail-section h3, .workflow-description h3, .workflow-records h3,
  .workflow-record strong { color: var(--ink); }
  .timeline-dot { color: var(--muted); background: var(--fill-hover); }
  .board-column { background: #242426; }
  .board-card { color: var(--ink); border-color: var(--line); background: var(--bg-elevated); }
  .board-card:hover { border-color: #5c83aa; box-shadow: 0 8px 24px rgba(0, 0, 0, .24); }
  .board-empty { color: var(--subtle); border-color: var(--line-strong); }
  .workflow-path span, .request-flow > div, .relation-line, .file-map > div,
  .server-path-list > div, .guide-issue { color: var(--muted); border-color: var(--line); background: var(--bg-elevated); }
  .workflow-return-warning { color: #ff928b; border-color: #6b3033; background: var(--red-soft); }
  .workflow-return-warning p { color: #ffc1bd; }
  .guide-toc { border-color: var(--line); background: rgba(36, 36, 38, .94); }
  .guide-table, .guide-table-wrap, .file-map, .server-path-list { border-color: var(--line); background: var(--line); }
  .guide-detail-text, .scope-note, .deploy-note { color: var(--muted); border-color: var(--line); background: var(--bg-elevated); }
  .scope-note strong { color: #ffb25a; }
  .settings-menu button { color: var(--muted); }
  .settings-menu button.active { color: #79baff; background: var(--brand-soft); }
  .modal { border-color: var(--line); }
  .close-button { color: var(--muted); background: var(--fill-subtle); }
  .attachment { border-color: var(--line); }
  .attachment:hover { border-color: #5c83aa; background: var(--brand-soft); }
  .description-box:is(button) { color: var(--muted); }
  .toast { color: #fff; background: #3a3a3c; }
  .toast.success { background: #135f48; }
  .toast.error { background: #8f262c; }
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar, .topbar, .drawer-head, .modal-foot { backdrop-filter: none; background: var(--surface); }
  .modal-backdrop, .drawer-backdrop { backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .loading-line::after { width: 100%; animation: none !important; }
}
