/* ============================================================
   SHEETLY — platform stylesheet
   Deep navy + cyan. Used by landing, signup, admin dashboard.
   ============================================================ */
:root {
  --bg:         #061325;
  --bg-card:    #0F2647;
  --bg-soft:    #112E55;
  --bg-line:    #1F3A6F;
  --bg-hover:   #14376A;

  --fg:         #ffffff;
  --fg-dim:     #AAC8E6;
  --fg-mute:    #7892BA;

  --accent:     #00D4FF;
  --accent-2:   #60A5FA;
  --accent-deep:#0066CC;
  --warn:       #F5C037;
  --danger:     #FF5577;
  --success:    #34D399;

  --radius:     14px;
  --radius-sm:  10px;
  --shadow:     0 8px 32px rgba(0, 212, 255, .12);
  --safe-top:   env(safe-area-inset-top, 0px);
  --safe-bot:   env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

/* App-shell scroll pattern — body doesn't scroll, inner container does.
   Stops iOS Safari toolbar transitions from jiggling fixed elements. */
html, body {
  margin: 0; padding: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg); color: var(--fg);
  font: 16px/1.55 -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.shell {
  height: 100%; height: 100dvh;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, button, textarea { font-family: inherit; }

/* ===== NAV ===== */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 18px) 24px 18px;
  border-bottom: 1px solid var(--bg-line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 30;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: "SF Pro Display", -apple-system, sans-serif;
  font-weight: 800; font-size: 22px; letter-spacing: -0.5px;
}
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 12px var(--accent);
}
.nav-links {
  display: flex; align-items: center; gap: 22px;
  font-size: 14px; color: var(--fg-dim);
}
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent); color: #061325 !important;
  padding: 9px 18px; border-radius: 999px;
  font-weight: 700; font-size: 13px;
  letter-spacing: 0.2px;
  transition: transform .12s;
}
.nav-cta:hover { transform: translateY(-1px); }

@media (max-width: 720px) {
  .nav { padding: calc(var(--safe-top) + 14px) 16px 14px; }
  .nav-links { gap: 14px; font-size: 13px; }
  .nav-links a.nav-link-text { display: none; }
}

/* ===== HERO ===== */
.hero {
  padding: 64px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding: 40px 20px 60px; gap: 36px; }
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0, 212, 255, .12);
  color: var(--accent);
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(0, 212, 255, .25);
  margin-bottom: 18px;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: 54px; line-height: 1.05;
  font-weight: 800; letter-spacing: -1.5px;
  color: var(--fg);
}
.hero h1 .accent { color: var(--accent); }
@media (max-width: 880px) { .hero h1 { font-size: 38px; letter-spacing: -1px; } }
.hero p.lead {
  margin: 0 0 28px;
  font-size: 17px; line-height: 1.55; color: var(--fg-dim);
  max-width: 540px;
}
.hero-ctas {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 22px;
}
.btn-primary {
  background: var(--accent); color: #061325;
  font-weight: 700; font-size: 15px;
  padding: 14px 22px; border-radius: 10px;
  border: 0; display: inline-flex; align-items: center; gap: 8px;
  transition: transform .12s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 212, 255, .25); }
.btn-ghost {
  background: transparent; color: var(--fg-dim);
  font-size: 14px; padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--bg-line);
}
.btn-ghost:hover { color: var(--fg); border-color: var(--accent); }
.hero-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--fg-mute);
}
.hero-meta span::before { content: "✓ "; color: var(--accent); margin-right: 4px; }

