/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --surface2: #1e1e1e;
  --border: #2a2a2a;
  --border2: #3a3a3a;
  --text: #f0ede8;
  --muted: #8f8f8f;
  --hint: #7c7c7c;
  --accent: #E25822;
  --accent-dark: #c44a18;
  --accent-text: #ffffff;
  --pro: #7c6af7;
  --pro-bg: #1a1730;
  --radius: 12px;
  --radiuslg: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
}
/* ── Inline icons ──────────────────────────────────────────────────────────── */
.ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; stroke: currentColor; }
svg.icon { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Icon sizing across surfaces */
.feature-item .icon { width: 16px; height: 16px; color: var(--accent); }
.sidebar-nav-icon { display: inline-flex; width: 18px; justify-content: center; }
.sidebar-nav-icon .icon { width: 17px; height: 17px; }
.w-icon-btn .icon { width: 19px; height: 19px; }
.empty-icon .icon { width: 40px; height: 40px; color: var(--muted); }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* ── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Syne', sans-serif; line-height: 1.15; }
em { font-style: italic; color: var(--accent); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500;
  font-family: 'DM Sans', sans-serif; cursor: pointer; border: none;
  transition: all .15s; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border2); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: 10px; }
.btn-full { width: 100%; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(13,13,13,.82); backdrop-filter: blur(14px); z-index: 100;
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo {
  font-family: 'Syne', sans-serif; font-weight: 900; font-size: 24px;
  letter-spacing: -1px; color: var(--text);
  display: flex; align-items: center; gap: 4px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.nav-links a { white-space: nowrap; }
.nav-links a:not(.btn) { font-size: 14px; color: var(--muted); transition: color .15s; }
.nav-links a:not(.btn):hover { color: var(--text); }
@media (max-width: 560px) {
  .nav-inner { padding: 12px 16px; gap: 10px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.btn) { font-size: 13px; }
  .nav-logo { font-size: 20px; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 24px 84px;
  background: #0b0b0b;
}
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 130%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 44% at 78% 8%, rgba(226,88,34,.28) 0%, transparent 60%),
    radial-gradient(ellipse 42% 40% at 18% 4%, rgba(124,106,247,.24) 0%, transparent 62%),
    radial-gradient(ellipse 50% 50% at 60% 40%, rgba(226,88,34,.10) 0%, transparent 70%);
  filter: blur(8px);
}
.hero-inner { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-copy { text-align: left; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border: 1px solid rgba(226,88,34,.35);
  border-radius: 24px; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 30px;
  background: rgba(226,88,34,.08); box-shadow: 0 0 24px rgba(226,88,34,.12);
}
.hero-badge .icon { width: 15px; height: 15px; color: var(--accent); }
.hero-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(226,88,34,.6); animation: pulse-dot 2s ease-out infinite; }
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(226,88,34,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(226,88,34,0); }
  100% { box-shadow: 0 0 0 0 rgba(226,88,34,0); }
}
.hero-title { font-size: clamp(44px, 5.6vw, 76px); font-weight: 800; letter-spacing: -2px; margin-bottom: 22px; line-height: 1.04; }
.hero-title em { font-style: italic; background: linear-gradient(100deg, #ff7a45 0%, #E25822 45%, #d6478f 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 480px; margin: 0 0 34px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-social-proof { font-size: 13px; color: var(--hint); }
.hero-modes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.mode-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: var(--surface2); border: 1px solid var(--border2); color: var(--text); }
.mode-chip .icon { width: 14px; height: 14px; color: var(--accent); }
.mode-chip:nth-of-type(2) .icon { color: var(--pro); }
.mode-chip-note { font-size: 12.5px; color: var(--hint); }

/* Hero card mockup — two modes, fanned and fully visible, no idle motion */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 500px; }
.hero-glow { position: absolute; width: 380px; height: 380px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(226,88,34,.32) 0%, rgba(124,106,247,.20) 45%, transparent 70%); filter: blur(34px); }
.hero-cards { position: relative; z-index: 1; width: 432px; height: 480px; }
.hero-card { position: absolute; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); }
.hero-card-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); z-index: 4;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; white-space: nowrap;
  padding: 4px 11px; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,.22); }
