:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-strong: #edf2f7;
  --ink: #111827;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #d9e0ea;
  --line-strong: #b8c4d3;
  --rail: #080d14;
  --sidebar: #111820;
  --sidebar-2: #151f2b;
  --sidebar-text: #f5f7fb;
  --cyan: #0891b2;
  --cyan-soft: #dff7fb;
  --blue: #2563eb;
  --blue-soft: #e6efff;
  --green: #059669;
  --green-soft: #daf8e8;
  --orange: #d97706;
  --orange-soft: #fff1d6;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --purple: #7c3aed;
  --purple-soft: #efe7ff;
  --ai: #8b5cf6;
  --ai-strong: #6d28d9;
  --ai-soft: #f1ecff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --control-height: 42px;
  --control-padding-x: 12px;
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(238, 242, 246, 0.96), rgba(223, 247, 251, 0.9)),
    repeating-linear-gradient(90deg, rgba(8, 145, 178, 0.08) 0, rgba(8, 145, 178, 0.08) 1px, transparent 1px, transparent 48px);
  transition: opacity 180ms ease, visibility 180ms ease;
}

body.authenticated .login-screen {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body:not(.authenticated) .app {
  filter: blur(2px);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 28px;
  line-height: 1.15;
}

.login-logo {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  object-fit: cover;
}

.odin-acronym {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  line-height: 1.45;
  letter-spacing: 0;
}

.odin-acronym span {
  white-space: nowrap;
}

.odin-acronym b {
  color: var(--cyan);
}

.login-card p {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.login-form input,
.login-form select {
  width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  max-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 var(--control-padding-x);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
}

.login-form select {
  appearance: none;
}

.login-form input:focus,
.login-form select:focus {
  border-color: rgba(8, 145, 178, 0.62);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.login-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.login-options label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.login-options input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  padding: 0;
  accent-color: var(--cyan);
}

.login-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-status.error {
  color: #b91c1c;
}

.session-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-chip small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

button,
input,
select,
textarea {
  box-sizing: border-box;
  font: inherit;
  letter-spacing: 0;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  height: var(--control-height);
  min-height: var(--control-height);
  max-height: var(--control-height);
  line-height: 1.2;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

textarea {
  line-height: 1.45;
  resize: vertical;
}

button {
  position: relative;
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-icon {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app.sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.rail-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: transparent;
  color: #9aa7b8;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.rail-icon:hover,
.rail-icon.active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  transform: translateY(-1px);
}

.rail-icon.active {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  overflow-y: auto;
  background: var(--sidebar);
  color: var(--sidebar-text);
  transition: padding 180ms ease;
}

.side-menu {
  flex: 1 1 auto;
}

.app.project-dashboard .sidebar {
  background:
    linear-gradient(180deg, rgba(8, 145, 178, 0.08), rgba(15, 23, 42, 0) 34%),
    #0d1b20;
}

.app.project-dashboard .command-shell {
  border-color: rgba(125, 211, 252, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.app.project-dashboard .project-tree {
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.app.project-dashboard .project-tree header {
  display: none;
}

.app.project-dashboard .side-link[data-global-side-link]:not([data-home-link]) {
  display: none !important;
}

.sidebar-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.sidebar-brand-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  background: transparent;
}

.sidebar-brand {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  filter: invert(1) contrast(1.25);
  mix-blend-mode: screen;
}

.sidebar-wordmark {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: #c7d0dd;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-footer {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-rail-toggle {
  width: 38px;
  height: 38px;
  justify-self: start;
  border: 0;
  background: transparent;
  color: #9aa7b8;
}

.sidebar-session {
  position: relative;
  min-width: 0;
}

.sidebar-profile-btn {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 48px;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  padding: 5px 8px 5px 5px;
  background: transparent;
  color: #dbe4f0;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.sidebar-profile-btn:hover,
.sidebar-profile-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-profile-btn .avatar,
.sidebar-popover-user .avatar {
  background: #0f172a;
  color: #fff;
}

.sidebar-profile-text {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.sidebar-profile-text strong,
.sidebar-popover-user strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-text small,
.sidebar-popover-user small {
  overflow: hidden;
  color: #9aa7b8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 60;
  display: grid;
  width: min(238px, calc(100vw - 24px));
  gap: 8px;
  border: 1px solid rgba(217, 224, 234, 0.18);
  border-radius: var(--radius);
  padding: 8px;
  background: #111820;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.sidebar-popover-user {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 4px;
}

.sidebar-popover-action {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fafc;
  font-weight: 900;
  text-align: left;
}

.sidebar-popover-action:hover {
  background: rgba(239, 68, 68, 0.17);
  color: #fecaca;
}

.workspace-meta {
  display: none;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.workspace-meta h1 {
  font-size: 18px;
  line-height: 1.22;
}

.workspace-meta p {
  color: #aab5c4;
  font-size: 12px;
}

.overline {
  display: inline-flex;
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.command-shell {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  min-height: var(--control-height);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.command-shell:focus-within {
  border-color: rgba(34, 211, 238, 0.58);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.18);
}

.command-shell .icon {
  color: #6ee7f8;
}

.command-shell input {
  min-width: 0;
  height: var(--control-height);
  min-height: var(--control-height);
  border: 0;
  background: transparent;
  color: #fff;
  outline: 0;
}

.command-shell input::placeholder {
  color: #79889a;
}

.side-menu {
  display: grid;
  gap: 6px;
}

.side-link {
  display: grid;
  grid-template-columns: 24px auto;
  align-items: center;
  justify-content: start;
  justify-items: start;
  column-gap: 4px;
  min-height: 36px;
  border-radius: var(--radius);
  padding: 0 10px;
  background: transparent;
  color: #c7d0dd;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.side-link:hover,
.side-link.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  transform: translateX(2px);
}

.side-link > span:not(.side-label) {
  display: grid;
  place-items: center;
}

.side-label {
  display: block;
  width: auto;
  min-width: 0;
  justify-self: start;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  white-space: nowrap;
}

.project-tree {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.project-tree header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 4px;
  color: #9aa7b8;
  font-size: 14px;
  font-weight: 900;
  text-transform: none;
}

.project-tree-toggle {
  display: grid;
  grid-template-columns: 24px minmax(0, auto) 16px;
  align-items: center;
  justify-content: start;
  justify-items: start;
  width: auto;
  min-height: 36px;
  gap: 4px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 10px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: #c7d0dd;
  font: inherit;
  line-height: 1;
  text-align: left;
}

.project-tree-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.project-tree-toggle > span:first-child {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  transform: translateX(-2px);
}

.project-tree-toggle .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.project-tree-toggle .side-label {
  color: inherit;
  font-size: 14px;
  font-weight: 850;
}

.project-tree-toggle .project-tree-chevron {
  width: 15px;
  height: 15px;
  justify-self: end;
}

.mini-icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  font-weight: 900;
}

.mini-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.project-node {
  display: grid;
  gap: 4px;
}

.project-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.project-name-btn,
.project-child-link {
  display: grid;
  align-items: center;
  justify-content: start;
  width: 100%;
  border-radius: var(--radius);
  color: #c7d0dd;
  text-align: left;
}

.project-name-btn {
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 11px;
  min-height: 34px;
  padding: 0 8px 0 22px;
  background: transparent;
  font-weight: 900;
}

.project-donut-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 8px;
  height: 8px;
  border: 3px solid rgba(103, 232, 249, 0.95);
  border-radius: 999px;
  box-shadow: none;
}

.project-donut-icon::after {
  display: none;
}

.project-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-name-btn:hover .project-donut-icon,
.project-name-btn.active .project-donut-icon {
  border-color: #fff;
  box-shadow: none;
}

.project-name-btn:not(:has(.project-donut-icon))::before {
  content: "";
  display: inline-grid;
  place-self: center;
  width: 8px;
  height: 8px;
  border: 3px solid rgba(103, 232, 249, 0.95);
  border-radius: 999px;
  box-shadow: none;
}

.project-name-btn:hover:not(:has(.project-donut-icon))::before,
.project-name-btn.active:not(:has(.project-donut-icon))::before {
  border-color: #fff;
  box-shadow: none;
}

.project-only-node .project-name-btn {
  grid-template-columns: minmax(0, 1fr);
}

.project-only-node .project-name-btn::before {
  content: none;
  display: none;
}

.project-action-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.76;
  transition: opacity 160ms ease;
}

.project-node:hover .project-action-badges,
.project-node.active .project-action-badges {
  opacity: 1;
}

.project-action-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.07);
  color: #b8f3ff;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.project-action-badge.tree-edit-toggle,
.project-action-badge.info-toggle {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #fff;
}

.project-action-badge .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.project-action-badge.tree-edit-toggle .icon,
.project-action-badge.info-toggle .icon {
  width: 13px;
  height: 13px;
}

.project-action-badge:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(103, 232, 249, 0.14);
  color: #fff;
}

.project-action-badge.tree-edit-toggle:hover,
.project-action-badge.info-toggle:hover {
  background: transparent;
  color: #fff;
}

.project-action-badge:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.project-action-badges {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.project-name-row:hover .project-action-badges,
.project-node.editing .project-action-badges {
  opacity: 1;
  pointer-events: auto;
}

.project-node:not(.editing) .project-action-badge:not(.tree-edit-toggle):not(.info-toggle) {
  display: none;
}

.project-action-badge.tree-edit-toggle.active {
  border-color: transparent;
  background: transparent;
  color: #fff;
}

.project-name-btn:hover,
.project-name-btn.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.project-flat-menu {
  display: grid;
  gap: 3px;
  padding-top: 4px;
}

.app:not(.project-dashboard) #projectMenu {
  display: grid;
  gap: 4px;
  margin-left: 20px;
  padding-left: 0;
}

.portfolio-project-node {
  position: relative;
}

.portfolio-project-node::before {
  content: none;
}

.portfolio-project-node .project-name-btn {
  min-height: 32px;
  padding: 0 10px 0 0;
  font-size: 13px;
}

.project-child-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius);
  transition: background 140ms ease, opacity 140ms ease;
}

.project-child-item.flat {
  margin-left: 0;
}

.project-only-node {
  gap: 7px;
}

.project-only-node .project-name-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.project-only-node .project-child-link {
  min-height: 34px;
  padding: 0 10px;
}

.project-child-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #9fb1c6;
}

.project-child-icon .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.project-child-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-child-link {
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  min-height: 32px;
}

.project-only-node .project-child-link.active {
  background: rgba(125, 211, 252, 0.13);
  color: #fff;
  box-shadow: inset 3px 0 0 #22d3ee;
}

.project-child-link:hover .project-child-icon,
.project-child-link.active .project-child-icon {
  color: #fff;
}

.project-child-item.dragging {
  opacity: 0.46;
}

.project-child-item.drop-target {
  background: rgba(139, 92, 246, 0.2);
  outline: 1px dashed rgba(196, 181, 253, 0.56);
}

.project-child-link {
  min-height: 30px;
  padding: 0 8px;
  background: transparent;
  font-size: 12px;
  justify-content: stretch;
  justify-items: start;
}

.project-child-link:hover,
.project-child-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.project-order-controls {
  display: flex;
  gap: 2px;
  opacity: 1;
  transition: opacity 140ms ease;
}

.project-order-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #a9b7c8;
}

.project-order-btn .icon {
  width: 12px;
  height: 12px;
}

.project-order-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
}

