:root {
  --ink: #12261e;
  --ink-2: #3d5249;
  --muted: #6b7d75;
  --line: #dfe6e1;
  --paper: #f6f4ee;
  --card: #ffffff;
  --forest: #0f3d2e;
  --forest-2: #1a5a44;
  --lime: #c9f26b;
  --amber: #f2b33d;
  --red: #d9534f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 38, 30, .06), 0 8px 24px rgba(18, 38, 30, .06);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--forest); display: grid; place-items: center; }
.logo-mark svg { width: 18px; height: 18px; }
.nav-links { display: flex; gap: 24px; align-items: center; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px var(--sans); cursor: pointer; text-decoration: none; transition: transform .1s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-2); }
.btn-lime { background: var(--lime); color: var(--forest); }
.btn-lime:hover { filter: brightness(.97); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding: 56px 0 88px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--forest-2); background: #e5eedf; padding: 5px 11px; border-radius: 999px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(38px, 5.4vw, 62px); margin: 18px 0 20px; }
h1 em { font-style: italic; color: var(--forest-2); }
h2 { font-size: clamp(30px, 3.6vw, 42px); }
h3 { font-size: 21px; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 520px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: 14px; color: var(--muted); margin-top: 14px; }

.mock { background: var(--forest); border-radius: 22px; padding: 22px; color: #fff; box-shadow: 0 30px 60px -20px rgba(15, 61, 46, .45); position: relative; }
.mock-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.mock-head small { color: #a9c4b8; font-size: 13px; }
.mock-big { font-family: var(--serif); font-size: 44px; color: var(--lime); line-height: 1; }
.mock-alert { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 13px 14px; margin-top: 10px; display: flex; gap: 12px; align-items: flex-start; }
.mock-alert b { display: block; font-size: 14.5px; font-weight: 600; }
.mock-alert span { font-size: 13px; color: #b8cfc4; }
.mock-alert .amt { margin-left: auto; font-weight: 700; color: var(--lime); white-space: nowrap; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.dot.red { background: #ff7b72; } .dot.amber { background: var(--amber); } .dot.lime { background: var(--lime); }

/* Sections */
section.block { padding: 84px 0; }
section.block.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--ink-2); font-size: 18px; margin: 14px 0 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--forest); font-weight: 700; margin-bottom: 16px; }
.step p { color: var(--ink-2); margin: 8px 0 0; }

.finds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.find { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); background: var(--paper); }
.find-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--forest); color: var(--lime); display: grid; place-items: center; flex: none; }
.find-ico svg { width: 21px; height: 21px; }
.find p { margin: 5px 0 0; color: var(--ink-2); font-size: 15.5px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; }
.plan.featured { background: var(--forest); color: #fff; border-color: var(--forest); position: relative; }
.plan.featured .plan-desc, .plan.featured li { color: #cfe0d8; }
.badge { position: absolute; top: -12px; left: 28px; background: var(--lime); color: var(--forest); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.price { font-family: var(--serif); font-size: 44px; margin: 14px 0 2px; }
.price small { font-family: var(--sans); font-size: 15px; font-weight: 500; opacity: .7; }
.plan-desc { color: var(--ink-2); font-size: 15px; margin: 0 0 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); flex: 1; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: #e5eedf url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f3d2e' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat; }
.plan.featured li::before { background-color: var(--lime); }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-2); margin: 10px 0 0; }

.cta-band { background: var(--forest); color: #fff; border-radius: 24px; padding: 54px; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-band p { color: #cfe0d8; margin: 10px 0 0; font-size: 17px; }
footer { padding: 40px 0 50px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ===== App ===== */
.app-shell { min-height: 100vh; }
.app-top { background: #fff; border-bottom: 1px solid var(--line); }
.app-top .nav { padding: 14px 0; }
.user-chip { font-size: 14px; color: var(--ink-2); display: flex; gap: 14px; align-items: center; }

.auth-card { max-width: 420px; margin: 70px auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 34px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 30px; margin-bottom: 6px; }
.auth-card p.sub { color: var(--ink-2); margin: 0 0 24px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date] {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); font: 15px var(--sans); background: #fff; color: var(--ink);
}
input:focus { outline: 2px solid var(--lime); border-color: var(--forest-2); }
.auth-card .btn { width: 100%; margin-top: 20px; }
.switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.switch button { background: none; border: 0; color: var(--forest-2); font-weight: 600; cursor: pointer; font-size: 14px; text-decoration: underline; }
.msg { margin-top: 14px; font-size: 14px; padding: 10px 12px; border-radius: 10px; display: none; }
.msg.show { display: block; }
.msg.err { background: #fbe9e8; color: #8b2c29; }
.msg.ok { background: #e5eedf; color: var(--forest); }

.dash { padding: 30px 0 70px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: 34px; margin: 0; }
.dash-head p { margin: 4px 0 0; color: var(--ink-2); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.kpi small { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .v { font-family: var(--serif); font-size: 30px; margin-top: 4px; line-height: 1.1; }
.kpi.hl { background: var(--forest); color: #fff; border-color: var(--forest); }
.kpi.hl small { color: #a9c4b8; } .kpi.hl .v { color: var(--lime); }

.grid-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; min-width: 0; }
.panel h3 { font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: 0; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel h3 span { font-weight: 500; color: var(--muted); font-size: 14px; }

.drop { border: 2px dashed #b9c9bf; border-radius: 14px; padding: 30px 20px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; background: var(--paper); }
.drop.over { background: #ecf5dc; border-color: var(--forest-2); }
.drop b { display: block; font-size: 16px; margin-bottom: 4px; }
.drop span { color: var(--muted); font-size: 14px; }
.queue { margin-top: 12px; display: grid; gap: 6px; font-size: 14px; }
.queue div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--paper); }
.queue em { font-style: normal; color: var(--muted); white-space: nowrap; }

.alert-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.alert-item:last-child { border-bottom: 0; }
.alert-item .dot { margin-top: 7px; }
.alert-item .dot.high { background: var(--red); } .alert-item .dot.medium { background: var(--amber); } .alert-item .dot.low { background: #9fbf61; }
.alert-body { flex: 1; min-width: 0; }
.alert-body b { display: block; font-size: 15px; }
.alert-body p { margin: 3px 0 8px; color: var(--ink-2); font-size: 14px; }
.alert-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.alert-amt { font-weight: 700; color: var(--forest-2); white-space: nowrap; font-size: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--ink-2); white-space: nowrap; }
.tag.done { background: #e5eedf; color: var(--forest); }
.tag.error { background: #fbe9e8; color: #8b2c29; }
.tag.processing, .tag.pending { background: #fdf2dc; color: #7a5410; }
.empty { color: var(--muted); font-size: 14.5px; padding: 8px 0; }

.form-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; align-items: end; margin-top: 10px; }
.form-row label { margin-top: 0; font-size: 12.5px; }
.banner { background: #fdf2dc; border: 1px solid #f1d9a6; color: #6b4a0d; padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .hero, .grid-2 { grid-template-columns: 1fr; }
  .hero { gap: 36px; padding-top: 24px; }
  .steps, .plans { grid-template-columns: 1fr; }
  .finds { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .nav-links .hide-sm { display: none; }
  .cta-band { padding: 34px 24px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  section.block { padding: 60px 0; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .kpi .v { font-size: 24px; }
  .mock-big { font-size: 36px; }
}

/* fixes */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
.grid-2 > div { min-width: 0; }
