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

:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --bg-alt: #f0e7d7;
  --ink: #1b1b1d;
  --accent: #009e84;
  --accent-dark: #007b67;
  --digi-gray: #666666;
  --card: #fff8ee;
  --line: #e2d6c2;
  --shadow: 0 18px 45px rgba(27, 27, 29, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, #ffe7c7 0, transparent 45%),
    radial-gradient(circle at 80% 10%, #fcd1ba 0, transparent 40%),
    radial-gradient(circle at 70% 80%, #f5c8aa 0, transparent 50%),
    linear-gradient(130deg, var(--bg) 0%, var(--bg-alt) 100%);
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 8vw 10px;
  gap: 20px;
}

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

.logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
}

.brand p {
  margin: 6px 0 0;
  color: var(--digi-gray);
}

.user-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.shell {
  padding: 0 8vw 60px;
}

.tabs {
  display: flex;
  gap: 10px;
  padding: 8px 0 18px;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #fff5e8;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.tab-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

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

h2,
h3 {
  margin: 0 0 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
}

.inline-input {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 600;
}

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

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.btn {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

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

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: #dff5ef;
  font-size: 13px;
}

.list {
  display: grid;
  gap: 6px;
}

.list-item {
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 4px;
}

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

.item-actions {
  display: inline-flex;
  gap: 6px;
}

.icon-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--digi-gray);
}

.icon-btn:hover {
  border-color: var(--line);
  color: var(--ink);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.list-item.is-clickable {
  cursor: pointer;
}

.list-item.is-clickable:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(224, 108, 63, 0.15);
}

.list-item small {
  color: #5a5a63;
}

.filters {
  margin-bottom: 12px;
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.chart {
  display: grid;
  gap: 8px;
}

.chart-row {
  display: grid;
  gap: 6px;
}

.chart-row header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--digi-gray);
}

.chart-bar {
  height: 12px;
  border-radius: 999px;
  background: #dff5ef;
  overflow: hidden;
}

.chart-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 27, 29, 0.4);
}

.modal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  width: min(520px, 90vw);
  box-shadow: var(--shadow);
  z-index: 1;
}

.modal-body {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding-right: 6px;
  flex: 1;
}

.inner-card {
  box-shadow: none;
  margin: 0;
}

.muted {
  color: var(--digi-gray);
  margin: 6px 0 0;
}

.plans-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.action-item.is-active,
.business-item.is-active,
.timeline-day.is-active {
  border-color: var(--accent);
  background: #e9fbf6;
}

.action-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--digi-gray);
}

.action-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.feas-100 .action-dot,
.feas-100 .timeline-dot {
  background: #49b86b;
}

.feas-75 .action-dot,
.feas-75 .timeline-dot {
  background: #7cc96b;
}

.feas-50 .action-dot,
.feas-50 .timeline-dot {
  background: #d1d96b;
}

.feas-25 .action-dot,
.feas-25 .timeline-dot {
  background: #f4b35f;
}

.feas-10 .action-dot,
.feas-10 .timeline-dot {
  background: #f08a6a;
}

.feas-0 .action-dot,
.feas-0 .timeline-dot {
  background: #e45f5f;
}

.feas-na .action-dot,
.feas-na .timeline-dot {
  background: #9a9a9a;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

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

  .user-actions {
    width: 100%;
    justify-content: space-between;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }
}
