:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f9faff;
  --surface-muted: #f1f3f8;
  --ink: #182238;
  --ink-soft: #55627a;
  --muted: #8993a7;
  --line: #e8ebf2;
  --line-strong: #dce1eb;
  --primary: #4f5ff3;
  --primary-dark: #3e4edb;
  --primary-soft: #eef0ff;
  --green: #24a276;
  --green-soft: #e9f8f2;
  --orange: #e8914d;
  --orange-soft: #fff3e8;
  --red: #dd6b78;
  --red-soft: #fff0f2;
  --blue: #4c8fe8;
  --blue-soft: #ebf4ff;
  --violet: #8c71d6;
  --violet-soft: #f2efff;
  --shadow-sm: 0 4px 14px rgba(28, 39, 70, 0.04);
  --shadow-md: 0 18px 48px rgba(27, 35, 70, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --sidebar-width: 246px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [data-action], [data-view] { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(79, 95, 243, 0.22); outline-offset: 2px; }
.icon { width: 17px; height: 17px; display: inline-block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { width: var(--sidebar-width); min-height: 100vh; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 26px 16px 18px; background: #fbfcff; border-right: 1px solid var(--line); z-index: 20; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 10px; }
.brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; align-items: end; }
.brand-mark span { border-radius: 5px 5px 7px 7px; background: var(--primary); display: block; }
.brand-mark span:nth-child(1) { height: 15px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 23px; opacity: .8; }
.brand-mark span:nth-child(3) { height: 29px; }
.brand-name { font-size: 19px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.brand-subtitle { color: var(--muted); font-size: 11px; margin-top: 4px; letter-spacing: .08em; }
.workspace-switcher { margin: 33px 0 26px; padding: 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.workspace-avatar, .user-avatar, .topbar-avatar { display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(145deg, #6876f7, #4f5ff3); }
.workspace-avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.workspace-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.workspace-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-copy span { color: var(--muted); font-size: 10px; margin-top: 1px; }
.workspace-chevron { color: var(--muted); display: flex; }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { color: #a2aabc; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 0 12px 9px; }
.nav-label-spaced { margin-top: 26px; }
.nav-item, .sidebar-action { appearance: none; border: 0; background: transparent; display: flex; align-items: center; width: 100%; gap: 12px; border-radius: 10px; padding: 11px 12px; color: var(--ink-soft); text-align: left; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover, .sidebar-action:hover { background: var(--surface-muted); color: var(--ink); }
.nav-item.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.nav-item .icon, .sidebar-action .icon { width: 17px; height: 17px; }
.nav-count { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 600; }
.nav-item.active .nav-count { color: var(--primary); }
.sidebar-bottom { margin-top: auto; }
.sidebar-tip { display: flex; gap: 10px; margin: 0 5px 17px; padding: 13px 11px; border-radius: 14px; background: linear-gradient(140deg, #f2f3ff, #f7f7ff); border: 1px solid #e5e7ff; }
.tip-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; color: var(--primary); background: #fff; flex: 0 0 auto; }
.tip-icon .icon { width: 15px; height: 15px; }
.sidebar-tip strong { font-size: 11px; display: block; }
.sidebar-tip p { margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.sidebar-action { color: var(--muted); font-size: 11px; margin-bottom: 12px; padding: 7px 11px; }
.sidebar-action .icon { width: 14px; height: 14px; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 13px 8px 0; border-top: 1px solid var(--line); }
.user-avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.user-copy { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.user-copy strong { font-size: 12px; }
.user-copy span { color: var(--muted); font-size: 10px; }
.sidebar-user > .icon { color: var(--muted); width: 16px; }

.main-shell { margin-left: var(--sidebar-width); min-width: 0; flex: 1; }
.topbar { height: 75px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; background: rgba(246,247,251,.82); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.topbar-left, .topbar-actions, .breadcrumbs, .global-search { display: flex; align-items: center; }
.breadcrumbs { gap: 10px; font-size: 12px; color: var(--muted); }
.breadcrumbs strong { color: var(--ink); font-size: 13px; }
.breadcrumb-slash { color: #c2c7d4; }
.topbar-actions { gap: 11px; }
.global-search { width: 228px; gap: 8px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.global-search .icon { width: 15px; height: 15px; }
.global-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; color: var(--ink); }
.global-search input::placeholder { color: #a0a8b8; }
.global-search kbd { white-space: nowrap; font-size: 10px; color: #a4acba; border: 1px solid var(--line); padding: 2px 4px; border-radius: 4px; background: #fafbfe; }
.icon-button, .mobile-menu { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; position: relative; }
.icon-button:hover, .mobile-menu:hover { background: var(--surface-muted); color: var(--ink); }
.icon-button .icon { width: 17px; height: 17px; }
.notification-button i { position: absolute; width: 6px; height: 6px; top: 6px; right: 6px; border-radius: 50%; background: var(--red); border: 1.5px solid var(--bg); }
.topbar-avatar { width: 30px; height: 30px; border-radius: 10px; font-size: 11px; margin-left: 1px; }
.mobile-menu { display: none; }

.content { max-width: 1540px; margin: 0 auto; padding: 34px 42px 54px; }
.hero { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin-bottom: 29px; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .04em; margin: 0 0 10px; }
.hero h1 { font-size: clamp(24px, 2.7vw, 34px); line-height: 1.18; letter-spacing: -.04em; margin: 0; font-weight: 760; }
.hero p:not(.eyebrow) { margin: 11px 0 0; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; gap: 9px; align-items: center; flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 9px; padding: 10px 14px; font-size: 12px; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 6px 13px rgba(79, 95, 243, .18); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 18px rgba(79, 95, 243, .24); }
.btn-secondary { color: var(--ink-soft); background: var(--surface); border-color: var(--line); }
.btn-secondary:hover { color: var(--ink); border-color: var(--line-strong); background: #fff; }
.btn-quiet { color: var(--ink-soft); background: transparent; border-color: transparent; padding-left: 8px; padding-right: 8px; }
.btn-quiet:hover { background: var(--surface-muted); }
.btn-danger { color: var(--red); background: var(--red-soft); border-color: #f8d8de; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 19px; min-height: 128px; box-shadow: var(--shadow-sm); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; }
.metric-icon .icon { width: 15px; height: 15px; }
.metric-icon.blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.orange { color: var(--orange); background: var(--orange-soft); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.violet { color: var(--violet); background: var(--violet-soft); }
.metric-value { font-size: 29px; font-weight: 760; letter-spacing: -.04em; line-height: 1; margin-top: 16px; }
.metric-foot { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.metric-foot .trend { color: var(--green); font-weight: 700; }
.metric-foot .trend.warn { color: var(--orange); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.54fr) minmax(320px, .86fr); gap: 21px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.panel-heading { padding: 20px 21px 15px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.panel-heading h2, .page-heading h1 { margin: 0; letter-spacing: -.03em; }
.panel-heading h2 { font-size: 15px; }
.panel-heading p { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.text-link { color: var(--primary); border: 0; background: transparent; padding: 5px; font-size: 11px; font-weight: 700; }
.text-link:hover { color: var(--primary-dark); }
.text-link .icon { width: 13px; height: 13px; vertical-align: -3px; }
.project-table-head, .project-row { display: grid; grid-template-columns: minmax(180px, 1.45fr) minmax(105px, .68fr) minmax(130px, .8fr) 72px; gap: 15px; align-items: center; }
.project-table-head { padding: 0 21px 9px; color: #a2aabc; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.project-row { padding: 14px 21px; border-top: 1px solid var(--line); transition: background .18s ease; cursor: pointer; }
.project-row:hover { background: var(--surface-soft); }
.project-name-cell, .project-meta, .project-owner { min-width: 0; display: flex; align-items: center; }
.project-name-cell { gap: 10px; }
.project-color { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #fff; font-size: 11px; font-weight: 800; flex: 0 0 auto; }
.project-color.orange { background: linear-gradient(135deg, #f2aa62, #e98742); }
.project-color.blue { background: linear-gradient(135deg, #72aaf0, #4b85db); }
.project-color.violet { background: linear-gradient(135deg, #a28ae1, #7e61cb); }
.project-color.green { background: linear-gradient(135deg, #59c99b, #279d73); }
.project-name-copy { min-width: 0; }
.project-name-copy strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-name-copy span { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-meta { gap: 8px; font-size: 11px; color: var(--ink-soft); }
.project-meta .icon { width: 14px; height: 14px; color: var(--muted); }
.project-owner { gap: 7px; font-size: 11px; color: var(--ink-soft); }
.mini-avatar { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; font-size: 9px; font-weight: 700; color: #fff; background: #a0a8bb; }
.mini-avatar.me { background: #6673ef; }
.progress-copy { text-align: right; font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.progress-bar { width: 100%; height: 5px; margin-top: 7px; border-radius: 10px; overflow: hidden; background: #edf0f5; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--primary); }
.project-row .progress-bar { width: 72px; margin-left: auto; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 5px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.active { color: var(--green); background: var(--green-soft); }
.status-badge.planning { color: var(--blue); background: var(--blue-soft); }
.status-badge.paused { color: var(--orange); background: var(--orange-soft); }
.status-badge.done { color: #798397; background: var(--surface-muted); }

.focus-panel { min-height: 100%; }
.focus-list { padding: 0 21px 10px; }
.focus-item { display: flex; gap: 10px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); cursor: pointer; }
.focus-item:first-child { border-top: 0; }
.focus-check { width: 16px; height: 16px; border: 1.5px solid #c9cfdb; border-radius: 5px; flex: 0 0 auto; margin-top: 2px; position: relative; transition: background .18s ease, border-color .18s ease; }
.focus-check.done { background: var(--green); border-color: var(--green); }
.focus-check.done::after { content: ""; position: absolute; width: 6px; height: 3px; border-left: 1.5px solid white; border-bottom: 1.5px solid white; transform: rotate(-45deg); left: 4px; top: 4px; }
.focus-copy { flex: 1; min-width: 0; }
.focus-copy strong { display: block; font-size: 11px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-copy span { color: var(--muted); display: block; font-size: 10px; margin-top: 3px; }
.focus-date { color: var(--orange); font-size: 10px; white-space: nowrap; margin-top: 2px; }
.focus-date.overdue { color: var(--red); }
.focus-date.done-date { color: var(--green); }
.empty-inline { color: var(--muted); font-size: 12px; padding: 22px 0; text-align: center; }
.activity-panel { margin-top: 21px; }
.activity-list { padding: 0 21px 16px; }
.activity-item { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.activity-dot { width: 23px; height: 23px; border-radius: 8px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); flex: 0 0 auto; }
.activity-dot .icon { width: 12px; height: 12px; }
.activity-copy { min-width: 0; font-size: 11px; color: var(--ink-soft); line-height: 1.45; }
.activity-copy strong { color: var(--ink); font-weight: 650; }
.activity-copy span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }

.page-heading { display: flex; justify-content: space-between; gap: 22px; align-items: flex-end; margin-bottom: 25px; }
.page-heading h1 { font-size: 27px; line-height: 1.15; }
.page-heading p { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.page-actions { display: flex; align-items: center; gap: 9px; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.filter-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-pill { border: 1px solid transparent; color: var(--muted); background: transparent; padding: 7px 11px; border-radius: 8px; font-size: 11px; font-weight: 650; }
.filter-pill:hover { color: var(--ink); background: var(--surface); }
.filter-pill.active { color: var(--primary); background: var(--primary-soft); }
.select-control { color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 11px; outline: none; }
.select-control:hover { border-color: var(--line-strong); }
.board-filter-label { color: var(--muted); font-size: 11px; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card { padding: 18px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.project-card:hover { transform: translateY(-2px); border-color: #d9ddf9; box-shadow: 0 13px 27px rgba(29, 39, 89, .08); }
.project-card-top, .card-action-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-card-title { display: flex; gap: 10px; align-items: center; min-width: 0; }
.project-card-title .project-color { width: 35px; height: 35px; }
.project-card-title strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card-title span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.project-card-description { color: var(--ink-soft); font-size: 11px; line-height: 1.55; min-height: 36px; margin: 18px 0; }
.project-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.project-card-dates { color: var(--muted); font-size: 10px; }
.project-card-progress { width: 120px; }
.project-card-progress .progress-copy { display: flex; justify-content: space-between; align-items: center; font-size: 10px; }
.project-card-progress .progress-copy span { color: var(--muted); font-weight: 500; }
.project-card-progress .progress-bar { margin-top: 5px; }
.avatar-stack { display: flex; padding-left: 5px; margin-bottom: 7px; }
.avatar-stack .mini-avatar { margin-left: -5px; border: 2px solid #fff; }
.avatar-stack .mini-avatar:first-child { margin-left: 0; }
.empty-state { padding: 52px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: rgba(255,255,255,.45); }
.empty-state .empty-icon { width: 44px; height: 44px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 14px; color: var(--primary); background: var(--primary-soft); }
.empty-state .icon { width: 20px; height: 20px; }
.empty-state strong { display: block; color: var(--ink); font-size: 13px; }
.empty-state p { font-size: 11px; margin: 5px 0 16px; }

.board-toolbar { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 17px; }
.board-toolbar-left { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.board-column { min-height: 490px; border: 1px solid var(--line); border-radius: 13px; background: rgba(239,242,248,.56); transition: background .18s ease, border-color .18s ease; }
.board-column.drag-over { background: #f0f2ff; border-color: #cbd0ff; }
.column-header { padding: 14px 13px 11px; display: flex; align-items: center; justify-content: space-between; }
.column-title { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 750; }
.column-dot { width: 7px; height: 7px; border-radius: 50%; }
.column-dot.todo { background: #9da7b7; }
.column-dot.in-progress { background: var(--primary); }
.column-dot.review { background: var(--orange); }
.column-dot.done { background: var(--green); }
.column-count { color: var(--muted); font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: rgba(255,255,255,.78); }
.column-body { min-height: 430px; padding: 0 9px 9px; }
.task-card { padding: 13px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 4px 10px rgba(40, 47, 75, .035); cursor: grab; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.task-card:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(40, 47, 75, .08); }
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: .4; }
.task-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.task-card-title { font-size: 11px; font-weight: 680; line-height: 1.45; }
.task-priority { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; }
.task-priority.high { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.task-priority.medium { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.task-priority.low { background: #9aa4b6; box-shadow: 0 0 0 3px var(--surface-muted); }
.task-card-description { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 8px 0 10px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.task-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.task-tag { color: var(--ink-soft); background: var(--surface-muted); border-radius: 4px; padding: 3px 5px; font-size: 9px; }
.task-card-footer { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 9px; }
.task-assignee { display: inline-flex; align-items: center; gap: 5px; }
.task-assignee .mini-avatar { width: 18px; height: 18px; border-radius: 6px; font-size: 8px; }
.task-due { display: inline-flex; align-items: center; gap: 4px; }
.task-due .icon { width: 11px; height: 11px; }
.task-due.overdue { color: var(--red); }
.task-due.today { color: var(--orange); }
.add-task-inline { width: 100%; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px dashed #d3d8e5; border-radius: 9px; padding: 9px 8px; color: var(--muted); background: transparent; font-size: 10px; }
.add-task-inline:hover { color: var(--primary); border-color: #bfc5fa; background: rgba(255,255,255,.65); }
.add-task-inline .icon { width: 13px; height: 13px; }
.column-empty { color: #a8afbe; padding: 39px 8px; text-align: center; font-size: 10px; }

.detail-back { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); border: 0; background: transparent; padding: 0; margin-bottom: 18px; font-size: 11px; }
.detail-back:hover { color: var(--primary); }
.detail-back .icon { width: 14px; height: 14px; }
.detail-hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 17px; }
.detail-title { display: flex; gap: 13px; align-items: flex-start; min-width: 0; }
.detail-title .project-color { width: 44px; height: 44px; border-radius: 13px; font-size: 15px; }
.detail-title h1 { font-size: 22px; letter-spacing: -.035em; margin: 1px 0 5px; }
.detail-title p { color: var(--muted); font-size: 11px; margin: 0; max-width: 650px; }
.detail-actions { display: flex; gap: 8px; flex-shrink: 0; }
.detail-summary { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; margin-top: 20px; }
.detail-summary-item { padding: 12px 14px; background: var(--surface); }
.detail-summary-item span { display: block; color: var(--muted); font-size: 10px; }
.detail-summary-item strong { display: block; font-size: 14px; margin-top: 4px; }
.detail-progress { width: min(320px, 100%); margin: -2px 0 22px auto; }
.detail-progress .progress-copy { display: flex; justify-content: space-between; font-size: 10px; }
.detail-progress .progress-copy span { color: var(--muted); font-weight: 500; }
.detail-tabs { display: flex; align-items: center; gap: 19px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.detail-tab { border: 0; background: transparent; padding: 0 1px 11px; color: var(--muted); font-size: 11px; font-weight: 700; border-bottom: 2px solid transparent; }
.detail-tab.active { color: var(--primary); border-color: var(--primary); }
.detail-overview-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); gap: 17px; }
.detail-info-card { padding: 19px; }
.detail-info-card h3 { margin: 0 0 13px; font-size: 13px; }
.detail-description { color: var(--ink-soft); font-size: 12px; line-height: 1.75; margin: 0; }
.detail-info-list { display: grid; gap: 11px; }
.detail-info-row { display: flex; justify-content: space-between; gap: 15px; font-size: 11px; }
.detail-info-row span { color: var(--muted); }
.detail-info-row strong { color: var(--ink-soft); font-weight: 650; text-align: right; }

.timeline-panel { padding-bottom: 8px; overflow: hidden; }
.timeline-header, .timeline-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) 130px minmax(280px, 1.8fr) 100px; gap: 17px; align-items: center; }
.timeline-header { padding: 0 21px 11px; color: #a2aabc; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.timeline-row { padding: 14px 21px; border-top: 1px solid var(--line); }
.timeline-project { display: flex; align-items: center; gap: 9px; min-width: 0; }
.timeline-project .project-color { width: 27px; height: 27px; border-radius: 8px; font-size: 10px; }
.timeline-project strong { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-project span { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }
.timeline-dates { color: var(--ink-soft); font-size: 10px; }
.timeline-track { height: 22px; position: relative; background: #f0f2f6; border-radius: 7px; overflow: hidden; }
.timeline-months { display: flex; justify-content: space-between; color: #adb4c3; font-size: 9px; margin-bottom: 5px; }
.timeline-bar { position: absolute; top: 4px; bottom: 4px; border-radius: 5px; min-width: 18px; }
.timeline-bar.orange { background: #f4b276; }
.timeline-bar.blue { background: #7eaff1; }
.timeline-bar.violet { background: #ad98e5; }
.timeline-bar.green { background: #6bd0aa; }
.timeline-status { justify-self: end; }

.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(22, 29, 51, .39); backdrop-filter: blur(5px); z-index: 50; animation: fade-in .18s ease; }
.modal { width: min(590px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow: auto; border: 1px solid rgba(255,255,255,.7); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-md); animation: modal-in .2s ease; }
.modal.modal-small { width: min(420px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 21px 22px 16px; }
.modal-header h2 { font-size: 16px; margin: 0; letter-spacing: -.025em; }
.modal-header p { color: var(--muted); font-size: 11px; margin: 5px 0 0; }
.modal-close { border: 0; background: var(--surface-muted); color: var(--muted); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; }
.modal-close:hover { color: var(--ink); background: var(--line); }
.modal-close .icon { width: 15px; height: 15px; }
.modal form { padding: 0 22px 21px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.form-field input, .form-field textarea, .form-field select { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; color: var(--ink); padding: 10px 11px; outline: none; font-size: 12px; transition: border-color .18s ease, background .18s ease; }
.form-field textarea { resize: vertical; min-height: 78px; line-height: 1.6; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { background: #fff; border-color: #aeb5fa; }
.form-helper { color: var(--muted); font-size: 10px; margin-top: -1px; font-weight: 400; }
.color-options { display: flex; gap: 8px; padding-top: 3px; }
.color-option { width: 25px; height: 25px; padding: 0; border: 2px solid transparent; border-radius: 8px; }
.color-option.selected { outline: 2px solid var(--primary); outline-offset: 2px; }
.color-option.orange { background: #e98742; }
.color-option.blue { background: #4b85db; }
.color-option.violet { background: #7e61cb; }
.color-option.green { background: #279d73; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--line); }
.modal-footer-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.toast-container { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 9px; z-index: 80; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); font-size: 11px; animation: toast-in .25s ease; }
.toast .toast-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: var(--green); background: var(--green-soft); }
.toast .icon { width: 13px; height: 13px; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1120px) {
  .content, .topbar { padding-left: 28px; padding-right: 28px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .focus-panel { min-height: 0; }
  .metric-card { min-height: 118px; }
}
@media (max-width: 860px) {
  :root { --sidebar-width: 232px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-md); }
  .sidebar.open { transform: translateX(0); }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: grid; margin-right: 10px; }
  .topbar { padding-left: 20px; padding-right: 20px; }
  .content { padding: 27px 20px 45px; }
  .global-search { width: 190px; }
  .project-table-head { display: none; }
  .project-row { grid-template-columns: minmax(180px, 1fr) 90px; gap: 10px; }
  .project-row > .project-meta, .project-row > .project-owner { display: none; }
  .project-row > .progress-copy { grid-column: 2; grid-row: 1; }
  .project-row .progress-bar { width: 70px; }
  .projects-grid { grid-template-columns: 1fr; }
  .detail-overview-grid { grid-template-columns: 1fr; }
  .timeline-header, .timeline-row { grid-template-columns: minmax(170px, 1fr) 100px minmax(200px, 1fr); }
  .timeline-header > :nth-child(4), .timeline-row > :nth-child(4) { display: none; }
}
@media (max-width: 620px) {
  .topbar { height: 64px; }
  .breadcrumbs > span:first-child, .breadcrumb-slash { display: none; }
  .global-search { width: 34px; padding: 8px; border-color: transparent; background: transparent; }
  .global-search input, .global-search kbd { display: none; }
  .topbar-actions { gap: 4px; }
  .hero, .page-heading, .board-toolbar, .detail-hero { flex-direction: column; align-items: stretch; }
  .hero-actions, .page-actions, .detail-actions { justify-content: flex-start; }
  .hero { margin-bottom: 23px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { padding: 14px; min-height: 112px; }
  .metric-value { font-size: 24px; margin-top: 13px; }
  .metric-foot { font-size: 9px; }
  .panel-heading { padding-left: 16px; padding-right: 16px; }
  .project-table-head, .project-row { padding-left: 16px; padding-right: 16px; }
  .project-row { grid-template-columns: minmax(150px, 1fr) 70px; }
  .filter-row { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 24px; }
  .detail-hero { padding: 17px; }
  .detail-summary { grid-template-columns: 1fr; }
  .detail-summary-item { display: flex; align-items: center; justify-content: space-between; }
  .detail-summary-item strong { margin-top: 0; }
  .timeline-header { display: none; }
  .timeline-row { grid-template-columns: 1fr 100px; gap: 10px; }
  .timeline-row > :nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
  .timeline-row > :nth-child(4) { display: block; grid-column: 2; grid-row: 1; }
  .timeline-status { justify-self: end; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .modal-footer { align-items: flex-start; }
  .modal-footer-right { flex-wrap: wrap; justify-content: flex-end; }
  .toast-container { right: 12px; left: 12px; bottom: 12px; }
  .toast { width: 100%; }
}

/* Atlas workspace v2: hierarchy, focus and interaction surfaces */
body { background: radial-gradient(circle at 84% -10%, rgba(102, 116, 246, .08), transparent 31%), var(--bg); }
.content { padding-top: 38px; }
.hero-v2 { position: relative; min-height: 238px; align-items: center; padding: 31px 32px; margin-bottom: 18px; overflow: hidden; color: #fff; border: 0; border-radius: 24px; background: linear-gradient(124deg, #202a5a 0%, #303d86 58%, #5b68dd 100%); box-shadow: 0 22px 46px rgba(40, 52, 121, .22); }
.hero-v2::before, .hero-v2::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; pointer-events: none; }
.hero-v2::before { width: 390px; height: 390px; right: 21%; top: -228px; }
.hero-v2::after { width: 260px; height: 260px; right: 0; bottom: -182px; }
.hero-copy, .hero-visual, .hero-v2 .hero-actions { position: relative; z-index: 1; }
.hero-copy { max-width: 480px; }
.hero-v2 .eyebrow { color: #aeb8ff; margin-bottom: 12px; letter-spacing: .1em; }
.hero-v2 h1 { color: #fff; font-size: clamp(27px, 3vw, 39px); }
.hero-v2 .hero-copy > p:not(.eyebrow) { color: rgba(255,255,255,.7); margin-top: 13px; font-size: 13px; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 24px; color: rgba(255,255,255,.72); font-size: 11px; }
.hero-meta-dot { width: 7px; height: 7px; border-radius: 50%; background: #67dca8; box-shadow: 0 0 0 4px rgba(103,220,168,.14); }
.hero-good { color: #a5edc9; }
.hero-alert { color: #ffd39e; }
.hero-visual { display: flex; align-items: center; gap: 14px; margin-left: auto; margin-right: 8px; }
.hero-progress-ring { width: 92px; height: 92px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(#9eabff var(--progress-angle), rgba(255,255,255,.15) 0); box-shadow: 0 10px 24px rgba(17, 24, 70, .18); }
.hero-progress-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #303d86; }
.hero-progress-ring span { position: relative; z-index: 1; font-size: 23px; font-weight: 800; letter-spacing: -.05em; }
.hero-progress-ring small { font-size: 11px; margin-left: 1px; font-weight: 700; }
.hero-visual-copy { display: grid; gap: 3px; min-width: 145px; }
.hero-visual-copy span { color: rgba(255,255,255,.58); font-size: 10px; }
.hero-visual-copy strong { color: #fff; font-size: 14px; }
.hero-visual-copy small { color: rgba(255,255,255,.66); font-size: 10px; }
.hero-v2 .hero-actions { align-self: flex-end; }
.btn-ghost-on-dark { color: rgba(255,255,255,.84); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); }
.btn-ghost-on-dark:hover { color: #fff; background: rgba(255,255,255,.17); }
.hero-v2 .hero-primary { color: var(--primary); background: #fff; box-shadow: 0 8px 17px rgba(16, 24, 74, .2); }
.hero-v2 .hero-primary:hover { color: var(--primary-dark); background: #f5f6ff; }
.quick-add-card { display: grid; grid-template-columns: auto minmax(180px, .7fr) minmax(390px, 1.3fr); align-items: center; gap: 14px; padding: 13px 15px; margin-bottom: 18px; background: rgba(255,255,255,.84); border: 1px solid rgba(218,222,237,.95); border-radius: 16px; box-shadow: 0 8px 22px rgba(35,43,88,.05); }
.quick-add-icon { width: 35px; height: 35px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 11px; }
.quick-add-icon .icon { width: 16px; height: 16px; }
.quick-add-copy { display: grid; gap: 2px; }
.quick-add-copy strong { font-size: 12px; }
.quick-add-copy span { color: var(--muted); font-size: 10px; }
.quick-add-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.quick-add-controls input, .quick-add-controls select { height: 37px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcff; color: var(--ink); font-size: 11px; outline: none; }
.quick-add-controls input { min-width: 0; flex: 1; padding: 0 11px; }
.quick-add-controls input:focus, .quick-add-controls select:focus { border-color: #aeb5fa; background: #fff; box-shadow: 0 0 0 3px rgba(79,95,243,.08); }
.quick-add-controls select { max-width: 145px; padding: 0 8px; }
.quick-add-controls .btn { height: 37px; padding: 0 12px; white-space: nowrap; }
.metric-grid-v2 { margin-bottom: 19px; }
.metric-grid-v2 .metric-card { min-height: 122px; border-radius: 16px; box-shadow: 0 8px 21px rgba(36,46,93,.045); }
.metric-grid-v2 .metric-value { font-size: 31px; }
.dashboard-grid-v2 { grid-template-columns: minmax(0, 1.52fr) minmax(300px, .84fr); gap: 18px; }
.dashboard-main-column, .dashboard-side-column { min-width: 0; }
.dashboard-side-column { display: grid; gap: 18px; }
.section-kicker { color: #a1a9bb !important; font-size: 9px !important; font-weight: 800 !important; letter-spacing: .12em; margin: 0 0 3px !important; }
.panel-live { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 10px; font-weight: 700; }
.panel-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--green-soft); }
.dashboard-v2 .panel { border-radius: 18px; }
.dashboard-v2 .panel-heading { padding-top: 19px; }
.dashboard-v2 .project-row { padding-top: 15px; padding-bottom: 15px; }
.dashboard-v2 .focus-panel { min-height: auto; }
.dashboard-v2 .focus-item { padding-top: 14px; padding-bottom: 14px; }
.next-action-card { position: relative; padding: 17px 18px 16px; overflow: hidden; border-radius: 18px; color: #fff; background: linear-gradient(140deg, #354390, #5665da); box-shadow: 0 13px 26px rgba(61,74,176,.18); }
.next-action-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -65px; bottom: -95px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.next-action-top, .next-action-copy, .next-action-link { position: relative; z-index: 1; }
.next-action-top { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.7); font-size: 10px; font-weight: 700; }
.next-action-icon { width: 27px; height: 27px; display: grid; place-items: center; color: #c8d0ff; background: rgba(255,255,255,.13); border-radius: 8px; }
.next-action-icon .icon { width: 14px; height: 14px; }
.next-action-copy { display: grid; gap: 3px; margin: 17px 0 14px; }
.next-action-copy strong { color: #fff; font-size: 13px; line-height: 1.4; }
.next-action-copy span { color: rgba(255,255,255,.66); font-size: 10px; }
.next-action-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: #fff; border: 0; background: transparent; font-size: 10px; font-weight: 700; }
.next-action-link .icon { width: 13px; height: 13px; }

.board-page-heading { margin-bottom: 18px; }
.board-page-heading .eyebrow { margin-bottom: 8px; }
.board-toolbar-v2 { min-height: 58px; display: flex; align-items: center; gap: 14px; padding: 8px 12px; margin-bottom: 10px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 15px; }
.board-toolbar-v2 .board-toolbar-left { min-width: 180px; }
.board-select-wrap, .board-project-context { display: flex; align-items: center; gap: 8px; }
.board-project-context { gap: 9px; }
.board-project-context .project-color { width: 28px; height: 28px; border-radius: 8px; }
.board-project-context div { display: grid; gap: 1px; }
.board-project-context strong { font-size: 11px; }
.board-project-context span { color: var(--muted); font-size: 9px; }
.board-scope-pills { display: flex; gap: 4px; padding: 3px; background: var(--surface-muted); border-radius: 10px; }
.board-scope-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; color: var(--muted); border: 0; border-radius: 7px; background: transparent; font-size: 10px; font-weight: 700; white-space: nowrap; }
.board-scope-pill:hover { color: var(--ink); }
.board-scope-pill.active { color: var(--primary); background: #fff; box-shadow: 0 2px 7px rgba(30,39,74,.08); }
.board-scope-pill span { color: inherit; opacity: .62; font-size: 9px; }
.board-toolbar-status { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.board-summary-strip { display: flex; align-items: center; gap: 17px; min-height: 28px; padding: 0 3px 10px; color: var(--muted); font-size: 10px; }
.board-summary-strip > span { display: inline-flex; align-items: center; gap: 6px; }
.summary-dot { width: 6px; height: 6px; border-radius: 50%; }
.summary-dot.blue { background: var(--blue); }
.summary-dot.orange { background: var(--orange); }
.board-key-hint { margin-left: auto; }
.board { gap: 13px; }
.board-column { border-radius: 15px; background: rgba(238,241,248,.68); border-color: transparent; }
.board-column.drag-over { border-color: rgba(79,95,243,.35); background: #eef0ff; box-shadow: inset 0 0 0 1px rgba(79,95,243,.12); }
.column-header { padding: 14px 14px 11px; }
.column-title { font-size: 11px; }
.column-count { min-width: 22px; height: 20px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.72); }
.column-body { min-height: 260px; padding: 4px 9px 10px; }
.task-card { border-radius: 12px; padding: 13px; box-shadow: 0 5px 12px rgba(30,40,75,.045); }
.task-card:hover { border-color: #cfd5fa; box-shadow: 0 9px 17px rgba(38,47,103,.1); transform: translateY(-1px); }
.task-card-title { font-size: 11px; line-height: 1.45; }
.task-card-description { font-size: 10px; }
.add-task-inline { border-radius: 9px; }

.modal-backdrop { z-index: 80; }
.drawer-backdrop, .command-backdrop { position: fixed; inset: 0; z-index: 85; display: flex; background: rgba(20,27,58,.4); backdrop-filter: blur(7px); animation: fade-in .2s ease; }
.drawer-backdrop { justify-content: flex-end; }
.task-drawer { width: min(445px, 100vw); height: 100%; display: flex; flex-direction: column; overflow: hidden; background: #fbfcff; box-shadow: -18px 0 48px rgba(22,30,70,.18); animation: drawer-in .28s ease; }
.drawer-topbar { display: flex; justify-content: space-between; align-items: center; padding: 24px 25px 16px; border-bottom: 1px solid var(--line); }
.drawer-eyebrow { color: #a0a9ba; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.drawer-body { flex: 1; overflow: auto; padding: 27px 25px 25px; }
.drawer-title-row { display: flex; align-items: center; gap: 7px; }
.drawer-priority-label { color: var(--muted); font-size: 10px; font-weight: 650; }
.drawer-title { margin: 10px 0 22px; font-size: 24px; line-height: 1.27; letter-spacing: -.035em; }
.drawer-project-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: #f2f4fb; border-radius: 11px; }
.drawer-project-link .project-color { width: 29px; height: 29px; border-radius: 8px; }
.drawer-project-link > div { display: grid; gap: 1px; }
.drawer-project-link span { color: var(--muted); font-size: 9px; }
.drawer-project-link strong { font-size: 11px; }
.drawer-section { padding-top: 24px; }
.drawer-label { display: block; margin-bottom: 9px; color: #a0a8b7; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.drawer-statuses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.drawer-status-option { display: flex; align-items: center; gap: 7px; padding: 10px 11px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 10px; text-align: left; }
.drawer-status-option:hover { border-color: #bdc5fa; color: var(--primary); }
.drawer-status-option.active { color: var(--primary); border-color: #c9cefa; background: var(--primary-soft); font-weight: 700; }
.drawer-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.drawer-detail-grid strong { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.drawer-detail-grid strong.overdue { color: var(--red); }
.drawer-detail-grid strong.today { color: var(--orange); }
.drawer-description { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-footer { display: flex; gap: 8px; padding: 16px 25px 21px; border-top: 1px solid var(--line); background: #fff; }
.drawer-footer .btn { flex: 1; }

.command-backdrop { justify-content: center; align-items: flex-start; padding-top: 15vh; }
.command-palette { width: min(570px, calc(100vw - 28px)); overflow: hidden; border: 1px solid rgba(218,222,242,.9); border-radius: 18px; background: #fbfcff; box-shadow: 0 28px 70px rgba(21,29,71,.24); animation: modal-in .23s ease; }
.command-search { display: flex; align-items: center; gap: 10px; padding: 15px 17px; border-bottom: 1px solid var(--line); color: var(--muted); }
.command-search .icon { width: 16px; height: 16px; }
.command-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.command-search input::placeholder { color: #9da5b7; }
.command-search kbd, .command-footer kbd, .command-item kbd { padding: 3px 5px; color: #9aa3b7; border: 1px solid var(--line); border-radius: 5px; background: #f5f6fa; font-size: 9px; }
.command-section-label { padding: 15px 17px 8px; color: #a0a8b7; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.command-list { padding: 0 8px 9px; }
.command-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 9px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.command-item:hover, .command-item:focus-visible { background: var(--primary-soft); outline: 0; }
.command-item-icon { width: 31px; height: 31px; display: grid; place-items: center; color: var(--primary); background: #eef0ff; border-radius: 9px; }
.command-item-icon .icon { width: 15px; height: 15px; }
.command-item-copy { min-width: 0; flex: 1; display: grid; gap: 1px; }
.command-item-copy strong { font-size: 11px; }
.command-item-copy small { color: var(--muted); font-size: 10px; }
.command-footer { display: flex; justify-content: space-between; padding: 11px 17px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; }
.command-footer span:last-child { display: flex; align-items: center; gap: 5px; }

@keyframes drawer-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 980px) {
  .hero-v2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .hero-v2 .hero-visual { grid-column: 2; grid-row: 1; }
  .hero-v2 .hero-actions { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; align-self: start; }
  .quick-add-card { grid-template-columns: auto minmax(160px, 1fr); }
  .quick-add-controls { grid-column: 1 / -1; }
  .dashboard-grid-v2 { grid-template-columns: 1fr; }
  .dashboard-side-column { grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); align-items: start; }
}

@media (max-width: 620px) {
  .content { padding-top: 25px; }
  .hero-v2 { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: 24px 21px; border-radius: 20px; }
  .hero-v2 .hero-visual { margin: 24px 0 0; }
  .hero-v2 .hero-actions { flex-wrap: wrap; margin-top: 21px; }
  .hero-progress-ring { width: 76px; height: 76px; }
  .hero-progress-ring span { font-size: 20px; }
  .hero-visual-copy { min-width: 0; }
  .quick-add-card { display: flex; align-items: flex-start; flex-wrap: wrap; padding: 13px; }
  .quick-add-copy { flex: 1; }
  .quick-add-controls { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 90px; }
  .quick-add-controls input { grid-column: 1 / -1; }
  .quick-add-controls select { max-width: none; width: 100%; }
  .quick-add-controls .btn { width: 100%; }
  .dashboard-side-column { grid-template-columns: 1fr; }
  .board-toolbar-v2 { align-items: stretch; flex-direction: column; gap: 9px; padding: 10px; }
  .board-toolbar-v2 .board-toolbar-left { min-width: 0; }
  .board-select-wrap { justify-content: space-between; }
  .board-select-wrap .select-control { flex: 1; max-width: 190px; }
  .board-scope-pills { overflow-x: auto; }
  .board-scope-pill { flex: 0 0 auto; }
  .board-toolbar-status { margin-left: 0; }
  .board-summary-strip { gap: 9px; flex-wrap: wrap; }
  .board-key-hint { width: 100%; margin-left: 0; }
  .drawer-footer { flex-wrap: wrap; }
  .drawer-footer .btn { min-width: 135px; }
  .command-backdrop { padding-top: 8vh; }
  .command-footer { display: none; }
}

/* Project space v2 */
.btn-compact { padding: 8px 10px; border-radius: 8px; font-size: 10px; }
.project-list-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 194px; padding: 27px 29px; margin-bottom: 17px; overflow: hidden; color: #fff; border-radius: 22px; background: linear-gradient(125deg, #252e65 0%, #4351a7 68%, #6874e3 100%); box-shadow: 0 18px 38px rgba(42,54,134,.18); }
.project-list-hero::before { content: ""; position: absolute; width: 330px; height: 330px; right: 15%; top: -213px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; pointer-events: none; }
.project-list-hero-copy { position: relative; z-index: 1; }
.project-list-hero .eyebrow { color: #b5bdff; margin-bottom: 9px; letter-spacing: .12em; }
.project-list-hero h1 { margin: 0; color: #fff; font-size: 31px; letter-spacing: -.04em; }
.project-list-hero-copy > p:not(.eyebrow) { max-width: 430px; margin: 9px 0 0; color: rgba(255,255,255,.7); font-size: 12px; }
.project-list-microcopy { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 21px; color: rgba(255,255,255,.72); font-size: 10px; }
.micro-dot { width: 7px; height: 7px; border-radius: 50%; background: #70dfae; box-shadow: 0 0 0 4px rgba(112,223,174,.15); }
.micro-divider { width: 1px; height: 12px; background: rgba(255,255,255,.23); }
.project-health-strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 91px); gap: 1px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(255,255,255,.13); }
.project-health-strip div { display: grid; gap: 8px; padding: 14px 13px; background: rgba(25,35,85,.18); }
.project-health-strip span { color: rgba(255,255,255,.6); font-size: 9px; }
.project-health-strip strong { color: #fff; font-size: 24px; line-height: 1; letter-spacing: -.04em; }
.projects-control-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 48px; margin-bottom: 14px; }
.projects-control-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; }
.project-search-state { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); }
.project-search-state button { width: 18px; height: 18px; display: grid; place-items: center; padding: 0; color: var(--muted); border: 0; border-radius: 5px; background: var(--surface-muted); }
.project-search-state button:hover { color: var(--primary); background: var(--primary-soft); }
.project-search-state .icon { width: 11px; height: 11px; }
.projects-grid-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card-v2 { min-height: 284px; padding: 20px; border-radius: 18px; }
.project-card-v2:hover { transform: translateY(-3px); box-shadow: 0 17px 31px rgba(29,39,89,.1); }
.project-card-v2-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-card-v2 .project-card-title .project-color { width: 40px; height: 40px; border-radius: 12px; }
.project-card-v2 .project-card-title strong { font-size: 14px; }
.project-card-v2 .project-card-title span { font-size: 10px; }
.card-more-button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; color: var(--muted); border: 0; border-radius: 8px; background: transparent; }
.card-more-button:hover { color: var(--primary); background: var(--primary-soft); }
.card-more-button .icon { width: 14px; height: 14px; }
.project-card-v2-status { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 17px; color: var(--muted); font-size: 10px; }
.project-card-alert { color: var(--red); }
.project-card-good { color: var(--green); }
.project-card-v2 .project-card-description { min-height: 36px; margin: 14px 0 17px; line-height: 1.65; }
.project-card-v2-progress { padding: 12px 13px; border-radius: 11px; background: #f7f8fc; }
.project-card-v2-progress .progress-copy { display: flex; align-items: center; justify-content: space-between; text-align: left; font-size: 10px; }
.project-card-v2-progress .progress-copy span { color: var(--muted); font-weight: 550; }
.project-card-v2-progress .progress-copy strong { color: var(--ink); }
.project-card-v2-progress .progress-bar { margin-top: 8px; }
.project-card-v2-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.project-card-next { min-width: 0; display: grid; gap: 2px; }
.project-card-next-label { color: #a0a8b7; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.project-card-next strong { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-card-next small { color: var(--muted); font-size: 9px; }
.project-card-v2-footer .btn { flex: 0 0 auto; }
.project-empty-v2 { margin-top: 8px; }

/* Project detail v2 */
.project-detail-v2 .detail-back { margin-bottom: 15px; }
.detail-hero-v2 { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; min-height: 218px; padding: 26px 28px; overflow: hidden; color: #fff; border: 0; border-radius: 22px; background: linear-gradient(125deg, #222b5e 0%, #394894 61%, #6874e3 100%); box-shadow: 0 18px 38px rgba(42,54,134,.19); }
.detail-hero-v2::after { content: ""; position: absolute; width: 310px; height: 310px; right: 14%; top: -218px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; pointer-events: none; }
.detail-hero-main, .detail-hero-progress, .detail-hero-v2 .detail-actions { position: relative; z-index: 1; }
.detail-hero-v2 .detail-title .project-color { width: 49px; height: 49px; border-radius: 14px; }
.detail-hero-v2 .detail-title h1 { color: #fff; font-size: 27px; margin-top: 2px; }
.detail-hero-v2 .detail-title p:not(.eyebrow) { max-width: 590px; color: rgba(255,255,255,.69); font-size: 11px; }
.detail-hero-v2 .detail-title .eyebrow { color: #b6beff; margin-bottom: 7px; letter-spacing: .12em; }
.detail-chip-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 19px; }
.detail-chip { display: inline-flex; align-items: center; min-height: 23px; padding: 4px 8px; color: rgba(255,255,255,.74); border: 1px solid rgba(255,255,255,.16); border-radius: 7px; background: rgba(255,255,255,.08); font-size: 9px; }
.detail-chip.danger { color: #ffd3a0; }
.detail-chip.good { color: #a7edcc; }
.detail-hero-progress { display: grid; justify-items: center; gap: 7px; margin: 0 24px; }
.detail-progress-orbit { width: 79px; height: 79px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(#aeb8ff var(--progress-angle), rgba(255,255,255,.16) 0); }
.detail-progress-orbit::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #3a4994; }
.detail-progress-orbit span { position: relative; z-index: 1; color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -.05em; }
.detail-progress-orbit small { font-size: 10px; margin-left: 1px; }
.detail-hero-progress > small { color: rgba(255,255,255,.61); font-size: 9px; }
.detail-hero-v2 .detail-actions { align-self: end; padding-bottom: 1px; }
.detail-hero-v2 .btn-secondary { color: rgba(255,255,255,.84); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.1); }
.detail-hero-v2 .btn-secondary:hover { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.17); }
.detail-hero-v2 .btn-primary { color: var(--primary); background: #fff; }
.detail-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 15px 0 20px; }
.detail-stat-grid > div { display: grid; gap: 5px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.detail-stat-grid span { color: var(--muted); font-size: 10px; }
.detail-stat-grid strong { font-size: 24px; line-height: 1; letter-spacing: -.04em; }
.detail-stat-grid strong.warn { color: var(--orange); }
.detail-stat-grid small { color: var(--muted); font-size: 9px; }
.project-detail-v2 .detail-tabs { gap: 22px; margin-bottom: 15px; }
.project-detail-v2 .detail-tab { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 12px; }
.project-detail-v2 .detail-tab span { min-width: 17px; height: 17px; display: grid; place-items: center; color: var(--primary); border-radius: 5px; background: var(--primary-soft); font-size: 9px; }
.detail-task-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 11px; }
.detail-scope-pills { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-muted); }
.detail-scope-pill { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; color: var(--muted); border: 0; border-radius: 7px; background: transparent; font-size: 10px; font-weight: 700; white-space: nowrap; }
.detail-scope-pill:hover { color: var(--ink); }
.detail-scope-pill.active { color: var(--primary); background: #fff; box-shadow: 0 2px 7px rgba(30,39,74,.08); }
.detail-scope-pill span { color: inherit; opacity: .65; font-size: 9px; }
.task-status-pill { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 6px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.task-status-pill.todo { color: #7e899b; background: #eef1f5; }
.task-status-pill.in-progress { color: var(--primary); background: var(--primary-soft); }
.task-status-pill.review { color: var(--orange); background: var(--orange-soft); }
.task-status-pill.done { color: var(--green); background: var(--green-soft); }
.detail-overview-v2 { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 15px; }
.detail-overview-v2 .panel { padding: 18px; border-radius: 16px; }
.detail-next-panel { color: #fff; background: linear-gradient(140deg, #354390, #5968df); border: 0; box-shadow: 0 13px 25px rgba(61,74,176,.16); }
.detail-next-heading, .detail-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-next-heading { justify-content: flex-start; }
.detail-next-heading h3, .detail-card-heading h3 { margin: 4px 0 0; font-size: 14px; }
.detail-next-heading .section-kicker { color: rgba(255,255,255,.55) !important; }
.detail-next-copy { display: grid; gap: 4px; margin: 22px 0 16px; }
.detail-next-copy strong { color: #fff; font-size: 14px; }
.detail-next-copy span { color: rgba(255,255,255,.68); font-size: 10px; }
.detail-next-panel .next-action-link { color: #fff; }
.detail-info-card h3 { margin: 4px 0 0; }
.detail-info-card .icon-button { width: 28px; height: 28px; }
.detail-description-card .detail-description { margin-top: 18px; }
.detail-task-preview-list { display: grid; gap: 5px; margin-top: 14px; }
.detail-task-preview { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 8px; color: var(--ink); border: 0; border-radius: 8px; background: #f8f9fc; text-align: left; }
.detail-task-preview:hover { background: var(--primary-soft); }
.detail-task-preview-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.detail-task-preview-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.detail-task-preview-copy small { color: var(--muted); font-size: 9px; }
.detail-task-preview > .icon { width: 12px; height: 12px; color: var(--muted); }
.detail-overview-v2 .detail-info-list { margin-top: 16px; }

@media (max-width: 980px) {
  .project-list-hero { align-items: flex-start; flex-direction: column; }
  .project-health-strip { align-self: stretch; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-hero-v2 { grid-template-columns: minmax(0, 1fr) auto; }
  .detail-hero-v2 .detail-hero-progress { grid-column: 2; grid-row: 1; margin-right: 0; }
  .detail-hero-v2 .detail-actions { grid-column: 1 / -1; grid-row: 2; justify-self: start; align-self: start; margin-top: 18px; }
}

@media (max-width: 620px) {
  .project-list-hero { min-height: 0; padding: 23px 21px; border-radius: 19px; }
  .project-list-hero h1 { font-size: 27px; }
  .project-health-strip { width: 100%; }
  .projects-control-bar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .projects-control-meta { width: 100%; justify-content: space-between; }
  .projects-grid-v2 { grid-template-columns: 1fr; }
  .project-card-v2 { min-height: 0; }
  .detail-hero-v2 { display: flex; flex-direction: column; align-items: stretch; padding: 22px 20px; border-radius: 19px; }
  .detail-hero-v2 .detail-hero-progress { align-self: flex-start; margin: 22px 0 0; }
  .detail-hero-v2 .detail-actions { margin-top: 21px; }
  .detail-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .detail-stat-grid > div { padding: 13px; }
  .detail-stat-grid strong { font-size: 21px; }
  .detail-task-toolbar { align-items: flex-start; flex-direction: column; }
  .detail-scope-pills { width: 100%; overflow-x: auto; }
  .detail-scope-pill { flex: 0 0 auto; }
  .detail-overview-v2 { grid-template-columns: 1fr; }
}
