:root {
  --navy: #073b78;
  --navy-deep: #052c59;
  --blue: #2078f0;
  --blue-soft: #eef5ff;
  --ink: #17202e;
  --muted: #6f7785;
  --quiet: #9aa2af;
  --line: #e7ebf1;
  --canvas: #f6f8fb;
  --surface: #ffffff;
  --red: #e6534e;
  --red-soft: #fff0ef;
  --amber: #e99a29;
  --amber-soft: #fff7e8;
  --green: #2e9a6c;
  --green-soft: #edf9f3;
  --shadow: 0 12px 34px rgba(22, 45, 74, .055);
  --shadow-high: 0 28px 70px rgba(10, 35, 67, .16);
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 11px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 1080px; min-height: 100%; background: var(--canvas); }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
svg { display: block; }

.app-shell { display: flex; height: 100vh; min-height: 700px; }
.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: rgba(255, 255, 255, .96);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 20px;
  position: relative;
  z-index: 5;
}

.brand { padding: 0 8px 22px; border-bottom: 1px solid var(--line); }
.brand-crop { width: 184px; height: 54px; overflow: hidden; }
.brand-crop img { width: 184px; height: auto; transform: translateY(-19px); display: block; }
.product-name { margin: 2px 0 0 54px; color: var(--blue); font-size: 8px; font-weight: 750; letter-spacing: .19em; }

.nav { display: grid; gap: 7px; padding-top: 24px; }
.nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 13px;
  color: #7b8390;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 590;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item svg { width: 20px; height: 20px; fill: currentColor; }