/* Hero phone preview (right column) */
.hero-preview {
  display: flex; justify-content: center;
}
.phone {
  width: 280px;
  background: #0a1d3b; border-radius: 32px;
  border: 8px solid #0a0e1a; box-shadow: var(--shadow);
  overflow: hidden;
}
.phone-bar {
  background: #000; padding: 8px 20px 6px;
  display: flex; justify-content: space-between;
  font-size: 11px; color: #fff;
}
.phone-top {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #1F3A6F;
  background: #0a1d3b;
}
.phone-top-mark {
  font-family: "Arial Black", sans-serif;
  font-size: 16px; letter-spacing: 1px; color: var(--accent);
}
.phone-top-sub {
  font-size: 9px; color: var(--fg-mute); letter-spacing: 2px; margin-top: 3px;
}
.phone-grid {
  padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.phone-card {
  background: #11264e; border: 0.5px solid var(--bg-line); border-radius: 8px;
  overflow: hidden;
}
.phone-card-img {
  aspect-ratio: 1/1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #6a85a8; font-size: 28px;
}
.phone-card-meta { padding: 6px 8px 8px; }
.phone-card-cat { font-size: 7px; color: var(--accent); letter-spacing: 1.5px; font-weight: 700; }
.phone-card-name { font-size: 10px; color: #fff; margin-top: 3px; line-height: 1.2; }
.phone-card-price { font-size: 11px; color: var(--accent); font-weight: 700; margin-top: 4px; }

/* ===== STEPS ===== */
.steps {
  max-width: 1100px; margin: 0 auto;
  padding: 30px 24px 70px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; gap: 16px; padding: 0 20px 50px; } }
.step {
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: var(--radius);
  padding: 22px;
}
.step-num {
  font-size: 11px; letter-spacing: 1.5px; color: var(--accent); font-weight: 700;
}
.step h3 { margin: 6px 0 8px; font-size: 17px; font-weight: 700; }
.step p { margin: 0; font-size: 14px; color: var(--fg-dim); line-height: 1.5; }

/* ===== PRICING ===== */
.pricing {
  max-width: 1100px; margin: 0 auto;
  padding: 40px 24px 70px;
}
.pricing-header { text-align: center; margin-bottom: 30px; }
.pricing-header h2 {
  font-size: 32px; font-weight: 800; margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.pricing-header p { color: var(--fg-dim); margin: 0; font-size: 15px; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 880px) { .pricing-grid { grid-template-columns: 1fr; } }
.tier {
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
}
.tier.popular {
  border: 2px solid var(--accent);
}
.tier-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #061325;
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 999px;
}
.tier-name {
  font-size: 11px; letter-spacing: 1.5px; color: var(--accent);
  font-weight: 700; margin-bottom: 8px;
}
.tier-price {
  font-size: 36px; font-weight: 800; margin-bottom: 2px;
  letter-spacing: -1px;
}
.tier-price span {
  font-size: 14px; font-weight: 500; color: var(--fg-mute);
}
.tier-desc {
  font-size: 13px; color: var(--fg-dim); margin: 4px 0 16px;
}
.tier-features {
  list-style: none; margin: 0 0 22px; padding: 0;
  font-size: 13px; line-height: 1.85; color: var(--fg-dim);
}
.tier-features li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.tier-cta {
  display: block; text-align: center;
  padding: 11px; border-radius: 8px;
  font-weight: 700; font-size: 13px;
  background: transparent; color: var(--fg);
  border: 1px solid var(--bg-line);
  transition: all .15s;
}
.tier.popular .tier-cta {
  background: var(--accent); color: #061325; border-color: var(--accent);
}
.tier-cta:hover { border-color: var(--accent); color: var(--accent); }
.tier.popular .tier-cta:hover { color: #061325; transform: translateY(-1px); }

/* ===== FAQ ===== */
.faq {
  max-width: 760px; margin: 0 auto;
  padding: 20px 24px 80px;
}
.faq h2 {
  text-align: center;
  font-size: 26px; margin: 0 0 24px; font-weight: 800;
}
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 8px;
}
.faq summary {
  cursor: pointer;
  font-size: 15px; font-weight: 600;
  color: var(--fg);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 300; }
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: 10px 0 0; color: var(--fg-dim); font-size: 14px; line-height: 1.6;
}

/* ============================================================
   AUTH / SIGNUP / DASHBOARD
   ============================================================ */
