:root {
  --brand: #3d5a45;
  --brand-dark: #2f4636;
  --brand-soft: #eef4ee;
  --brand-border: #d7e3d9;
  --page: #faf8f5;
  --surface: #ffffff;
  --surface-soft: #f5f3ef;
  --border: #e7e5e4;
  --text: #1c1917;
  --muted: #78716c;
  --faint: #a8a29e;
  --danger: #b91c1c;
  --warning: #a16207;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
}

.demo-banner {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  min-height: 34px;
  padding: 8px 16px;
  border-bottom: 1px solid #f4d58d;
  background: #fffbeb;
  color: #713f12;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
}

.demo-banner a {
  color: inherit;
  font-weight: 600;
}

.app-header {
  position: fixed;
  inset: 34px 0 auto;
  z-index: 60;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
}

.brand-lockup,
.header-user,
.header-left {
  display: flex;
  min-width: 0;
  align-items: center;
}

.header-left {
  gap: 12px;
}

.brand-lockup {
  gap: 9px;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-soft);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 17px;
  white-space: nowrap;
}

.brand-subtitle {
  margin: 0;
  color: var(--brand);
  font-size: 10px;
  font-weight: 600;
  line-height: 12px;
  white-space: nowrap;
}

.tier-badge,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
}

.tier-badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  background: var(--brand);
  color: white;
  font-size: 11px;
}

