@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=IBM+Plex+Sans+KR:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --paper: #f5efe2;
  --paper-deep: #eadfcb;
  --ledger: rgba(255, 251, 244, 0.86);
  --console: rgba(244, 248, 252, 0.92);
  --sidebar: #17222b;
  --sidebar-soft: #22313d;
  --ink: #18202a;
  --muted: #617282;
  --line: rgba(58, 67, 76, 0.14);
  --line-strong: rgba(27, 34, 42, 0.24);
  --primary: #0e7490;
  --primary-soft: rgba(14, 116, 144, 0.12);
  --human: #b8681d;
  --human-soft: rgba(184, 104, 29, 0.14);
  --success: #17624e;
  --success-soft: rgba(23, 98, 78, 0.14);
  --danger: #b54132;
  --danger-soft: rgba(181, 65, 50, 0.12);
  --shadow-lg: 0 24px 60px rgba(20, 31, 42, 0.12);
  --shadow-md: 0 12px 32px rgba(20, 31, 42, 0.1);
  --shadow-sm: 0 4px 16px rgba(20, 31, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 116, 144, 0.12), transparent 32%),
    radial-gradient(circle at 100% 20%, rgba(184, 104, 29, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f2e7 0%, #f2ebdd 100%);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

#app {
  min-height: 100vh;
}

.shell {
  min-height: 100vh;
  padding: 18px;
}

.shell-dashboard {
  padding: 12px;
}

.workspace {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-columns: 240px minmax(420px, 1fr) 560px;
  gap: 18px;
}

.workspace-reports {
  grid-template-columns: 240px minmax(520px, 1fr);
}

.workspace-dashboard {
  min-height: calc(100vh - 24px);
  gap: 14px;
}

.sidebar,
.ledger,
.console-shell,
.composer-panel {
  backdrop-filter: blur(16px);
}

.sidebar {
  background: linear-gradient(180deg, rgba(23, 34, 43, 0.98), rgba(30, 45, 56, 0.94));
  color: #f0f4f7;
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  min-width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, #d18a2f, #8a5311);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.brand-copy h1,
.ledger-hero h2,
.console-header h2,
.group-header h2,
.panel-header h3 {
  font-family: "Space Grotesk", sans-serif;
}

.brand-copy h1 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.05;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.72;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: rgba(240, 244, 247, 0.8);
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

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

.nav-item-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-section {
  display: grid;
  gap: 10px;
}

.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-section-label,
.sidebar-section-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 244, 247, 0.56);
}

