:root {
  --ink: #1d2939;
  --muted: #667085;
  --line: #e4e7ec;
  --panel: #ffffff;
  --canvas: #f4f6f8;
  --nav: #173150;
  --nav-soft: #24466e;
  --blue: #245b9b;
  --blue-soft: #edf3fa;
  --green: #147a5a;
  --orange: #a66e25;
  --red: #ba3e45;
  --red-soft: #fff5f5;
  --shadow: 0 10px 28px rgba(16, 36, 61, .06);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.auth-screen { position: relative; display: flex; flex-direction: column; min-height: 100vh; overflow: hidden; padding: 32px clamp(24px, 7vw, 104px) 22px; background: #f7f9fb; }
.auth-screen::before { position: absolute; top: 0; right: 0; width: 44%; height: 100%; background: #f0f4f8; content: ""; }
.auth-brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; color: #173150; font-size: 18px; font-weight: 800; letter-spacing: .3px; }
.auth-brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 5px; color: #fff; background: #173150; font-size: 11px; letter-spacing: -.5px; }
.auth-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(360px, 1fr) 420px; gap: clamp(50px, 10vw, 150px); align-items: center; width: min(100%, 1120px); flex: 1; margin: 0 auto; }
.auth-intro { max-width: 555px; padding-bottom: 42px; }
.auth-intro .eyebrow { color: #587394; }
.auth-intro h1 { max-width: 600px; margin-bottom: 19px; color: #173150; font-size: clamp(32px, 4vw, 48px); letter-spacing: -1.5px; }
.auth-intro > p:not(.eyebrow) { max-width: 475px; margin: 0; color: #596a7f; font-size: 16px; line-height: 1.9; }
.auth-points { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 31px; }
.auth-points span { padding: 7px 10px; border: 1px solid #d7e0e9; border-radius: 4px; color: #445a74; background: rgba(255,255,255,.55); font-size: 12px; font-weight: 600; }
.auth-card { width: 100%; padding: 35px; border: 1px solid #dde4eb; border-radius: 8px; background: #fff; box-shadow: 0 16px 35px rgba(23,49,80,.09); }
.auth-card-heading h2 { margin: 0 0 5px; color: #1d2939; font-size: 24px; }
.auth-card-heading p:not(.eyebrow) { margin-bottom: 23px; color: var(--muted); }
.auth-tabs { display: flex; gap: 23px; margin-bottom: 24px; border-bottom: 1px solid #e5e9ee; }
.auth-tab { position: relative; padding: 0 2px 11px; border: 0; color: #8b95a7; background: transparent; font-weight: 700; }
.auth-tab.active { color: #245b9b; }
.auth-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #245b9b; content: ""; }
.auth-card label { display: block; margin-bottom: 16px; color: #344054; font-size: 13px; font-weight: 700; }
.auth-card input, .auth-card select { display: block; width: 100%; height: 43px; padding: 0 12px; margin-top: 7px; border: 1px solid #d7dee7; border-radius: 5px; outline: 0; color: #1d2939; background: #fff; font-weight: 400; }
.auth-card input:focus, .auth-card select:focus { border-color: #6289b5; box-shadow: 0 0 0 3px #eaf1f8; }
.auth-error { min-height: 20px; margin: -4px 0 9px; color: #ba3e45; font-size: 12px; }
.demo-accounts { padding: 13px 14px; margin-top: 19px; border-left: 3px solid #a6b9cc; color: #68788d; background: #f6f8fa; font-size: 11px; }
.demo-accounts strong { display: block; margin-bottom: 4px; color: #43566f; font-size: 12px; }
.demo-accounts p { margin: 2px 0; }
.auth-footer { position: relative; z-index: 1; margin: 0; color: #8995a4; font-size: 11px; text-align: center; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 246px; flex: 0 0 246px; display: flex; flex-direction: column; padding: 27px 16px 18px; color: #dfe5f1; background: var(--nav); }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 10px; color: #fff; text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.brand small { display: block; margin-top: -1px; color: #7e8aa2; font-size: 7px; font-weight: 700; letter-spacing: 1.8px; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 5px; color: #173150; background: #d6e2ee; font-size: 10px; letter-spacing: -.5px; }
.role-card { margin: 41px 8px 28px; padding: 13px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.055); }
.role-card p { margin: 0 0 4px; color: #7f8ca4; font-size: 11px; }
.role-card strong { display: block; color: #fff; font-size: 13px; }
.text-button, .link-button { padding: 0; border: 0; color: inherit; background: transparent; }
.role-card .text-button { margin-top: 6px; color: #8eacff; font-size: 12px; }
.main-nav { display: grid; gap: 5px; margin-top: 35px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 8px; color: #9aa6bb; text-decoration: none; font-weight: 600; }
.nav-link span { width: 16px; color: #8491a8; text-align: center; }
.nav-link.active, .nav-link:hover { color: #fff; background: var(--nav-soft); }
.nav-link.active span { color: #8aafff; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; color: #6e7a91; font-size: 11px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #57d59d; }

.main-content { min-width: 0; flex: 1; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; border-bottom: 1px solid var(--line); background: #fff; }
.crumb { color: #7d8698; font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.demo-badge { padding: 3px 8px; border-radius: 3px; color: #667085; background: #f2f4f7; font-size: 10px; font-weight: 700; }
.logout-button { border: 0; color: #667085; background: transparent; font-size: 12px; font-weight: 600; }
.logout-button:hover { color: #245b9b; }
.avatar-button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; color: #fff; background: #61758c; font-weight: 700; }

.view { display: none; max-width: 1280px; padding: 49px 48px 68px; margin: 0 auto; }
.view.active { display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 780px; margin-bottom: 10px; font-size: clamp(27px, 3.2vw, 39px); line-height: 1.23; letter-spacing: -.7px; }
h2 { margin-bottom: 5px; font-size: 22px; letter-spacing: -.35px; }
h3 { margin-bottom: 5px; font-size: 17px; }
.eyebrow { margin-bottom: 8px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 1.25px; }
.subtle, .hero-copy { color: var(--muted); }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 41px; }
.hero .eyebrow { margin-bottom: 9px; font-size: 12px; }
.hero-copy { max-width: 575px; margin: 0; font-size: 15px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; transition: .18s ease; }
.primary-button { color: #fff; background: var(--blue); box-shadow: none; }
.primary-button:hover { background: #1d4c82; transform: translateY(-1px); }
.secondary-button { color: #445273; border-color: #dce1eb; background: #fff; }
.secondary-button:hover { border-color: #aeb9ce; }
.full-width { width: 100%; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 49px; }
.metrics article { padding: 21px 23px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); box-shadow: 0 2px 5px rgba(22,32,51,.015); }
.metrics span, .metrics small { display: block; color: var(--muted); }
.metrics strong { display: block; margin: 3px 0 4px; font-size: 28px; }
.metrics small { font-size: 12px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-heading h1 { margin: 0 0 8px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.link-button { color: var(--blue); font-weight: 700; }
.project-card, .project-list-card, .workspace-main, .side-info-card, .ai-summary { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 2px 6px rgba(23,32,51,.02); }
.project-card { overflow: hidden; }
.project-card-top { display: flex; align-items: flex-start; gap: 15px; padding: 25px 27px 23px; }
.project-icon { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border-radius: 6px; color: #315c86; background: #e7eff7; font-weight: 800; }
.project-icon.large { width: 47px; height: 47px; }
.project-title { min-width: 0; flex: 1; }
.project-title h3 { margin: 6px 0 2px; font-size: 17px; }
.project-title p, .list-main p { margin: 0; color: var(--muted); font-size: 13px; }
.tag { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 10px; font-weight: 800; }
.tag-blue { color: #4b65c2; background: #eef1ff; }
.stage-pill { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 5px 9px; border-radius: 99px; color: #a86c22; background: #fff5e8; font-size: 11px; font-weight: 800; white-space: nowrap; }
.stage-pill.status-paid { color: #1a8a68; background: #e7f8f1; }
.stage-pill.status-delivery { color: #6263b5; background: #eeefff; }
.stage-pill.status-finished { color: #348463; background: #e8f7ef; }
.project-card-bottom { display: flex; align-items: center; gap: 27px; padding: 14px 27px; border-top: 1px solid var(--line); color: #657088; font-size: 12px; }
.project-card-bottom b { margin-right: 6px; color: #a1a9b8; font-weight: 600; }
.project-card-bottom .secondary-button { margin-left: auto; min-height: 34px; font-size: 12px; }
.empty-project-card { display: flex; align-items: center; gap: 18px; padding: 20px; border: 1px dashed #cfd9e2; border-radius: 3px; color: #65778a; background: #f8fafb; }
.empty-project-card strong { color: #3f566e; font-size: 14px; }
.empty-project-card p { flex: 1; margin: 0; font-size: 12px; }

.assistant-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.chat-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.chat-header strong, .chat-header span { display: block; }
.chat-header span { color: var(--muted); font-size: 11px; }
.assistant-avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 5px; color: #fff; background: #315c86; font-size: 11px; font-weight: 800; }
.messages { min-height: 405px; max-height: 510px; overflow-y: auto; padding: 21px; background: #fbfcff; }
.message { display: flex; gap: 9px; max-width: 86%; margin-bottom: 16px; }
.message.self { flex-direction: row-reverse; margin-left: auto; }
.message-bubble { padding: 10px 13px; border-radius: 4px 12px 12px 12px; color: #3d4659; background: #fff; box-shadow: 0 1px 3px rgba(27,40,68,.08); }
.message.self .message-bubble { border-radius: 12px 4px 12px 12px; color: #fff; background: var(--blue); }
.message-bubble p { margin: 0; font-size: 13px; }
.message-time { display: block; margin-top: 4px; color: #a3abba; font-size: 10px; }
.message.self .message-time { color: #c5d4ff; text-align: right; }
.small-avatar { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; }
.client-avatar { background: #e5a087; }
.programmer-avatar { background: #5c77bb; }
.message-composer { display: flex; gap: 9px; padding: 13px; border-top: 1px solid var(--line); background: #fff; }
.message-composer input { min-width: 0; flex: 1; height: 39px; padding: 0 12px; border: 1px solid #dfe4ed; border-radius: 7px; outline: none; color: var(--ink); }
.message-composer input:focus { border-color: #8cabff; box-shadow: 0 0 0 3px #edf2ff; }
.send-button { padding: 0 12px; border: 0; border-radius: 7px; color: #fff; background: #2f6bf2; font-size: 12px; font-weight: 700; }
.ai-summary { align-self: start; padding: 23px; }
.ai-summary h3 { margin-bottom: 22px; }
.brief-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed #e2e5ec; color: var(--muted); }
.brief-row strong { color: var(--ink); font-size: 13px; }
.brief-progress { height: 6px; overflow: hidden; margin: 22px 0 8px; border-radius: 5px; background: #e9edf4; }
.brief-progress span { display: block; width: 82%; height: 100%; border-radius: inherit; background: #4c7bab; }
.ai-summary .subtle { margin-bottom: 20px; font-size: 12px; }

.filter-row { display: flex; gap: 9px; margin-bottom: 18px; }
.filter { padding: 7px 11px; border: 1px solid transparent; border-radius: 7px; color: #69738a; background: transparent; font-weight: 600; }
.filter span { padding-left: 3px; color: #9ba4b4; font-size: 11px; }
.filter.active { color: var(--blue); border-color: #dce6ff; background: #eff4ff; }
.project-list-card { display: flex; align-items: center; gap: 17px; padding: 21px; }
.list-main { min-width: 0; flex: 1; }
.list-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.list-main h3 { margin: 0 0 4px; font-size: 17px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 13px; color: #929bad; font-size: 11px; }

.workspace-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.workspace-top h1 { margin: 4px 0; font-size: 27px; }
.workspace-top p, .back-label { margin: 0; color: var(--muted); font-size: 12px; }
.back-label { color: #8d96a8; }
.large-pill { padding: 7px 12px; }
.timeline { display: flex; align-items: center; margin-bottom: 29px; padding: 0 15px; }
.timeline-item { display: grid; justify-items: center; gap: 7px; min-width: 77px; color: #a0a8b6; font-size: 11px; font-weight: 700; text-align: center; }
.timeline-item i { display: grid; width: 23px; height: 23px; place-items: center; border: 2px solid #dce1e9; border-radius: 50%; background: var(--canvas); color: #a0a8b6; font-size: 10px; font-style: normal; }
.timeline-item.done, .timeline-item.active { color: var(--blue); }
.timeline-item.done i { border-color: var(--blue); color: #fff; background: var(--blue); }
.timeline-item.active i { border-color: var(--blue); color: var(--blue); background: #fff; box-shadow: 0 0 0 4px #e9efff; }
.timeline-line { height: 2px; flex: 1; margin-top: -18px; background: #e1e5eb; }
.timeline-line.done { background: var(--blue); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 19px; align-items: start; }
.workspace-main { min-height: 600px; overflow: hidden; }
.tabs { display: flex; gap: 22px; padding: 0 23px; border-bottom: 1px solid var(--line); }
.tab { position: relative; padding: 17px 1px 14px; border: 0; color: #8490a3; background: transparent; font-size: 13px; font-weight: 700; }
.tab.active { color: var(--blue); }
.tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--blue); content: ""; }
.tab span { display: inline-grid; min-width: 17px; place-items: center; border-radius: 10px; color: #6380d7; background: #eaf0ff; font-size: 10px; }
.tab-panel { display: none; padding: 26px; }
.tab-panel.active { display: block; }
.panel-intro { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-intro h2 { margin: 0 0 4px; font-size: 19px; }
.panel-intro .eyebrow { margin-bottom: 5px; }
.revision-notice { display: flex; align-items: center; gap: 9px; padding: 11px 13px; margin-bottom: 18px; border: 1px solid #ffdede; border-radius: 7px; color: #bb565b; background: #fff8f8; font-size: 12px; }
.revision-notice b { color: var(--red); }
.prd-document { overflow: hidden; border: 1px solid #e3e6ed; border-radius: 9px; }
.prd-head { padding: 20px 22px 17px; border-bottom: 1px solid #e7e9ef; background: #fbfcfe; }
.prd-head h3 { margin-bottom: 5px; font-size: 18px; }
.prd-head p { margin: 0; color: var(--muted); font-size: 12px; }
.prd-section { padding: 17px 22px; border-bottom: 1px solid #edf0f4; }
.prd-section:last-child { border-bottom: 0; }
.prd-section h4 { margin: 0 0 8px; color: #3f4d67; font-size: 13px; }
.prd-section p, .prd-section li { color: #59667b; font-size: 13px; }
.prd-section p { margin: 0; }
.prd-section ul { margin: 0; padding-left: 19px; }
.prd-section li + li { margin-top: 5px; }
.diff { padding: 1px 3px; border-radius: 3px; color: #c44950; background: #fff0f0; font-weight: 600; }
.action-bar { display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; }
.action-note { flex: 1; align-self: center; color: var(--muted); font-size: 12px; }
.project-chat-panel { border: 0; }
.project-chat-panel .messages { min-height: 396px; max-height: 470px; }
.member-stack { display: flex; }
.member-stack .small-avatar + .small-avatar { margin-left: -7px; border: 2px solid #fff; }
.delivery-empty, .delivery-card { padding: 20px; border: 1px dashed #dce2eb; border-radius: 9px; text-align: center; }
.delivery-empty .delivery-icon, .delivery-card .delivery-icon { display: grid; width: 44px; height: 44px; place-items: center; margin: 0 auto 10px; border-radius: 12px; color: #5a71d3; background: #edf1ff; font-size: 20px; }
.delivery-empty h3, .delivery-card h3 { margin-bottom: 5px; }
.delivery-empty p, .delivery-card p { color: var(--muted); font-size: 13px; }
.delivery-card { border-style: solid; text-align: left; }
.delivery-card .delivery-icon { float: left; margin: 0 13px 25px 0; }
.delivery-card .file-box { display: flex; align-items: center; justify-content: space-between; clear: both; padding: 12px; border-radius: 7px; background: #f7f8fb; color: #4c5c79; font-size: 12px; }
.delivery-card .file-box button { border: 0; color: var(--blue); background: transparent; font-weight: 700; }
.delivery-actions { display: flex; justify-content: flex-end; margin-top: 17px; }
.delivery-input { display: block; width: 100%; padding: 10px; margin: 15px 0; border: 1px solid #dbe1eb; border-radius: 7px; color: var(--muted); background: #fafbfc; font-size: 12px; }
.workspace-aside { display: grid; gap: 14px; }
.side-info-card { padding: 18px; }
.side-info-card .eyebrow { margin-bottom: 5px; }
.side-info-card h3 { margin-bottom: 14px; font-size: 15px; }
.detail-line { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid #f0f1f4; color: var(--muted); font-size: 12px; }
.detail-line strong { color: #46536c; }
.member { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.member strong, .member small { display: block; }
.member strong { color: #46536c; font-size: 12px; }
.member small { color: #9099a9; font-size: 11px; }
.payment-card { background: #fbfcff; }
.payment-card > strong { display: block; margin-bottom: 7px; color: #c68b34; font-size: 13px; }
.payment-card p { margin: 0; color: #8993a5; font-size: 11px; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; background: rgba(10,17,31,.53); transition: .18s ease; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { position: relative; width: min(100%, 470px); padding: 29px; border-radius: 8px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.25); transform: translateY(9px); transition: .18s ease; }
.modal-backdrop.open .modal { transform: translateY(0); }
.modal h2 { margin-bottom: 7px; }
.modal-close { position: absolute; top: 13px; right: 15px; width: 29px; height: 29px; border: 0; border-radius: 50%; color: #7d8798; background: #f3f5f8; font-size: 20px; line-height: 1; }
.role-options { display: grid; gap: 10px; margin-top: 20px; }
.role-option { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px; border: 1px solid #e2e6ee; border-radius: 9px; color: var(--ink); background: #fff; text-align: left; }
.role-option:hover, .role-option.selected { border-color: #95b1ff; background: #f7f9ff; }
.role-option > span:nth-child(2) { flex: 1; }
.role-option strong, .role-option small { display: block; }
.role-option small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.role-option b { color: var(--blue); }
.role-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #fff; font-weight: 800; }
.payment-modal { text-align: center; }
.payment-amount { margin: 17px 0 12px; color: var(--ink); font-size: 35px; font-weight: 800; letter-spacing: -1px; }
.payment-modal .primary-button { margin-top: 14px; }
.editor-modal label { display: block; margin: 19px 0 15px; color: #59647a; font-weight: 700; }
.editor-modal textarea { display: block; width: 100%; height: 112px; padding: 10px; margin-top: 8px; resize: vertical; border: 1px solid #dbe1eb; border-radius: 7px; color: #46536c; line-height: 1.55; outline: none; }
.editor-modal textarea:focus { border-color: #8cabff; box-shadow: 0 0 0 3px #edf2ff; }
.toast { position: fixed; z-index: 30; bottom: 25px; left: 50%; padding: 11px 16px; border-radius: 8px; color: #fff; background: #202b40; box-shadow: var(--shadow); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.is-hidden { display: none !important; }

@media (max-width: 960px) {
  .sidebar { width: 207px; flex-basis: 207px; }
  .view { padding: 37px 28px 52px; }
  .topbar { padding: 0 28px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-aside { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .auth-screen { min-height: 100vh; padding: 22px 18px 16px; }
  .auth-screen::before { display: none; }
  .auth-layout { display: block; margin: 52px 0 25px; }
  .auth-intro { display: none; }
  .auth-card { padding: 25px 20px; }
  .app-shell { display: block; }
  .sidebar { width: 100%; min-height: auto; padding: 15px; }
  .brand { padding: 0; }
  .role-card { display: none; }
  .main-nav { display: flex; gap: 2px; overflow-x: auto; margin-top: 15px; }
  .nav-link { flex: 0 0 auto; padding: 8px 10px; font-size: 12px; }
  .sidebar-foot { display: none; }
  .topbar { height: 55px; padding: 0 16px; }
  .view { padding: 29px 16px 42px; }
  .hero, .workspace-top { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr; gap: 10px; margin-bottom: 32px; }
  .assistant-layout { grid-template-columns: 1fr; }
  .ai-summary { order: -1; }
  .project-card-top, .project-card-bottom, .project-list-card { align-items: flex-start; flex-direction: column; }
  .project-card-bottom { gap: 8px; }
  .project-card-bottom .secondary-button { margin-left: 0; }
  .project-list-card > .secondary-button { width: 100%; }
  .timeline { display: none; }
  .workspace-aside { grid-template-columns: 1fr; }
  .tabs { gap: 15px; padding: 0 16px; overflow-x: auto; }
  .tab-panel { padding: 19px 15px; }
  .panel-intro { flex-direction: column; }
  .panel-intro .secondary-button { width: 100%; }
}

.main-content { min-width: 0; }
.view { width: 100%; max-width: none; padding: 24px 28px 40px; }
.view > .section-heading { padding: 0 2px; }
.hero { min-height: 128px; padding: 24px 28px; margin-bottom: 15px; background: #eef3f7; }
.hero h1 { font-size: 26px; }
.metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.metrics article { min-height: 94px; display: flex; flex-direction: column; justify-content: center; }
.content-section { width: 100%; }
.project-card-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.project-card-bottom { display: grid; grid-template-columns: repeat(3, max-content) auto; align-items: center; }
.project-card-bottom .secondary-button { justify-self: end; }
.assistant-layout { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.conversation-sidebar, .ai-summary { position: sticky; top: 20px; }
.ai-chat-panel { min-width: 0; }
.messages { min-height: 485px; }
.project-list-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 15px; }
.list-main { width: 100%; }
.workspace-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.workspace-main { min-width: 0; }
.workspace-aside { gap: 10px; }
.side-info-card { padding: 14px; }
.prd-document { width: 100%; }
.delivery-card, .delivery-empty { min-height: 220px; }

@media (min-width: 1500px) {
  .view { padding-right: 42px; padding-left: 42px; }
  .assistant-layout { grid-template-columns: minmax(0, 1fr) 400px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (max-width: 900px) {
  .view { padding-right: 20px; padding-left: 20px; }
  .assistant-layout { grid-template-columns: minmax(0, 1fr); }
  .ai-summary { position: static; grid-column: 1 / -1; }
  .project-card-bottom { grid-template-columns: repeat(3, max-content) auto; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 245px; }
}

@media (max-width: 720px) {
  .view { padding: 20px 14px 35px; }
  .hero { min-height: 0; padding: 18px; }
  .metrics { grid-template-columns: 1fr; }
  .project-card-top { grid-template-columns: auto minmax(0, 1fr); }
  .project-card-top .stage-pill { grid-column: 2; justify-self: start; margin-top: -6px; }
  .project-card-bottom { grid-template-columns: 1fr 1fr; }
  .project-card-bottom .secondary-button { grid-column: 1 / -1; justify-self: stretch; }
  .assistant-layout { grid-template-columns: 1fr; }
  .conversation-sidebar, .ai-summary { position: static; }
  .ai-chat-panel { order: 1; }
  .conversation-sidebar { order: 0; }
  .ai-summary { order: 2; grid-column: auto; }
  .messages { min-height: 360px; }
  .project-list-card { grid-template-columns: 40px minmax(0, 1fr); }
  .project-list-card > .secondary-button { grid-column: 1 / -1; }
  .workspace-grid { grid-template-columns: 1fr; }
}

.app-shell { align-items: stretch; }
.system-conversation-sidebar { order: 1; flex: 0 0 220px; width: 220px; height: calc(100vh - 61px); min-height: calc(100vh - 61px); margin-top: 61px; margin-right: 0; overflow: hidden; padding: 22px 12px 16px; border: 0; border-right: 0; border-radius: 0; background: #fff; }
.conversation-sidebar.system-conversation-sidebar { border: 0; }
.system-conversation-sidebar .conversation-list { max-height: calc(100vh - 181px); }
.sidebar { order: 0; min-height: 100vh; }
.main-content { order: 2; min-width: 0; margin: 0; padding-top: 61px; }
.topbar { position: fixed; z-index: 12; top: 0; right: 0; left: 220px; width: auto; }
.assistant-layout { grid-template-columns: minmax(0, 1fr); }
.assistant-layout .conversation-sidebar { display: none; }
.view[data-view="ai"] { height: calc(100vh - 61px); padding: 0; overflow: hidden; }
.view[data-view="ai"] .assistant-layout { width: 100%; height: 100%; min-height: 0; margin: 0; gap: 0; }
.view[data-view="ai"] .ai-chat-panel { display: flex; height: 100%; min-height: 0; margin-left: 0; flex-direction: column; border: 0; border-radius: 0; }
.system-conversation-sidebar + .main-content { margin-left: 0; }
.view[data-view="ai"] .ai-chat-panel .messages { min-height: 0; max-height: none; flex: 1; }
.view[data-view="ai"] .message-composer { flex: 0 0 auto; }
.view[data-view="ai"] .ai-chat-actions { flex: 0 0 auto; }

@media (max-width: 720px) {
  .app-shell { display: flex; flex-direction: column; }
  .system-conversation-sidebar { order: 2; width: 100%; height: auto; min-height: auto; max-height: 190px; margin-top: 0; padding: 12px 14px; border: 0; border-top: 1px solid #dce3ea; }
  .system-conversation-sidebar .conversation-list { max-height: 95px; }
  .sidebar { order: 1; min-height: auto; }
  .main-content { order: 3; padding-top: 0; }
  .topbar { position: static; width: 100%; }
  .view[data-view="ai"] { height: auto; min-height: 620px; overflow: visible; }
  .view[data-view="ai"] .ai-chat-panel { min-height: 620px; }
}

body { color: #27364a; background: #f3f5f7; font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.auth-screen { padding: 0; background: #f5f6f8; }
.auth-screen::before { display: none; }
.auth-brand { width: 100%; height: 64px; padding: 0 42px; border-bottom: 1px solid #dfe4ea; background: #fff; font-size: 17px; }
.auth-brand-mark { width: 28px; height: 28px; border-radius: 3px; background: #1e436b; font-size: 9px; }
.auth-layout { grid-template-columns: minmax(420px, 580px) 390px; gap: 120px; align-items: center; width: min(100%, 1090px); }
.auth-intro { padding: 0 0 0 25px; border-left: 3px solid #2d679c; }
.auth-intro .eyebrow { color: #60758d; }
.auth-intro h1 { max-width: 530px; margin-bottom: 14px; color: #203b5b; font-size: 38px; line-height: 1.35; letter-spacing: -.8px; }
.auth-intro > p:not(.eyebrow) { max-width: 450px; color: #6a7788; font-size: 14px; line-height: 1.8; }
.auth-points { gap: 24px; margin-top: 27px; }
.auth-points span { padding: 0 0 0 12px; border: 0; border-left: 2px solid #b7c5d4; border-radius: 0; color: #607085; background: transparent; font-weight: 400; }
.auth-card { padding: 31px; border: 1px solid #d9e0e7; border-radius: 4px; box-shadow: 0 5px 16px rgba(32,59,91,.05); }
.auth-card-heading h2 { font-size: 21px; font-weight: 600; }
.auth-card-heading p:not(.eyebrow) { font-size: 13px; }
.auth-tabs { gap: 25px; margin-bottom: 21px; }
.auth-tab { font-size: 13px; }
.auth-card input, .auth-card select { height: 40px; border-radius: 3px; }
.auth-card .primary-button { min-height: 40px; border-radius: 3px; }
.auth-footer { padding-bottom: 18px; }

.sidebar { width: 220px; flex-basis: 220px; padding: 22px 12px 16px; color: #64748b; border-right: 1px solid #dce3ea; background: #fff; }
.brand { padding: 0 11px; color: #1f3b5a; font-size: 17px; }
.brand-mark { width: 28px; height: 28px; border-radius: 3px; color: #fff; background: #1e436b; font-size: 9px; }
.brand small { color: #9aa7b5; font-size: 6px; }
.role-card { margin: 32px 5px 22px; padding: 13px 12px; border: 1px solid #e0e6ec; border-radius: 3px; background: #f7f9fb; }
.role-card p { color: #8a98a8; }
.role-card strong { color: #344b65; font-weight: 600; }
.role-card .text-button { color: #2d679c; }
.nav-link { padding: 10px 12px; border-radius: 3px; color: #66778b; font-size: 13px; font-weight: 600; }
.nav-link span { color: #8a9aac; }
.nav-link.active, .nav-link:hover { color: #1e4f7e; background: #edf3f8; }
.nav-link.active span { color: #2d679c; }
.sidebar-foot { color: #99a5b2; }
.main-content { background: #f3f5f7; }
.topbar { height: 61px; padding: 0 36px; border-bottom: 1px solid #dfe4e9; }
.crumb { color: #718096; font-size: 12px; }
.topbar-actions { gap: 14px; }
.demo-badge { color: #53718f; border: 1px solid #d8e2eb; border-radius: 3px; background: #f5f8fa; font-weight: 600; }
.logout-button { font-size: 12px; }
.view { max-width: 1400px; padding: 31px 36px 52px; }
h1 { color: #243b53; font-size: 27px; font-weight: 600; letter-spacing: -.3px; }
h2 { color: #2a4058; font-size: 18px; font-weight: 600; }
h3 { color: #334e68; font-size: 15px; font-weight: 600; }
.eyebrow { color: #67819b; font-size: 9px; letter-spacing: 1px; }
.hero { align-items: center; padding: 21px 25px; margin-bottom: 20px; border: 1px solid #dfe5eb; background: #fff; }
.hero .eyebrow { margin-bottom: 7px; }
.hero h1 { margin-bottom: 5px; font-size: 25px; }
.hero-copy { font-size: 13px; }
.primary-button, .secondary-button { min-height: 37px; padding: 0 14px; border-radius: 3px; font-size: 12px; font-weight: 600; }
.primary-button { background: #2c6598; }
.primary-button:hover { background: #24547e; transform: none; }
.secondary-button { color: #425b74; border-color: #cdd7e1; }
.secondary-button:hover { border-color: #90a6bb; }
.metrics { gap: 12px; margin-bottom: 28px; }
.metrics article { padding: 16px 18px; border: 1px solid #dfe5eb; border-radius: 3px; box-shadow: none; }
.metrics strong { margin: 2px 0; color: #284e73; font-size: 23px; font-weight: 600; }
.metrics small { color: #8a98a8; font-size: 11px; }
.section-heading { margin-bottom: 12px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.link-button { color: #2d679c; font-size: 12px; }
.project-card, .project-list-card, .workspace-main, .side-info-card, .ai-summary { border-color: #dfe5eb; border-radius: 3px; box-shadow: none; }
.project-card-top { gap: 13px; padding: 18px 20px; }
.project-icon { width: 36px; height: 36px; border-radius: 3px; color: #35678f; background: #e9f0f6; font-size: 13px; }
.project-title h3 { margin: 4px 0 2px; font-size: 15px; }
.project-title p, .list-main p { font-size: 12px; }
.project-card-bottom { padding: 11px 20px; }
.stage-pill { border-radius: 3px; font-weight: 600; }
.assistant-layout { gap: 14px; }
.assistant-layout { grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 430px); align-items: start; }
.conversation-sidebar { min-height: 505px; padding: 13px; border: 1px solid #dfe5eb; border-radius: 3px; background: #fff; }
.new-conversation-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 37px; border: 1px solid #2c6598; border-radius: 3px; color: #fff; background: #2c6598; font-size: 12px; font-weight: 600; }
.new-conversation-button:hover { background: #24547e; }
.new-conversation-button span { font-size: 17px; font-weight: 400; line-height: 1; }
.conversation-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 4px 9px; color: #52677d; font-size: 12px; font-weight: 700; }
.conversation-heading small { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 3px; color: #6c8298; background: #edf2f6; font-size: 10px; font-weight: 600; }
.conversation-list { display: grid; gap: 3px; max-height: 420px; overflow-y: auto; }
.conversation-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 8px 9px; border: 1px solid transparent; border-radius: 3px; color: #52677d; background: transparent; text-align: left; }
.conversation-item:hover { background: #f5f8fa; }
.conversation-item.active { border-color: #d5e2ed; color: #1e4f7e; background: #edf3f8; }
.conversation-item strong { min-width: 0; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item span { flex: 0 0 auto; color: #9aa7b5; font-size: 10px; }
.chat-panel { border-radius: 3px; }
.chat-header { padding: 13px 16px; }
.messages { min-height: 380px; padding: 17px; background: #f8fafb; }
.message-bubble { border: 1px solid #e5e9ee; border-radius: 3px; box-shadow: none; }
.message.self .message-bubble { border-radius: 3px; background: #2c6598; }
.markdown-content { color: #3f5368; font-size: 13px; }
.markdown-content p { margin: 0 0 8px; }
.markdown-content p:last-child { margin-bottom: 0; }
.markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4 { margin: 0 0 8px; color: #294661; font-size: 14px; line-height: 1.4; }
.markdown-content ul, .markdown-content ol { margin: 5px 0 9px; padding-left: 20px; }
.markdown-content li + li { margin-top: 4px; }
.markdown-content strong { color: #294661; font-weight: 700; }
.markdown-content em { color: #526b82; }
.markdown-content code { padding: 2px 4px; border-radius: 2px; color: #385b76; background: #edf2f6; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.markdown-content pre { overflow-x: auto; padding: 11px 12px; margin: 8px 0 2px; border-radius: 3px; color: #dce8f2; background: #24384c; line-height: 1.55; }
.markdown-content pre code { padding: 0; color: inherit; background: transparent; }
.markdown-table-wrap { max-width: 100%; overflow-x: auto; margin: 9px 0 3px; border: 1px solid #dbe3ea; border-radius: 3px; }
.markdown-content table { width: 100%; min-width: 480px; border-collapse: collapse; color: #40566d; font-size: 12px; }
.markdown-content th { padding: 8px 10px; border-bottom: 1px solid #cfdbe5; color: #294661; background: #f1f5f8; font-weight: 700; white-space: nowrap; }
.markdown-content td { padding: 8px 10px; border-bottom: 1px solid #e8edf1; vertical-align: top; }
.markdown-content tbody tr:last-child td { border-bottom: 0; }
.markdown-content tbody tr:nth-child(even) { background: #fafcfd; }
.message.self .markdown-content { color: #fff; }
.message.self .markdown-content strong, .message.self .markdown-content h1, .message.self .markdown-content h2, .message.self .markdown-content h3, .message.self .markdown-content h4 { color: #fff; }
.view[data-view="ai"] .prd-panel { display: flex; height: 100%; min-width: 0; min-height: 0; flex-direction: column; border: 1px solid #dfe5eb; border-radius: 3px; background: #fff; }
.view[data-view="ai"] .prd-panel { border-right: 0; border-radius: 0; }
.prd-panel-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 18px 10px; border-bottom: 1px solid #e5e9ee; }
.prd-panel-header .eyebrow { margin-bottom: 4px; }
.prd-panel-header h2 { margin: 0; font-size: 18px; }
.prd-state { padding: 4px 7px; border: 1px solid #d8e4ed; border-radius: 3px; color: #5b7790; background: #f4f8fa; font-size: 10px; white-space: nowrap; }
.prd-panel-copy { padding: 11px 18px; margin: 0; border-bottom: 1px solid #eef1f4; color: #7a8998; font-size: 11px; line-height: 1.55; }
.prd-fields { min-height: 0; flex: 1; overflow-y: auto; padding: 4px 18px 14px; }
.prd-field { display: block; padding: 11px 0 10px; border-bottom: 1px solid #edf0f3; }
.prd-field > span { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; color: #425a71; font-size: 11px; font-weight: 700; }
.prd-field > span em { color: #a0acb7; font-size: 10px; font-style: normal; font-weight: 400; }
.prd-field input, .prd-field textarea { display: block; width: 100%; padding: 7px 8px; border: 1px solid #dfe6ec; border-radius: 3px; outline: 0; color: #344e65; background: #fbfcfd; font: 12px/1.5 Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.prd-field input { height: 32px; }
.prd-field textarea { min-height: 48px; resize: vertical; }
.prd-field input:focus, .prd-field textarea:focus { border-color: #7d9fbb; background: #fff; box-shadow: 0 0 0 2px #edf3f7; }
.prd-pending { padding: 11px 0 2px; color: #8a6d3b; font-size: 11px; }
.prd-pending strong { display: block; margin-bottom: 5px; color: #85652f; }
.prd-pending p { margin: 3px 0; }
.prd-panel-actions { padding: 13px 18px; border-top: 1px solid #e5e9ee; }
.prd-action-row { display: flex; align-items: stretch; gap: 8px; }
.prd-action-row button { min-width: 0; flex: 1; min-height: 40px; }
.prd-panel #order-status { padding: 0 18px 15px; }
.prd-panel .order-status-card { margin-top: 0; }
.message-composer { padding: 10px; }
.message-composer input { height: 36px; border-radius: 3px; }
.send-button { border-radius: 3px; background: #2c6598; }
.ai-summary { padding: 19px; }
.brief-row { padding: 9px 0; }
.assistant-actions { display: grid; gap: 8px; margin-top: 4px; }
.ai-chat-actions { padding: 13px 16px 16px; border-top: 1px solid #e5e9ee; background: #fff; }
.ai-chat-actions .assistant-actions { display: flex; justify-content: flex-end; }
.ai-chat-actions .assistant-actions .primary-button, .ai-chat-actions .assistant-actions .secondary-button { width: auto; min-width: 130px; }
.primary-button.is-disabled { cursor: default; color: #6e7f90; border-color: #d9e2e9; background: #e8eef2; box-shadow: none; }
.order-status-card { display: flex; gap: 9px; padding: 11px; margin-top: 13px; border: 1px solid #d6e5dd; border-radius: 3px; background: #f3f9f5; }
.order-status-icon { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #25815e; font-size: 12px; }
.order-status-card strong, .order-status-card p, .order-status-card small { display: block; }
.order-status-card strong { margin-top: 1px; color: #21654d; font-size: 12px; }
.order-status-card p { margin: 3px 0 4px; color: #617b6f; font-size: 11px; line-height: 1.5; }
.order-status-card small { color: #8aa194; font-size: 10px; }
.filter { border-radius: 3px; }
.project-list-card { padding: 17px; }
.project-icon.large { width: 40px; height: 40px; }
.workspace-top { margin-bottom: 21px; }
.workspace-top h1 { font-size: 23px; font-weight: 600; }
.timeline { margin-bottom: 20px; }
.timeline-item i { border-radius: 3px; }
.workspace-main { min-height: 550px; }
.tabs { padding: 0 20px; }
.tab { padding: 14px 1px 12px; }
.tab-panel { padding: 21px; }
.prd-document { border-radius: 3px; }
.prd-head { padding: 16px 18px 14px; }
.prd-section { padding: 14px 18px; }
.side-info-card { padding: 16px; }
.modal { border-radius: 4px; }
.modal-close { border-radius: 3px; }

@media (max-width: 720px) {
  .auth-screen { min-height: 100vh; padding: 0 16px 16px; }
  .auth-brand { height: 56px; padding: 0 2px; }
  .auth-layout { display: block; width: 100%; margin: 34px 0 25px; }
  .auth-intro { display: none; }
  .auth-card { padding: 25px 20px; }
  .app-shell { display: block; }
  .sidebar { width: 100%; min-height: auto; padding: 15px; }
  .role-card { display: none; }
  .main-nav { display: flex; gap: 2px; overflow-x: auto; margin-top: 15px; }
  .nav-link { flex: 0 0 auto; padding: 8px 10px; font-size: 12px; }
  .sidebar-foot { display: none; }
  .topbar { height: 55px; padding: 0 16px; }
  .view { padding: 25px 16px 42px; }
  .hero, .workspace-top { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr; gap: 10px; margin-bottom: 25px; }
  .assistant-layout { grid-template-columns: 1fr; }
  .conversation-sidebar { min-height: auto; }
  .conversation-list { display: flex; max-height: none; overflow-x: auto; padding-bottom: 2px; }
  .conversation-item { flex: 0 0 180px; }
  .ai-summary { order: -1; }
  .view[data-view="ai"] .prd-panel { height: auto; min-height: 520px; }
  .project-card-top, .project-card-bottom, .project-list-card { align-items: flex-start; flex-direction: column; }
  .project-card-bottom { gap: 8px; }
  .project-card-bottom .secondary-button, .project-list-card > .secondary-button { width: 100%; margin-left: 0; }
  .timeline { display: none; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-aside { grid-template-columns: 1fr; }
  .tabs { gap: 15px; padding: 0 16px; overflow-x: auto; }
  .tab-panel { padding: 19px 15px; }
  .panel-intro { flex-direction: column; }
  .panel-intro .secondary-button { width: 100%; }
}