.nav-item:hover { background: #f3f6fa; color: var(--navy); transform: translateX(1px); }
.nav-item.active { background: var(--blue-soft); color: var(--navy); font-weight: 720; }
.nav-item.active svg { color: var(--blue); }
.nav-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #eef1f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7b8390;
  font-size: 10px;
  font-weight: 700;
}
.nav-item.active .nav-count { background: #dcecff; color: var(--blue); }
.sidebar-bottom { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--line); }
.local-pill { display: flex; align-items: center; gap: 8px; color: #57616f; font-size: 11px; font-weight: 650; }
.local-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.sidebar-bottom p { margin: 8px 0 0 15px; color: var(--quiet); font-size: 10px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 82px;
  flex: 0 0 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: rgba(246, 248, 251, .9);
  border-bottom: 1px solid rgba(226, 231, 238, .8);
  backdrop-filter: blur(18px);
}
.eyebrow, .kicker, .panel-kicker { margin: 0; color: var(--blue); font-size: 9px; font-weight: 780; letter-spacing: .15em; }
.topbar-title { margin-top: 3px; color: var(--navy); font-size: 18px; font-weight: 760; letter-spacing: -.02em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--surface); color: #78808d; border: 1px solid var(--line); transition: .18s ease;
}
.icon-button:hover { color: var(--blue); border-color: #cdddf3; transform: translateY(-1px); }
.icon-button svg { width: 19px; height: 19px; fill: currentColor; }

.primary-button, .secondary-button, .tertiary-button, .ghost-button, .danger-button {
  border-radius: 12px;
  padding: 11px 17px;
  font-size: 12px;
  font-weight: 690;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button { color: white; background: var(--blue); box-shadow: 0 7px 18px rgba(32, 120, 240, .2); }
.primary-button:hover { background: #166ddd; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(32, 120, 240, .25); }
.secondary-button { color: var(--navy); background: var(--blue-soft); border: 1px solid #dce9fb; }
.secondary-button:hover { background: #e2efff; transform: translateY(-1px); }
.tertiary-button { color: #69717e; background: #f0f2f5; }
.tertiary-button:hover { background: #e7eaee; }
.ghost-button { padding: 8px 11px; color: #6f7886; background: transparent; }
.ghost-button:hover { color: var(--blue); background: var(--blue-soft); }
.danger-button { color: #a73d39; background: var(--red-soft); border: 1px solid #f3d7d5; }
.danger-button:hover { color: white; background: var(--red); transform: translateY(-1px); }
.full { width: 100%; margin-top: 9px; }

.content { overflow: auto; height: calc(100vh - 82px); padding: 34px 38px 48px; }
.page { display: none; max-width: 1460px; margin: 0 auto; animation: fadeIn .22s ease; }
.page.active { display: block; }
#page-projects.active, #project-task-pane.active {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.welcome-row { display: flex; justify-content: space-between; align-items: flex-end; margin: 2px 0 25px; }
.welcome-row h1, .page-intro h1 { margin: 8px 0 0; color: var(--navy-deep); letter-spacing: -.045em; }
.welcome-row h1 { font-size: clamp(34px, 3.1vw, 48px); line-height: 1.08; font-weight: 730; }
.welcome-note { margin: 0 0 5px; max-width: 330px; color: var(--muted); font-size: 12px; line-height: 1.75; text-align: right; }

.metric-grid { display: grid; grid-template-columns: 1.18fr repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.metric-card {
  min-height: 154px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.metric-primary { color: white; border: 0; background: linear-gradient(135deg, #06376f 0%, #0c4f9d 62%, #1470d7 100%); }
.metric-primary::after { content: ""; position: absolute; right: -46px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.075); }
.metric-primary::before { content: ""; position: absolute; right: 42px; bottom: -75px; width: 120px; height: 120px; border-radius: 50%; border: 26px solid rgba(255,255,255,.055); }
.metric-label { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-primary .metric-label { color: rgba(255,255,255,.72); }
.metric-dot { width: 8px; height: 8px; border-radius: 50%; background: #5ea4ff; box-shadow: 0 0 0 4px rgba(91,164,255,.18); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.red { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.status-dot.amber { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.status-dot.blue { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.metric-value { position: relative; z-index: 1; margin-top: 13px; color: white; font-size: 40px; line-height: 1; font-weight: 735; letter-spacing: -.04em; }
.metric-value.dark { color: var(--ink); }
.metric-foot { position: absolute; z-index: 1; left: 22px; bottom: 18px; color: var(--quiet); font-size: 10px; }
.metric-primary .metric-foot { color: rgba(255,255,255,.58); }
.text-link { position: absolute; left: 18px; bottom: 12px; padding: 6px 4px; color: var(--red); background: transparent; font-size: 10px; font-weight: 700; }
.text-link span { margin-left: 3px; transition: margin .16s ease; }
.text-link:hover span { margin-left: 7px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(315px, .8fr); gap: 16px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; }
.panel-head.compact { padding-bottom: 8px; }
.panel-head h2 { margin: 5px 0 0; color: var(--ink); font-size: 17px; letter-spacing: -.025em; }
.panel-head .muted { color: var(--quiet); font-size: 10px; }
.focus-panel, .health-panel { min-height: 360px; }
.focus-list, .health-list { padding: 0 12px 14px; }
.focus-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 13px 10px;
  border-top: 1px solid #f0f2f5;
  cursor: pointer;
  border-radius: 12px;
  transition: background .16s ease;
}
.focus-item:hover { background: #f8fafc; }
.focus-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-size: 10px; font-weight: 760; }
.focus-icon.overdue { color: var(--red); background: var(--red-soft); }
.focus-icon.today { color: var(--amber); background: var(--amber-soft); }
.focus-icon.tomorrow { color: var(--blue); background: var(--blue-soft); }
.focus-icon.normal { color: var(--green); background: var(--green-soft); }
.focus-copy { min-width: 0; }
.focus-title { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #263140; font-size: 12px; font-weight: 680; }
.focus-meta { margin-top: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--quiet); font-size: 9px; }
.focus-date { text-align: right; color: #646e7c; font-size: 10px; font-variant-numeric: tabular-nums; }
.focus-date strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 11px; }

.health-item { padding: 13px 10px; border-top: 1px solid #f0f2f5; }
.health-top { display: flex; justify-content: space-between; gap: 12px; }
.health-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #263140; font-size: 11px; font-weight: 680; }
.health-percent { color: var(--navy); font-size: 10px; font-weight: 750; }
.progress-track { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 3px; background: #edf0f4; }
.progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--blue), #55a2ff); }
.health-meta { display: flex; justify-content: space-between; margin-top: 7px; color: var(--quiet); font-size: 8px; }

.rhythm-panel { padding-bottom: 17px; }
.week-rhythm { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; padding: 4px 20px 0; }
.day-cell { min-height: 84px; padding: 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #f0f2f5; display: flex; flex-direction: column; justify-content: space-between; }
.day-cell.today { color: white; background: var(--navy); border-color: var(--navy); }
.day-name { color: var(--quiet); font-size: 9px; }
.day-cell.today .day-name { color: rgba(255,255,255,.62); }
.day-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.day-date { font-size: 13px; font-weight: 690; }
.day-count { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--blue); font-size: 10px; font-weight: 770; box-shadow: 0 3px 10px rgba(30,60,90,.07); }
.day-count.zero { color: #b1b7c0; background: #eef1f5; box-shadow: none; }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; margin: 2px 0 24px; }
.page-intro h1 { font-size: 36px; font-weight: 730; }
.page-intro p:not(.kicker) { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.segmented { display: flex; padding: 4px; border-radius: 13px; background: #eaedf2; }
.segmented button { min-width: 74px; padding: 8px 12px; border-radius: 10px; color: #77808d; background: transparent; font-size: 10px; font-weight: 650; }
.segmented button.active { color: var(--navy); background: var(--surface); box-shadow: 0 3px 12px rgba(29,54,85,.08); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
#page-projects .page-intro, #project-task-pane .page-intro, #project-task-pane .filter-bar, #project-task-pane .batch-toolbar { flex: 0 0 auto; }
#page-projects .project-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding: 2px 7px 30px 2px;
  scrollbar-gutter: stable;
}
.project-card { min-height: 220px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.project-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(22,45,74,.085); }
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.project-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.project-card h3 { margin: 0; color: var(--ink); font-size: 16px; letter-spacing: -.02em; }
.project-client { margin: 6px 0 0; color: var(--quiet); font-size: 10px; }
.type-badge, .risk-badge, .status-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; white-space: nowrap; font-weight: 700; }
.type-badge { padding: 6px 10px; color: var(--navy); background: var(--blue-soft); font-size: 9px; }
.type-badge.custom { color: #7b57a0; background: #f5effb; }
.status-badge { padding: 6px 9px; font-size: 9px; }
.status-active { color: #237259; background: var(--green-soft); }
.status-paused { color: #a56800; background: var(--amber-soft); }
.status-ended { color: #a43e3a; background: var(--red-soft); }
.status-closed { color: #687382; background: #f0f2f5; }
.renewal-note { margin-top: 10px; color: #6b7582; font-size: 9px; }
.renewal-note strong { color: var(--blue); }
.project-timeline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 11px; margin-top: 24px; }
.date-block span { display: block; color: var(--quiet); font-size: 8px; }
.date-block strong { display: block; margin-top: 5px; color: #4d5765; font-size: 10px; font-weight: 680; }
.date-block.right { text-align: right; }
.timeline-line { width: 56px; height: 1px; background: var(--line); position: relative; }
.timeline-line::before, .timeline-line::after { content: ""; position: absolute; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: #b7c1cf; }
.timeline-line::before { left: 0; }.timeline-line::after { right: 0; background: var(--blue); }
.project-progress { margin-top: 21px; }
.project-progress-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.project-progress-head strong { color: var(--navy); font-size: 10px; }
.project-progress .progress-track { height: 6px; }
.project-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; padding-top: 14px; border-top: 1px solid #f0f2f5; }
.next-due { color: var(--quiet); font-size: 9px; }.next-due strong { color: #596473; }
.card-actions { display: flex; gap: 4px; }
.card-action { padding: 7px 9px; border-radius: 9px; color: #647080; background: transparent; font-size: 9px; font-weight: 700; }
.card-action:hover { color: var(--blue); background: var(--blue-soft); }

.filter-bar { display: flex; align-items: center; gap: 9px; padding: 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.batch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 15px; margin-bottom: 12px; border: 1px solid #d7e6fa; border-radius: 15px; background: #f3f8ff; box-shadow: var(--shadow); }
.batch-toolbar strong { display: block; color: var(--navy); font-size: 11px; }
.batch-toolbar span { display: block; margin-top: 3px; color: var(--quiet); font-size: 8px; }
.batch-actions { display: flex; align-items: center; gap: 7px; }
.batch-actions button { padding-top: 8px; padding-bottom: 8px; font-size: 10px; }
select, input, textarea { border: 1px solid #dde3ea; border-radius: 10px; outline: none; color: #354151; background: #fbfcfd; transition: border .17s ease, box-shadow .17s ease, background .17s ease; }
select, input { height: 38px; padding: 0 11px; }
textarea { padding: 10px 11px; resize: vertical; }
select:focus, input:focus, textarea:focus { background: white; border-color: #8bbcf9; box-shadow: 0 0 0 3px rgba(32,120,240,.1); }
.filter-bar select { min-width: 145px; }
.search-field { min-width: 240px; flex: 1; position: relative; }
.search-field svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; fill: #9ba4b1; }
.search-field input { width: 100%; padding-left: 36px; }
.table-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
#project-task-pane .table-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
thead th { padding: 14px 15px; color: var(--quiet); background: #fafbfd; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; font-weight: 740; letter-spacing: .03em; }
#project-task-pane thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(250, 251, 253, .98);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(14px);
}
tbody td { padding: 14px 15px; color: #526071; border-bottom: 1px solid #f0f2f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
tbody tr { cursor: pointer; transition: background .14s ease; }
tbody tr.selected { background: #f1f7ff; }
tbody tr:hover { background: #f8fbff; }
tbody tr:last-child td { border-bottom: 0; }
th:nth-child(1) { width: 44px; } th:nth-child(2) { width: 92px; } th:nth-child(3) { width: 17%; } th:nth-child(4) { width: 27%; } th:nth-child(5) { width: 13%; } th:nth-child(6) { width: 105px; } th:nth-child(7) { width: 70px; } th:nth-child(8) { width: 92px; }
.check-column, tbody td:first-child { text-align: center; padding-left: 8px; padding-right: 8px; }
.task-check, #select-all-tasks { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.task-title-cell { color: #263343; font-weight: 670; }
.task-source { display: block; margin-top: 4px; overflow: hidden; color: var(--blue); font-size: 8px; font-weight: 650; text-overflow: ellipsis; }
.risk-badge { padding: 5px 8px; font-size: 8px; }
.risk-overdue { color: var(--red); background: var(--red-soft); }.risk-today { color: #b96e00; background: var(--amber-soft); }.risk-tomorrow { color: var(--blue); background: var(--blue-soft); }.risk-normal { color: var(--green); background: var(--green-soft); }.risk-done { color: #818995; background: #f0f2f5; }.risk-paused { color: #9a6708; background: var(--amber-soft); }.risk-ended { color: #8a4550; background: #f7e9eb; }
.row-more { width: 28px; height: 28px; border-radius: 9px; color: #8b94a0; background: transparent; font-size: 16px; }
.row-more:hover { color: var(--blue); background: var(--blue-soft); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.quick-complete { width: 28px; height: 28px; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 800; }
.quick-complete:hover { color: white; background: var(--green); }
.quick-delete { width: 28px; height: 28px; border-radius: 9px; color: #a45a57; background: transparent; font-size: 14px; }
.quick-delete:hover { color: white; background: var(--red); }
.table-foot { display: flex; justify-content: space-between; padding: 12px 16px; color: var(--quiet); background: #fafbfd; border-top: 1px solid var(--line); font-size: 9px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 920px; }
.setting-card { padding: 24px; }
.setting-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.setting-icon svg { width: 22px; height: 22px; fill: currentColor; }.blue-bg { color: var(--blue); background: var(--blue-soft); }.navy-bg { color: white; background: var(--navy); }
.setting-card h2 { margin: 17px 0 6px; color: var(--ink); font-size: 17px; }.setting-card > p { min-height: 40px; margin: 0 0 18px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; color: #4c5968; border-top: 1px solid #f0f2f5; font-size: 10px; }
.switch-row input { display: none; }.switch-row i { width: 38px; height: 22px; border-radius: 11px; background: #d9dde3; position: relative; transition: .2s ease; }
.switch-row i::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.14); transition: .2s ease; }
.switch-row input:checked + i { background: var(--blue); }.switch-row input:checked + i::after { transform: translateX(16px); }

.empty-state { min-height: 220px; display: grid; place-items: center; padding: 40px; text-align: center; color: var(--quiet); }
.empty-state strong { display: block; margin-bottom: 6px; color: #697381; font-size: 12px; }.empty-state span { font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 28px; background: rgba(12, 26, 43, .34); backdrop-filter: blur(12px); }
.modal-backdrop.open { display: flex; animation: backdropIn .18s ease; }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(590px, 95vw); max-height: 92vh; overflow: auto; padding: 25px; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(255,255,255,.98); box-shadow: var(--shadow-high); animation: modalIn .22s ease; }
.modal.large { width: min(760px, 95vw); }.modal.xlarge { width: min(1040px, 96vw); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.modal-head h2 { margin: 5px 0 0; color: var(--navy); font-size: 23px; letter-spacing: -.035em; }.modal-head p:not(.panel-kicker) { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.close-button { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; color: #75808e; background: #f0f2f5; font-size: 20px; line-height: 1; }.close-button:hover { color: var(--ink); background: #e4e8ed; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid label { display: grid; gap: 6px; }.form-grid label > span, .node-form label > span { color: #697483; font-size: 9px; font-weight: 700; }.form-grid label.wide { grid-column: 1 / -1; }.form-grid small { color: var(--quiet); font-size: 8px; }
.modal-tip { margin-top: 16px; padding: 11px 13px; border-radius: 11px; color: #496884; background: var(--blue-soft); font-size: 9px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-actions.split { justify-content: space-between; align-items: center; }
.modal-actions.split > div { display: flex; gap: 8px; }
.hidden { display: none !important; }

.node-builder { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 14px; }
.node-form { padding: 17px; border-radius: 17px; background: #f8fafc; border: 1px solid var(--line); display: grid; gap: 10px; align-self: start; }
.node-form label { display: grid; gap: 5px; }.node-form .secondary-button { margin-top: 5px; }
.draft-list { min-height: 390px; max-height: 460px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 17px; background: #fbfcfd; }
.draft-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 13px; margin-bottom: 7px; border-radius: 13px; background: white; border: 1px solid #edf0f4; }
.draft-item h4 { margin: 0; color: #2f3a49; font-size: 11px; }.draft-item p { margin: 5px 0 0; color: var(--quiet); font-size: 8px; }.draft-remove { align-self: center; width: 28px; height: 28px; border-radius: 9px; color: var(--red); background: var(--red-soft); }

.toast { position: fixed; left: 50%; bottom: 30px; z-index: 100; display: flex; align-items: center; gap: 9px; padding: 12px 17px; border-radius: 13px; color: white; background: #1e2d3f; box-shadow: 0 16px 40px rgba(14,30,50,.25); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast.error { background: #9e3835; }.toast-mark { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 10px; }

@media (max-width: 1190px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .health-panel { min-height: 0; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