.sidebar-nav-secondary .nav-item {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.sidebar-projects {
  min-height: 0;
}

.sidebar-project-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.project-nav-item {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  text-align: left;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}

.project-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.project-nav-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(67, 99, 255, 0.18);
  color: #dfe7ff;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.project-nav-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.project-nav-copy strong,
.dashboard-project-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.project-nav-copy span,
.dashboard-project-copy span {
  color: rgba(240, 244, 247, 0.56);
  font-size: 12px;
}

.sidebar-summary {
  margin-top: auto;
}

.sidebar-summary-compact {
  gap: 10px;
}

.sidebar-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-summary h2 {
  margin: 0 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
}

.summary-grid {
  display: grid;
  gap: 10px;
}

.summary-card,
.metric-card,
.rail-card,
.tag,
.gate-pill,
.chip {
  border: 1px solid transparent;
}

.summary-card {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.summary-card strong {
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
}

.summary-card-copy {
  display: grid;
  gap: 4px;
}

.summary-card-copy small {
  color: rgba(240, 244, 247, 0.58);
  font-size: 11px;
  line-height: 1.35;
}

.tone-attention {
  border-color: rgba(232, 158, 70, 0.26);
}

.tone-running {
  border-color: rgba(65, 183, 164, 0.26);
}

.tone-resolved {
  border-color: rgba(91, 191, 135, 0.26);
}

.tone-bridge {
  border-color: rgba(98, 163, 214, 0.26);
}

.ledger {
  background: var(--ledger);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.main-topbar {
  height: 66px;
  padding: 0 18px 0 22px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: #1b2533;
  color: #eef4f8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.main-topbar strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
}

.topbar-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  color: #eef4f8;
}

.topbar-search input::placeholder {
  color: rgba(238, 244, 248, 0.55);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: end;
}

.topbar-icon-button,
.topbar-text-button {
  color: rgba(238, 244, 248, 0.84);
}

.topbar-icon-button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.topbar-user-name,
.topbar-text-button {
  font-size: 13px;
}

.topbar-user-name {
  color: #fff;
  font-weight: 500;
}

.topbar-text-button {
  padding: 0;
  background: none;
}

.topbar-filter-chip {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.ledger-dashboard {
  background: linear-gradient(180deg, #202a39 0%, #1a2431 100%);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f6fb;
}

.dashboard-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 20px;
}

.dashboard-surface {
  display: grid;
  gap: 16px;
}

.dashboard-banner {
  border-radius: 18px;
  padding: 18px 22px;
  color: #fff;
  background: linear-gradient(135deg, #3452de 0%, #5968ef 100%);
  box-shadow: 0 18px 36px rgba(30, 47, 116, 0.22);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.dashboard-banner .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.dashboard-banner h2 {
  margin: 8px 0 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  line-height: 1.04;
}

.dashboard-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.dashboard-banner-copy {
  display: grid;
  gap: 4px;
}

.dashboard-banner-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
}

.dashboard-banner-pill {
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.dashboard-banner-pill span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-banner-pill strong {
  display: block;
  margin-top: 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
}

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

.dashboard-operator-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-operator-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-operator-card strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
  line-height: 1;
}

.dashboard-operator-card p {
  margin: 8px 0 0;
  color: rgba(242, 246, 251, 0.6);
  font-size: 12px;
}

.dashboard-operator-card-warning {
  border-color: rgba(250, 204, 21, 0.2);
}

.dashboard-metric-grid-compact .dashboard-stat-card strong {
  font-size: 30px;
}

.dashboard-stat-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dashboard-stat-card-success {
  border-color: rgba(52, 211, 153, 0.24);
}

.dashboard-stat-card-warning {
  border-color: rgba(250, 204, 21, 0.24);
}

.dashboard-stat-label {
  display: block;
  color: rgba(242, 246, 251, 0.64);
  font-size: 12px;
}

.dashboard-stat-card strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 38px;
  line-height: 1;
}

.dashboard-project-strip {
  display: none;
}

.dashboard-onboarding-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-onboarding-copy {
  display: grid;
  gap: 4px;
}

.dashboard-onboarding-copy strong {
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
}

.dashboard-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 16px;
}

.dashboard-panel {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-panel-header h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  line-height: 1.04;
}

.dashboard-panel-header p {
  margin: 6px 0 0;
  color: rgba(242, 246, 251, 0.58);
  font-size: 13px;
}

.dashboard-link {
  padding: 0;
  color: rgba(144, 168, 255, 0.88);
  font-size: 13px;
  font-weight: 500;
}

.dashboard-activity-list {
  display: grid;
  gap: 12px;
}

.dashboard-activity-card {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  transition: border-color var(--transition), transform var(--transition), background-color var(--transition);
}

.dashboard-activity-card:hover {
  transform: translateY(-1px);
  border-color: rgba(144, 168, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-activity-head,
.dashboard-activity-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-activity-card strong {
  display: block;
  margin: 12px 0 8px;
  color: #f7fbff;
  font-size: 18px;
  line-height: 1.3;
}

.dashboard-activity-card p {
  margin: 0;
  color: rgba(242, 246, 251, 0.64);
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-session-card {
  display: grid;
  gap: 12px;
}

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

.dashboard-inline-button {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 12px;
}

.review-action-strip {
  padding: 14px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.review-action-copy {
  display: grid;
  gap: 4px;
}

.review-action-copy strong {
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
}

.review-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-checklist-item {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.review-checklist-item strong {
  display: block;
  font-size: 14px;
  font-family: "Space Grotesk", sans-serif;
}

.review-checklist-item p {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(242, 246, 251, 0.62);
}

.review-checklist-ok {
  border-color: rgba(113, 214, 191, 0.24);
}

.review-checklist-missing {
  border-color: rgba(242, 195, 109, 0.2);
}

.dashboard-activity-foot {
  margin-top: 14px;
  color: rgba(242, 246, 251, 0.48);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.dashboard-empty-state {
  min-height: 420px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
}

.dashboard-empty-state strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
}

.dashboard-empty-state p {
  margin: 0;
  max-width: 28ch;
  color: rgba(242, 246, 251, 0.54);
}

.dashboard-empty-state-compact {
  min-height: 0;
  padding: 18px;
}

.shell-unified .ledger:not(.ledger-dashboard),
.shell-unified .console-shell,
.shell-unified .console-placeholder,
.shell-unified .composer-panel {
  background: linear-gradient(180deg, #202a39 0%, #1a2431 100%);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f6fb;
}

.shell-unified .ledger-hero,
.shell-unified .project-rail,
.shell-unified .metric-card,
.shell-unified .project-card,
.shell-unified .queue-card,
.shell-unified .activity-card,
.shell-unified .report-card,
.shell-unified .issue-row,
.shell-unified .panel,
.shell-unified .rail-card,
.shell-unified .warning-card,
.shell-unified .summary-card,
.shell-unified .composer-panel,
.shell-unified .ghost-button,
.shell-unified .dock-tab,
.shell-unified input,
.shell-unified textarea,
.shell-unified select {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f6fb;
}

.shell-unified .ledger-hero,
.shell-unified .console-header,
.shell-unified .action-dock,
.shell-unified .execution-rail {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.08);
}

.shell-unified .focus-strip {
  background: linear-gradient(135deg, rgba(35, 49, 67, 0.98), rgba(22, 34, 48, 0.94));
  color: #f5f8fb;
}

.shell-unified .issue-row:hover,
.shell-unified .queue-card:hover,
.shell-unified .activity-card:hover,
.shell-unified .project-nav-item:hover {
  box-shadow: 0 16px 28px rgba(5, 10, 20, 0.28);
}

.shell-unified .hero-copy h2,
.shell-unified .group-header h2,
.shell-unified .panel-header h3,
.shell-unified .console-header h2,
.shell-unified .row-title,
.shell-unified .field-value,
.shell-unified .command-entry strong,
.shell-unified .timeline-content strong,
.shell-unified .metric-card strong,
.shell-unified .project-card strong,
.shell-unified .rail-card strong,
.shell-unified .state-grid strong,
.shell-unified .dashboard-project-copy strong {
  color: #f7fbff;
}

.shell-unified .hero-copy p,
.shell-unified .group-header p,
.shell-unified .focus-copy p,
.shell-unified .panel-kicker,
.shell-unified .field-group label,
.shell-unified .state-block label,
.shell-unified .state-grid label,
.shell-unified .warning-label,
.shell-unified .row-updated,
.shell-unified .row-subline,
.shell-unified .issue-ref,
.shell-unified .project-card-metrics,
.shell-unified .command-head span,
.shell-unified .timeline-head span,
.shell-unified .command-entry p,
.shell-unified .timeline-content p,
.shell-unified .console-placeholder p,
.shell-unified .empty-state,
.shell-unified .report-card p,
.shell-unified .queue-card p,
.shell-unified .activity-card p,
.shell-unified .field-value + .field-value,
.shell-unified .field-value,
.shell-unified .warning-card p {
  color: rgba(242, 246, 251, 0.62);
}

.shell-unified .tag,
.shell-unified .chip,
.shell-unified .gate-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #eef4f8;
}

.shell-unified .chip-muted,
.shell-unified .project-rail-count {
  color: rgba(242, 246, 251, 0.5);
}

.shell-unified .group-count {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f6fb;
}

.shell-unified .inline-link,
.shell-unified .dashboard-link {
  color: rgba(144, 168, 255, 0.9);
}

.ledger-hero {
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48)),
    linear-gradient(135deg, rgba(14, 116, 144, 0.04), rgba(184, 104, 29, 0.08));
  display: grid;
  gap: 18px;
}

.hero-copy h2 {
  margin: 6px 0 8px;
  font-size: 30px;
  line-height: 1.05;
}

.hero-copy p,
.group-header p,
.focus-copy p,
.rail-card p,
.panel-kicker,
.field-group label,
.state-block label,
.state-grid label,
.warning-label,
.row-updated {
  color: var(--muted);
}

.hero-copy p,
.focus-copy p {
  margin: 0;
  max-width: 60ch;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-sm);
}

.metric-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-family: "Space Grotesk", sans-serif;
}

.focus-strip {
  margin: 18px 28px 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(12, 24, 35, 0.92), rgba(20, 48, 65, 0.88));
  color: #f5f8fb;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  box-shadow: var(--shadow-sm);
}

.focus-copy strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 18px;
}