.hero-card-flag-front { background: #17171a; color: #fff; }
.hero-card-flag-bio { background: #fff; color: #5b2be0; }
/* Business card (right, front) */
.hero-card-front { top: 0; right: 0; z-index: 2; width: 262px; padding: 0 22px 20px; text-align: center; transform: rotate(4deg); }
/* Link-in-bio card (left) */
.hero-card-bio { top: 66px; left: 0; z-index: 1; width: 188px; padding: 22px 15px 16px; text-align: center; transform: rotate(-6deg);
  background: linear-gradient(168deg, #7c4dff 0%, #5b2be0 58%, #4a1fc4 100%); color: #fff; }
.hb-avatar { width: 44px; height: 44px; border-radius: 50%; margin: 4px auto 8px; background: rgba(255,255,255,.92); color: #4a1fc4; display: flex; align-items: center; justify-content: center; font-family: 'Syne',sans-serif; font-weight: 800; font-size: 15px; }
.hb-name { font-family: 'Syne',sans-serif; font-weight: 800; font-size: 15px; letter-spacing: -.2px; }
.hb-sub { font-size: 10.5px; color: rgba(255,255,255,.72); margin-bottom: 10px; }
.hb-socials { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.hb-socials span { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.2); }
.hb-link { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 9px; background: rgba(255,255,255,.16); font-size: 11px; font-weight: 600; margin-bottom: 7px; }
.hb-link .icon { width: 12px; height: 12px; }
.hb-link-solid { background: #fff; color: #4a1fc4; }
.hero-card-banner { height: 84px; margin: 0 -22px 0; border-radius: 22px 22px 0 0; background: linear-gradient(135deg, #6d34ff, #5b2be0); }
.hero-card-avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: -32px auto 10px; border: 3px solid #fff;
  background: #3a1e8f; color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 20px; box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.hero-card-name { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 19px; color: #17171a; letter-spacing: -.3px; }
.hero-card-role { font-size: 12.5px; color: #6b6b70; margin-top: 2px; }
.hero-card-company { font-size: 12.5px; font-weight: 600; color: #35353a; margin-bottom: 14px; }
.hero-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
.hero-card-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 9px; border-radius: 9px; font-size: 12px; font-weight: 600; }
.hero-card-btn .icon { width: 13px; height: 13px; }
.hero-card-btn-primary { background: #5b2be0; color: #fff; }
.hero-card-btn-secondary { background: #f0eef7; color: #35353a; }
.hero-card-links { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.hero-card-link { width: 36px; height: 36px; border-radius: 10px; background: #f4f3f7; border: 1px solid #ececf2; display: inline-flex; align-items: center; justify-content: center; color: #45454d; }
.hero-card-link .icon { width: 16px; height: 16px; }
.hero-card-save { display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 6px; padding: 11px; border-radius: 11px; background: #17171a; color: #fff; font-size: 12.5px; font-weight: 700; }
.hero-card-save .icon { width: 14px; height: 14px; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; text-align: center; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-modes { justify-content: center; }
}
@media (max-width: 480px) {
  .hero-visual { min-height: 440px; }
  .hero-cards { transform: scale(.82); }
}

/* ── Features strip ──────────────────────────────────────────────────────── */
.features-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 0;
}
.feature-item {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 32px; font-size: 13.5px; color: var(--muted);
  border-right: 1px solid var(--border);
}
.feature-item:last-child { border-right: none; }
.fi { font-size: 16px; }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: -1px; margin-bottom: 48px; }

/* ── Features grid ─────────────────────────────────────────────────────────── */
.features { padding: 100px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2px; border: 1px solid var(--border); }
.feature-card { padding: 36px 32px; background: var(--surface); border: 1px solid var(--border); transition: background .2s, transform .2s, box-shadow .2s; }
.feature-card:hover { background: var(--surface2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-icon { width: 44px; height: 44px; margin-bottom: 18px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(226,88,34,.1); color: var(--accent); }
.feature-icon .icon { width: 22px; height: 22px; }
/* Varied icon hues for vibrancy (stays on dark theme) */
.feature-card:nth-child(1) .feature-icon { background: rgba(226,88,34,.12);  color: #E25822; }
.feature-card:nth-child(2) .feature-icon { background: rgba(124,106,247,.14); color: #9b8cff; }
.feature-card:nth-child(3) .feature-icon { background: rgba(45,196,158,.13);  color: #2dc49e; }
.feature-card:nth-child(4) .feature-icon { background: rgba(56,150,255,.13);  color: #4c9dff; }
.feature-card:nth-child(5) .feature-icon { background: rgba(240,110,170,.13); color: #f06eaa; }
.feature-card:nth-child(6) .feature-icon { background: rgba(245,180,60,.13);  color: #f5b43c; }
.feature-card h3 em { font-style: italic; color: var(--muted); }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ── Pricing ──────────────────────────────────────────────────────────────── */
.pricing-preview { padding: 100px 0; background: var(--surface); border-top: 1px solid var(--border); }
.pricing-preview .section-label, .pricing-preview .section-title { text-align: center; }
.billing-toggle { display: inline-flex; gap: 4px; padding: 4px; margin: 0 auto 36px; border: 1px solid var(--border2); border-radius: 24px; background: var(--surface); }
.pricing-preview .container { text-align: center; }
.billing-toggle { text-align: initial; }
.billing-opt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 20px; border: none; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all .15s; }
.billing-opt.active { background: var(--accent); color: #fff; }
.save-pill { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; background: rgba(255,255,255,.22); }
.billing-opt:not(.active) .save-pill { background: rgba(226,88,34,.15); color: var(--accent); }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 720px; margin: 0 auto; text-align: left; }
.plans-grid-3 { max-width: 1000px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.price-note { font-size: 12.5px; color: var(--hint); margin-bottom: 22px; margin-top: 2px; }
.plan-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 4px 12px; border-radius: 20px; margin-bottom: 14px; }
.plan-card.plan-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 16px 44px rgba(226,88,34,.14); }
.plan-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radiuslg); padding: 32px; }
.plan-card.featured { border-color: var(--accent); }
.plan-name { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.plan-price { font-family: 'Syne', sans-serif; font-size: 42px; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 4px; }
.plan-price span { font-size: 16px; font-weight: 400; color: var(--muted); }
.plan-desc { font-size: 13.5px; color: var(--muted); margin-bottom: 24px; }
.plan-features { margin-bottom: 28px; }
.plan-feature { font-size: 13.5px; color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.plan-feature::before { content: '✓'; color: var(--accent); font-weight: 700; }
.plan-features li { font-size: 13.5px; color: var(--text); padding: 7px 0; }
.plan-features li.muted { color: var(--hint); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 56px 0 44px; margin-top: 20px; background: var(--surface); }
.footer .container { display: flex; flex-direction: column; gap: 28px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-brand { font-family: 'Syne', sans-serif; font-weight: 900; font-size: 22px; letter-spacing: -.5px; color: var(--text); }
.footer-tagline { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--border); }
.footer-copy { font-size: 12.5px; color: var(--hint); }

/* ── Auth ──────────────────────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(ellipse 55% 45% at 50% -8%, rgba(226,88,34,.16) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 108%, rgba(124,106,247,.13) 0%, transparent 60%); }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radiuslg); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.auth-logo {
  font-family: 'Syne', sans-serif; font-weight: 900; font-size: 28px;
  letter-spacing: -1px; display: block; margin-bottom: 28px;
  color: var(--text);
}
.auth-logo span { color: var(--accent); }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.auth-footer { font-size: 13px; color: var(--muted); text-align: center; margin-top: 20px; }
.auth-footer a { color: var(--accent); }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border2);
  border-radius: 8px; padding: 10px 12px; font-size: 14px;
  font-family: 'DM Sans', sans-serif; color: var(--text); outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--accent); }
.form-error { background: rgba(226,88,34,.1); border: 1px solid rgba(226,88,34,.3); color: #ff8c69; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; display: none; }
.form-error.show { display: block; }

/* ── App shell ──────────────────────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.app-sidebar {
  width: 220px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); display: flex;
  flex-direction: column; height: 100vh; overflow-y: auto;
}
.app-sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-text {
  font-family: 'Syne', sans-serif; font-weight: 900; font-size: 22px;
  letter-spacing: -0.5px; color: var(--text);
}
.sidebar-logo-text span { color: var(--accent); }
.sidebar-nav { flex: 1; padding: 12px 10px; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--muted); transition: all .15s; margin-bottom: 2px;
}
.sidebar-nav-item:hover { background: var(--surface2); color: var(--text); }
.sidebar-nav-item.active { background: rgba(226,88,34,.12); color: var(--accent); font-weight: 500; }
.sidebar-nav-icon { font-size: 15px; width: 18px; text-align: center; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 12px;
  font-weight: 700; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-plan { font-size: 11px; color: var(--muted); }
.plan-badge-pro { color: var(--accent) !important; }

/* ── Main content ────────────────────────────────────────────────────────────── */
.app-main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.app-content { flex: 1; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.app-topbar-title { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; }

/* ── Editor layout ───────────────────────────────────────────────────────────── */
.editor-layout { display: flex; }
.editor-sidebar {
  width: 320px; flex-shrink: 0; border-right: 1px solid var(--border);
  overflow-y: auto; display: flex; flex-direction: column;
}
.editor-tabs { display: flex; border-bottom: 1px solid var(--border); }
.editor-tab {
  flex: 1; padding: 12px; text-align: center; font-size: 13px;
  cursor: pointer; color: var(--muted); transition: all .15s; border-bottom: 2px solid transparent;
  font-weight: 500;
}
.editor-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.editor-tab:hover { color: var(--text); }
.editor-section { padding: 20px; border-bottom: 1px solid var(--border); }
.editor-section-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--hint); margin-bottom: 14px; }
.editor-field { margin-bottom: 12px; }
.editor-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.editor-field input, .editor-field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border2);
  border-radius: 8px; padding: 8px 10px; font-size: 13.5px;
  font-family: 'DM Sans', sans-serif; color: var(--text); outline: none; transition: border .15s;
}
.editor-field input:focus, .editor-field textarea:focus { border-color: var(--accent); }
.editor-field textarea { min-height: 72px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.upload-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.photo-preview {
  width: 54px; height: 54px; border-radius: 50%; background: var(--bg);
  border: 1px solid var(--border2); display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 700; cursor: pointer;
  flex-shrink: 0; background-size: cover; background-position: center; color: var(--muted);
}
.upload-info { font-size: 11px; color: var(--hint); margin-top: 5px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; transition: transform .15s; border: 2px solid transparent; }
.color-swatch.active { transform: scale(1.15); border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.toggle-label { font-size: 13px; color: var(--text); }
.toggle { width: 34px; height: 18px; border-radius: 9px; background: var(--border2); cursor: pointer; transition: background .2s; position: relative; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(16px); }
.publish-btn {
  margin: 16px; padding: 12px; border-radius: 10px;
  background: var(--accent); color: var(--accent-text); border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: background .15s;
}
.publish-btn:hover { background: var(--accent-dark); }
.publish-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Editor preview ──────────────────────────────────────────────────────────── */
.editor-preview-area {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 32px 20px; gap: 24px; overflow-y: auto; background: var(--bg);
}
.preview-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--hint); }
.phone-wrap {
  width: 288px; background: #fff; border-radius: 40px;
  overflow: hidden; border: 8px solid #1a1a1a;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.phone-notch { background: #1a1a1a; height: 28px; display: flex; align-items: center; justify-content: center; }
.phone-pill { width: 60px; height: 6px; background: #333; border-radius: 3px; }
.card-scroll { background: #f5f3f0; max-height: 520px; overflow-y: auto; }
.card-banner { height: 110px; position: relative; }
.card-avatar-wrap { display: flex; justify-content: center; margin-top: -30px; }
.card-avatar {
  width: 60px; height: 60px; border-radius: 50%; border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
  background-size: cover; background-position: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.card-body-inner { padding: 10px 16px 16px; text-align: center; }
.card-name-el { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: #1a1a1a; letter-spacing: -.3px; }
.card-title-el { font-size: 12px; color: #666; }
.card-company-el { font-size: 12px; font-weight: 600; color: #333; margin-bottom: 10px; }
.card-bio-el { font-size: 11px; color: #666; line-height: 1.5; margin-bottom: 12px; }
.card-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.card-btn { padding: 9px; border-radius: 8px; font-size: 11px; font-weight: 600; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.card-btn-primary { color: #fff; }
.card-btn-secondary { background: #f0f0ee; color: #333; }
.card-links-row { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.card-link-icon { width: 34px; height: 34px; border-radius: 9px; background: #f0f0ee; display: flex; align-items: center; justify-content: center; font-size: 14px; text-decoration: none; border: 1px solid #e8e8e8; color: #333; }
.card-save-btn { width: 100%; padding: 10px; border-radius: 10px; background: #1a1a1a; color: #fff; font-size: 12px; font-weight: 700; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; margin-bottom: 8px; }
.card-footer-el { text-align: center; font-size: 10px; color: #bbb; padding: 6px 0 10px; }

/* ── Share panel ─────────────────────────────────────────────────────────────── */
.share-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radiuslg); padding: 20px; width: 288px; text-align: center;
}
.share-panel-title { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.qr-box { width: 100px; height: 100px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.url-row { display: flex; gap: 6px; margin-bottom: 12px; }
.url-display { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--muted); font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { background: var(--accent); color: var(--accent-text); border: none; border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; white-space: nowrap; }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.share-btn { padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); font-size: 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--text); transition: border .15s; }
.share-btn:hover { border-color: var(--border2); }

/* ── Stats ─────────────────────────────────────────────────────────────────── */
.stats-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 288px; }
.stat-mini { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center; }
.stat-mini-num { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--accent); }
.stat-mini-label { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ── Cards grid ──────────────────────────────────────────────────────────────── */
.cards-grid-wrap { padding: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; max-width: 1040px; margin: 0 auto; width: 100%; }
.card-thumb { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radiuslg); overflow: hidden; cursor: pointer; transition: border .2s, transform .2s, box-shadow .2s; }
.card-thumb:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.thumb-banner { height: 56px; }
.thumb-avatar { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface); margin: -19px auto 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 13px; }
.thumb-body { padding: 10px 14px 14px; text-align: center; }
.thumb-name { font-size: 13px; font-weight: 600; }
.thumb-role { font-size: 11px; color: var(--muted); margin-top: 2px; }
.thumb-actions { display: flex; border-top: 1px solid var(--border); }
.thumb-action { flex: 1; padding: 9px; font-size: 11.5px; text-align: center; cursor: pointer; color: var(--muted); transition: color .15s; border: none; background: none; font-family: 'DM Sans', sans-serif; }
.thumb-action:hover { color: var(--accent); }
.thumb-action + .thumb-action { border-left: 1px solid var(--border); }
.new-card-tile { background: transparent; border: 1px dashed var(--border2); border-radius: var(--radiuslg); display: flex; align-items: center; justify-content: center; cursor: pointer; min-height: 160px; transition: border .2s; }
.new-card-tile:hover { border-color: var(--accent); }
.new-card-tile-inner { text-align: center; color: var(--muted); }
.new-card-tile-icon { margin-bottom: 8px; display: flex; justify-content: center; }
.new-card-tile-icon .icon { width: 26px; height: 26px; }

/* ── Contacts ────────────────────────────────────────────────────────────────── */
.contacts-table-wrap { overflow-x: auto; }
.contacts-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.contacts-table th { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--hint); padding: 10px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.contacts-table td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text); }
.contacts-table tr:hover td { background: var(--surface2); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-qr { background: var(--pro-bg); color: var(--pro); }
.badge-email { background: rgba(226,88,34,.12); color: var(--accent); }
.badge-direct { background: var(--surface2); color: var(--muted); }
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-icon { font-size: 40px; margin-bottom: 12px; }

/* ── Analytics ─────────────────────────────────────────────────────────────── */
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 20px; }
.analytics-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.analytics-num { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--accent); }
.analytics-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.analytics-chart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 20px 20px; padding: 20px; }
.chart-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--hint); margin-bottom: 16px; }
.upgrade-gate { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radiuslg); padding: 48px; text-align: center; margin: 24px; }
.upgrade-gate h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.upgrade-gate p { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

/* ── Settings ─────────────────────────────────────────────────────────────── */
.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radiuslg); padding: 24px; margin-bottom: 16px; }
.settings-section-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }

/* ── Public card page ─────────────────────────────────────────────────────── */
.public-card-page { min-height: 100vh; background: radial-gradient(120% 80% at 50% 0%, #faf7f3 0%, #efe9e1 55%, #e7e0d6 100%); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.public-card { background: #fff; border-radius: 24px; width: 100%; max-width: 400px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.10), 0 40px 80px rgba(0,0,0,.08); }
.public-card-banner { height: 120px; }
.public-card-avatar-wrap { display: flex; justify-content: center; margin-top: -36px; }
.public-card-avatar { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; color: #fff; background-size: cover; background-position: center; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.public-card-body { padding: 16px 24px 24px; text-align: center; }
.public-card-name { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: #1a1a1a; margin-bottom: 2px; }
.public-card-title { font-size: 14px; color: #666; }
.public-card-company { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 14px; }
.public-card-bio { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 18px; }
.public-card-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.public-card-btn { padding: 11px; border-radius: 10px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; text-decoration: none; display: block; text-align: center; }
.public-card-btn-primary { color: #fff; }
.public-card-btn-secondary { background: #f0f0ee; color: #333; }
.public-card-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.public-card-link { width: 42px; height: 42px; border-radius: 11px; background: #f5f5f3; display: flex; align-items: center; justify-content: center; font-size: 18px; text-decoration: none; border: 1px solid #eee; }
.public-card-save { width: 100%; padding: 13px; border-radius: 12px; background: #1a1a1a; color: #fff; font-size: 14px; font-weight: 700; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; margin-bottom: 12px; }
.public-card-powered { text-align: center; font-size: 11px; color: #bbb; padding-bottom: 8px; }
.public-card-powered a { color: #999; }
.save-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; display: none; }
.save-modal.open { display: flex; }
.save-modal-card { background: #fff; border-radius: 20px; padding: 28px; width: 100%; max-width: 360px; }
.save-modal-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; margin-bottom: 6px; color: #1a1a1a; }
.save-modal-sub { font-size: 13px; color: #666; margin-bottom: 20px; }
.save-modal-input { width: 100%; border: 1px solid #e0e0e0; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none; color: #1a1a1a; margin-bottom: 10px; background: #fafafa; }
.save-modal-input:focus { border-color: #1a1a1a; }
.save-modal-btns { display: flex; gap: 8px; margin-top: 4px; }
.save-modal-cancel { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid #e0e0e0; background: #fafafa; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 13px; }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.link-item { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.link-icon-badge { width: 30px; height: 30px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.link-input { flex: 1; background: var(--bg); border: 1px solid var(--border2); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: 'DM Sans', sans-serif; color: var(--text); outline: none; }
.link-input:focus { border-color: var(--accent); }
.add-link-btn { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; cursor: pointer; padding: 4px 0; margin-top: 4px; background: none; border: none; font-family: 'DM Sans', sans-serif; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 20px; font-size: 13px; z-index: 9999; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
