:root {
  --bg: #fbf9f9;
  --surface: #ffffff;
  --surface-soft: #f3ece4;
  --surface-muted: #efeded;
  --border: #ddd6cf;
  --text: #191919;
  --muted: #6e675f;
  --primary: #222222;
  --accent: #c5a059;
  --accent-deep: #8f6f2f;
  --shadow: 0 18px 50px rgba(24, 25, 25, 0.06);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fffdfc 0%, #f8f3ee 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: rgba(255, 255, 255, 0.7);
  border-right: 1px solid rgba(221, 214, 207, 0.8);
  padding: 32px 24px;
  backdrop-filter: blur(14px);
}

.brand-mark,
.page-header,
.topbar,
.panel-head,
.client-item,
.task-item,
.topbar-actions,
.side-nav,
.milestone-row {
  display: flex;
}

.brand-mark {
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1b1b1b, #4c453f);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar h1,
.topbar h2,
.hero-overlay h3,
.page-header h1,
.panel h3,
.stat-card h3,
.budget-summary strong {
  margin: 0;
  font-family: "Playfair Display", serif;
}

.sidebar h1 {
  font-size: 1.7rem;
}

.nav-toggle {
  display: none;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  margin-bottom: 20px;
  background: var(--surface);
}

.side-nav {
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.side-nav a,
.mobile-nav a {
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--muted);
}

.side-nav a.is-active,
.mobile-nav a.is-active {
  background: var(--primary);
  color: #fff;
}

.side-card,
.panel,
.stat-card,
.project-card,
.simple-page .panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(221, 214, 207, 0.9);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.side-card {
  padding: 20px;
  margin-bottom: 18px;
}

.side-card h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.side-card p,
.mini-list,
.hero-overlay p,
.stat-card p,
.milestone-card p,
.task-item p,
.client-item p,
.project-card p,
.ledger-list span {
  color: var(--muted);
}

.mini-list {
  margin: 0;
  padding-left: 18px;
}

.mini-list li + li {
  margin-top: 10px;
}

.main-panel {
  padding: 32px;
}

.topbar {
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.topbar h2,
.page-header h1 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
}

.topbar-actions,
.panel-head,
.task-item,
.client-item,
.page-header {
  align-items: center;
}

.topbar-actions {
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.text-btn {
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.text-btn {
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 600;
}

.mobile-nav {
  display: none;
  margin-bottom: 24px;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 420px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22, 20, 19, 0.72) 0%, rgba(22, 20, 19, 0.28) 45%, rgba(22, 20, 19, 0.1) 100%);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 620px;
  padding: 42px;
}

.hero-overlay h3 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 0.96;
  margin: 20px 0 18px;
}

.hero-overlay p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(245, 230, 211, 0.95);
  color: #3f3321;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-pill.subtle {
  background: #f6eee3;
  color: #654f22;
}

.stats-grid,
.content-grid,
.gallery-grid,
.project-grid,
.swatch-grid {
  display: grid;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 24px;
}

.stat-card h3 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.accent-card {
  background: linear-gradient(135deg, #1f1d1c 0%, #4a403a 100%);
  color: #fff;
}

.accent-card .eyebrow,
.accent-card p {
  color: rgba(255, 255, 255, 0.72);
}

.content-grid {
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.panel {
  padding: 26px;
}

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

.panel-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-head h3 {
  font-size: 1.9rem;
}

.panel-head span {
  color: var(--muted);
  font-weight: 600;
}

.milestone-row {
  gap: 14px;
  overflow-x: auto;
}

.milestone-card {
  min-width: 220px;
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.milestone-card.complete {
  background: #fcf8f2;
}

.milestone-card.current {
  background: #262322;
  color: #fff;
  border-color: #262322;
}

.milestone-card.current p,
.milestone-card.current .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  margin-top: 12px;
  overflow: hidden;
}

.progress-bar span,
.budget-track .used {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c5a059 0%, #ead29f 100%);
}

.task-list,
.client-list,
.ledger-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-item {
  gap: 16px;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid rgba(221, 214, 207, 0.7);
}

.task-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.task-item > div {
  flex: 1;
}

.task-item h4,
.client-item h2,
.project-card h2,
.milestone-card h4 {
  margin: 0 0 6px;
}

.task-item-done h4 {
  text-decoration: line-through;
  opacity: 0.55;
}

.check {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  flex: 0 0 auto;
}

.check-filled {
  background: var(--primary);
  border-color: var(--primary);
}

.task-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f4eadc;
  color: #6b5634;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.budget-stack {
  display: grid;
  gap: 18px;
}

.budget-summary strong {
  display: block;
  font-size: 3rem;
}

.budget-track {
  height: 10px;
  border-radius: 999px;
  background: #ebe5de;
  overflow: hidden;
}

.budget-track .used {
  width: 37.5%;
}

.ledger-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ledger-list li,
.client-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.swatch {
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.swatch.marble {
  background: linear-gradient(135deg, #f8f6f2 0%, #e6e3de 52%, #ffffff 100%);
}

.swatch.walnut {
  background: linear-gradient(135deg, #241e18, #6a4e35);
}

.swatch.linen {
  background: linear-gradient(135deg, #f7f0e1, #dfd0b1);
}

.swatch.brass {
  background: linear-gradient(135deg, #765a1b, #d7b25b);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
}

.simple-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px;
}

.page-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

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

.project-card {
  overflow: hidden;
}

.project-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-card div {
  padding: 20px;
}

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

.gallery-grid img {
  border-radius: var(--radius-md);
  min-height: 280px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(221, 214, 207, 0.8);
  }

  .desktop-nav {
    display: none;
  }

  .nav-toggle,
  .mobile-nav {
    display: flex;
  }

  .mobile-nav {
    display: none;
  }

  .mobile-nav.is-open {
    display: flex;
  }

  .stats-grid,
  .content-grid,
  .project-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main-panel,
  .simple-page,
  .sidebar {
    padding: 20px;
  }

  .topbar,
  .page-header,
  .site-footer,
  .task-item,
  .client-item,
  .ledger-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-card {
    min-height: 360px;
  }

  .hero-overlay {
    padding: 28px 24px;
  }

  .hero-overlay h3 {
    font-size: 3rem;
  }

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