:root {
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: #dcfce7;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --navy: #0b3d2e;
  --amber: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
}

.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}

.nav-links a,
.nav-links button.linkish {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links button.linkish:hover,
.nav-links a.active {
  color: var(--ink);
  background: #f1f5f9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  transition: 0.15s transform, 0.15s background;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: white;
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-dark {
  background: var(--ink);
  color: white;
}

.btn-ghost {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-amber {
  background: #fff7ed;
  color: #c2410c;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.9rem;
}

.hero {
  background:
    radial-gradient(900px 400px at 10% -10%, #bbf7d0 0%, transparent 50%),
    radial-gradient(700px 300px at 90% 0%, #dbeafe 0%, transparent 45%),
    white;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.kicker {
  color: var(--green-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 8px 0 12px;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.3rem);
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.stats {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.2rem;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.quote-preview {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.quote-preview:last-child {
  border-bottom: 0;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

.stars {
  color: var(--amber);
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.section {
  padding: 48px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}

.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cat {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.cat:hover {
  border-color: #86efac;
  box-shadow: var(--shadow);
}

.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-soft);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.card:hover {
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
}

.badge-open {
  background: var(--green-soft);
  color: var(--green-dark);
}

.badge-assigned {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-done {
  background: #f1f5f9;
  color: #475569;
}

.badge-short {
  background: #fef3c7;
  color: #92400e;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.price {
  font-weight: 700;
  font-size: 1.15rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 10px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters input,
.filters select,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
}

.filters input,
.filters select {
  width: auto;
  min-width: 180px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 20px;
}

.quote-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.quote-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: end;
}

.auth-box {
  width: min(440px, 100%);
  margin: 48px auto;
}

.wizard {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.wizard span {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: #e2e8f0;
}

.wizard span.on {
  background: var(--green);
}

.messages {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding: 8px 0;
}

.bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f1f5f9;
}

.bubble.mine {
  margin-left: auto;
  background: var(--green-soft);
}

.composer {
  display: flex;
  gap: 8px;
}

.composer input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}

.notice {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs button {
  border: 0;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.tabs button.on {
  background: var(--ink);
  color: white;
}

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

.menu-btn {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.review {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.checks {
  display: grid;
  gap: 8px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
}

.details {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
}

.detail-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.photo-grid img,
.photo-chip img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.photo-chip {
  position: relative;
  width: 110px;
}

.loc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
}

.loc-overlay[hidden] {
  display: none;
}

.admin-state {
  margin-bottom: 12px;
}

.admin-state-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.admin-rename {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  min-width: 160px;
}

.admin-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.city-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px 8px 4px 10px;
  font-size: 0.9rem;
}

.city-chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 860px) {
  .hero-grid,
  .cats,
  .grid,
  .steps,
  .layout {
    grid-template-columns: 1fr;
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 12px;
    align-items: stretch;
  }

  .nav-links.open {
    display: flex;
  }
}
