:root {
  --ink: #07130f;
  --ink-2: #10231c;
  --paper: #eef3f0;
  --surface: #ffffff;
  --acid: #b8f238;
  --cyan: #3fcabd;
  --text: #173129;
  --muted: #74877f;
  --line: #dce6e1;
  --danger: #d9554d;
  --warning: #e8a22b;
  --shadow: 0 18px 48px rgba(13, 37, 28, .12);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--paper); font-family: var(--font); letter-spacing: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.login-gate { min-height: 100vh; position: relative; overflow: hidden; display: grid; place-items: center; padding: 24px; color: #fff; background: var(--ink); }
.login-grid { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.18) 1px,transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(135deg,#000,transparent 72%); }
.login-card { width: min(430px, 100%); position: relative; padding: 36px; border: 1px solid rgba(255,255,255,.16); background: #0d2119; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.login-brand { margin-bottom: 44px; display: flex; align-items: center; gap: 12px; }
.login-brand b, .login-brand small { display: block; }
.login-brand small { margin-top: 3px; color: #7f938b; font-size: 9px; letter-spacing: 1.5px; }
.login-card h1 { margin: 8px 0 7px; font-size: 28px; }
.login-card > p:not(.section-kicker):not(.login-error) { margin: 0 0 25px; color: #8fa29a; font-size: 12px; }
.login-field { margin-top: 14px; display: grid; gap: 7px; color: #b8c5c0; font-size: 11px; font-weight: 700; }
.login-field > span:last-child { height: 46px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.035); }
.login-field svg { width: 17px; color: var(--cyan); }
.login-field input { min-width: 0; flex: 1; color: #fff; border: 0; outline: 0; background: transparent; }
.login-error { min-height: 18px; margin: 11px 0 0; color: #ff8e87; font-size: 10px; }
.login-submit { width: 100%; margin-top: 7px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 18px 18px; display: flex; flex-direction: column; color: #fff; background: var(--ink); z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--acid); border: 1px solid rgba(184, 242, 56, .45); background: rgba(184, 242, 56, .07); }
.brand-mark svg { width: 22px; }
.brand b, .brand small { display: block; }
.brand b { font-size: 16px; }
.brand small { margin-top: 2px; color: #82968e; font-size: 9px; letter-spacing: 1.5px; }
.sidebar nav { margin-top: 46px; display: grid; gap: 6px; }
.nav-item { width: 100%; height: 46px; padding: 0 13px; display: flex; align-items: center; gap: 12px; color: #9eb0a9; border: 0; border-left: 2px solid transparent; background: transparent; text-align: left; transition: .2s ease; }
.nav-item svg { width: 19px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: var(--acid); border-left-color: var(--acid); background: rgba(184,242,56,.08); }
.sidebar-focus { margin-top: auto; padding: 17px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); }
.sidebar-focus small, .sidebar-focus span { display: block; color: #80948c; font-size: 11px; }
.sidebar-focus strong { display: block; margin: 5px 0 0; color: var(--acid); font-size: 38px; line-height: 1; }
.profile { margin-top: 13px; padding-top: 16px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; color: var(--ink); background: var(--acid); font-weight: 800; }
.profile > span:nth-child(2) { min-width: 0; flex: 1; }
.profile b, .profile small { display: block; }
.profile b { font-size: 13px; }
.profile small { margin-top: 2px; color: #7f938b; font-size: 10px; }
.icon-btn { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; color: inherit; border: 1px solid currentColor; background: transparent; }
.icon-btn svg { width: 18px; }
.profile .icon-btn { width: 34px; height: 34px; color: #7f938b; border-color: rgba(255,255,255,.12); }
.workspace { min-width: 0; }
.topbar { height: 86px; position: sticky; top: 0; z-index: 20; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(238,243,240,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-left small { color: var(--muted); font-size: 11px; }
.topbar h1 { margin: 3px 0 0; font-size: 23px; line-height: 1.1; }
.menu-btn { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.save-state { height: 38px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; border: 1px solid transparent; }
.save-state svg { width: 16px; color: var(--cyan); }
.save-state.saving { color: #80631d; border-color: #ead79d; background: #fff8e2; }
.save-state.success { color: #1b7469; border-color: #bce0da; background: #ebf8f5; }
.save-state.error { color: var(--danger); border-color: #efc7c3; background: #fff0ef; }
.primary-btn, .secondary-btn { min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; font-weight: 700; transition: .2s ease; }
.primary-btn { color: #102017; background: var(--acid); }
.primary-btn:hover { background: #cdf76f; transform: translateY(-1px); }
.secondary-btn { color: var(--text); background: var(--surface); border-color: var(--line); }
.secondary-btn:hover { border-color: #8fa79d; }
.primary-btn svg, .secondary-btn svg { width: 17px; }
.main-content { padding: 25px 30px 50px; }
.section-kicker { margin: 0 0 6px; color: #168f83; font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.section-title { margin: 0; font-size: 21px; }
.section-note { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 22px; align-items: start; }
.content-column { min-width: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 11px; }
.metric { min-height: 108px; padding: 17px; position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.metric::after { content: ""; width: 54px; height: 3px; position: absolute; left: 17px; bottom: 0; background: var(--cyan); }
.metric.acid::after { background: var(--acid); }
.metric.warn::after { background: var(--warning); }
.metric small { color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 8px; font-size: 30px; line-height: 1; }
.metric span { position: absolute; right: 14px; top: 16px; width: 30px; height: 30px; display: grid; place-items: center; color: #258f83; background: #e9f6f3; }
.metric span svg { width: 16px; }
.toolbar { margin: 21px 0 12px; display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.search-box { height: 40px; min-width: 220px; display: flex; align-items: center; gap: 8px; padding: 0 11px; background: #fff; border: 1px solid var(--line); }
.search-box svg { width: 16px; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
.segmented { display: inline-flex; padding: 3px; background: #e1e9e5; }
.segmented button { min-height: 34px; padding: 0 12px; color: var(--muted); border: 0; background: transparent; font-size: 11px; font-weight: 700; }
.segmented button.active { color: var(--text); background: #fff; box-shadow: 0 2px 8px rgba(10,30,21,.08); }
.project-list { display: grid; gap: 9px; }
.project-row { position: relative; display: grid; grid-template-columns: 42px minmax(180px,1.4fr) 92px 92px 118px 102px 32px; align-items: center; gap: 10px; padding: 14px 13px; background: var(--surface); border: 1px solid var(--line); transition: .2s ease; }
.project-row:hover { border-color: #9dafaa; box-shadow: 0 8px 22px rgba(13,37,28,.07); }
.project-row.selected { border-color: #82b51d; box-shadow: inset 3px 0 var(--acid); }
.project-select { width: 29px; height: 29px; display: grid; place-items: center; color: #9baaa4; border: 1px solid #cfdad5; background: #fff; }
.project-row.selected .project-select { color: var(--ink); border-color: var(--acid); background: var(--acid); }
.project-name { min-width: 0; cursor: pointer; }
.project-name strong, .project-name small { display: block; }
.project-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.project-name small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.tag { width: fit-content; max-width: 100%; padding: 4px 7px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #157b71; background: #e5f5f2; font-size: 10px; font-weight: 700; }
.tag.research { color: #70611d; background: #f8f1cc; }
.tag.composite { color: #6b518f; background: #eee7f6; }
.project-meta { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-person small, .quick-person b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-person small { color: var(--muted); font-size: 8px; }
.quick-person b { margin-top: 3px; font-size: 11px; }
.quick-progress { min-width: 0; }
.quick-progress > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.quick-progress > span b { color: var(--text); font-size: 10px; }
.progress-track { height: 5px; margin-top: 6px; overflow: hidden; background: #e4ebe7; }
.progress-track i { height: 100%; display: block; background: var(--cyan); }
.due { font-size: 11px; font-weight: 700; }
.due.urgent { color: var(--danger); }
.row-menu { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; color: var(--muted); border: 0; background: transparent; }
.row-menu svg { width: 17px; }
.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #bdcbc5; }
.empty-state svg { width: 32px; margin-bottom: 8px; color: #8aa49a; }
.focus-rail { position: sticky; top: 111px; overflow: hidden; color: #fff; background: var(--ink); box-shadow: var(--shadow); }
.focus-head { padding: 20px; display: flex; align-items: start; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.1); }
.focus-head small { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: 1.6px; }
.focus-head h2 { margin: 5px 0 0; font-size: 18px; }
.focus-live { display: inline-flex; align-items: center; gap: 6px; color: #91a49d; font-size: 9px; }
.focus-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px var(--acid); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.focus-body { max-height: calc(100vh - 245px); overflow: auto; }
.focus-empty { min-height: 360px; padding: 55px 26px; display: grid; place-content: center; text-align: center; color: #8da098; }
.focus-empty span { width: 58px; height: 58px; margin: auto auto 14px; display: grid; place-items: center; border: 1px solid rgba(184,242,56,.28); color: var(--acid); }
.focus-empty svg { width: 27px; }
.focus-empty b { color: #dce6e1; font-size: 14px; }
.focus-empty p { margin: 8px 0 0; font-size: 11px; line-height: 1.7; }
.focus-task { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.focus-task-top { display: flex; gap: 11px; align-items: start; }
.focus-number { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; color: var(--ink); background: var(--acid); font: 800 11px/1 var(--font); }
.focus-task-name { min-width: 0; flex: 1; }
.focus-task-name b, .focus-task-name small { display: block; }
.focus-task-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.focus-task-name small { margin-top: 4px; color: #83968e; font-size: 9px; }
.focus-time { margin: 16px 0 10px; display: flex; align-items: baseline; gap: 5px; }
.focus-time strong { font-size: 31px; line-height: 1; font-variant-numeric: tabular-nums; }
.focus-time span { color: #80938b; font-size: 10px; }
.battery { height: 12px; position: relative; padding: 2px; border: 1px solid rgba(255,255,255,.25); }
.battery::after { content: ""; width: 3px; height: 6px; position: absolute; right: -4px; top: 2px; background: rgba(255,255,255,.25); }
.battery i { height: 100%; display: block; background: var(--acid); transition: width .5s linear; }
.battery.low i { background: var(--danger); }
.focus-foot { margin-top: 8px; display: flex; justify-content: space-between; color: #7f938b; font-size: 9px; }
.focus-controls { display: flex; gap: 6px; }
.focus-controls button { width: 30px; height: 30px; margin-top: 10px; display: grid; place-items: center; color: #9eb0a9; border: 1px solid rgba(255,255,255,.14); background: transparent; }
.focus-controls button:hover { color: var(--acid); border-color: var(--acid); }
.focus-controls svg { width: 14px; }
.page-head { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.project-board { display: grid; grid-template-columns: minmax(0,1fr) 460px; gap: 18px; align-items: start; }
.project-board > * { min-width: 0; }
.project-board .project-row { grid-template-columns: 34px minmax(120px,1fr) 70px 70px 92px 30px; gap: 7px; }
.project-board .project-row > .due { display: none; }
.detail-panel { min-height: 420px; padding: 22px; position: static; background: #fff; border: 1px solid var(--line); }
.detail-panel h2 { margin: 8px 0 4px; font-size: 20px; }
.detail-labels { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0 18px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.detail-item { padding: 11px; background: #f4f7f5; }
.detail-item small, .detail-item b { display: block; }
.detail-item small { color: var(--muted); font-size: 9px; }
.detail-item b { margin-top: 5px; font-size: 12px; overflow-wrap: anywhere; }
.detail-editor { margin-top: 17px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.detail-editor .field.full { grid-column: 1 / -1; }
.detail-editor .field input, .detail-editor .field select, .detail-editor .field textarea { min-height: 38px; padding: 8px 9px; font-size: 11px; }
.detail-editor-actions { grid-column: 1 / -1; position: sticky; bottom: -22px; z-index: 3; margin: 4px -22px -22px; padding: 12px 22px; display: flex; gap: 7px; justify-content: flex-end; background: rgba(255,255,255,.95); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
.identity-note { padding: 9px 10px; display: flex; align-items: center; gap: 7px; color: #24766c; background: #ebf8f5; font-size: 9px; }
.identity-note svg { width: 14px; }
.project-timeline { margin: 22px 0 4px; padding: 15px 4px 2px; overflow-x: auto; }
.timeline-track { min-width: 420px; height: 76px; position: relative; margin: 0 10px; }
.timeline-line { height: 2px; position: absolute; left: 0; right: 0; top: 26px; background: #cbd8d2; }
.timeline-line i { height: 100%; display: block; background: var(--cyan); }
.timeline-point { width: 70px; position: absolute; top: 18px; transform: translateX(-50%); text-align: center; }
.timeline-point::before { content: ""; width: 9px; height: 9px; display: block; margin: 4px auto 7px; border: 2px solid #fff; border-radius: 50%; background: #8ba098; box-shadow: 0 0 0 1px #8ba098; }
.timeline-point.done::before, .timeline-point.today::before { background: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.timeline-point.due::before { background: var(--acid); box-shadow: 0 0 0 1px #84ae28; }
.timeline-point b, .timeline-point small { display: block; white-space: nowrap; }
.timeline-point b { font-size: 9px; }
.timeline-point small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.task-section { margin-top: 22px; }
.task-section-head { display: flex; justify-content: space-between; align-items: center; }
.task-section h3 { margin: 0; font-size: 14px; }
.task-section-head button { width: 30px; height: 30px; }
.task-list { margin-top: 9px; display: grid; gap: 7px; }
.task-card { position: relative; overflow: hidden; touch-action: pan-y; background: #f6f8f7; border-left: 3px solid var(--cyan); user-select: none; }
.task-card.completed { filter: grayscale(1); opacity: .58; border-left-color: #9aa5a0; }
.task-card::before { content: "完成"; position: absolute; inset: 0; display: flex; align-items: center; padding-left: 18px; color: var(--ink); background: var(--acid); font-size: 12px; font-weight: 800; }
.task-inner { position: relative; z-index: 1; padding: 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; background: #f6f8f7; transition: transform .18s ease; }
.task-card.swiping .task-inner { transition: none; }
.task-inner b, .task-inner small { display: block; }
.task-inner b { font-size: 12px; }
.task-inner small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.task-actions { display: flex; gap: 3px; }
.task-actions button { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; color: var(--muted); border: 0; background: transparent; }
.task-actions svg { width: 14px; }
.swipe-hint { margin-top: 10px; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 9px; }
.swipe-hint svg { width: 13px; }
.library-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.library-panel { background: #fff; border: 1px solid var(--line); }
.library-panel header { padding: 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.library-panel header h2 { margin: 0; font-size: 16px; }
.library-list { display: grid; }
.library-item { min-height: 57px; padding: 10px 15px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #edf1ef; }
.library-item:last-child { border-bottom: 0; }
.library-item > span { min-width: 0; flex: 1; }
.library-item b, .library-item small { display: block; }
.library-item b { font-size: 12px; }
.library-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.library-item button { width: 29px; height: 29px; padding: 0; display: grid; place-items: center; color: var(--muted); border: 0; background: transparent; }
.library-item button svg { width: 14px; }
.member-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.member-card { padding: 18px; background: #fff; border: 1px solid var(--line); }
.member-card-head { display: flex; align-items: center; gap: 11px; }
.member-card-head > span:nth-child(2) { min-width: 0; flex: 1; }
.member-card h3 { margin: 0; font-size: 14px; }
.member-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.member-card-actions { margin-top: 15px; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #edf1ef; }
.member-card-actions span { color: var(--muted); font-size: 9px; }
.member-card-actions div { display: flex; gap: 4px; }
.member-card-actions button { width: 29px; height: 29px; padding: 0; display: grid; place-items: center; color: var(--muted); border: 0; background: transparent; }
.member-card-actions svg { width: 14px; }
.dialog-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; visibility: hidden; opacity: 0; transition: .2s ease; }
.dialog-layer.open { visibility: visible; opacity: 1; }
.dialog-backdrop { position: absolute; inset: 0; background: rgba(3,12,9,.72); backdrop-filter: blur(5px); }
.dialog { width: min(700px, 100%); max-height: min(780px, calc(100vh - 40px)); position: relative; display: flex; flex-direction: column; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.dialog > header { padding: 20px 23px; display: flex; justify-content: space-between; align-items: start; color: #fff; background: var(--ink); }
.dialog header small { color: var(--cyan); font-size: 9px; letter-spacing: 1.7px; }
.dialog header h2 { margin: 5px 0 0; font-size: 19px; }
.dialog header .icon-btn { color: #a8b8b1; border-color: rgba(255,255,255,.15); }
.dialog form { min-height: 0; display: flex; flex-direction: column; }
.dialog-body { padding: 22px 23px; overflow: auto; }
.dialog footer { padding: 14px 23px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.field { min-width: 0; display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--text); border: 1px solid #cfdad5; outline: 0; background: #fff; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #59a99f; box-shadow: 0 0 0 3px rgba(63,202,189,.12); }
.field small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.check-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.check-chip input { position: absolute; opacity: 0; }
.check-chip span { padding: 7px 9px; display: block; color: var(--muted); border: 1px solid var(--line); font-size: 10px; cursor: pointer; }
.check-chip input:checked + span { color: #155f56; border-color: var(--cyan); background: #e7f7f4; }
.danger-btn { color: var(--danger); border-color: #efc5c2; }
.ai-panel { width: min(410px, 100vw); position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; color: #fff; background: var(--ink); box-shadow: -25px 0 70px rgba(0,0,0,.3); transform: translateX(105%); transition: .3s ease; }
.ai-panel.open { transform: translateX(0); }
.ai-panel > header { min-height: 78px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.1); }
.ai-panel > header > div { display: flex; align-items: center; gap: 10px; }
.ai-symbol { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); background: var(--acid); }
.ai-symbol svg { width: 19px; }
.ai-panel header b, .ai-panel header small { display: block; }
.ai-panel header b { margin-top: 3px; font-size: 14px; }
.ai-panel header small { color: var(--cyan); font-size: 8px; letter-spacing: 1.3px; }
.ai-panel header .icon-btn { color: #91a49c; border-color: rgba(255,255,255,.14); }
.ai-context { margin: 12px 16px 0; padding: 10px; display: flex; gap: 8px; align-items: center; color: #90a39b; background: rgba(255,255,255,.04); font-size: 9px; }
.ai-context svg { width: 14px; color: var(--cyan); }
.ai-messages { min-height: 0; flex: 1; padding: 17px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.message { max-width: 88%; padding: 11px 12px; color: #c5d1cc; background: #142920; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.message.user { align-self: flex-end; color: var(--ink); background: var(--acid); }
.message.loading { color: #81958d; }
.ai-prompts { padding: 0 16px 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.ai-prompts button { padding: 6px 8px; color: #90a39b; border: 1px solid rgba(255,255,255,.12); background: transparent; font-size: 9px; }
.ai-form { margin: 0 16px 16px; padding: 8px; display: flex; align-items: end; gap: 8px; background: #fff; }
.ai-form textarea { min-width: 0; flex: 1; padding: 6px; resize: none; border: 0; outline: 0; color: var(--text); }
.ai-form button { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; color: var(--ink); border: 0; background: var(--acid); }
.ai-form svg { width: 17px; }
.toast { max-width: min(420px, calc(100vw - 30px)); position: fixed; z-index: 150; right: 20px; bottom: 20px; padding: 12px 15px; display: flex; align-items: center; gap: 9px; color: #fff; background: var(--ink-2); box-shadow: var(--shadow); transform: translateY(25px); opacity: 0; pointer-events: none; transition: .25s ease; font-size: 11px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error svg { color: var(--danger); }
.toast svg { width: 17px; color: var(--acid); }
@media (max-width: 1400px) {
  .project-row { grid-template-columns: 38px minmax(140px,1fr) 72px 72px 104px 30px; }
  .project-row > .due { display: none; }
}
@media (max-width: 1120px) {
  .overview-grid { grid-template-columns: minmax(0,1fr) 310px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-row { grid-template-columns: 38px minmax(160px,1.4fr) 84px 110px 92px 30px; }
  .project-row > .quick-person.checker { display: none; }
  .project-board { grid-template-columns: minmax(0,1fr) 430px; }
}
@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { width: 246px; position: fixed; left: 0; transform: translateX(-105%); transition: .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: grid; }
  .save-state { display: none; }
  .overview-grid, .project-board { grid-template-columns: 1fr; }
  .focus-rail, .detail-panel { position: static; }
  .focus-body { max-height: none; }
  .focus-empty { min-height: 230px; }
  .detail-panel { min-height: 0; }
  .member-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .topbar { height: 74px; padding: 0 14px; }
  .topbar h1 { font-size: 18px; }
  .topbar-actions .secondary-btn { width: 42px; padding: 0; }
  .topbar-actions .secondary-btn span { display: none; }
  .topbar-actions .primary-btn { width: 42px; padding: 0; }
  .topbar-actions .primary-btn span { display: none; }
  .main-content { padding: 17px 14px 40px; }
  .metric-grid { gap: 8px; }
  .metric { min-height: 96px; padding: 14px; }
  .metric strong { font-size: 25px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; }
  .segmented { overflow-x: auto; }
  .segmented button { flex: 1 0 auto; }
  .project-row { grid-template-columns: 34px minmax(0,1fr) 30px; gap: 9px; }
  .project-board .project-row { grid-template-columns: 34px minmax(0,1fr) 30px; gap: 9px; }
  .project-row > .tag, .project-row > .project-meta, .project-row > .due, .project-row > .quick-person, .project-row > .quick-progress { display: none; }
  .page-head { align-items: stretch; flex-direction: column; }
  .library-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .dialog-layer { padding: 0; align-items: end; }
  .dialog { max-height: 94vh; }
  .dialog > header { padding: 17px; }
  .dialog-body { padding: 17px; }
  .dialog footer { padding: 12px 17px; }
  .login-card { padding: 26px 20px; }
  .login-brand { margin-bottom: 32px; }
  .detail-editor { grid-template-columns: 1fr; }
  .detail-editor .field.full, .detail-editor-actions { grid-column: auto; }
  .member-grid { grid-template-columns: 1fr; }
}