.project-order-btn:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.app.sidebar-collapsed .sidebar {
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  overflow-x: hidden;
}

.app.sidebar-collapsed .sidebar-header {
  justify-content: center;
}

.app.sidebar-collapsed .sidebar-brand-wrap {
  width: 38px;
  justify-content: center;
}

.app.sidebar-collapsed .sidebar-wordmark {
  display: none;
}

.app.sidebar-collapsed .sidebar-toggle .icon {
  transform: rotate(180deg);
}

.app.sidebar-collapsed .workspace-meta,
.app.sidebar-collapsed .command-shell input,
.app.sidebar-collapsed .side-label,
.app.sidebar-collapsed .project-tree header,
.app.sidebar-collapsed .project-tree,
.app.sidebar-collapsed .project-name-row,
.app.sidebar-collapsed .project-name-btn {
  display: none;
}

.app.sidebar-collapsed .command-shell {
  width: 38px;
  height: 38px;
  min-height: 38px;
  grid-template-columns: 1fr;
  justify-items: center;
  place-items: center;
  padding: 0;
}

.app.sidebar-collapsed .side-menu {
  width: 38px;
  gap: 8px;
  justify-items: center;
}

.app.sidebar-collapsed .project-tree {
  width: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.app.sidebar-collapsed .side-link {
  width: 38px;
  height: 38px;
  min-height: 38px;
  grid-template-columns: 1fr;
  place-items: center;
  justify-content: center;
  justify-items: center;
  padding: 0;
}

.app.sidebar-collapsed .side-link > span:not(.side-label) {
  width: 38px;
  height: 38px;
  place-items: center;
}

.app.sidebar-collapsed .side-link:hover,
.app.sidebar-collapsed .side-link.active {
  transform: translateY(-1px);
}

.app.sidebar-collapsed .sidebar-footer {
  width: 38px;
  justify-items: center;
  padding-top: 10px;
}

.app.sidebar-collapsed .sidebar-rail-toggle {
  justify-self: center;
}

.app.sidebar-collapsed .sidebar-profile-btn {
  width: 38px;
  min-height: 38px;
  grid-template-columns: 38px;
  justify-items: center;
  padding: 0;
}

.app.sidebar-collapsed .sidebar-profile-text {
  display: none;
}

.app.sidebar-collapsed .sidebar-profile-popover {
  left: calc(100% + 10px);
  bottom: 0;
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -22px -22px 18px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(217, 224, 234, 0.84);
  background: rgba(238, 242, 246, 0.86);
  backdrop-filter: blur(14px);
}

.crumb {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.topbar h2 {
  margin-top: 3px;
  font-size: 22px;
}

.session-chip {
  display: inline-grid;
  grid-template-columns: 34px minmax(0, auto);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px 6px 6px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.session-chip .avatar,
.session-chip .avatar {
  background: #0f172a;
  color: #fff;
}

.top-logout-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: #fff;
  color: var(--ink);
}

.top-logout-btn .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.top-logout-btn:hover {
  border-color: rgba(8, 145, 178, 0.38);
  background: #f0fbff;
  color: #05718c;
}

.top-actions,
.view-switch,
.segmented,
.card-meta,
.progress-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-actions,
.view-switch {
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.ai-btn,
.tiny-btn,
.view-chip,
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: var(--radius);
  padding: 0 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.primary-btn {
  border: 1px solid #0e7490;
  background: #0e7490;
  color: #fff;
  box-shadow: none;
}

.ghost-btn,
.danger-btn,
.tiny-btn,
.view-chip,
.segmented button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.danger-btn {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.ai-btn {
  gap: 7px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: var(--ai);
  color: #fff;
  box-shadow: none;
}

.ai-btn-secondary,
.ai-btn-small {
  background: var(--ai-soft);
  color: var(--ai-strong);
  box-shadow: none;
}

.ai-btn-small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.tiny-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.primary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.ai-btn:hover,
.tiny-btn:hover,
.view-chip:hover,
.segmented button:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.primary-btn:active,
.ghost-btn:active,
.danger-btn:active,
.ai-btn:active,
.tiny-btn:active,
.view-chip:active,
.segmented button:active,
.rail-icon:active,
.side-link:active {
  transform: translateY(0) scale(0.98);
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.hero-main {
  min-width: 0;
  min-height: 198px;
  display: grid;
  align-content: center;
  gap: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.94), rgba(223, 247, 251, 0.82)),
    repeating-linear-gradient(90deg, rgba(8, 145, 178, 0.08) 0, rgba(8, 145, 178, 0.08) 1px, transparent 1px, transparent 42px);
  box-shadow: var(--shadow-soft);
}

.hero-main h3 {
  font-size: 28px;
  line-height: 1.2;
}

.hero-main h3:empty {
  display: none;
}

.hero-main p {
  max-width: 780px;
  color: var(--muted);
}

.hero-main > .overline,
.hero-main p:empty,
.hero-ops:empty {
  display: none;
}

.hero-ops {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.hero-ops.hero-spotlight {
  position: relative;
  display: block;
  min-height: 274px;
  margin-top: 0;
  overflow: hidden;
}

.control-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px 34px 24px;
  color: var(--ink);
}

.control-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 31px;
}

.control-metrics {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.control-metrics span {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.control-metrics b {
  color: var(--ink);
  font-weight: 950;
}

.control-board {
  min-width: 0;
  display: grid;
  grid-template-rows: 128px auto;
  gap: 12px;
}

.control-rail {
  position: relative;
  min-height: 128px;
  padding: 34px 18px 20px;
}

.control-track {
  position: absolute;
  left: 42px;
  right: 42px;
  top: 58px;
  height: 12px;
  border-radius: 999px;
  background: rgba(95, 130, 160, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.control-track-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--track-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, #22a9c2, #47c7d5);
}

.control-today {
  position: absolute;
  left: clamp(42px, var(--today-left), calc(100% - 42px));
  top: 17px;
  z-index: 3;
  width: 44px;
  height: 42px;
  background: transparent;
  transform: translateX(-50%);
}

.control-today::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 21px;
  width: 0;
  height: 0;
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  border-top: 17px solid #ef4444;
  filter: drop-shadow(0 5px 6px rgba(239, 68, 68, 0.28));
  transform: translateX(-50%);
  animation: todayMarkerBob 1300ms ease-in-out infinite;
}

.control-today b {
  position: absolute;
  left: 50%;
  top: 0;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 950;
  transform: translateX(-50%);
  white-space: nowrap;
}

@keyframes todayMarkerBob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.control-phases {
  position: absolute;
  inset: 0 42px;
}

.control-phase {
  position: absolute;
  left: var(--phase-left);
  top: 50px;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 90px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
}

.control-phase-dot {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(95, 130, 160, 0.34);
}

.control-phase.done .control-phase-dot {
  background: #35b3ca;
  box-shadow: 0 0 0 2px rgba(15, 127, 152, 0.42);
}

.control-phase.active .control-phase-dot {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.36);
}

.control-phase strong,
.control-phase small {
  overflow: hidden;
  max-width: 96px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-phase small {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 10px;
}

.control-briefs {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
}

.control-brief {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 90px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.control-brief.primary {
  border-color: rgba(8, 145, 178, 0.22);
}

.control-brief span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.control-brief strong {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.control-brief strong span {
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-brief em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-main:has(.hero-ops.hero-spotlight),
.app.portfolio-dashboard .hero-main,
.app.project-dashboard .hero-main {
  min-height: 288px;
  align-content: stretch;
  gap: 10px;
  padding: 0;
  overflow: hidden;
}

.hero-main:has(.hero-ops.hero-spotlight) > .overline,
.hero-main:has(.hero-ops.hero-spotlight) h3,
.hero-main:has(.hero-ops.hero-spotlight) p,
.app.portfolio-dashboard .hero-main > .overline,
.app.portfolio-dashboard .hero-main h3,
.app.portfolio-dashboard .hero-main p,
.app.project-dashboard .hero-main > .overline,
.app.project-dashboard .hero-main h3,
.app.project-dashboard .hero-main p {
  display: none;
}

.hero-main:has(.hero-ops.hero-spotlight) .hero-ops.hero-spotlight,
.app.portfolio-dashboard .hero-ops.hero-spotlight,
.app.project-dashboard .hero-ops.hero-spotlight {
  min-height: 288px;
  height: 100%;
  margin-top: 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-width: 0;
  display: grid;
  align-content: space-between;
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric-card span,
.metric-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
}

.metric-card strong {
  margin-top: 6px;
  font-size: 26px;
}

.metric-card.tone-1 {
  border-top: 3px solid var(--cyan);
}

.metric-card.tone-2 {
  border-top: 3px solid var(--blue);
}

.metric-card.tone-3 {
  border-top: 3px solid var(--orange);
}

.metric-card.tone-4 {
  border-top: 3px solid var(--red);
}

.view-switch {
  display: none;
}

.mobile-dashboard-menu {
  display: none;
}

.mobile-dashboard-menu-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.mobile-dashboard-menu-head h3 {
  margin: 0;
  font-size: 15px;
}

.mobile-dashboard-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mobile-menu-btn {
  min-width: 0;
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 900;
}

.mobile-menu-btn .icon {
  width: 20px;
  height: 20px;
  color: var(--cyan);
}

.mobile-menu-btn span {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-btn.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.mobile-menu-btn.active .icon {
  color: #fff;
}

.view-chip {
  min-height: 34px;
  padding: 0 12px;
}

.view-chip.active,
.segmented button.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  gap: 14px;
  align-items: start;
}

.app.portfolio-dashboard .hero {
  grid-template-columns: minmax(0, 1fr);
}

.app.portfolio-dashboard .hero-main {
  min-height: 176px;
}

.app.portfolio-dashboard .content-grid {
  grid-template-columns: minmax(0, 1fr);
}

.app.portfolio-dashboard .inspector {
  display: none;
}

.app.portfolio-dashboard .overview-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.app.portfolio-dashboard .overview-layout .panel:first-child {
  grid-row: span 2;
}

.app.portfolio-dashboard .overview-layout .panel.span-2 {
  grid-column: auto;
}

.work-surface {
  min-width: 0;
}

.view-pane {
  display: none;
  animation: fadeUp 220ms ease both;
}

.view-pane.active {
  display: block;
}

.overview-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.panel.span-2 {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin-top: 2px;
  font-size: 16px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.view-filter-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.view-filter-tabs button {
  min-height: 24px;
  border: 0;
  border-radius: 0;
  padding: 0 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
}

.view-filter-tabs button + button::before {
  content: "|";
  display: inline-block;
  margin-right: 8px;
  color: #cbd5e1;
  font-weight: 700;
}

.view-filter-tabs button.active {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.view-filter-tabs button:hover {
  color: var(--ink);
}

.board-phase-filter,
.gantt-level-filter {
  justify-content: flex-start;
}

.panel-head > strong {
  font-size: 24px;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.phase-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.phase-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 1.1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-radius: var(--radius);
  padding: 0 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.phase-row:hover {
  background: var(--surface-soft);
  transform: translateX(2px);
}

.portfolio-project-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.portfolio-project-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 76px minmax(120px, 0.8fr) 48px 74px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.portfolio-project-row:hover {
  border-color: rgba(8, 145, 178, 0.28);
  background: #f8fdff;
}

.portfolio-project-row strong,
.portfolio-project-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-project-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.portfolio-row-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.portfolio-row-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2, #2563eb);
}

.portfolio-stat-list,
.portfolio-engineer-list,
.portfolio-status-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.portfolio-stat-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
}

.portfolio-stat-row strong {
  color: var(--ink);
  font-size: 18px;
}

.portfolio-stat-row small,
.portfolio-stat-row em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.portfolio-stat-bars {
  display: grid;
  gap: 5px;
}

.portfolio-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f8;
}

.portfolio-bar::before {
  content: "";
  display: block;
  width: var(--bar);
  height: 100%;
  border-radius: inherit;
  background: #0891b2;
}

.portfolio-bar.done::before {
  background: #16a34a;
}

.portfolio-bar.draft::before {
  background: #64748b;
}

.portfolio-bar b {
  position: absolute;
  inset: 0 8px;
  display: flex;
  align-items: center;
  color: #0f172a;
  font-size: 10px;
  font-weight: 900;
}

.portfolio-status-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: 0;
}

.portfolio-status-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
}

.portfolio-status-item strong {
  color: var(--ink);
  font-size: 22px;
}

.portfolio-status-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.portfolio-status-item i {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f8;
}

.portfolio-status-item i::before {
  content: "";
  display: block;
  width: var(--bar);
  height: 100%;
  border-radius: inherit;
  background: #0891b2;
}

.portfolio-status-item.draft i::before {
  background: #64748b;
}

.portfolio-status-item.done i::before {
  background: #16a34a;
}

.portfolio-status-item.paused i::before {
  background: #f59e0b;
}

.portfolio-status-item.discarded i::before {
  background: #ef4444;
}

.portfolio-engineer-row {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(150px, 1fr) 64px 96px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.portfolio-engineer-row strong,
.portfolio-engineer-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-engineer-row small,
.portfolio-engineer-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.portfolio-engineer-row > b {
  text-align: right;
}

.portfolio-engineer-row i {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f8;
}

.portfolio-engineer-row i::before {
  content: "";
  display: block;
  width: var(--load);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2, #2563eb);
}

.phase-name,
.phase-value {
  font-size: 12px;
  font-weight: 760;
}

.phase-value {
  color: var(--muted);
  text-align: right;
}

.bar {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf4;
}

.bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.project-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.project-fact-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}

.project-fact-card span,
.project-fact-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.project-fact-card strong {
  color: var(--ink);
  font-size: 18px;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(236px, 1fr));
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
}

.panel .board {
  padding: 14px;
}

.board.compact {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
}

.board-empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
}

.board-column {
  min-width: 236px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.board-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
}

.board-column header strong,
.board-column header span {
  display: block;
}

.board-column header span {
  color: var(--muted);
  font-size: 11px;
}

.board-column header b {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.card-list {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 320px;
  padding: 10px;
}

.board-phase-group {
  display: grid;
  gap: 7px;
}

.board-phase-group h4 {
  margin: 4px 0 0;
  border-radius: 7px;
  padding: 6px 8px;
  background: #eaf6fb;
  color: #075985;
  font-size: 11px;
  font-weight: 900;
}

.task-card,
.deliverable-card,
.note-row,
.daily-log-row,
.api-card,
.risk-row,
.member-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.task-card:hover,
.deliverable-card:hover,
.note-row:hover,
.daily-log-row:hover,
.api-card:hover,
.risk-row:hover,
.member-row:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.task-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 11px;
}

.task-card strong {
  font-size: 13px;
  line-height: 1.35;
}

.task-card small {
  color: var(--muted);
  font-size: 12px;
}

.card-meta {
  justify-content: space-between;
  gap: 8px;
}

.card-meta > span:first-child {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-card,
.empty-row {
  color: var(--muted);
  font-size: 12px;
}

.empty-card {
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.status,
.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.status.todo {
  background: var(--surface-strong);
  color: #475467;
}

.status.open {
  background: var(--red-soft);
  color: var(--red);
}

.status.delayed {
  background: #fff7ed;
  color: #c2410c;
}

.status.doing {
  background: var(--blue-soft);
  color: var(--blue);
}

.status.done {
  background: var(--green-soft);
  color: var(--green);
}

.status.review,
.status.planned {
  background: var(--orange-soft);
  color: var(--orange);
}

.status.ready {
  background: var(--blue-soft);
  color: var(--blue);
}

.status.active {
  background: var(--green-soft);
  color: var(--green);
}

.status.prospect {
  background: var(--blue-soft);
  color: var(--blue);
}

.status.inactive {
  background: var(--surface-strong);
  color: #475467;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.data-table tr {
  transition: background 140ms ease;
}

.view-pane[data-pane="wbs"] .data-table {
  table-layout: fixed;
  min-width: 1180px;
}

.wbs-tree-col {
  width: 54px;
}

.wbs-title-col {
  width: 420px;
}

.wbs-status-col {
  width: 92px;
}

.wbs-owner-col {
  width: 96px;
}

.wbs-period-col {
  width: 210px;
}

.wbs-progress-col {
  width: 150px;
}

.wbs-parent-col {
  width: 150px;
}

.view-pane[data-pane="wbs"] .data-table th,
.view-pane[data-pane="wbs"] .data-table td {
  text-align: center;
}

.view-pane[data-pane="wbs"] .data-table th:first-child,
.view-pane[data-pane="wbs"] .data-table td:first-child {
  text-align: left;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr.wbs-phase-row {
  background: #f3f9fc;
}

.data-table tbody tr.wbs-phase-row:hover {
  background: #e9f6fb;
}

.data-table tbody tr.wbs-phase-row td {
  border-top: 1px solid #cfe3ef;
  border-bottom-color: #cfe3ef;
}

.data-table tbody tr.wbs-task-row td:first-child {
  position: relative;
}

.data-table tbody tr.wbs-task-row td:first-child::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d7e8f1;
}

.issue-table {
  min-width: 1080px;
  table-layout: fixed;
}

.issue-table th:nth-child(1),
.issue-table td:nth-child(1) {
  width: 118px;
}

.issue-table th:nth-child(2),
.issue-table td:nth-child(2) {
  width: 96px;
}

.issue-table th:nth-child(3),
.issue-table td:nth-child(3) {
  width: 92px;
}

.issue-table th:nth-child(4),
.issue-table td:nth-child(4) {
  width: 260px;
}

.issue-table th:nth-child(5),
.issue-table td:nth-child(5) {
  width: 96px;
}

.issue-table td {
  vertical-align: top;
}

.issue-note-cell {
  min-width: 360px;
  color: #334155;
  line-height: 1.55;
  white-space: pre-line;
}

.wbs-phase-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  text-align: left;
}

.wbs-phase-heading strong {
  display: block;
  align-items: center;
  min-width: 0;
  color: #0f172a;
  font-weight: 900;
  word-break: keep-all;
}

.wbs-phase-heading strong span {
  color: #075985;
}

.task-title-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  text-align: left;
  line-height: 1.35;
  word-break: keep-all;
}

.task-title-cell strong {
  min-width: 0;
}

.task-title-cell.indent-1 {
  padding-left: 14px;
  position: relative;
}

.task-title-cell.indent-1::before {
  content: none;
}

.task-title-cell.indent-2 {
  padding-left: 34px;
  position: relative;
}

.task-title-cell.indent-2::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 12px;
  height: 1px;
  background: #c9deea;
}

.task-title-cell.indent-3,
.task-title-cell.indent-4,
.task-title-cell.indent-5 {
  padding-left: 52px;
}

.wbs-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  margin-right: 2px;
  border-radius: 6px;
  border: 1px solid rgba(14, 116, 144, 0.16);
  background: #e4f3f8;
  color: #0e7490;
  font-weight: 900;
  transition: background 140ms ease, border-color 140ms ease;
}

.wbs-toggle .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.6;
}