.project-rail {
  margin: 18px 28px 0;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.project-rail-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.project-rail-head strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
}

.project-rail-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--muted);
}

.project-grid,
.report-grid,
.queue-grid {
  display: grid;
  gap: 12px;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.project-card,
.queue-card,
.activity-card,
.report-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.project-card {
  padding: 14px 16px;
}

.project-card-wide {
  min-height: 112px;
}

.project-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.project-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.metric-pill-attention {
  color: #f2c36d;
  border-color: rgba(242, 195, 109, 0.2);
}

.metric-pill-running {
  color: #71d6bf;
  border-color: rgba(113, 214, 191, 0.2);
}

.metric-pill-resolved {
  color: #95d7a9;
  border-color: rgba(149, 215, 169, 0.2);
}

.metric-pill-bridge {
  color: #92b6ff;
  border-color: rgba(146, 182, 255, 0.2);
}

.metric-pill-muted {
  color: rgba(242, 246, 251, 0.56);
}

.surface-shell {
  display: grid;
  gap: 16px;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-welcome {
  background: linear-gradient(135deg, #5d50e6, #6d63ff);
  color: white;
}

.dashboard-welcome .eyebrow,
.dashboard-welcome .panel-kicker,
.dashboard-welcome p {
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-welcome h3 {
  margin: 10px 0 6px;
  font-size: 32px;
}

.surface-block {
  display: grid;
  gap: 12px;
}

.project-onboarding-surface {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.project-onboarding-copy h2 {
  margin: 8px 0 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
}

.project-onboarding-copy p {
  margin: 0;
  color: rgba(242, 246, 251, 0.64);
  max-width: 56ch;
}

.project-onboarding-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.project-onboarding-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.compact-list .issue-row {
  padding: 14px 16px;
}

.queue-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.queue-card,
.activity-card {
  width: 100%;
  padding: 16px 18px;
  text-align: left;
  transition: transform var(--transition), box-shadow var(--transition);
}

.queue-card:hover,
.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.queue-card strong,
.report-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
}

.queue-card p,
.activity-card p,
.report-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.queue-inline-run {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.queue-inline-run-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.queue-inline-run-copy strong {
  font-size: 12px;
}

.queue-inline-run-copy span {
  color: var(--muted);
  font-size: 12px;
}

.queue-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.activity-stream {
  display: grid;
  gap: 12px;
}

.activity-card-type {
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.report-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.report-card {
  padding: 18px;
}

.report-card strong {
  margin-top: 6px;
  font-size: 30px;
}

.ledger-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px 28px;
}

.ledger-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.issue-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.group-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.group-header p {
  margin: 0;
}

.group-count {
  min-width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", monospace;
}

.section-toggle-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}

.section-collapsed {
  display: none;
}

.subsection-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 12px;
}

.subsection-head-top {
  margin-top: 18px;
}

.subsection-head strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
}

.subsection-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.issue-list {
  display: grid;
  gap: 12px;
}

.issue-row {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: rise-in 420ms ease both;
}

.issue-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(14, 116, 144, 0.18);
}

.row-active {
  border-color: rgba(14, 116, 144, 0.4);
  box-shadow: 0 18px 34px rgba(14, 116, 144, 0.12);
}

.row-head,
.row-footer,
.panel-header,
.command-head,
.timeline-head,
.console-header,
.action-dock-header,
.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.issue-ref,
.eyebrow,
.tag,
.gate-pill,
.chip,
.row-updated {
  font-family: "IBM Plex Mono", monospace;
}

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

.row-title {
  margin: 12px 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.row-subline {
  color: var(--muted);
  font-size: 14px;
}

.row-footer {
  margin-top: 16px;
  flex-wrap: wrap;
}

.row-updated {
  margin-left: auto;
  font-size: 11px;
}

.tag,
.chip,
.gate-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.tag-bridge {
  background: rgba(14, 116, 144, 0.08);
  border-color: rgba(14, 116, 144, 0.2);
}

.tag-prd {
  background: rgba(184, 104, 29, 0.12);
  border-color: rgba(184, 104, 29, 0.22);
}

.chip-muted {
  color: var(--muted);
}

.gate-running {
  color: var(--success);
}

.gate-blocked {
  color: var(--danger);
}

.gate-review,
.gate-attention {
  color: var(--human);
}

.gate-resolved {
  color: var(--success);
}

.gate-pill.gate-running {
  background: var(--success-soft);
  border-color: rgba(23, 98, 78, 0.18);
}

.gate-pill.gate-blocked {
  background: var(--danger-soft);
  border-color: rgba(181, 65, 50, 0.18);
}

.gate-pill.gate-review,
.gate-pill.gate-attention {
  background: var(--human-soft);
  border-color: rgba(184, 104, 29, 0.18);
}

.gate-pill.gate-resolved {
  background: var(--success-soft);
  border-color: rgba(23, 98, 78, 0.18);
}

.console {
  position: relative;
}

.console-shell {
  height: 100%;
  background: var(--console);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.console-empty {
  display: flex;
}

.console-placeholder {
  width: 100%;
  min-height: 100%;
  background: linear-gradient(180deg, rgba(244, 248, 252, 0.96), rgba(233, 239, 245, 0.84));
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-md);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.console-placeholder h2 {
  margin: 8px 0 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
}

.console-placeholder p {
  margin: 0;
  color: var(--muted);
}

.console-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.console-header h2 {
  margin: 4px 0 12px;
  font-size: 24px;
  line-height: 1.08;
}

.execution-rail {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 250, 252, 0.92);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rail-card {
  min-height: 94px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
}

.rail-card label,
.field-group label,
.state-block label,
.state-grid label,
.warning-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.rail-card strong {
  display: block;
  font-size: 16px;
}

.rail-card p {
  margin: 8px 0 0;
  font-size: 13px;
}

.console-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 24px;
}

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

.panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  animation: rise-in 420ms ease both;
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-header {
  margin-bottom: 14px;
  align-items: start;
}

.panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.panel-kicker {
  font-size: 12px;
}

.warning-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(181, 65, 50, 0.07);
  border: 1px solid rgba(181, 65, 50, 0.12);
}

.warning-card p {
  margin: 0;
}

.reminder-list,
.signal-list {
  margin: 14px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-stack,
.command-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-value {
  color: var(--ink);
}

.inline-link {
  color: var(--primary);
}

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

.state-grid strong {
  font-size: 16px;
}

.state-block {
  margin-top: 16px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-entry {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.command-entry:first-child {
  padding-top: 0;
  border-top: none;
}

.command-head strong {
  font-size: 13px;
}

.command-head span {
  color: var(--muted);
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
}

.command-entry p,
.timeline-content p {
  margin: 6px 0 0;
  color: var(--muted);
}

.session-link-row {
  margin-top: 10px;
}

.session-lineage-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.run-history-list {
  display: grid;
  gap: 12px;
}

.run-history-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.run-history-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-item {
  position: relative;
  padding-left: 22px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(14, 116, 144, 0.08);
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 4px;
  bottom: -18px;
  width: 1px;
  background: var(--line);
}

.timeline-head span {
  font-size: 11px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.action-dock {
  border-top: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.95);
  padding: 16px 24px 20px;
}

.action-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dock-tab {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.dock-tab-active {
  background: var(--primary-soft);
  border-color: rgba(14, 116, 144, 0.2);
  color: var(--primary);
}

.primary-button,
.ghost-button {
  padding: 10px 14px;
  border-radius: 999px;
  transition: transform var(--transition), background-color var(--transition), color var(--transition);
}

.primary-button {
  background: linear-gradient(135deg, #0f7a98, #11566e);
  color: white;
  box-shadow: var(--shadow-sm);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  color: var(--ink);
}

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

.compact-form {
  margin-top: 16px;
}

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

input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(14, 116, 144, 0.35);
  box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.08);
}

.composer-shell {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 36, 0.48);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.composer-panel {
  width: min(640px, 100%);
  background: rgba(255, 250, 244, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 26px;
}

.session-picker-panel {
  width: min(560px, 100%);
}

.composer-actions {
  justify-content: flex-end;
}

.empty-state {
  color: var(--muted);
}

.panel-empty,
.app-loading {
  padding: 32px;
  text-align: center;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1320px) {
  .workspace {
    grid-template-columns: 220px minmax(360px, 1fr) 500px;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .console {
    position: fixed;
    inset: 18px 18px 18px auto;
    width: min(560px, calc(100vw - 36px));
    z-index: 10;
  }

  .console-empty {
    display: none;
  }

  .dashboard-banner h2 {
    font-size: 30px;
  }
}

@media (max-width: 820px) {
  .shell {
    padding: 12px;
  }

  .workspace {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 24px);
  }

  .sidebar {
    display: none;
  }

  .ledger-hero,
  .main-topbar,
  .ledger-scroll,
  .project-rail,
  .focus-strip,
  .console-header,
  .console-scroll,
  .action-dock,
  .execution-rail {
    padding-left: 18px;
    padding-right: 18px;
  }

  .focus-strip {
    margin-left: 18px;
    margin-right: 18px;
    flex-direction: column;
    align-items: start;
  }

  .project-rail {
    margin-left: 18px;
    margin-right: 18px;
  }

  .hero-copy h2 {
    font-size: 26px;
  }

  .hero-metrics,
  .dashboard-metric-grid,
  .dashboard-panels,
  .console-grid,
  .execution-rail,
  .inline-grid,
  .state-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-scroll {
    padding: 14px;
  }

  .main-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-left: 14px;
    padding-right: 14px;
    gap: 10px;
  }

  .main-topbar strong {
    font-size: 16px;
  }

  .topbar-user {
    gap: 8px;
  }

  .topbar-user-name,
  .topbar-text-button {
    display: none;
  }

  .dashboard-banner {
    padding: 18px;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-banner h2 {
    font-size: 28px;
  }

  .dashboard-banner-meta {
    justify-content: start;
  }

  .dashboard-panel-header {
    flex-direction: column;
    align-items: start;
  }

  .dashboard-empty-state {
    min-height: 280px;
  }

  .dashboard-project-strip {
    display: grid;
    gap: 10px;
  }

  .project-onboarding-surface {
    flex-direction: column;
    align-items: start;
  }

  .project-onboarding-actions,
  .project-onboarding-stats {
    justify-items: start;
    justify-content: start;
  }

  .dashboard-onboarding-strip {
    flex-direction: column;
    align-items: start;
  }

  .review-action-strip {
    flex-direction: column;
    align-items: start;
  }

  .review-checklist-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-project-card {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    text-align: left;
  }

  .dashboard-project-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .console {
    position: fixed;
    inset: 0;
    width: 100%;
    padding: 12px;
    background: rgba(16, 23, 30, 0.28);
  }

  .console-shell {
    height: 100%;
  }

  .action-dock {
    position: sticky;
    bottom: 0;
  }
}