.auth-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: var(--radius);
  padding: 32px 30px;
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--fg);
}
.auth-card .lead {
  margin: 0 0 20px;
  font-size: 14px; line-height: 1.55;
  color: var(--fg-dim);
}
.step-pill {
  display: inline-block;
  background: rgba(0,212,255,.12);
  color: var(--accent);
  font-size: 10px; letter-spacing: 1.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(0,212,255,.2);
  margin-bottom: 14px;
}
.step-row { display: flex; gap: 6px; margin-bottom: 14px; }
.step-dot {
  flex: 1; height: 4px; border-radius: 999px;
  background: var(--bg-line);
}
.step-dot.is-active { background: var(--accent); }
.step-dot.is-done   { background: var(--accent); opacity: .55; }

/* Form fields */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
  font-size: 12px; letter-spacing: 0.5px;
  color: var(--fg-dim); font-weight: 600;
}
.field input[type=email],
.field input[type=text],
.field input[type=url],
.field input:not([type]) {
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  color: var(--fg);
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.field-suffix {
  display: flex; align-items: stretch;
  border: 1px solid var(--bg-line); border-radius: 10px;
  background: var(--bg-soft);
  overflow: hidden;
}
.field-suffix input { border: 0 !important; background: transparent !important; flex: 1; min-width: 0; }
.field-suffix .suffix-text {
  background: var(--bg-line);
  color: var(--fg-mute);
  font-size: 13px;
  padding: 11px 12px;
  display: flex; align-items: center;
}
.field-hint { font-size: 11px; color: var(--fg-mute); margin-top: 2px; }
.field-hint.ok  { color: var(--success); }
.field-hint.bad { color: var(--danger); }

.form-error {
  background: rgba(255,85,119,.1);
  border: 1px solid rgba(255,85,119,.3);
  color: var(--danger);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
}

.auth-foot {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--fg-mute);
  text-align: center;
}
.auth-foot a { color: var(--accent); }
.auth-foot.small { font-size: 12px; }

/* Theme picker */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.theme-swatch {
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
}
.theme-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.theme-preview {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 10px;
  border: 2px solid;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .12s, box-shadow .15s;
}
.theme-swatch input:checked + .theme-preview {
  box-shadow: 0 0 0 3px var(--accent);
}
.theme-dot { width: 16px; height: 16px; border-radius: 50%; }
.theme-name { font-size: 11px; color: var(--fg-dim); text-align: center; }

/* Big success */
.big-check {
  width: 60px; height: 60px; margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(0,212,255,.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800;
}

/* Setup steps */
.setup-steps {
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-radius: 10px;
  padding: 14px 18px 14px 38px;
  margin: 0 0 18px;
  font-size: 13px; line-height: 1.7;
  color: var(--fg-dim);
}
.setup-steps li { margin: 4px 0; }
.setup-steps a { color: var(--accent); }
.setup-steps .muted { color: var(--fg-mute); font-size: 12px; }
.setup-steps code {
  background: var(--bg);
  border: 1px solid var(--bg-line);
  padding: 1px 6px; border-radius: 4px;
  font-size: 12px;
}

.test-result {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--bg-line);
  background: var(--bg-soft);
  font-size: 13px;
}
.test-result.ok  { border-color: var(--success); background: rgba(52,211,153,.08); color: var(--success); }
.test-result.bad { border-color: var(--danger);  background: rgba(255,85,119,.08); color: var(--danger); }

/* Dashboard */
.toast-inline {
  background: rgba(0,212,255,.12);
  border: 1px solid rgba(0,212,255,.3);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.toast-inline a { color: inherit; text-decoration: underline; }
.status-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 20px 0 24px;
}
@media (max-width: 540px) { .status-row { grid-template-columns: 1fr; } }
.status-card {
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-radius: 10px;
  padding: 12px 14px;
}
.status-label {
  font-size: 10px; letter-spacing: 1.5px;
  color: var(--fg-mute); font-weight: 700;
  margin-bottom: 4px;
}
.status-value { color: var(--fg); font-size: 13px; }
.status-ok  { color: var(--success); }
.status-bad { color: var(--danger); }
.status-warn{ color: var(--warn); }
.section-h {
  font-size: 14px; letter-spacing: 0.5px; font-weight: 700;
  color: var(--accent);
  margin: 18px 0 6px;
  text-transform: uppercase;
}
.muted { color: var(--fg-mute); }