.wbs-toggle:hover {
  background: #d4edf6;
  border-color: rgba(14, 116, 144, 0.26);
}

.progress-cell {
  min-width: 128px;
  justify-content: center;
}

.progress-cell .bar {
  width: 92px;
}

.segmented {
  gap: 4px;
  border-radius: var(--radius);
}

.segmented button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.gantt {
  display: grid;
  gap: 0;
  padding: 14px;
  overflow-x: auto;
}

.gantt-phase-summary {
  width: 100%;
  min-width: var(--gantt-min-width, 1026px);
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.gantt-phase-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gantt-phase-summary-head strong {
  font-size: 13px;
}

.gantt-phase-summary-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gantt-phase-stack-wrap {
  position: relative;
  padding-top: 28px;
}

.gantt-phase-stack {
  display: flex;
  min-height: 44px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.gantt-phase-time-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
}

.gantt-phase-time-marker.active {
  left: 0;
  right: 0;
}

.gantt-phase-time-marker.active::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 0;
  left: var(--today-left);
  border-left: 2px solid #0e7490;
}

.gantt-phase-time-marker.before {
  left: 0;
}

.gantt-phase-time-marker.after {
  right: 0;
}

.gantt-phase-time-marker span {
  position: absolute;
  top: 0;
  left: var(--today-left, 0);
  transform: translateX(-50%);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.gantt-phase-time-marker.active span {
  border-color: rgba(14, 116, 144, 0.28);
  background: #e8f6fb;
  color: #0e7490;
}

.gantt-phase-time-marker.before span {
  left: 0;
  transform: translateX(0);
}

.gantt-phase-time-marker.after span {
  left: auto;
  right: 0;
  transform: translateX(0);
}

.gantt-phase-segment {
  width: var(--phase-width);
  min-width: 92px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.82);
  padding: 6px 10px;
  color: #0f172a;
  text-align: left;
}

