:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #1c241f;
  --muted: #667069;
  --line: #dfe5dc;
  --green: #17694c;
  --green-2: #e5f4ed;
  --gold: #a57522;
  --red: #b74242;
  --red-2: #f9e9e9;
  --blue: #2b5d8a;
  --blue-2: #e8f1f9;
  --shadow: 0 12px 30px rgba(27, 39, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: #101914;
  color: white;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #d7f4e5;
  color: #123325;
  font-weight: 800;
}

.brand span,
.eyebrow,
.muted {
  color: var(--muted);
}

.brand span {
  display: block;
  color: #aebbb3;
  font-size: 13px;
}

#nav {
  display: grid;
  gap: 6px;
}

.nav-btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #cfdbd2;
  text-align: left;
}

.nav-btn.active,
.nav-btn:hover {
  background: #243329;
  color: white;
}

.main {
  min-width: 0;
  padding: 22px;
}

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

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

.eyebrow {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.top-actions,
.row-actions,
.modal-actions,
.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.stats {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

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

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

.panel,
.stat,
.table-wrap,
.lp-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel,
.table-wrap {
  padding: 16px;
}

.stat {
  padding: 14px;
}

.stat span,
label span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 25px;
}

.panel h2,
.lp-preview h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.panel h3 {
  margin: 12px 0 8px;
}

.filters {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.search {
  min-width: 260px;
  flex: 1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
}

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

label {
  display: grid;
  gap: 6px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.primary,
.ghost,
.mini,
.icon-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 700;
}

.primary {
  background: var(--green);
  color: white;
}

.ghost {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.sidebar .ghost {
  margin-top: auto;
  background: transparent;
  color: #cfdbd2;
  border-color: #35483d;
}

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

.mini {
  padding: 6px 8px;
  background: #eef4ef;
  color: #173526;
}

.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  background: #eef4ef;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #eef1ee;
  color: #314238;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.good {
  background: var(--green-2);
  color: var(--green);
}

.badge.warn {
  background: #fff2d7;
  color: var(--gold);
}

.badge.bad {
  background: var(--red-2);
  color: var(--red);
}

.badge.info {
  background: var(--blue-2);
  color: var(--blue);
}

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

.lane {
  background: #eef1ee;
  border-radius: 8px;
  padding: 10px;
  min-height: 180px;
}

.lane h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.lead-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  margin-bottom: 8px;
}

.lead-card strong,
.lead-card span {
  display: block;
}

.lead-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.lp-preview {
  overflow: hidden;
}

.lp-hero {
  min-height: 250px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
  padding: 26px;
  background: linear-gradient(135deg, #eaf3ec, #ffffff);
}

.product-art {
  min-height: 220px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 65% 35%, rgba(23, 105, 76, 0.28), transparent 30%),
    linear-gradient(135deg, #ffffff, #dbe7df);
  border: 1px solid var(--line);
}

.lp-section {
  padding: 22px 26px;
  border-top: 1px solid var(--line);
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0;
  list-style: none;
}

.benefits li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(12, 18, 14, 0.48);
}

.modal-box {
  padding: 16px;
}

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

.modal-head h2 {
  margin: 0;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  #nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats,
  .two,
  .three,
  .kanban,
  .lp-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .main {
    padding: 14px;
  }

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

  #nav,
  .form-grid,
  .benefits {
    grid-template-columns: 1fr;
  }

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