:root {
  --ink: #202124;
  --muted: #667085;
  --paper: #f4f1ed;
  --surface: #fffdf8;
  --soft: #ebe6dc;
  --line: #ded7ca;
  --brand: #111111;
  --accent: #dff36b;
  --blue: #2f6fb2;
  --green: #3f8f5f;
  --orange: #d9902f;
  --shadow: 0 14px 30px rgba(32, 33, 36, 0.1);
  --shadow-strong: 0 18px 36px rgba(32, 33, 36, 0.14);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.08;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.brand-logo-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 126px;
  height: 40px;
  padding: 8px 12px;
  background: var(--brand);
  border-radius: var(--radius);
}

.brand-logo-shell img {
  display: block;
  width: 100%;
  max-height: 24px;
  object-fit: contain;
}

.context-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 42px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}

.context-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.context-tabs a.active {
  border-color: var(--brand);
  color: var(--ink);
}

.user-menu {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  max-width: max-content;
  padding: 4px 8px 4px 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--brand);
  border-radius: 6px;
  color: var(--surface);
  font-size: 12px;
  font-weight: 900;
}

.user-menu span:last-child {
  display: grid;
  gap: 1px;
}

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

.workspace {
  display: grid;
  gap: 18px;
  padding: 26px clamp(16px, 4vw, 44px) 44px;
}

.overview-head,
.project-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.overview-head p,
.project-head p {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.search {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
}

.search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search input {
  min-height: 42px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}

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

.space-card {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.space-card:hover,
.panel:hover,
.row-panel:hover,
.info-tile:hover {
  box-shadow: var(--shadow-strong);
}

.space-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}

.space-card-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 100%;
}

.card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.card-heading {
  min-width: 0;
}

.card-heading p:last-child {
  margin-top: 2px;
}

.project-card-status {
  margin-left: auto;
}

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

.glance div,
.project-facts div,
.fact-list div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #f7f4ee;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.project-facts {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(140px, 1fr) minmax(90px, 0.55fr);
  gap: 8px;
}

.glance span,
.project-facts span,
.fact-list span,
.content-item span,
.timeline small {
  color: var(--muted);
  font-size: 12px;
}

.card-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card-actions {
  margin-top: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  cursor: pointer;
}

.button.primary {
  background: var(--brand);
  color: var(--surface);
  font-weight: 800;
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f4ee;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.blue {
  background: rgba(47, 111, 178, 0.1);
  border-color: rgba(47, 111, 178, 0.26);
  color: #244f80;
}

.status.green {
  background: rgba(63, 143, 95, 0.12);
  border-color: rgba(63, 143, 95, 0.3);
  color: #2f6d48;
}

.status.orange {
  background: rgba(217, 144, 47, 0.13);
  border-color: rgba(217, 144, 47, 0.32);
  color: #8b5c1e;
}

.back {
  min-height: 34px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.project-status {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  min-height: 44px;
  padding: 0 2px;
  background: transparent;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.tabs button.active {
  border-color: var(--brand);
  color: var(--ink);
}

.notice {
  padding: 12px;
  background: #eef7bc;
  border: 1px solid rgba(63, 143, 95, 0.3);
  border-radius: var(--radius);
  font-weight: 800;
}

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

.focus-panel,
.panel,
.row-panel,
.info-tile,
.content-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.focus-panel {
  grid-column: span 7;
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 216px;
  padding: 18px;
}

.info-tile {
  grid-column: span 5;
  display: grid;
  gap: 8px;
  min-height: 102px;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.info-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel {
  grid-column: span 6;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.panel.lead {
  grid-column: span 12;
}

.deal-panel {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: stretch;
}

.deal-panel img {
  width: 100%;
  min-height: 178px;
  object-fit: cover;
  border-radius: 6px;
}

.row-panel {
  grid-column: span 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
}

.row-panel div {
  display: grid;
  gap: 4px;
}

.row-panel span:not(.status) {
  color: var(--muted);
  font-size: 13px;
}

.clean-list,
.todo-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

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

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #d8d1c6;
}

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

.dot.active {
  background: var(--accent);
  border-color: #bdce54;
}

.content-section {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.content-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #f7f4ee;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-menu {
    justify-content: start;
    min-width: 0;
    width: 100%;
  }

  .overview-head,
  .project-head {
    align-items: stretch;
    flex-direction: column;
  }

  .space-card,
  .deal-panel {
    grid-template-columns: 1fr;
  }

  .card-actions,
  .project-status {
    justify-content: start;
    justify-items: start;
  }

  .glance,
  .project-facts,
  .content-list {
    grid-template-columns: 1fr;
  }

  .context-tabs,
  .tabs {
    gap: 14px;
    overflow-x: auto;
  }

  .focus-panel,
  .info-tile,
  .panel,
  .panel.lead,
  .row-panel {
    grid-column: span 12;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 26px;
  }

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