:root {
  --ink: #17352d;
  --muted: #66766f;
  --paper: #f7f2e8;
  --card: #fffdf7;
  --line: #d9ded7;
  --lime: #d8f06b;
  --coral: #ff8a6b;
  --mint: #cce8da;
  --shadow: 0 24px 70px rgba(23, 53, 45, 0.12);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.grain {
  position: fixed; inset: 0; pointer-events: none; opacity: .16; z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.topbar { max-width: 1180px; margin: auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 30; }
.brand { text-decoration: none; font-weight: 800; font-size: 20px; display: flex; gap: 10px; align-items: center; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: var(--lime); font-family: "Fraunces", serif; }
nav { display: flex; align-items: center; gap: 10px; }
.nav-link { border: 0; background: transparent; color: var(--ink); padding: 10px 12px; font-weight: 600; }

main { min-height: calc(100vh - 180px); }
.shell { max-width: 1180px; margin: 0 auto; padding: 54px 28px 90px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; min-height: 660px; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; color: #537167; margin-bottom: 18px; }
h1, h2, h3 { font-family: "Fraunces", serif; margin-top: 0; letter-spacing: -.03em; }
h1 { font-size: clamp(54px, 7vw, 92px); line-height: .95; margin-bottom: 25px; }
h2 { font-size: clamp(36px, 5vw, 62px); line-height: 1.02; }
h3 { font-size: 25px; }
.lead { font-size: 20px; line-height: 1.62; max-width: 680px; color: #4d625b; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.button { border: 1px solid transparent; border-radius: 14px; padding: 14px 19px; font-weight: 800; background: var(--lime); color: var(--ink); box-shadow: 0 8px 22px rgba(23, 53, 45, .10); transition: transform .18s, box-shadow .18s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(23, 53, 45, .16); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-dark { background: var(--ink); color: white; }
.button-light { background: white; border-color: var(--line); box-shadow: none; }
.button-small { padding: 10px 14px; border-radius: 11px; }
.button-block { width: 100%; }
.hero-card { background: var(--ink); color: white; padding: 34px; border-radius: 34px; box-shadow: var(--shadow); transform: rotate(1.2deg); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 210px; height: 210px; border-radius: 50%; background: var(--coral); right: -100px; top: -110px; opacity: .9; }
.mini-qr { width: 150px; height: 150px; background: white; border-radius: 20px; display: grid; place-items: center; color: var(--ink); font: 800 46px "Fraunces"; margin-bottom: 45px; position: relative; z-index: 2; }
.steps { display: grid; gap: 16px; }
.step { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 15px; }
.step span { width: 29px; height: 29px; display: grid; place-items: center; background: var(--lime); color: var(--ink); border-radius: 50%; font-weight: 900; flex: 0 0 auto; }
.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.trust { padding: 22px; border-top: 1px solid #ccd5ce; }
.trust strong { display: block; font-size: 16px; margin-bottom: 8px; }
.trust p { margin: 0; color: var(--muted); line-height: 1.5; }

.panel { max-width: 880px; margin: 20px auto; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow); }
.panel.narrow { max-width: 570px; }
.panel-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 26px; }
.panel-header h2 { font-size: 40px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.notice { border-left: 4px solid var(--lime); background: #f4f8df; padding: 14px 16px; border-radius: 0 12px 12px 0; line-height: 1.5; margin: 18px 0; }
.notice.error { border-color: var(--coral); background: #fff0ec; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
label, legend { font-weight: 800; font-size: 14px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: white; border-radius: 13px; padding: 13px 14px; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: #5c8b7b; box-shadow: 0 0 0 3px rgba(92,139,123,.13); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #edf0ea; border-radius: 13px; padding: 4px; margin-bottom: 22px; }
.auth-tab { border: 0; padding: 11px; border-radius: 10px; background: transparent; font-weight: 800; }
.auth-tab.active { background: white; box-shadow: 0 3px 12px rgba(23,53,45,.1); }
.hidden { display: none !important; }

.dashboard-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.dashboard-head h2 { margin-bottom: 5px; }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: 0 12px 38px rgba(23,53,45,.06); }
.card h3 { margin-bottom: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.stat { background: #eef4ee; border-radius: 15px; padding: 16px; }
.stat strong { font-size: 28px; display: block; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 700; }
.location-list { display: grid; gap: 14px; }
.location { border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.location-top { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.tag { display: inline-block; border-radius: 999px; padding: 5px 9px; background: var(--mint); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.qr-wrap { display: grid; place-items: center; gap: 14px; text-align: center; }
.qr-image { width: min(100%, 260px); border: 14px solid white; border-radius: 22px; box-shadow: 0 8px 25px rgba(23,53,45,.12); }
.link-box { word-break: break-all; font-size: 12px; background: #f3f3ec; border-radius: 11px; padding: 12px; width: 100%; text-align: left; }

.customer-shell { max-width: 660px; margin: 0 auto; padding: 34px 18px 80px; }
.customer-brand { text-align: center; margin: 18px 0 28px; }
.customer-card { background: var(--card); border: 1px solid var(--line); border-radius: 27px; padding: clamp(22px, 6vw, 38px); box-shadow: var(--shadow); }
.customer-card h1 { font-size: 43px; line-height: 1.02; }
.progress { display: flex; gap: 7px; margin-bottom: 30px; }
.progress span { height: 5px; flex: 1; border-radius: 9px; background: #dfe3dc; }
.progress span.active { background: var(--ink); }
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; border: 0; padding: 0; margin: 18px 0 25px; }
.star { border: 1px solid var(--line); border-radius: 13px; background: white; min-height: 54px; font-size: 24px; }
.star.selected { background: var(--lime); border-color: #a6bd3f; }
.question { margin: 24px 0; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; cursor: pointer; background: white; }
.choice input:checked + label { background: var(--mint); border-color: #82a997; }
.draft { min-height: 220px; font-size: 17px; background: #fffefb; }
.destination-grid { display: grid; gap: 10px; margin-top: 18px; }
.destination { display: flex; justify-content: space-between; align-items: center; gap: 15px; border: 1px solid var(--line); background: white; border-radius: 14px; padding: 15px 17px; font-weight: 800; }
.destination::after { content: "↗"; }
.spinner { width: 38px; height: 38px; border: 4px solid #d9dfda; border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; margin: 28px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: white; padding: 12px 17px; border-radius: 12px; z-index: 100; transition: .25s; pointer-events: none; max-width: calc(100vw - 30px); text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
footer { max-width: 1180px; margin: auto; padding: 28px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid #d8ddd7; font-size: 13px; }

@media (max-width: 800px) {
  .hero, .dashboard-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 15px; min-height: auto; }
  .hero-card { transform: none; }
  .trust-row, .stat-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  h1 { font-size: 53px; }
  .dashboard-head, .panel-header { flex-direction: column; }
  footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .topbar { padding: 16px; }
  .nav-link { display: none; }
  .shell { padding: 28px 16px 70px; }
  .hero-card { padding: 24px; border-radius: 24px; }
  .choices { grid-template-columns: 1fr; }
  .customer-card { border-radius: 22px; }
}