.header-user {
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.header-email {
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outline-button,
.primary-button,
.quiet-button,
.action-button {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: 150ms ease;
}

.outline-button,
.quiet-button {
  border: 1px solid #d6d3d1;
  background: white;
  color: #44403c;
}

.outline-button:hover,
.quiet-button:hover {
  background: #fafaf9;
}

.primary-button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: white;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.action-button {
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.menu-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  color: #57534e;
}

.menu-button svg {
  width: 18px;
  height: 18px;
}

.sidebar {
  position: fixed;
  z-index: 50;
  top: 90px;
  bottom: 0;
  left: 0;
  width: 288px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: white;
  transition: transform 200ms ease;
  scrollbar-color: #d6d3d1 transparent;
  scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d6d3d1;
}

.sidebar-intro {
  padding: 18px 16px 13px;
}

.eyebrow,
.nav-group,
.card-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-org {
  margin: 0;
  color: #57534e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sidebar-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-seats {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.sidebar nav {
  padding: 0 8px 28px;
}

.nav-group {
  margin: 10px 10px 5px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
}

.nav-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 1px 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #44403c;
  text-align: left;
  font-size: 13px;
}

.nav-button:hover {
  background: #f5f5f4;
}

.nav-button.active {
  background: var(--brand);
  color: white;
}

.nav-count {
  min-width: 19px;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
}

.nav-button.active .nav-count {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-overlay {
  position: fixed;
  z-index: 45;
  inset: 90px 0 0;
  display: none;
  border: 0;
  background: rgba(0, 0, 0, 0.3);
}

.app-main {
  min-height: 100vh;
  padding: 114px 28px 48px 316px;
  transition: padding-left 200ms ease;
}

.app-shell.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.app-shell.sidebar-collapsed .app-main {
  padding-left: 28px;
}

.content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: panel-in 160ms ease;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stack {
  display: grid;
  gap: 20px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-pad {
  padding: 24px;
}

.hero-title {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
}

.section-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.subheading {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.date-line {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.seat-line {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

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

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

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

.stat-card,
.soft-card,
.list-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.stat-card,
.soft-card {
  padding: 16px;
  background: var(--surface-soft);
}

.stat-card {
  min-height: 110px;
}

.card-label {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.stat-value {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-hint {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.4;
}

.recommendation {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--brand-soft);
}

.recommendation p:last-child {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.text-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.text-link:hover {
  text-decoration: underline;
}

.priority-list,
.item-list,
.timeline-list,
.task-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.priority-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--page);
}

.priority-item .item-title,
.priority-item .item-meta {
  display: block;
}

.priority-number {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.item-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.item-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  min-height: 88px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: white;
  color: #44403c;
  text-align: left;
}

.quick-action:hover {
  border-color: #a8bbaa;
  background: var(--brand-soft);
}

.quick-action-icon {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 19px;
}

.quick-action strong {
  display: block;
  font-size: 12px;
}

.trend-bars {
  display: flex;
  height: 110px;
  align-items: flex-end;
  gap: 9px;
  margin-top: 18px;
}

.trend-day {
  display: grid;
  flex: 1;
  height: 100%;
  align-content: end;
  gap: 6px;
  color: var(--faint);
  text-align: center;
  font-size: 9px;
}

.trend-bar {
  min-height: 8px;
  border-radius: 6px 6px 3px 3px;
  background: var(--brand);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.section-header + .card,
.section-header + .grid,
.section-header + .stack {
  margin-top: 18px;
}

.list-card {
  padding: 16px;
  background: white;
}

.list-card.soft {
  background: var(--surface-soft);
}

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

.badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  font-size: 9px;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
}

.badge-amber {
  background: #fef3c7;
  color: #92400e;
}

.badge-red {
  background: #fee2e2;
  color: #991b1b;
}

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.badge-stone {
  background: #e7e5e4;
  color: #57534e;
}

.progress {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e5e4;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

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

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

.check {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid #a8bbaa;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.check.open {
  border-color: #d6d3d1;
  background: white;
  color: #d6d3d1;
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 5px;
  margin-top: 12px;
}

.calendar-day {
  height: 25px;
  border-radius: 5px;
  background: #e7e5e4;
}

.calendar-day.done {
  background: var(--brand);
}

.schedule-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  background: var(--surface-soft);
}

.schedule-row + .schedule-row {
  margin-top: 8px;
}

.schedule-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-item {
  position: relative;
  padding: 2px 0 18px 26px;
}

.timeline-item::before {
  position: absolute;
  top: 5px;
  bottom: -8px;
  left: 7px;
  width: 1px;
  background: #d6d3d1;
  content: "";
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-item::after {
  position: absolute;
  top: 4px;
  left: 2px;
  width: 11px;
  height: 11px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
  content: "";
}

.metric-ring {
  display: grid;
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--brand) var(--ring, 75%), #e7e5e4 0);
}

.metric-ring::before {
  grid-area: 1 / 1;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: white;
  content: "";
}

.metric-ring strong {
  z-index: 1;
  grid-area: 1 / 1;
  font-size: 22px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
}

.profile-avatar {
  display: grid;
  width: 112px;
  height: 112px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 30px;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.tag {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 700;
}

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

.chat-message {
  max-width: 84%;
  padding: 13px 15px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}

.chat-message.ai {
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  background: white;
}

.chat-message.user {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: var(--brand);
  color: white;
}

.compose {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.field,
.textarea,
.select {
  width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  background: white;
  color: var(--text);
  outline: 0;
}

.field,
.select {
  min-height: 40px;
  padding: 0 12px;
}

.textarea {
  min-height: 96px;
  padding: 11px 12px;
  resize: vertical;
}

.field:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(61, 90, 69, 0.12);
}

.template-preview {
  padding: 18px;
  border: 1px dashed #a8a29e;
  border-radius: 12px;
  background: #fdfcfb;
}

.theme-card {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: white;
}

.theme-card.selected {
  border-color: var(--brand);
}

.theme-swatch {
  display: flex;
  height: 48px;
  overflow: hidden;
  border-radius: 9px;
}

.theme-swatch span {
  flex: 1;
}

.premium-card {
  border-color: #ded1b8;
  background: linear-gradient(140deg, #fffdf7, #f7f1e4);
}

.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.team-table th,
.team-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.team-table th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-scroll {
  overflow-x: auto;
}

.domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  color: #44403c;
  font-size: 11px;
}

.domain-chip::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dc2626;
  content: "";
}

.money-amount {
  margin: 7px 0 0;
  font-size: 24px;
  font-weight: 800;
}

.positive {
  color: #166534;
}

.negative {
  color: var(--danger);
}

.quote {
  margin: 0;
  padding-left: 16px;
  border-left: 3px solid var(--brand);
  color: #44403c;
  font-size: 15px;
  font-style: italic;
  line-height: 1.65;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: 12px;
  background: #292524;
  color: white;
  box-shadow: 0 18px 45px rgba(28, 25, 23, 0.22);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.sidebar-open .sidebar-overlay {
    display: block;
  }

  .app-main,
  .app-shell.sidebar-collapsed .app-main {
    padding-right: 18px;
    padding-left: 18px;
  }

  .quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .demo-banner {
    min-height: 46px;
    padding: 6px 10px;
    line-height: 16px;
  }

  .app-header {
    top: 46px;
  }

  .sidebar {
    top: 102px;
    width: min(288px, 86vw);
  }

  .sidebar-overlay {
    inset-block-start: 102px;
  }

  .header-inner {
    padding: 0 12px;
  }

  .header-email {
    display: none;
  }

  .brand-subtitle {
    display: none;
  }

  .tier-badge {
    padding-inline: 8px;
  }

  .app-main,
  .app-shell.sidebar-collapsed .app-main {
    padding: 122px 12px 32px;
  }

  .card-pad {
    padding: 18px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .quick-actions,
  .profile-grid {
    grid-template-columns: 1fr;
  }

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

  .schedule-row {
    grid-template-columns: 55px minmax(0, 1fr);
  }

  .schedule-row .badge {
    display: none;
  }

  .card-head,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