.gantt-phase-segment:last-child {
  border-right: 0;
}

.gantt-phase-segment strong,
.gantt-phase-segment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-phase-segment strong {
  font-size: 12px;
  font-weight: 900;
}

.gantt-phase-segment span {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.78;
}

.gantt-phase-segment.tone-1 {
  background: #e8f6fb;
}

.gantt-phase-segment.tone-2 {
  background: #e9efff;
}

.gantt-phase-segment.tone-3 {
  background: #eaf8ee;
}

.gantt-phase-segment.tone-4 {
  background: #fff4dd;
}

.gantt-phase-segment.tone-5 {
  background: #f3edff;
}

.gantt-months,
.gantt-row {
  display: grid;
  grid-template-columns: 210px minmax(var(--gantt-timeline-min, 560px), 1fr) 86px 170px;
  width: 100%;
  min-width: var(--gantt-min-width, 1026px);
  align-items: center;
}

.gantt-months {
  min-height: 36px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.gantt-months > span:nth-child(3),
.gantt-months > span:nth-child(4) {
  justify-self: stretch;
  text-align: center;
}

.gantt-scale {
  display: grid;
  grid-template-columns: repeat(var(--gantt-month-count), minmax(0, 1fr));
  align-self: stretch;
  align-items: center;
  min-width: 0;
}

.gantt-scale b {
  display: grid;
  place-items: center;
  height: 100%;
  border-left: 1px solid transparent;
  font-size: 11px;
}

.gantt-body {
  position: relative;
  width: 100%;
  min-width: var(--gantt-min-width, 1026px);
}

.gantt-row {
  min-height: 46px;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.gantt-row.phase {
  background: #f3f9fc;
  border-top-color: #cfe3ef;
}

.gantt-row.phase + .gantt-row.task {
  border-top-color: #cfe3ef;
}

.gantt-label {
  padding-right: 12px;
  font-weight: 800;
}

.gantt-row.phase .gantt-label {
  color: #0f172a;
  font-weight: 900;
}

.gantt-track {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 14px;
  border-radius: 999px;
  background: #e7edf4;
}

.gantt-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: var(--cyan);
}

.gantt-bar.done {
  background: var(--green);
}

.gantt-bar.doing {
  background: var(--blue);
}

.gantt-bar.open {
  background: var(--red);
}

.gantt-dates {
  justify-self: stretch;
  padding-left: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.gantt-duration {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  min-width: 44px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.gantt-row.phase .gantt-duration {
  background: #dff7fb;
  color: #0e7490;
}

.calendar-panel .panel-head {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
}

.calendar-panel .panel-head > div:first-child {
  min-width: 0;
}

.calendar-toolbar {
  display: contents;
}

.calendar-center-controls {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.calendar-mode,
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-mode button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.calendar-mode button.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.calendar-nav strong {
  min-width: 150px;
  text-align: center;
}

.calendar-arrow-btn {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.calendar-arrow-btn .icon {
  width: 15px;
  height: 15px;
}

.calendar-engineer-filter {
  width: min(220px, 100%);
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 30px 0 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.calendar-right-controls {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.calendar-add-event-btn {
  flex: 0 0 auto;
  height: 30px;
  min-height: 30px;
}

.calendar-board {
  padding: 14px;
}

.calendar-board.month {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 1px;
  background: var(--line);
  overflow-x: auto;
}

.calendar-weekday,
.calendar-day {
  min-width: 118px;
  background: var(--surface);
}

.calendar-weekday {
  min-height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 126px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
}

.calendar-date-button {
  width: fit-content;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.calendar-day.muted {
  background: #f8fafc;
  color: var(--faint);
}

.calendar-weekday:first-child,
.calendar-weekday:last-child,
.calendar-day.weekend time,
.calendar-day.holiday time {
  color: var(--red);
}

.calendar-day time {
  font-size: 12px;
  font-weight: 900;
}

.calendar-day.weekend,
.calendar-day.holiday {
  background: #fff8f8;
}

.calendar-day-label {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.calendar-event-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.calendar-event {
  min-width: 0;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(14, 116, 144, 0.15);
  border-left: 3px solid var(--cyan);
  border-radius: 7px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.calendar-event:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
  background: #fff;
}

.calendar-event span {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-event strong,
.calendar-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event strong {
  font-size: 12px;
  font-weight: 900;
}

.calendar-event small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.calendar-event.phase {
  border-left-color: #0e7490;
  background: #eff9fc;
}

.calendar-event.done {
  border-left-color: var(--green);
}

.calendar-event.doing {
  border-left-color: var(--blue);
}

.calendar-event.open {
  border-left-color: var(--red);
}

.calendar-event.staffing {
  border-color: rgba(79, 70, 229, 0.16);
  border-left-color: #4f46e5;
  background: #f5f7ff;
}

.calendar-event.staffing span {
  color: #4f46e5;
}

.calendar-special-event {
  grid-template-columns: 22px 46px minmax(0, 1fr);
  align-items: center;
  border-color: rgba(124, 58, 237, 0.18);
  border-color: color-mix(in srgb, var(--event-border-color, #7c3aed) 22%, transparent);
  border-left-color: var(--event-border-color, #7c3aed);
  background: var(--event-bg-color, #f7f4ff);
}

.calendar-special-event span:not(.calendar-event-icon) {
  color: var(--event-border-color, #6d28d9);
}

.calendar-event-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: transparent;
  color: var(--event-border-color, #7c3aed);
}

.calendar-event-icon .icon {
  width: 14px;
  height: 14px;
}

.calendar-board.month .calendar-event {
  min-height: 25px;
  padding: 4px 6px;
}

.calendar-board.month .calendar-event span,
.calendar-board.month .calendar-event small {
  display: none;
}

.calendar-board.month .calendar-special-event {
  grid-template-columns: 18px minmax(0, 1fr);
}

.calendar-board.month .calendar-special-event .calendar-event-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.calendar-board.month .calendar-special-event .calendar-event-icon .icon {
  width: 12px;
  height: 12px;
}

.calendar-board.month .calendar-event strong {
  font-size: 11px;
}

.calendar-board.week,
.calendar-board.day {
  display: grid;
  gap: 10px;
}

.calendar-agenda-day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-agenda-day.weekend,
.calendar-agenda-day.holiday {
  border-color: rgba(220, 38, 38, 0.16);
  background: #fff8f8;
}

.calendar-agenda-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.calendar-agenda-day header time {
  font-weight: 900;
}

.calendar-agenda-day.weekend header time,
.calendar-agenda-day.holiday header time {
  color: var(--red);
}

.calendar-agenda-day header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-agenda-day .calendar-event-list {
  padding: 10px 12px 12px;
}

.calendar-agenda-day .calendar-event {
  grid-template-columns: 72px minmax(0, 1fr) 170px;
  align-items: center;
  min-height: 38px;
}

.calendar-agenda-day .calendar-special-event {
  grid-template-columns: 28px 72px minmax(0, 1fr) 170px;
}

.calendar-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.installation-form {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.install-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.install-section header {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: var(--surface-soft);
}

.install-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.install-center-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.install-center-add-btn {
  box-shadow: none;
}

.install-center-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
  overflow-x: auto;
}

.install-center-tab {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.install-center-tab.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.install-center-panes {
  display: grid;
}

.install-center-pane {
  display: none;
  gap: 12px;
  padding: 14px;
}

.install-center-pane.active {
  display: grid;
}

.install-center-name-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.install-center-name-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.install-center-name-row input {
  width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  max-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 var(--control-padding-x);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
}

.install-center-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.install-center-fieldset header {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--surface-soft);
}

.install-center-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.install-center-empty strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.ghost-btn {
  background: #fff;
}

.install-choice-body {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.install-choice-body p {
  display: none;
}

.install-choice-group {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border-top: 1px solid #edf2f7;
  padding-top: 8px;
}

.install-choice-group > strong {
  min-height: 32px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.install-choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  column-gap: 14px;
  row-gap: 4px;
}

.install-choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 28px;
  border: 0;
  border-radius: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
  transition: color 140ms ease;
}

.install-choice-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--cyan);
  flex: 0 0 auto;
}

.install-choice-row.checked {
  color: #075985;
}

.install-choice-row:hover {
  color: #075985;
}

.install-choice-row span {
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.install-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.install-grid label.wide {
  grid-column: 1 / -1;
}

.install-grid input,
.install-grid select,
.install-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: none;
}

.install-grid input,
.install-grid select {
  height: var(--control-height);
  min-height: var(--control-height);
  max-height: var(--control-height);
  padding: 0 var(--control-padding-x);
  line-height: 1.2;
}

.install-grid textarea {
  min-height: 82px;
  padding: 10px var(--control-padding-x);
  resize: vertical;
}

.install-grid textarea.install-license-textarea {
  min-height: 190px;
  overflow-y: hidden;
  line-height: 1.5;
  resize: vertical;
}

.install-tabbar {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  margin: 14px 14px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  overflow: hidden;
}

.install-tabbar button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.install-tabbar button:last-child {
  border-right: 0;
}

.install-tabbar button.active {
  background: #0f172a;
  color: #fff;
}

.install-tab-panel {
  display: grid;
  gap: 12px;
}

.install-actions {
  display: flex;
  justify-content: flex-end;
}

.deliverable-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.deliverable-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 148px;
  padding: 14px;
}

.deliverable-card p,
.deliverable-card small,
.note-row small,
.daily-log-row small,
.activity-item p,
.activity-item time,
.risk-row small,
.member-row small {
  color: var(--muted);
}

.deliverable-card strong {
  font-size: 15px;
}

.file-chip,
.file-link,
.file-help {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  border: 1px solid rgba(8, 145, 178, 0.2);
  border-radius: 999px;
  padding: 0 10px;
  background: #edfafe;
  color: #075985;
  font-size: 12px;
  font-weight: 850;
}

.file-link {
  appearance: none;
  cursor: pointer;
  text-decoration: none;
}

.file-help {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.file-upload-field input[type="file"] {
  display: flex;
  align-items: center;
  min-height: var(--control-height);
  padding: 8px 12px;
  line-height: 1.2;
}

.notes-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.view-pane[data-pane="notes"] .panel + .panel {
  margin-top: 28px;
}

.daily-log-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.note-row,
.daily-log-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 74px;
  align-items: start;
  gap: 12px;
  min-height: 92px;
  padding: 12px;
}

.note-row time {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.daily-log-row time {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.note-row span,
.daily-log-row span {
  display: grid;
  gap: 6px;
}

.note-body-preview {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.45;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.daily-log-row em {
  color: #b45309;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.note-row b,
.daily-log-row b {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.settings-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px;
  background: #fff;
}

.settings-tabbar button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.settings-tabbar button.active {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #fff;
  box-shadow: none;
}

.settings-tab-panel {
  display: none;
  gap: 14px;
}

.settings-tab-panel.active {
  display: grid;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(320px, 1.28fr);
  gap: 12px;
  padding: 14px;
}

.settings-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.setting-status {
  display: grid;
  gap: 8px;
}

.setting-status strong {
  font-size: 16px;
}

.setting-status small {
  color: var(--muted);
  font-size: 12px;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-form input,
.settings-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: none;
}

.settings-form input {
  height: var(--control-height);
  min-height: var(--control-height);
  max-height: var(--control-height);
  padding: 0 var(--control-padding-x);
  line-height: 1.2;
}

.settings-form textarea {
  min-height: 136px;
  max-height: 240px;
  resize: vertical;
  padding: 12px var(--control-padding-x);
  line-height: 1.55;
}

.settings-form .settings-prompt-label {
  grid-column: 1 / -1;
}

.google-ai-settings {
  grid-template-columns: minmax(0, 1fr);
}

.google-ai-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.google-ai-key-panel {
  display: grid;
  grid-template-columns: 220px minmax(220px, 1fr) minmax(180px, 0.55fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
}

.google-ai-key-panel .setting-status {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.google-ai-key-panel .settings-error {
  grid-column: 1 / -1;
}

.google-ai-key-panel .compact-actions {
  grid-column: auto;
  align-self: end;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.settings-form .ai-prompt-stack {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.settings-form .prompt-layer {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f8fafc;
}

.settings-form .prompt-layer span {
  display: grid;
  gap: 3px;
}

.settings-form .prompt-layer strong {
  color: var(--ink);
  font-size: 13px;
}

.settings-form .prompt-layer small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.settings-form .prompt-layer textarea {
  min-height: 154px;
  background: #fff;
}

.settings-actions {
  grid-column: 1 / -1;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-error {
  border-radius: var(--radius);
  padding: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
}

.catalog-settings {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.catalog-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}

.catalog-section[draggable="true"] > header,
.catalog-group[draggable="true"] > .catalog-group-head,
.catalog-item[draggable="true"] {
  cursor: grab;
}

.catalog-section.dragging,
.catalog-group.dragging,
.catalog-item.dragging {
  opacity: 0.48;
}

.catalog-section.drop-target,
.catalog-group.drop-target,
.catalog-item.drop-target {
  outline: 2px dashed rgba(8, 145, 178, 0.42);
  outline-offset: 2px;
}

.catalog-section.drop-target {
  background: #f0fbff;
}

.catalog-group.drop-target {
  border-radius: var(--radius);
  background: #f5fcff;
}

.catalog-item.drop-target {
  border-color: rgba(8, 145, 178, 0.44);
  background: #e8f8fb;
}

.catalog-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-section header > div {
  min-width: 0;
}

.catalog-section header strong {
  color: var(--ink);
  font-size: 14px;
}

.catalog-section header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.catalog-group-list {
  display: grid;
  gap: 6px;
}

.catalog-group {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-top: 1px solid #edf2f7;
  padding-top: 6px;
}

.catalog-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  min-height: 30px;
}

.catalog-group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.catalog-inline-input {
  width: 100%;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.catalog-item-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 5px;
}

.catalog-item,
.catalog-add-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px 0 10px;
  background: var(--surface-soft);
}

.catalog-add-card {
  border-style: dashed;
  background: #fff;
  color: var(--muted);
}

.catalog-add-card:hover {
  border-color: rgba(8, 145, 178, 0.32);
  background: #f8fdff;
}

.catalog-add-card input {
  width: 100%;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.catalog-add-card input:focus {
  outline: none;
}

.catalog-add-item,
.catalog-add-group,
.catalog-add-section {
  justify-content: center;
  min-height: 34px;
  color: #0891b2;
  font-size: 12px;
  font-weight: 900;
}

.catalog-add-item .icon,
.catalog-add-group .icon,
.catalog-add-section .icon {
  width: 15px;
  height: 15px;
}

.catalog-group-add {
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid #edf2f7;
}

.catalog-group-add .catalog-add-group {
  grid-column: 1 / -1;
}

.catalog-section-add {
  padding: 12px 14px;
}

.catalog-section-add header {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(180px, 1fr);
}

.catalog-section-add .catalog-add-section {
  width: 100%;
  min-height: 42px;
}

.catalog-item b {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.catalog-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.catalog-section .icon-badge {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0;
  background: var(--surface);
  color: var(--muted);
}

.catalog-section .icon-badge .icon {
  width: 14px;
  height: 14px;
}

.catalog-section .icon-badge.edit {
  border-color: rgba(8, 145, 178, 0.2);
  background: #e8f8fb;
  color: #0e7490;
}

.catalog-section .icon-badge.delete {
  border-color: rgba(239, 68, 68, 0.2);
  background: #fff1f2;
  color: #b91c1c;
}

.catalog-section .icon-badge:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.catalog-item button:not(.icon-badge) {
  flex: 0 0 auto;
  min-height: 20px;
  border: 0;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff1f2;
  color: #be123c;
  font-size: 11px;
  font-weight: 900;
}

.wbs-template-settings {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.wbs-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.wbs-formula-note {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.wbs-formula-note strong {
  color: var(--ink);
  font-size: 13px;
}

.wbs-formula-note.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.wbs-formula-note.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.wbs-formula-bar {
  position: relative;
  display: flex;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  user-select: none;
  touch-action: none;
}

.wbs-formula-segment {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  background: var(--phase-color);
  color: #0f172a;
  box-shadow: inset -1px 0 rgba(15, 23, 42, 0.08);
}

.wbs-formula-segment span,
.wbs-formula-segment b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wbs-formula-segment span {
  font-size: 12px;
  font-weight: 900;
}

.wbs-formula-segment b {
  font-size: 13px;
}

.wbs-formula-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  margin-left: -9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
  z-index: 2;
}

.wbs-formula-handle::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.32);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.86), 0 4px 12px rgba(15, 23, 42, 0.14);
}

.wbs-formula-handle:hover::before,
.wbs-formula-handle.dragging::before {
  width: 5px;
  background: #0f172a;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.18);
}

.wbs-template-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(360px, 1fr) 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.wbs-template-head {
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.wbs-template-head.center {
  text-align: center;
}

.wbs-template-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(360px, 1fr) 52px;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.wbs-template-row > * {
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.wbs-template-row:last-child {
  border-bottom: 0;
}

.wbs-template-row.phase > * {
  background: transparent;
}

.wbs-template-row.phase {
  background: #fbfdff;
}

.wbs-template-row input,
.wbs-template-row select,
.wbs-template-row textarea {
  width: 100%;
}

.wbs-template-phase-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.wbs-template-row input[name="phaseTitle"] {
  align-self: start;
  height: 38px;
  min-height: 38px;
  margin-top: 0;
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  text-align: left;
}

.wbs-template-row > button {
  justify-self: center;
  align-self: start;
  min-height: 30px;
  margin-top: 5px;
  padding: 0 10px;
  border-radius: 8px;
}

.wbs-template-settings .icon-badge {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0;
  background: var(--surface);
  color: var(--muted);
}

.wbs-template-settings .icon-badge .icon {
  width: 14px;
  height: 14px;
}

.wbs-template-settings .icon-badge.delete {
  border-color: rgba(239, 68, 68, 0.2);
  background: #fff1f2;
  color: #b91c1c;
}

.wbs-template-row > .wbs-template-remove {
  justify-self: center;
  align-self: start;
  margin-top: 5px;
}

.wbs-template-add-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  border: 0;
  border-top: 1px dashed #bfd4e3;
  padding: 0 12px;
  background: #f8fdff;
  color: #0891b2;
  font-size: 13px;
  font-weight: 900;
}

.wbs-template-add-row:hover {
  background: #eefbff;
}

.wbs-template-add-row .icon {
  width: 15px;
  height: 15px;
}

.wbs-template-row textarea {
  min-height: 74px;
  padding-top: 11px;
  line-height: 1.45;
  resize: vertical;
}

.wbs-subtask-add-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px dashed #bfd4e3;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #0891b2;
  font-size: 12px;
  font-weight: 900;
}

.wbs-subtask-add-card:hover {
  background: #f8fdff;
}

.wbs-subtask-add-card .icon {
  width: 14px;
  height: 14px;
}

.formula-weight-badge {
  min-width: 58px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e8f8fb;
  color: #075985;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.formula-weight-badge.small {
  min-width: 52px;
  padding: 5px 8px;
  font-size: 11px;
}

.wbs-subformula-editor {
  display: grid;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.wbs-subformula-bar {
  position: relative;
  display: flex;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  user-select: none;
  touch-action: none;
}

.wbs-subformula-segment {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 5px 8px;
  background: var(--phase-color);
  color: #0f172a;
  box-shadow: inset -1px 0 rgba(15, 23, 42, 0.08);
}

.wbs-subformula-segment span,
.wbs-subformula-segment b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wbs-subformula-segment span {
  font-size: 11px;
  font-weight: 900;
}

.wbs-subformula-segment b {
  font-size: 11px;
}

.wbs-subformula-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  margin-left: -8px;
  border: 0;
  background: transparent;
  cursor: ew-resize;
  z-index: 2;
}

.wbs-subformula-handle::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.wbs-subformula-handle:hover::before,
.wbs-subformula-handle.dragging::before {
  width: 5px;
  background: #0f172a;
}

.wbs-subformula-empty {
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.wbs-subtask-list {
  display: grid;
  gap: 6px;
}

.wbs-subtask-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.wbs-subtask-row .wbs-template-remove {
  align-self: center;
}

.wbs-subtask-row input[name="subtaskTitle"] {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.wbs-preview-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.wbs-preview-panel header {
  display: grid;
  gap: 3px;
}

.wbs-preview-panel header strong {
  color: var(--ink);
  font-size: 15px;
}

.wbs-preview-list {
  display: grid;
  gap: 8px;
}

.wbs-preview-phase {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.wbs-preview-phase-head,
.wbs-preview-subtasks div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wbs-preview-phase-head b {
  color: var(--ink);
  font-size: 13px;
}

.wbs-preview-phase-head span,
.wbs-preview-subtasks b {
  color: #075985;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.wbs-preview-subtasks {
  display: grid;
  gap: 4px;
}

.wbs-preview-subtasks div {
  border-top: 1px solid #e2e8f0;
  padding-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.api-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 12px;
}

.api-card strong {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.method.get {
  width: max-content;
  background: var(--blue-soft);
  color: var(--blue);
}

.method.post {
  width: max-content;
  background: var(--purple-soft);
  color: var(--purple);
}

.method.patch {
  width: max-content;
  background: var(--orange-soft);
  color: var(--orange);
}

.method.delete {
  width: max-content;
  background: var(--red-soft);
  color: var(--red);
}

.inspector {
  position: sticky;
  top: 142px;
  display: grid;
  gap: 12px;
}

.inspector-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.inspector-card header {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

#riskList,
.member-load,
.activity-list {
  display: grid;
  gap: 8px;
}

.activity-list {
  max-height: 286px;
  overflow: hidden;
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  align-items: start;
  gap: 12px;
  padding: 14px;
}

.member-pool-grid {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.staffing-layer {
  display: grid;
  gap: 10px;
}

.staffing-layer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #f8fafc;
}

.staffing-layer > header strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.staffing-layer > header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.staffing-layer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 12px;
}

#staffPoolGrid.member-pool-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  align-items: start;
}

.customer-staffing-layer > header {
  background: #f6f9fb;
}

.customer-staffing-layer .staffing-layer-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.selection-summary strong {
  color: var(--text);
}

.member-pool-card,
.customer-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  text-align: left;
}

.member-pool-card {
  position: relative;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.member-pool-card:hover {
  border-color: rgba(8, 145, 178, 0.38);
  box-shadow: none;
  transform: translateY(-1px);
}

.member-pool-card.selected {
  border-color: rgba(8, 145, 178, 0.72);
  background: linear-gradient(180deg, #f8ffff, #fff);
  box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.16);
}

.member-pool-card.selected::after {
  content: "선택";
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
}

.staff-card {
  cursor: pointer;
  min-height: 104px;
  padding: 12px;
}

.customer-card.staff-card {
  min-height: 104px;
  padding: 12px;
}

.assignment-card {
  align-content: start;
  cursor: default;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

.assignment-card .assignment-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.assignment-card .assignment-profile,
.assignment-card .assignment-period-line,
.assignment-card .assignment-dates,
.assignment-card .load-meter,
.assignment-card .assignment-actions {
  grid-column: 1 / -1;
}

.assignment-person-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.assignment-person-line strong,
.assignment-person-line small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-person-line strong {
  flex: 0 0 auto;
}

.assignment-person-line small {
  min-width: 0;
}

.customer-avatar {
  display: grid;
  place-items: center;
  background: #1f2937;
}

.customer-avatar .icon {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 2.4;
}

.customer-person-card {
  background: #fcfdff;
  min-height: 132px;
}

.customer-person-contact {
  margin: 0;
  min-height: 20px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.customer-contact-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-contact-list small {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.customer-contact-list small span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.customer-contact-list small b {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-dates {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.assignment-dates span {
  width: fit-content;
  max-width: 100%;
  border-radius: var(--radius);
  padding: 6px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.35;
}

.assignment-dates .assignment-period {
  width: fit-content;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment-period-line {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  justify-self: stretch;
  border-radius: var(--radius);
  padding: 6px 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.assignment-period-line span {
  display: block;
  white-space: nowrap;
}

.assignment-dates .assignment-permission {
  background: #eef2f7;
}

.assignment-dates .assignment-permission.pm {
  background: #e0f2fe;
  color: #0369a1;
}

.assignment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assignment-actions span {
  display: flex;
  gap: 6px;
}

.tiny-danger {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.member-pool-card header,
.customer-card header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-pool-card strong,
.customer-card strong {
  font-size: 15px;
}

.person-name-line,
.member-pool-card strong,
.member-row strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  padding: 2px 7px;
  background: #f3e8ff;
  color: #7c3aed;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.member-pool-card small,
.customer-card small {
  color: var(--muted);
}

.credential-badge {
  width: max-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.credential-badge.ready {
  background: var(--green-soft);
  color: var(--green);
}

.customer-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.risk-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #fff8f8;
}

.risk-row span {
  width: max-content;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.member-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  min-height: 72px;
  padding: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: #101828;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.member-row span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.load-meter {
  grid-column: 1 / 3;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf4;
}

.load-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--orange));
}

.member-row em {
  position: absolute;
  right: 11px;
  top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.activity-item {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--cyan);
  padding: 1px 0 1px 10px;
}

.activity-item span {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-item p {
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.activity-item time {
  font-size: 11px;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  width: min(430px, calc(100vw - 24px));
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--surface);
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.22);
  transform: translateX(106%);
  transition: transform 220ms ease;
}

.drawer.open {
  transform: translateX(0);
}

.drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer > header span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer > header h3 {
  margin-top: 3px;
  font-size: 19px;
}

.drawer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
}

.drawer-note {
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.copyable-text-block {
  display: grid;
  gap: 6px;
}

.copyable-text-block > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.copyable-text-block > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.copyable-text-block .drawer-note {
  margin: 0;
  overflow-y: visible;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.drawer.scroll-mode .drawer-content {
  overflow: hidden;
}

.drawer.scroll-mode .copyable-text-block {
  min-height: 0;
}

.drawer.scroll-mode .copyable-text-block .drawer-note {
  overflow-y: auto;
}

.copy-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fff;
  color: var(--muted);
  box-shadow: none;
}

.copy-icon-btn:hover {
  border-color: rgba(8, 145, 178, 0.35);
  background: #effbff;
  color: var(--cyan);
}

.copy-icon-btn .icon {
  width: 15px;
  height: 15px;
}

.drawer-status,
.field-action-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  white-space: pre-line;
}

.drawer-status {
  margin: 0;
}

.field-action-status:empty,
.drawer-status:empty {
  display: none;
}

.drawer-status.info,
.field-action-status.info {
  color: #075985;
}

.drawer-status.success,
.field-action-status.success {
  color: #047857;
}

.drawer-status.warn,
.field-action-status.warn {
  color: #b45309;
}

.drawer-status.error,
.field-action-status.error {
  color: #b91c1c;
}

.field-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  min-height: 38px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.field-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.project-danger-zone {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.project-danger-zone header {
  display: grid;
  gap: 3px;
}

.project-danger-zone header span {
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.project-danger-zone header strong {
  color: var(--ink);
  font-size: 15px;
}

.project-danger-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.project-delete-confirm {
  display: grid;
  gap: 6px;
}

.project-delete-confirm span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.project-delete-confirm input {
  width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 var(--control-padding-x);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.project-danger-zone .danger-btn {
  justify-self: start;
}

.project-danger-zone .danger-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.28);
}

.modal {
  width: min(640px, calc(100vw - 32px));
  max-height: min(92vh, 780px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.34);
}

.modal form {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.modal header,
.modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
}

.modal header {
  border-bottom: 1px solid var(--line);
}

.modal footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
}

.form-grid label,
.form-grid .form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.form-grid label.wide,
.form-grid .form-field.wide {
  grid-column: 1 / -1;
}

.form-field-title {
  color: var(--muted);
}

.field-help {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.task-type-field {
  border: 0;
  background: transparent;
  padding: 0;
}

.calendar-icon-picker {
  display: grid;
  gap: 8px;
}

.calendar-icon-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.calendar-icon-option {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.calendar-icon-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.calendar-icon-option:has(input:checked) {
  border-color: var(--event-border-color, var(--cyan));
  background: var(--event-bg-color, #effbff);
}

.calendar-icon-option .calendar-event-icon {
  flex: 0 0 auto;
  color: var(--event-border-color, #7c3aed);
}

.calendar-color-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.calendar-color-option {
  min-height: 42px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.calendar-color-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.calendar-color-option:has(input:checked) {
  border-color: var(--event-border-color);
  background: var(--event-bg-color);
}

.calendar-color-swatch {
  width: 14px;
  height: 14px;
  border: 2px solid var(--event-border-color);
  border-radius: 999px;
  background: var(--event-bg-color);
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.textarea-toolbar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.erp-transfer-btn {
  flex: 0 0 auto;
}

.erp-transfer-btn {
  border-color: rgba(8, 145, 178, 0.28);
  background: #edfafe;
  color: #075985;
}

.button-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 720ms linear infinite;
}

button.is-busy {
  cursor: wait;
  opacity: 0.78;
}

.form-row-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.form-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.form-choice-list.compact-choice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #f8fafc;
  color: var(--ink);
}

.project-choice input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.project-choice span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.project-choice strong,
.project-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-choice small,
.form-empty-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.member-choice {
  min-height: var(--control-height);
  background: var(--surface);
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 var(--control-padding-x);
  color: var(--ink);
  background: var(--surface);
  font-weight: 700;
  line-height: 1.4;
  box-shadow: none;
}

.form-grid input,
.form-grid select {
  height: var(--control-height);
  min-height: var(--control-height);
}

.form-grid select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.form-grid input[type="date"] {
  appearance: none;
  min-inline-size: 0;
  padding-right: 10px;
}

.form-grid input[type="number"] {
  appearance: textfield;
}

.form-grid input[type="number"]::-webkit-outer-spin-button,
.form-grid input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.form-grid textarea {
  min-height: 90px;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
}

.form-grid label.textarea-large-field {
  min-height: 260px;
}

.form-grid textarea.large-textarea {
  min-height: 220px;
  line-height: 1.6;
  font-weight: 650;
}

.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: var(--faint);
  font-weight: 600;
}

.check-label {
  align-content: center;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.25;
}

.check-label input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 128px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, 14px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #101828;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pulse {
  animation: buttonPulse 360ms ease;
}

.boot-error {
  width: min(520px, calc(100vw - 32px));
  margin: 80px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.24);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(139, 92, 246, 0);
  }
}

@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.28);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(8, 145, 178, 0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1280px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .inspector {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .app.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .hero,
  .overview-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .app.portfolio-dashboard .overview-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-ops {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .app.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .side-menu {
    grid-template-columns: minmax(0, 1fr);
  }

  .main {
    padding: 16px 14px;
  }

  .topbar {
    position: static;
    display: grid;
    margin: -16px -14px 14px;
    padding: 14px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .top-actions > * {
    flex: 1;
  }

  .top-actions > .session-chip {
    flex: 1 1 auto;
  }

  .top-actions > .top-logout-btn {
    flex: 0 0 48px;
    width: 48px;
  }

  .hero-main {
    min-height: auto;
    padding: 18px;
  }

  .hero-main h3 {
    font-size: 24px;
  }

  .hero-main:has(.hero-ops.hero-spotlight),
  .app.portfolio-dashboard .hero-main,
  .app.project-dashboard .hero-main {
    min-height: 430px;
  }

  .hero-main:has(.hero-ops.hero-spotlight) .hero-ops.hero-spotlight,
  .app.portfolio-dashboard .hero-ops.hero-spotlight,
  .app.project-dashboard .hero-ops.hero-spotlight {
    min-height: 430px;
  }

  .control-panel {
    gap: 14px;
    padding: 18px 18px 22px;
  }

  .control-header {
    display: flex;
  }

  .control-metrics {
    justify-content: flex-start;
  }

  .control-board {
    grid-template-rows: 156px auto;
  }

  .control-rail {
    min-height: 156px;
    padding: 42px 8px 32px;
  }

  .control-track {
    left: 22px;
    right: 22px;
    top: 66px;
  }

  .control-today {
    left: clamp(22px, var(--today-left), calc(100% - 22px));
    top: 30px;
  }

  .control-phases {
    inset: 0 22px;
  }

  .control-phase {
    top: 58px;
    width: 68px;
    font-size: 10px;
  }

  .control-phase small {
    display: none;
  }

  .control-briefs {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-stats,
  .hero-ops,
  .action-grid,
  .portfolio-status-list,
  .portfolio-stat-row,
  .portfolio-project-row,
  .portfolio-engineer-row,
  .project-facts-grid,
  .deliverable-grid,
  .staffing-layer-grid,
  .customer-grid,
  .api-grid,
  .settings-grid,
  .settings-form,
  .install-grid,
  .inspector {
    grid-template-columns: minmax(0, 1fr);
  }

  .view-switch {
    top: 0;
  }

  .calendar-panel .panel-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-center-controls {
    grid-column: auto;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .calendar-right-controls {
    grid-column: auto;
    justify-self: stretch;
    flex-wrap: wrap;
  }

  .calendar-engineer-filter {
    flex: 1 1 180px;
    width: auto;
  }

  .calendar-add-event-btn {
    flex: 0 0 auto;
  }

  .install-choice-group,
  .catalog-group,
  .catalog-section-add header,
  .install-center-name-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .install-choice-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .view-pane[data-pane="wbs"] .table-wrap {
    overflow-x: hidden;
  }

  .view-pane[data-pane="wbs"] .data-table {
    display: block;
    min-width: 0;
    border-spacing: 0;
    table-layout: auto;
    background: transparent;
  }

  .view-pane[data-pane="wbs"] .data-table colgroup,
  .view-pane[data-pane="wbs"] .data-table thead {
    display: none;
  }

  .view-pane[data-pane="wbs"] .data-table tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .view-pane[data-pane="wbs"] .data-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface);
  }

  .view-pane[data-pane="wbs"] .data-table tr.wbs-phase-row {
    border-color: #cbe6f1;
    background: #f0f9fc;
  }

  .view-pane[data-pane="wbs"] .data-table td {
    display: grid;
    gap: 4px;
    min-width: 0;
    min-height: 0;
    border: 0;
    padding: 0;
    text-align: left;
  }

  .view-pane[data-pane="wbs"] .data-table td:first-child {
    grid-column: 1 / -1;
  }

  .view-pane[data-pane="wbs"] .data-table td[data-mobile-label]::before {
    content: attr(data-mobile-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
  }

  .view-pane[data-pane="wbs"] .progress-cell {
    justify-content: start;
  }

  .view-pane[data-pane="wbs"] .progress-cell .bar {
    min-width: 82px;
    max-width: 120px;
  }

  .task-title-cell,
  .wbs-phase-heading {
    width: 100%;
    overflow: visible;
  }

  .task-title-cell strong,
  .wbs-phase-heading strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .task-title-cell.indent-1 {
    padding-left: 10px;
  }

  .task-title-cell.indent-2 {
    padding-left: 24px;
  }

  .task-title-cell.indent-3,
  .task-title-cell.indent-4,
  .task-title-cell.indent-5 {
    padding-left: 34px;
  }

  .phase-row {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .phase-row .bar {
    grid-column: 1 / -1;
    order: 3;
  }

  .note-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-row b,
  .daily-log-row b {
    text-align: left;
  }

  .daily-log-row,
  .form-grid,
  .form-row-pair,
  .form-choice-list,
  .form-choice-list.compact-choice-list,
  .calendar-icon-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-tabbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-tabbar button {
    padding: 0 8px;
  }

  .wbs-template-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border: 0;
    gap: 10px;
    background: transparent;
  }

  .wbs-template-head {
    display: none;
  }

  .wbs-template-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
  }

  .wbs-template-row input[name="phaseTitle"],
  .wbs-template-phase-cell,
  .wbs-subformula-editor,
  .wbs-template-row textarea {
    grid-column: 1 / -1;
  }

  .wbs-subtask-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .wbs-subtask-row .formula-weight-badge {
    justify-self: end;
  }

  .wbs-subtask-row button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  .app,
  .app.sidebar-collapsed {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .app.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar,
  .app.sidebar-collapsed .sidebar {
    display: none;
    max-width: 100vw;
    height: auto;
    max-height: none;
  }

  .main,
  .work-surface,
  .view-pane,
  .panel,
  .content-grid,
  .overview-layout,
  .settings-tab-panel,
  .settings-grid,
  .settings-form,
  .google-ai-form,
  .google-ai-key-panel,
  .inspector,
  .hero,
  .hero-main,
  .hero-stats,
  .modal,
  .drawer {
    min-width: 0;
    max-width: 100%;
  }

  .main {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 12px;
  }

  .topbar {
    order: 1;
    margin: -12px -12px 12px;
    padding: 12px;
  }

  .mobile-dashboard-menu {
    order: 2;
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
  }

  .hero {
    order: 3;
    display: none;
  }

  .view-switch {
    order: 4;
  }

  .content-grid {
    order: 5;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: center;
  }

  .session-chip {
    width: 100%;
  }

  .top-logout-btn {
    width: 48px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
  }

  .hero-main {
    padding: 16px;
  }

  .hero-main h3 {
    font-size: 22px;
  }

  .hero-ops,
  .hero-stats,
  .content-grid,
  .overview-layout,
  .project-facts-grid,
  .settings-grid,
  .settings-form,
  .google-ai-form,
  .install-grid,
  .api-grid,
  .inspector,
  .customer-grid,
  .member-pool-grid,
  .staffing-layer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-grid {
    gap: 12px;
  }

  .inspector {
    position: static;
    display: grid;
    gap: 10px;
  }

  .settings-tabbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
  }

  .settings-tabbar button {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
  }

  .settings-tab-panel.active {
    display: grid;
    gap: 10px;
  }

  .settings-grid {
    padding: 10px;
  }

  .settings-form {
    padding: 10px;
  }

  .google-ai-key-panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 10px;
  }

  .google-ai-key-panel label,
  .google-ai-key-panel input,
  .google-ai-key-panel .setting-status,
  .google-ai-key-panel .compact-actions {
    width: 100%;
    min-width: 0;
  }

  .google-ai-key-panel .compact-actions,
  .settings-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    justify-content: stretch;
  }

  .google-ai-key-panel .compact-actions > *,
  .settings-actions > * {
    width: 100%;
  }

  .settings-form .prompt-layer {
    padding: 10px;
  }

  .settings-form textarea,
  .settings-form .prompt-layer textarea {
    min-height: 220px;
    max-height: none;
  }

  .catalog-section,
  .catalog-group,
  .catalog-group-list,
  .catalog-item-list,
  .install-choice-list,
  .install-tabbar,
  .wbs-template-settings,
  .wbs-template-grid {
    width: 100%;
    min-width: 0;
  }

  .catalog-section header,
  .catalog-group-head,
  .catalog-item,
  .catalog-add-card,
  .install-center-name-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-section header > span,
  .catalog-group-head .catalog-item-actions,
  .catalog-item .catalog-item-actions {
    justify-content: flex-start;
  }

  .board {
    grid-template-columns: minmax(260px, 1fr);
    overflow-x: auto;
  }

  .calendar-panel .panel-head,
  .panel-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .panel-actions,
  .segmented {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .gantt {
    overflow-x: auto;
  }

  .modal {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .modal form,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .drawer {
    width: min(100vw, 420px);
  }
}

@media (max-width: 480px) {
  .main {
    padding: 10px;
  }

  .topbar {
    margin: -10px -10px 10px;
    padding: 10px;
  }

  .hero-main,
  .metric-card,
  .panel,
  .inspector-card {
    border-radius: 8px;
  }

  .settings-tabbar,
  .hero-stats,
  .hero-ops {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-dashboard-menu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .view-pane[data-pane="wbs"] .data-table tr {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .settings-grid,
  .settings-form,
  .google-ai-form,
  .google-ai-key-panel {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
  }

  .google-ai-key-panel .compact-actions,
  .settings-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .google-ai-key-panel label,
  .google-ai-key-panel input,
  .google-ai-key-panel .setting-status,
  .settings-form .ai-prompt-stack,
  .settings-form .settings-prompt-label {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .app,
  .app.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .sidebar,
  .app.project-dashboard .sidebar,
  .app.portfolio-dashboard .sidebar,
  .app.sidebar-collapsed .sidebar {
    display: none !important;
  }
}
