/* ===================================================
   vCard SaaS — App Stylesheet
   =================================================== */

:root {
  --ink: #0e1726;
  --ink-soft: #1a2436;
  --paper: #f7f3eb;
  --paper-warm: #ede5d3;
  --gold: #b8945a;
  --gold-dark: #8b6d3f;
  --gold-light: #d4b87a;
  --burgundy: #5c1a1b;
  --muted: #8a8579;
  --line: rgba(184, 148, 90, 0.25);
  --success: #1f7a4e;
  --error: #b3261e;
  --info: #1f5a8a;
  --radius: 6px;
  --shadow: 0 8px 20px -8px rgba(0,0,0,0.15);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(184,148,90,0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 100%, rgba(92,26,27,0.06) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 { font-family: 'Cormorant Garamond', serif; color: var(--ink); font-weight: 600; line-height: 1.2; }
h1 { font-size: 42px; margin-bottom: 12px; }
h2 { font-size: 32px; margin-bottom: 14px; }
h3 { font-size: 22px; margin-bottom: 8px; }
p  { margin-bottom: 12px; }

a { color: var(--burgundy); text-decoration: none; }
a:hover { color: var(--gold-dark); }

/* ---------- Navbar ---------- */
.navbar {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 0;
  border-bottom: 2px solid var(--gold);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--gold-light); font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; }
.navbar .brand:hover { color: var(--gold); }
.brand-mark { color: var(--gold); font-style: italic; font-size: 26px; }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--paper-warm); font-size: 14px; }
.nav-links a:hover { color: var(--gold-light); }

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary { background: var(--gold); color: var(--ink); border-color: var(--gold-dark); }
.btn-primary:hover { background: var(--gold-dark); color: var(--paper); }
.btn-secondary { background: var(--ink); color: var(--paper); border-color: var(--ink-soft); }
.btn-secondary:hover { background: var(--ink-soft); color: var(--gold-light); }
.btn-ghost { background: transparent; color: var(--paper-warm); border-color: var(--gold); }
.btn-ghost:hover { background: var(--gold); color: var(--ink); }
.btn-danger { background: var(--burgundy); color: var(--paper); }
.btn-danger:hover { opacity: 0.9; }
.btn-block { display: block; width: 100%; }

/* ---------- Main content ---------- */
.main-content { flex: 1; padding: 32px 20px; }

/* ---------- Cards / Panels ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.panel-title { font-family: 'Cormorant Garamond', serif; font-size: 26px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: 0.02em; }
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=tel],
.form-group input[type=url],
.form-group input[type=password],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: #fcfaf5;
  transition: border 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,148,90,0.15);
}
.form-help { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Alerts ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid;
}
.alert-success { background: #e8f5ee; color: var(--success); border-color: rgba(31,122,78,0.3); }
.alert-error   { background: #fdecea; color: var(--error);   border-color: rgba(179,38,30,0.3); }
.alert-info    { background: #e8f0f8; color: var(--info);    border-color: rgba(31,90,138,0.3); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.hero h1 { font-size: 56px; line-height: 1.05; }
.hero h1 em { color: var(--burgundy); font-style: italic; }
.hero .lead { font-size: 18px; color: var(--muted); max-width: 600px; margin: 0 auto 24px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Plans grid ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.plan-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -16px rgba(0,0,0,0.2); }
.plan-card.featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.plan-card.featured::before {
  content: 'Recommended';
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--ink);
  padding: 4px 14px; border-radius: 999px;
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600;
}
.plan-name { font-family: 'Cormorant Garamond', serif; font-size: 24px; color: var(--burgundy); margin-bottom: 6px; }
.plan-price { font-family: 'Cormorant Garamond', serif; font-size: 44px; color: var(--ink); margin: 12px 0; }
.plan-price .rupee { font-size: 24px; vertical-align: top; }
.plan-price .per { font-size: 14px; color: var(--muted); font-family: 'Inter', sans-serif; }
.plan-features { list-style: none; margin: 20px 0; text-align: left; }
.plan-features li { padding: 6px 0; padding-left: 24px; position: relative; font-size: 14px; color: var(--ink-soft); }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ---------- Dashboard ---------- */
.dash-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-label { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.stat-value { font-family: 'Cormorant Garamond', serif; font-size: 30px; color: var(--burgundy); }

.vcard-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.vcard-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vcard-row .name { font-family: 'Cormorant Garamond', serif; font-size: 20px; color: var(--ink); }
.vcard-row .designation { color: var(--burgundy); font-size: 13px; font-style: italic; }
.vcard-row .meta { color: var(--muted); font-size: 12px; }
.vcard-row .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.vcard-row .actions a { font-size: 12px; padding: 6px 12px; }

/* ---------- OTP screen ---------- */
.auth-shell {
  max-width: 420px;
  margin: 60px auto;
}
.auth-shell .panel { padding: 32px 28px; }
.otp-inputs { display: flex; gap: 8px; justify-content: center; margin: 20px 0; }
.otp-inputs input {
  width: 44px; height: 52px; text-align: center;
  font-size: 22px; font-family: 'Cormorant Garamond', serif;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fcfaf5;
}
.otp-inputs input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,148,90,0.15); }
.text-center { text-align: center; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- Theme selector ---------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.theme-option {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  text-align: center;
  background: #fff;
  transition: all 0.2s;
}
.theme-option.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(184,148,90,0.2); }
.theme-swatch {
  height: 60px;
  border-radius: 4px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.theme-name { font-family: 'Cormorant Garamond', serif; font-size: 15px; color: var(--ink); }

/* Theme swatches preview */
.swatch-classic   { background: linear-gradient(135deg, #1a2436, #b8945a); }
.swatch-modern    { background: linear-gradient(135deg, #111111, #2563eb); }
.swatch-bold      { background: linear-gradient(135deg, #5c1a1b, #f59e0b); }
.swatch-minimal   { background: linear-gradient(135deg, #fafafa, #d4d4d8); border: 1px solid #e5e5e5; }
.swatch-royal     { background: linear-gradient(135deg, #1e1b4b, #c084fc); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper-warm); padding: 40px 0 24px; margin-top: 60px; }
.site-footer .brand { color: var(--gold-light); margin-bottom: 10px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 12px; }
.site-footer a { display: block; color: var(--paper-warm); font-size: 14px; padding: 4px 0; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .muted { color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-bottom { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 12px; color: rgba(255,255,255,0.5); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.table th { background: var(--ink); color: var(--paper-warm); font-weight: 500; letter-spacing: 0.05em; font-size: 12px; text-transform: uppercase; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fcfaf5; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; }
.badge-success { background: #e8f5ee; color: var(--success); }
.badge-pending { background: #fff4e0; color: #b06000; }
.badge-failed  { background: #fdecea; color: var(--error); }

/* ---------- QR section ---------- */
.qr-section { text-align: center; padding: 20px; }
.qr-section img { max-width: 240px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: #fff; }
.upi-id { font-family: monospace; font-size: 16px; background: #fcfaf5; padding: 8px 14px; border: 1px dashed var(--gold); border-radius: var(--radius); display: inline-block; margin-top: 12px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 10px 18px; cursor: pointer; border-bottom: 2px solid transparent; font-size: 14px; color: var(--muted); font-weight: 500; }
.tab.active { color: var(--burgundy); border-bottom-color: var(--gold); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- Utilities ---------- */
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .icon { font-size: 48px; color: var(--gold); font-family: 'Cormorant Garamond', serif; }