/* Advanced details toggle */
.advanced-toggle {
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-radius: 10px;
  padding: 10px 14px;
}
.advanced-toggle summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--fg-dim);
  font-weight: 600;
  list-style: none;
}
.advanced-toggle summary::-webkit-details-marker { display: none; }
.advanced-toggle summary::before { content: "▸ "; color: var(--accent); }
.advanced-toggle[open] summary::before { content: "▾ "; }

/* Product list (managed-mode dashboard) */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-soft);
  border: 1px dashed var(--bg-line);
  border-radius: 12px;
}
.cat-filter::-webkit-scrollbar { display: none; }
.cat-filter { scrollbar-width: none; }
.cat-pill {
  flex-shrink: 0;
  background: var(--bg-soft); border: 1px solid var(--bg-line); color: var(--fg-dim);
  padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  white-space: nowrap;
}
.cat-pill.is-active {
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
}
.prod-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.prod-row { background: var(--bg-card); border: 1px solid var(--bg-line); border-radius: 10px; }
.prod-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  text-decoration: none; color: var(--fg);
}
.prod-thumb {
  width: 56px; height: 56px; flex-shrink: 0; flex-grow: 0;
  background: #fff; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  max-width: 56px; max-height: 56px;
}
.prod-thumb img {
  width: 56px; height: 56px;
  max-width: 56px; max-height: 56px;
  object-fit: cover;
  display: block;
}
.prod-placeholder { color: #aaa; font-size: 18px; }
.prod-meta { flex: 1; min-width: 0; line-height: 1.3; }
.prod-cat { font-size: 9px; letter-spacing: 1.5px; color: var(--accent); font-weight: 700; }
.prod-name { font-size: 14px; color: var(--fg); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-price { font-size: 13px; color: var(--warn); font-weight: 700; margin-top: 2px; }
.prod-arrow { color: var(--fg-mute); font-size: 20px; flex-shrink: 0; }

/* Image uploader */
.image-uploader { display: flex; flex-direction: column; gap: 10px; }
.image-preview {
  aspect-ratio: 1/1;
  max-width: 240px;
  width: 100%;
  background: var(--bg-soft); border: 1px dashed var(--bg-line);
  border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview .muted { font-size: 12px; }

.image-upload-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg-soft);
  border: 2px dashed var(--bg-line);
  padding: 16px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
  user-select: none; -webkit-user-select: none;
}
.image-upload-btn:hover,
.image-upload-btn:active { border-color: var(--accent); background: var(--bg-hover); }
.image-upload-btn.has-image {
  background: rgba(0,212,255,.08);
  border-color: var(--accent);
  border-style: solid;
}
.image-upload-btn.has-image .label { color: var(--accent); }
.image-upload-btn .icon  { font-size: 28px; line-height: 1; }
.image-upload-btn .label { font-size: 15px; font-weight: 700; color: var(--fg); }
.image-upload-btn .sub   { font-size: 12px; color: var(--fg-mute); }

/* Mobile-tuned form padding */
@media (max-width: 600px) {
  .auth-main { padding: 16px 10px 80px; }
  .auth-card {
    padding: 20px 16px;
    border-radius: 10px;
  }
  .auth-card h1 { font-size: 22px; }
  .auth-form { gap: 12px; }
  .field input { font-size: 16px; }   /* iOS skips zoom-on-focus if >= 16px */
  .image-preview { max-width: 100%; aspect-ratio: 1/1; }
  .status-row { grid-template-columns: 1fr; gap: 8px; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== FOOTER ===== */
.foot {
  border-top: 1px solid var(--bg-line);
  padding: 28px 24px calc(28px + var(--safe-bot));
  text-align: center;
  font-size: 12px; color: var(--fg-mute);
  letter-spacing: 0.3px;
}
.foot a { color: var(--fg-dim); margin: 0 8px; }
.foot a:hover { color: var(--accent); }
