:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #1a2340;
  --muted: #7a839b;
  --line: #e8ebf2;
  --primary: #5d5fef;
  --primary-dark: #4749d8;
  --primary-soft: #eeefff;
  --green: #26b684;
  --green-soft: #e9f9f3;
  --orange: #f1a64e;
  --orange-soft: #fff6e9;
  --red: #e76d76;
  --red-soft: #fff0f2;
  --blue: #4c97ed;
  --blue-soft: #ecf5ff;
  --sidebar: #182139;
  --sidebar-soft: #232d48;
  --shadow: 0 9px 24px rgba(34, 45, 75, 0.055);
  --radius: 15px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 1180px;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.5 "Noto Sans SC", system-ui, -apple-system, sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.auth-hidden { display: none !important; }
.svg-defs { display: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.login-view { display: grid; min-height: 100vh; grid-template-columns: minmax(520px, 1.15fr) minmax(480px, .85fr); background: #fff; }
.login-story { position: relative; display: flex; overflow: hidden; flex-direction: column; padding: 32px 48px; color: #fff; background: #19233d; }
.login-story::before { position: absolute; top: -180px; right: -150px; width: 510px; height: 510px; border-radius: 50%; background: rgba(93,95,239,.26); content: ""; filter: blur(3px); }
.login-story::after { position: absolute; bottom: -210px; left: -180px; width: 450px; height: 450px; border-radius: 50%; background: rgba(76,151,237,.12); content: ""; }
.login-brand, .login-mobile-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font: 700 20px/1 "DM Sans", sans-serif; }
.login-brand small { margin-top: 5px; color: #9aa5c0; font-size: 10px; letter-spacing: 1px; }
.story-content { position: relative; z-index: 1; width: min(640px, 88%); margin: auto; padding-top: 27px; }
.story-kicker, .login-kicker { margin: 0; color: #9295ff; font: 700 11px "DM Sans"; letter-spacing: 2px; }
.story-content h1 { margin: 16px 0 13px; font-size: 39px; line-height: 1.3; letter-spacing: -1px; }
.story-content > p:not(.story-kicker) { margin: 0; color: #aeb8cf; font-size: 14px; line-height: 1.9; }
.story-preview { width: min(620px, 100%); height: 250px; margin-top: 43px; padding: 17px; border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: rgba(255,255,255,.075); box-shadow: 0 18px 35px rgba(4,10,25,.18); backdrop-filter: blur(10px); }
.preview-top { display: flex; gap: 5px; margin-bottom: 14px; }
.preview-top span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.31); }
.preview-shell { display: flex; height: 192px; gap: 15px; }
.preview-side { width: 91px; padding: 10px 9px; border-radius: 8px; background: rgba(255,255,255,.07); }
.preview-side i { display: block; height: 8px; margin-bottom: 13px; border-radius: 5px; background: rgba(255,255,255,.15); }
.preview-side i:first-child { background: rgba(140,142,255,.85); }
.preview-main { flex: 1; padding: 5px 0; }
.preview-heading { width: 34%; height: 12px; margin-bottom: 18px; border-radius: 8px; background: rgba(255,255,255,.62); }
.preview-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.preview-stats i { height: 45px; border-radius: 7px; background: rgba(255,255,255,.12); }
.preview-board { display: grid; grid-template-columns: 1.3fr .7fr; gap: 9px; margin-top: 11px; }
.preview-board i { height: 94px; border-radius: 7px; background: rgba(255,255,255,.1); }
.preview-board i:last-child { background: rgba(139,141,255,.21); }
.story-footer { position: relative; z-index: 1; margin: 0; color: #727e99; font-size: 10px; letter-spacing: .6px; }
.login-panel { display: grid; place-items: center; padding: 35px; }
.login-card { width: 354px; }
.login-mobile-brand { display: none; }
.login-kicker { margin-bottom: 11px; color: var(--primary); }
.login-card h2 { margin: 0; color: var(--ink); font-size: 28px; letter-spacing: -.6px; }
.login-desc { margin: 9px 0 27px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-label { display: block; margin-top: 16px; color: #566075; font-size: 12px; font-weight: 600; }
.login-label > input, .password-wrap { display: flex; width: 100%; height: 43px; margin-top: 7px; border: 1px solid #dfe3ec; border-radius: 8px; transition: .2s; }
.login-label > input, .password-wrap input { padding: 0 12px; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.login-label > input { width: 100%; }
.login-label > input:focus, .password-wrap:focus-within { border-color: #a5a6ff; box-shadow: 0 0 0 3px #eeeefe; }
.password-wrap input { flex: 1; min-width: 0; border: 0; }
.password-toggle { border: 0; padding: 0 12px; color: var(--primary); background: transparent; font-size: 11px; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; color: #858da0; font-size: 11px; }
.login-options label { display: flex; align-items: center; gap: 5px; }
.login-options input { accent-color: var(--primary); }
.login-options button { border: 0; color: var(--primary); background: transparent; font-size: 11px; }
.login-error { min-height: 19px; margin: 12px 0 0; color: var(--red); font-size: 11px; }
.login-submit { display: flex; width: 100%; height: 44px; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 8px; color: #fff; background: var(--primary); box-shadow: 0 7px 15px rgba(93,95,239,.22); font-size: 12px; font-weight: 600; transition: .2s; }
.login-submit:hover { background: var(--primary-dark); }
.login-submit:disabled { cursor: wait; opacity: .65; }
.login-card[hidden] { display: none; }
.login-submit svg { width: 15px; height: 15px; }
.login-tip { margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line); color: #9aa2b3; font-size: 11px; text-align: center; }
.login-tip strong { color: #70798d; font-family: "DM Sans"; }

.app-shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  display: flex; flex: 0 0 228px; flex-direction: column; min-height: 0; padding: 22px 15px 16px;
  color: #a7b0c7; background: var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 11px; margin: 0 7px 28px; color: #fff; }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 19px/1 "DM Sans", sans-serif; letter-spacing: .3px; }
.brand small { margin-top: 5px; color: #8590a9; font-size: 10px; letter-spacing: 1px; }
.brand-mark { position: relative; width: 31px; height: 31px; border-radius: 10px; background: linear-gradient(135deg,#787aff,#5154dd); box-shadow: 0 6px 14px #101a35; }
.brand-mark span { position: absolute; width: 5px; border-radius: 4px; background: #fff; }
.brand-mark span:nth-child(1) { left: 7px; bottom: 7px; height: 9px; opacity: .7; }
.brand-mark span:nth-child(2) { left: 13px; bottom: 7px; height: 17px; opacity: .88; }
.brand-mark span:nth-child(3) { left: 19px; bottom: 7px; height: 13px; }
.side-nav { display: grid; gap: 4px; }
.nav-label { margin: 26px 10px 8px; color: #68748f; font-size: 11px; font-weight: 600; letter-spacing: 1.6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; height: 42px; padding: 0 11px;
  border: 0; border-radius: 9px; color: #a9b3ca; background: transparent; text-align: left; transition: .2s;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: var(--sidebar-soft); }
.nav-item.active::before { position: absolute; left: -15px; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: #898aff; content: ""; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item span { flex: 1; font-size: 13px; }
.nav-item b { min-width: 22px; padding: 1px 6px; border-radius: 10px; color: #aeb6ff; background: #353f68; font-size: 10px; text-align: center; }
.nav-item i { width: 7px; height: 7px; border-radius: 50%; background: #6ee0af; }
.sidebar-bottom { display: grid; gap: 11px; margin-top: auto; }
.workspace-card { display: flex; align-items: center; gap: 9px; padding: 11px 9px; border-top: 1px solid rgba(255,255,255,.07); }
.workspace-card strong, .workspace-card small { display: block; }
.workspace-card strong { color: #eef1f9; font-size: 12px; }
.workspace-card small { margin-top: 2px; color: #75819d; font-size: 10px; }
.workspace-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #bfc1ff; background: #303a61; font: 700 13px "DM Sans"; }
.switcher { margin-left: auto; color: #7f8ba7; font-size: 16px; }

.main-shell { flex: 1; min-width: 0; overflow: hidden; }
.topbar { display: flex; height: 68px; align-items: center; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }
.crumb { display: flex; min-width: 245px; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.crumb b { color: #c8ccd6; font-weight: 400; }
.crumb strong { color: var(--ink); font-weight: 600; }
.global-search { display: flex; width: 340px; height: 38px; align-items: center; gap: 8px; padding: 0 11px; border-radius: 9px; background: #f5f6fa; color: #a2a9b8; }
.global-search svg { width: 16px; height: 16px; }
.global-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
kbd { padding: 1px 4px; border: 1px solid #d9dde7; border-radius: 4px; color: #a7adba; background: #fff; font: 10px/1.5 "DM Sans"; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.icon-btn, .help-btn { position: relative; display: grid; width: 34px; height: 34px; place-items: center; border: 0; color: #778097; background: transparent; }
.icon-btn:hover, .help-btn:hover { border-radius: 8px; background: #f5f6fa; }
.bell span { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border: 1px solid #fff; border-radius: 50%; background: var(--red); }
.help-btn { border: 1px solid #dfe2ea; border-radius: 50%; font: 700 13px "DM Sans"; }
.profile { display: flex; align-items: center; gap: 8px; padding-left: 3px; }
.profile > span, .avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #5d5fef; background: #e8e9ff; font-weight: 700; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 12px; }
.profile small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.logout-btn { height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: #80889a; background: #fff; font-size: 11px; }
.logout-btn:hover { color: var(--primary); border-color: #cfd1ff; background: var(--primary-soft); }

.page-root { height: calc(100vh - 68px); overflow: auto; padding: 28px 30px 32px; }
.page-root::-webkit-scrollbar { width: 7px; }
.page-root::-webkit-scrollbar-thumb { border-radius: 8px; background: #d7dce8; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 23px; }
.page-title { margin: 0; font-size: 25px; letter-spacing: -.5px; }
.page-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.btn { display: inline-flex; height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 600; transition: .18s; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { color: #fff; background: var(--primary); box-shadow: 0 5px 10px rgba(93,95,239,.18); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.secondary { border-color: var(--line); color: #677086; background: #fff; }
.btn.secondary:hover { border-color: #d7dbea; background: #fafbfe; }

.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; margin-bottom: 19px; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.stat-icon { display: grid; width: 47px; height: 47px; place-items: center; border-radius: 13px; }
.stat-icon.purple { color: var(--primary); background: var(--primary-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.orange { color: var(--orange); background: var(--orange-soft); }
.stat-card small { display: block; color: var(--muted); font-size: 11px; }
.stat-number { margin-top: 3px; font: 700 25px/1.15 "DM Sans"; }
.stat-card em { margin-left: auto; align-self: flex-start; padding: 2px 7px; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: 10px; font-style: normal; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 295px; gap: 19px; }
.content-stack { display: grid; gap: 19px; min-width: 0; }
.side-stack { display: grid; align-content: start; gap: 19px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 13px; }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.text-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; color: var(--primary); background: transparent; font-size: 11px; font-weight: 600; }
.text-btn svg { width: 14px; height: 14px; }

.prototype-feature { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 18px; padding: 0 18px 18px; }
.mock-preview { position: relative; height: 162px; overflow: hidden; padding: 10px; border-radius: 11px; background: #f0f1fd; }
.mock-browser { height: 100%; padding: 9px; border-radius: 8px; background: white; box-shadow: 0 8px 15px rgba(73,75,153,.11); }
.mock-bar { display: flex; gap: 3px; margin-bottom: 10px; }
.mock-bar span { width: 5px; height: 5px; border-radius: 50%; background: #d7daee; }
.mock-body { display: flex; height: 112px; gap: 7px; }
.mock-sidebar { width: 25px; border-radius: 3px; background: #eef0fa; }
.mock-content { flex: 1; }
.mock-cover { height: 37px; border-radius: 4px; background: linear-gradient(135deg,#7375ef,#a3a5ff); }
.mock-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 7px; }
.mock-lines i { height: 30px; border-radius: 4px; background: #f0f1f6; }
.version-pill { position: absolute; right: 18px; bottom: 17px; padding: 4px 7px; border-radius: 11px; color: #fff; background: rgba(38,42,77,.68); font: 600 10px "DM Sans"; }
.prototype-info { display: flex; min-width: 0; flex-direction: column; padding: 3px 0; }
.badge { display: inline-flex; width: max-content; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 12px; font-size: 10px; font-weight: 600; }
.badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.badge.green { color: var(--green); background: var(--green-soft); }
.badge.orange { color: var(--orange); background: var(--orange-soft); }
.badge.gray { color: #8d95a7; background: #f0f2f6; }
.badge.red { color: var(--red); background: var(--red-soft); }
.prototype-info h3 { margin: 11px 0 4px; font-size: 17px; }
.prototype-info p { margin: 0; color: var(--muted); font-size: 11px; }
.meta-row { display: flex; align-items: center; gap: 8px; margin-top: auto; color: var(--muted); font-size: 11px; }
.avatar-group { display: flex; padding-left: 4px; }
.avatar.small { width: 25px; height: 25px; margin-left: -4px; border: 2px solid #fff; font-size: 9px; }
.avatar.small:nth-child(2n) { color: #d56a72; background: #fff0f2; }
.avatar.small:nth-child(3n) { color: #be852d; background: #fff5e3; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: #c7cbd5; }

.document-list { padding: 0 18px 10px; }
.doc-row { display: grid; grid-template-columns: minmax(0,1fr) 95px 105px 42px; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.doc-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
.doc-type { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 8px; }
.doc-type svg { width: 15px; height: 15px; }
.doc-type.prd { color: var(--primary); background: var(--primary-soft); }
.doc-type.research { color: var(--blue); background: var(--blue-soft); }
.doc-type.note { color: var(--orange); background: var(--orange-soft); }
.doc-title strong, .doc-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-title strong { font-size: 12px; }
.doc-title small, .doc-row > span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.doc-tag { justify-self: start; padding: 3px 7px; border-radius: 8px; color: #7d8495; background: #f2f3f7; font-size: 10px; }
.row-action { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 7px; color: #a0a8b8; background: transparent; }
.row-action:hover { background: #f3f4f8; }

.sprint-content { display: grid; grid-template-columns: 168px minmax(0,1fr); gap: 22px; padding: 2px 18px 20px; }
.sprint-progress { padding-right: 20px; border-right: 1px solid var(--line); }
.sprint-progress strong { display: block; margin: 3px 0; font: 700 30px "DM Sans"; }
.sprint-progress small { color: var(--muted); font-size: 11px; }
.progress-track { height: 6px; margin: 13px 0 8px; overflow: hidden; border-radius: 6px; background: #eceef4; }
.progress-track span { display: block; width: 68%; height: 100%; border-radius: inherit; background: var(--primary); }
.progress-note { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.work-breakdown { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; align-content: center; }
.work-item { padding: 8px; border-left: 2px solid var(--primary); }
.work-item:nth-child(2) { border-color: var(--orange); }
.work-item:nth-child(3) { border-color: var(--blue); }
.work-item:nth-child(4) { border-color: var(--green); }
.work-item small { display: block; color: var(--muted); font-size: 10px; }
.work-item strong { display: block; margin-top: 2px; font: 700 18px "DM Sans"; }

.activity-list, .agenda-list { padding: 0 17px 14px; }
.activity-item { display: flex; gap: 9px; padding: 10px 0; border-top: 1px solid var(--line); }
.activity-item .avatar { flex: 0 0 auto; width: 26px; height: 26px; font-size: 9px; }
.activity-item p { margin: 0; color: #535d73; font-size: 11px; }
.activity-item p strong { color: var(--ink); }
.activity-item small { display: block; margin-top: 4px; color: #a3a9b6; font-size: 10px; }
.agenda-item { display: grid; grid-template-columns: 39px minmax(0,1fr); gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.agenda-date { display: grid; height: 39px; place-items: center; border-radius: 8px; color: var(--primary); background: var(--primary-soft); font: 700 15px/1 "DM Sans"; }
.agenda-date small { display: block; color: #8d8fe6; font: 9px "Noto Sans SC"; }
.agenda-item strong { display: block; font-size: 11px; }
.agenda-item p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.toolbar-search { display: flex; width: 260px; height: 38px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #9ca4b5; }
.toolbar-search svg { width: 15px; height: 15px; }
.toolbar-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.toolbar .btn { height: 38px; box-shadow: none; }
.toolbar-spacer { flex: 1; }
.view-btn { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); color: #9ba3b3; background: #fff; }
.view-btn:first-of-type { border-radius: 8px 0 0 8px; }
.view-btn:last-of-type { margin-left: -11px; border-radius: 0 8px 8px 0; }
.view-btn.active { color: var(--primary); background: var(--primary-soft); }
.filter-tabs { display: flex; gap: 4px; margin-bottom: 15px; }
.filter-chip { padding: 6px 11px; border: 0; border-radius: 7px; color: #778096; background: transparent; font-size: 11px; }
.filter-chip.active, .filter-chip:hover { color: var(--primary); background: var(--primary-soft); }

.prototype-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.prototype-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.prototype-card:hover { transform: translateY(-3px); box-shadow: 0 13px 24px rgba(34,45,75,.09); }
.prototype-card .mock-preview { height: 148px; margin: 10px; }
.prototype-card-body { padding: 3px 14px 14px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.card-title-row h3 { overflow: hidden; margin: 0; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.star { border: 0; color: #c4c9d4; background: transparent; }
.star.active { color: #f2b653; }
.star.active svg { fill: currentColor; }
.prototype-card p { overflow: hidden; margin: 7px 0 11px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.card-footer { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.card-footer .badge { margin-right: auto; }

.data-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 12px 15px; color: #9aa2b2; background: #fbfcfe; font-size: 10px; font-weight: 600; }
.data-table td { padding: 13px 15px; border-top: 1px solid var(--line); color: #5c6579; font-size: 11px; }
.data-table tr:hover td { background: #fcfcff; }
.data-table .doc-title strong { color: var(--ink); }
.account-summary { display: grid; grid-template-columns: repeat(3, minmax(150px, 220px)); gap: 14px; margin-bottom: 18px; }
.account-summary article { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.account-summary small { display: block; color: var(--muted); font-size: 11px; }
.account-summary strong { display: block; margin-top: 4px; font: 700 24px "DM Sans", sans-serif; }
.account-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); align-items: start; gap: 18px; }
.account-create { overflow: hidden; }
.account-create .panel-head, .account-list .panel-head { border-bottom: 1px solid var(--line); padding: 18px 20px; }
.account-form-body { padding: 4px 20px 20px; }
.account-password-wrap { height: 39px; margin-top: 6px; background: #fff; }
.account-password-wrap input { font-size: 12px; }
.account-enabled { display: flex; align-items: center; gap: 7px; margin-top: 15px; color: #697287; font-size: 11px; }
.account-enabled input { accent-color: var(--primary); }
.form-error { min-height: 18px; margin: 10px 0 0; color: var(--red); font-size: 11px; }
.account-submit { width: 100%; margin-top: 4px; }
.account-submit:disabled { cursor: wait; opacity: .65; }
.account-security-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.account-field-hint { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.account-form-success { margin: 0 0 12px; padding: 11px 12px; border: 1px solid #bce7d5; border-radius: 8px; color: #167557; background: #effbf6; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.account-form-success[hidden] { display: none; }
.account-list { overflow: hidden; }
.account-list .data-table th, .account-list .data-table td { white-space: nowrap; }
.account-name { display: flex; align-items: center; gap: 9px; }
.account-name .avatar { width: 30px; height: 30px; flex: 0 0 auto; font-size: 11px; }
.account-name strong, .account-name small { display: block; }
.account-name small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.account-actions { display: flex; gap: 8px; }
.text-btn.danger { color: var(--red); }
.account-protected { color: #a0a7b6; font-size: 11px; }
.account-browser-note { display: flex; gap: 10px; margin-top: 18px; padding: 12px 15px; border: 1px solid #dfe3f7; border-radius: 9px; color: #677086; background: #f6f7ff; font-size: 11px; }
.account-browser-note strong { flex: 0 0 auto; color: #4f5870; }
.account-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #dfe3f7; border-radius: 9px; color: #4f5870; background: #f6f7ff; font-size: 12px; }
.account-notice p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.account-notice .btn { flex-shrink: 0; }
.account-notice.error { color: #b94350; border-color: #f1c8cd; background: #fff5f6; }
.account-list .panel-head { display: flex; align-items: center; justify-content: space-between; }
.owner { display: inline-flex; align-items: center; gap: 6px; color: #5f687c; }
.owner .avatar { width: 24px; height: 24px; font-size: 9px; }
.status-tag { padding: 3px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status-tag.draft { color: #8b93a5; background: #f0f2f6; }
.status-tag.review { color: #d68a34; background: var(--orange-soft); }
.status-tag.done { color: var(--green); background: var(--green-soft); }

.sprint-banner { display: flex; align-items: center; gap: 30px; margin-bottom: 16px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.sprint-banner h2 { margin: 0 0 4px; font-size: 16px; }
.sprint-banner p { margin: 0; color: var(--muted); font-size: 11px; }
.sprint-banner .progress-track { width: 220px; margin: 0; }
.sprint-banner strong { color: var(--primary); font: 700 21px "DM Sans"; }
.sprint-banner .btn { margin-left: auto; }
.kanban { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; align-items: start; }
.kanban-col { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #f9fafc; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 11px; }
.kanban-head strong { font-size: 12px; }
.kanban-head span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 8px; color: #929aaa; background: #eceef3; font: 600 10px "DM Sans"; }
.task-card { margin-bottom: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.task-card:last-child { margin-bottom: 0; }
.task-card p { margin: 0; color: #303950; font-size: 11px; font-weight: 600; }
.task-card small { display: block; margin: 7px 0 10px; color: var(--muted); font-size: 10px; }
.task-footer { display: flex; align-items: center; justify-content: space-between; }
.task-footer .avatar { width: 22px; height: 22px; font-size: 8px; }
.priority { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.priority.high { background: var(--red); }
.priority.low { background: var(--blue); }

.empty-state { display: none; padding: 56px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: none; place-items: center; background: rgba(22,30,51,.38); backdrop-filter: blur(2px); }
.modal-backdrop.show { display: grid; }
.modal { position: relative; width: 420px; padding: 25px; border-radius: 16px; background: #fff; box-shadow: 0 18px 42px rgba(19,28,54,.16); }
.modal-close { position: absolute; top: 16px; right: 16px; display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 7px; color: #9ba3b1; background: transparent; }
.modal-close:hover { background: #f3f4f7; }
.modal-close svg { width: 16px; height: 16px; }
.modal-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.modal h2 { margin: 15px 0 4px; font-size: 19px; }
.modal p { margin: 0 0 17px; color: var(--muted); font-size: 11px; }
.form-label { display: block; margin-top: 12px; color: #5e6779; font-size: 11px; font-weight: 600; }
.form-label input, .form-label select, .form-label textarea { width: 100%; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; }
.form-label input, .form-label select { height: 39px; }
.form-label textarea { height: 70px; padding-top: 9px; resize: vertical; }
.form-label input:focus, .form-label select:focus, .form-label textarea:focus { border-color: #a7a8ff; box-shadow: 0 0 0 3px #eeeeff; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 21px; }
.toast { position: fixed; z-index: 30; right: 28px; bottom: 26px; display: flex; align-items: center; gap: 8px; padding: 12px 15px; border-radius: 9px; color: #fff; background: #26324c; box-shadow: 0 10px 20px rgba(24,32,56,.2); opacity: 0; transform: translateY(12px); transition: .25s; pointer-events: none; font-size: 12px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast svg { width: 15px; height: 15px; color: #6ee0af; }

.tool-catalog { max-width: 1200px; }
.tool-catalog-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.tool-catalog-head h2 { margin: 0; font-size: 16px; }
.tool-catalog-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.tool-catalog-head > span { color: var(--muted); font-size: 11px; }
.tool-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 320px)); gap: 18px; }
.tool-card { display: block; width: 320px; padding: 0; overflow: hidden; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.tool-card:hover { transform: translateY(-2px); border-color: #bfc1fb; box-shadow: 0 12px 28px rgba(47,54,92,.12); }
.tool-card:focus-visible { outline: 3px solid #9395fa; outline-offset: 3px; }
.tool-card-art { display: block; padding: 12px 12px 0; }
.tool-card-picture { display: block; width: 100%; height: auto; stroke: none; }
.tool-card-content { display: block; padding: 15px 17px 17px; }
.tool-card-title { display: block; color: var(--ink); font-size: 15px; font-weight: 700; }
.tool-card-description { display: block; min-height: 36px; margin-top: 6px; color: #667188; font-size: 12px; line-height: 1.55; }
.tool-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; color: var(--primary-dark); font-size: 11px; font-weight: 600; }
.tool-card-meta b { margin-left: 4px; font-size: 15px; }
.tool-workspace { max-width: 1200px; }
.tool-workspace .panel-head { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.tool-workspace-title { display: flex; align-items: center; gap: 12px; }
.tool-back { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: #59647c; background: #f6f7fb; border: 1px solid var(--line); border-radius: 8px; font-size: 18px; }
.tool-back:hover { color: var(--primary-dark); background: var(--primary-soft); border-color: #cfd0fc; }
.tool-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); gap: 32px; padding: 24px; }
.tool-columns h3 { margin: 0 0 16px; font-size: 14px; }
.tool-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tool-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 245px; padding: 20px; color: #59647c; background: #fafbff; border: 1px dashed #b9bfd8; border-radius: 12px; }
.tool-drop svg { width: 32px; height: 32px; color: var(--primary); }
.tool-drop span { font-size: 12px; }
.tool-drop:hover, .tool-drop.is-dragging { background: var(--primary-soft); border-color: var(--primary); }
.tool-workspace button:focus-visible, .tool-workspace a:focus-visible { outline: 3px solid #9395fa; outline-offset: 3px; }
.tool-workspace button:disabled { cursor: not-allowed; opacity: .5; }
.tool-preview { display: grid; place-items: center; height: 245px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: conic-gradient(#eef0f5 25%, #fff 0 50%, #eef0f5 0 75%, #fff 0) 0 0 / 20px 20px; }
.tool-preview img { max-width: 100%; max-height: 245px; object-fit: contain; }
[data-preview-background="black"] .tool-preview { background: #111; }
[data-preview-background="white"] .tool-preview { background: #fff; }
.tool-preview-control { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; color: #59647c; font-size: 12px; }
.tool-preview-control select { min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; }
.tool-result-preview { height: 210px; }
.tool-result-preview img { max-height: 210px; }
.tool-filename { margin: 12px 0 4px; font-weight: 600; overflow-wrap: anywhere; }
.tool-hint { margin: 8px 0 12px; color: #667188; font-size: 12px; line-height: 1.7; }
.tool-settings .form-label { font-size: 13px; margin-top: 14px; }
.tool-output-hint { padding: 12px; background: #f5f7fb; border-radius: 8px; color: #59647c; font-size: 12px; }
.tool-actions { display: flex; gap: 10px; margin-top: 18px; }
.tool-progress-box { margin-top: 16px; }
.tool-progress-box progress { width: 100%; height: 10px; accent-color: var(--primary); }
.tool-status { min-height: 22px; font-size: 12px; color: #59647c; }
.tool-status.is-error { color: #b62942; }
.tool-result { padding: 16px; border: 1px solid #bde7d4; border-radius: 10px; background: #f0fbf6; }
.tool-result strong { color: #16714f; }
.tool-result p { font-size: 12px; color: #426457; }
.tool-result a { text-decoration: none; }
.tool-notes { padding: 16px 24px; border-top: 1px solid var(--line); background: #fafbfe; border-radius: 0 0 var(--radius) var(--radius); font-size: 12px; color: #59647c; }
.tool-notes p { margin: 6px 0; line-height: 1.8; }

.design-source > strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 14px; }
.design-source .btn { margin-top: 12px; }
.design-preview { display: grid; min-height: 200px; max-height: 320px; padding: 12px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f5f6fa; }
.design-preview img { display: block; max-width: 100%; max-height: 290px; object-fit: contain; }
.design-report { margin-top: 18px; padding: 14px; border: 1px solid #eee0bf; border-radius: 9px; color: #785b2e; background: #fffaf0; font-size: 12px; line-height: 1.7; }
.design-report h4 { margin: 0 0 8px; font-size: 12px; }
.design-report ul { margin: 0; padding-left: 18px; overflow-wrap: anywhere; }
.design-report li + li { margin-top: 7px; }
.design-report p { margin: 0; }
.design-workspace .tool-result { overflow-wrap: anywhere; }
.design-workspace .tool-status { overflow-wrap: anywhere; }
@media (max-width: 860px) { .design-columns { grid-template-columns: 1fr; } }

.bg-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .7fr); gap: 28px; padding: 24px; }
.bg-columns h3 { margin: 0; font-size: 14px; }
.bg-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bg-preview-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.bg-preview-head .tool-preview-control { margin: 0; white-space: nowrap; }
.bg-stage { display: grid; min-height: 400px; place-items: center; overflow: hidden; border: 1px dashed #b9bfd8; border-radius: 12px; background: #f7f8fd; }
.bg-stage.is-dragging { border-color: var(--primary); background: var(--primary-soft); }
.bg-empty { display: flex; align-items: center; flex-direction: column; gap: 10px; padding: 28px; color: #667188; text-align: center; }
.bg-empty svg { width: 36px; height: 36px; color: var(--primary); }
.bg-empty strong { color: var(--ink); font-size: 13px; }
.bg-empty span { font-size: 11px; }
.bg-empty .btn { margin-top: 6px; }
.bg-canvas-area { display: grid; width: 100%; min-height: 400px; place-items: center; padding: 12px; overflow: auto; }
.bg-canvas-frame { position: relative; width: fit-content; max-width: 100%; line-height: 0; background: conic-gradient(#e9ecf3 25%, #fff 0 50%, #e9ecf3 0 75%, #fff 0) 0 0 / 20px 20px; }
.bg-canvas-frame[data-background="black"] { background: #111; }
.bg-canvas-frame[data-background="white"] { background: #fff; }
#bgCanvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 520px; }
#bgOverlay { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
#bgGifPreview { display: block; width: auto; height: auto; max-width: 100%; max-height: 520px; object-fit: contain; }
#bgGifPreview[hidden] { display: none; }
.bg-canvas-frame[data-mode="erase"] #bgOverlay, .bg-canvas-frame[data-mode="restore"] #bgOverlay { cursor: cell; }
.bg-status { margin: 10px 0 0; }
.bg-controls-column { min-width: 0; }
.bg-controls-column h4 { margin: 22px 0 9px; font-size: 12px; }
.bg-intent { margin: 17px 0 20px; padding: 15px; border: 1px solid #dce1fb; border-radius: 10px; background: #f8f9ff; }
.bg-intent h4 { margin: 0 0 4px; color: #353b73; }
.bg-intent .tool-hint { margin: 0 0 10px; }
.bg-intent .form-label { margin-top: 0; }
.bg-intent textarea { width: 100%; min-height: 64px; margin-top: 6px; padding: 9px 10px; border: 1px solid #d9def0; border-radius: 8px; color: var(--ink); background: #fff; font: inherit; font-size: 11px; line-height: 1.5; resize: vertical; }
.bg-intent textarea:focus { outline: 0; border-color: #a7a8ff; box-shadow: 0 0 0 3px #eeeeff; }
.bg-intent-examples { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0; }
.bg-intent-examples button { padding: 4px 7px; border: 1px solid #dce0f2; border-radius: 6px; color: #606c9b; background: #fff; font-size: 10px; }
.bg-intent-examples button:hover { border-color: #a7a8ff; color: var(--primary-dark); }
.bg-intent-analyze { width: 100%; }
.bg-intent #bgIntentError { min-height: 0; margin: 8px 0 0; font-size: 11px; }
.bg-intent-plan { margin-top: 10px; padding: 12px; border: 1px solid #cdd5f6; border-radius: 8px; background: #fff; font-size: 11px; }
.bg-intent-plan strong { color: #303b73; }
.bg-intent-plan ol { margin: 7px 0 10px; padding-left: 18px; color: #566075; line-height: 1.8; }
.bg-intent-plan p { margin: 0 0 10px; color: #a56826; line-height: 1.6; }
.bg-intent-plan .btn { width: 100%; }
.bg-controls-column .form-label { margin-top: 18px; font-size: 12px; }
.bg-controls-column .form-label strong { color: var(--primary-dark); font-family: "DM Sans", sans-serif; }
.bg-range, .bg-controls-column .form-label input.bg-range { display: block; width: 100%; height: 24px; margin-top: 8px; padding: 0; accent-color: var(--primary); }
.bg-auto-btn { width: 100%; margin-top: 4px; }
.bg-gif-notice { margin: 16px 0 4px; padding: 12px; border: 1px solid #c9e7dc; border-radius: 8px; color: #426457; background: #f0fbf6; font-size: 11px; }
.bg-gif-notice strong { color: #16714f; }
.bg-gif-notice p { margin: 5px 0 0; line-height: 1.6; }
.bg-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bg-mode { min-height: 38px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; color: #566075; background: #fff; font-size: 11px; }
.bg-mode:hover { border-color: #bbbdf8; background: #f8f8ff; }
.bg-mode.active { border-color: #a6a7fa; color: var(--primary-dark); background: var(--primary-soft); font-weight: 600; }
.bg-edit-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.bg-download { width: 100%; margin-top: 14px; }
.bg-workspace button:focus-visible, .bg-workspace select:focus-visible, .bg-workspace input:focus-visible { outline: 3px solid #9395fa; outline-offset: 2px; }
.bg-workspace button:disabled { cursor: not-allowed; opacity: .5; }

@media (max-width: 1280px) {
  .page-root { padding: 24px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr) 276px; gap: 15px; }
  .prototype-feature { grid-template-columns: 210px minmax(0,1fr); }
}
