/* TinkyMerchant — portal styles. One file. No frameworks. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FBF7F0;
  --bg-warm: #F5EDE0;
  --bg-cool: #F0EBE3;
  --ink: #1A1A2E;
  --ink-soft: #4A4A5A;
  --ink-muted: #8A8A9A;
  --amber: #E8A838;
  --amber-light: #F5C563;
  --amber-dark: #C48A20;
  --green: #4A8F5C;
  --red: #C44545;
  --surface: #FFFFFF;
  --surface-hover: #FAFAF5;
  --border: #E5DFD3;
  --shadow: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

html, body {
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; }
h2 { font-size: clamp(24px, 3.5vw, 36px); line-height: 1.2; }
h3 { font-size: 20px; }

a { color: var(--amber-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ────────────────────────────────── nav ────────────────────────────────── */
.nav {
  background: var(--ink);
  color: var(--bg-warm);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.nav-brand {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--amber);
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--bg-warm); font-size: 14px; }
.nav-links a:hover { color: var(--amber); }
.nav-cta {
  background: var(--amber);
  color: var(--ink) !important;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.nav-cta:hover { background: var(--amber-light); text-decoration: none; }

/* ────────────────────────────────── hero ────────────────────────────────── */
.hero {
  padding: 80px 24px 64px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: var(--amber);
  color: var(--ink);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 16px; }
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 640px; margin: 0 auto 32px; }

.hero-form {
  display: flex; gap: 8px;
  max-width: 560px; margin: 0 auto;
  flex-wrap: wrap;
}
.hero-form input {
  flex: 1; min-width: 240px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px;
}
.hero-form input:focus { outline: 2px solid var(--amber); border-color: var(--amber); }

/* ────────────────────────────────── buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border: none; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--amber); color: var(--ink); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--amber-light); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: var(--red); color: white; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ────────────────────────────────── cards ────────────────────────────────── */
.section { padding: 64px 24px; max-width: 1100px; margin: 0 auto; }
.section-tight { padding: 32px 24px; max-width: 1100px; margin: 0 auto; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15px; }

/* ────────────────────────────────── forms ────────────────────────────────── */
.form-shell {
  max-width: 520px; margin: 48px auto; padding: 0 24px;
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 15px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--amber); border-color: var(--amber);
}
.form-row .help { color: var(--ink-muted); font-size: 12px; margin-top: 4px; }
.form-error { background: #FDEBEB; border: 1px solid #F4C0C0; color: var(--red);
              padding: 12px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.form-success { background: #EAF5ED; border: 1px solid #B8DCC0; color: var(--green);
                padding: 12px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }

/* ────────────────────────────────── wizard steps ────────────────────────────────── */
.steps { display: flex; gap: 8px; margin-bottom: 24px; }
.step { flex: 1; height: 4px; background: var(--border); border-radius: 2px; }
.step.active { background: var(--amber); }
.step.done { background: var(--green); }

/* ────────────────────────────────── dashboard layout ────────────────────────────────── */
.dash {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 720px) { .dash { grid-template-columns: 1fr; } }
.dash-side {
  background: var(--ink);
  color: var(--bg-warm);
  padding: 24px 16px;
}
.dash-side .brand { font-family: 'Bricolage Grotesque'; color: var(--amber);
                    font-weight: 800; font-size: 20px; margin-bottom: 24px; padding: 0 8px; }
.dash-side a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--bg-warm); margin-bottom: 4px; font-size: 14px;
}
.dash-side a:hover, .dash-side a.active { background: rgba(232, 168, 56, 0.15); color: var(--amber); text-decoration: none; }
.dash-main { padding: 32px; overflow-x: auto; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-header h1 { font-size: 28px; }

.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.metric .label { font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.metric .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.metric .delta { font-size: 13px; color: var(--green); margin-top: 4px; }

/* ────────────────────────────────── tables ────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg-cool); font-weight: 600; color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: var(--surface-hover); }

/* ────────────────────────────────── badges ────────────────────────────────── */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-green { background: #DCEFE0; color: var(--green); }
.badge-amber { background: #FBE9C7; color: var(--amber-dark); }
.badge-red { background: #FBDADA; color: var(--red); }
.badge-gray { background: var(--bg-cool); color: var(--ink-soft); }

/* ────────────────────────────────── board preview ────────────────────────────────── */
.board-preview {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px; padding: 16px; background: var(--bg-cool); border-radius: var(--radius);
}
.board-tile {
  background: var(--surface); border: 1px solid var(--border);
  padding: 16px 8px; border-radius: var(--radius-sm);
  text-align: center; font-size: 13px; min-height: 60px;
  display: flex; align-items: center; justify-content: center;
}

/* ────────────────────────────────── rep app (mobile-first) ────────────────────────────────── */
.rep-shell { max-width: 480px; margin: 0 auto; padding-bottom: 80px; }
.rep-header { background: var(--ink); color: white; padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.rep-header .title { font-weight: 700; }
.rep-tabs {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex;
}
.rep-tab {
  flex: 1; padding: 12px; text-align: center;
  font-size: 12px; color: var(--ink-muted);
  cursor: pointer; border: none; background: none;
}
.rep-tab.active { color: var(--amber-dark); font-weight: 600; }
.rep-tab .icon { font-size: 20px; display: block; }

.rep-section { padding: 16px; display: none; }
.rep-section.active { display: block; }

.lead-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.lead-card .name { font-weight: 700; font-size: 16px; }
.lead-card .meta { color: var(--ink-muted); font-size: 13px; margin-top: 2px; }
.lead-card .actions { display: flex; gap: 8px; margin-top: 12px; }

.demo-stage {
  background: var(--ink); color: white; border-radius: var(--radius);
  padding: 24px; text-align: center; margin-bottom: 16px;
}
.demo-stage h2 { color: var(--amber); margin-bottom: 8px; }
.demo-stage .url-input {
  width: 100%; padding: 12px; margin-top: 12px;
  border: none; border-radius: var(--radius-sm); font-size: 15px;
}

/* ────────────────────────────────── footer ────────────────────────────────── */
.footer {
  background: var(--ink); color: var(--bg-cool);
  padding: 48px 24px; text-align: center; font-size: 13px;
}
.footer a { color: var(--amber); }

/* ────────────────────────────────── utility ────────────────────────────────── */
.muted { color: var(--ink-muted); }
.center { text-align: center; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hide { display: none !important; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border);
           border-top-color: var(--amber); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* responsive nudges */
@media (max-width: 600px) {
  .nav { padding: 12px 16px; }
  .nav-links { gap: 12px; font-size: 13px; }
  .hero { padding: 48px 16px 32px; }
  .section { padding: 32px 16px; }
  .dash-main { padding: 16px; }
}
