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

:root {
  --bg:       #060D14;
  --surface:  #0D1B2A;
  --surface2: #112233;
  --border:   #1E3A52;
  --teal:     #14B8A6;
  --teal-dim: #0D9488;
  --teal-glow:#14B8A620;
  --green:    #065F46;
  --text:     #F0F9FF;
  --muted:    #7FA8C4;
  --dimmer:   #3A6080;
  --error:    #F87171;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* NAV */
nav { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1000px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--teal); letter-spacing: -0.2px; }
.logo-img { height: 24px; width: auto; vertical-align: middle; margin-right: 4px; position: relative; top: -1px; }
.logo { display: flex; align-items: center; gap: 4px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.nav-link:hover { color: var(--text); }
.nav-btn { background: var(--teal); color: #fff; border: none; font-family: var(--font-body); font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 7px; cursor: pointer; transition: background .2s; }
.nav-btn:hover { background: var(--teal-dim); }
.nav-btn-ghost { background: none; border: 1px solid var(--border); color: var(--muted); font-family: var(--font-body); font-size: 13px; padding: 6px 14px; border-radius: 7px; cursor: pointer; transition: border-color .2s, color .2s; }
.nav-btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-credits { font-size: 13px; color: var(--teal); font-weight: 600; }

/* HERO */
.hero { padding: 80px 24px 60px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -120px; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, #14B8A618 0%, transparent 70%); pointer-events: none; }
.hero-inner { max-width: 680px; margin: 0 auto; text-align: center; position: relative; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); background: var(--teal-glow); border: 1px solid #14B8A630; border-radius: 100px; padding: 4px 14px; margin-bottom: 24px; }
h1 { font-family: var(--font-display); font-size: clamp(32px, 5.5vw, 52px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; margin-bottom: 20px; }
.accent { color: var(--teal); }
.hero-sub { font-size: 17px; color: var(--muted); max-width: 520px; margin: 0 auto 24px; line-height: 1.7; }

/* USAGE BAR */
.usage-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 18px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.usage-bar span { color: var(--teal); font-weight: 600; }

/* CARD */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 36px 32px; margin-bottom: 20px; min-height: 220px; display: flex; align-items: center; justify-content: center; }
.drop-zone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 2px dashed var(--border); border-radius: 12px; padding: 40px 24px; cursor: pointer; transition: border-color .2s, background .2s; }
.drop-zone.dragover, .drop-zone:hover { border-color: var(--teal); background: var(--teal-glow); }
.drop-icon { font-size: 36px; margin-bottom: 4px; }
.drop-label { font-weight: 600; font-size: 16px; }
.drop-sub { color: var(--dimmer); font-size: 13px; }
.btn-upload { margin-top: 4px; background: var(--teal); color: #fff; font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 10px 22px; border-radius: 8px; cursor: pointer; transition: background .2s; border: none; }
.btn-upload:hover { background: var(--teal-dim); }

.file-preview { width: 100%; display: flex; flex-direction: column; gap: 20px; align-items: center; }
.file-info { display: flex; align-items: center; gap: 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; width: 100%; }
.file-icon { font-size: 22px; }
.file-name { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.remove-file { background: none; border: none; color: var(--dimmer); cursor: pointer; font-size: 16px; padding: 2px 6px; transition: color .2s; }
.remove-file:hover { color: var(--error); }
.btn-convert { background: var(--teal); color: #fff; border: none; font-family: var(--font-body); font-size: 16px; font-weight: 600; padding: 14px 36px; border-radius: 10px; cursor: pointer; transition: background .2s, transform .1s; width: 100%; }
.btn-convert:hover { background: var(--teal-dim); }
.btn-convert:active { transform: scale(.98); }

.loading { flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.loading-text { font-size: 16px; font-weight: 600; }
.loading-sub { font-size: 13px; color: var(--dimmer); }

/* Progress ring */
.progress-ring-wrap { position: relative; width: 90px; height: 90px; display: flex; align-items: center; justify-content: center; }
.progress-ring { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: #1E3A52; stroke-width: 6; }
.progress-ring-fill { fill: none; stroke: #14B8A6; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 238.76; stroke-dashoffset: 238.76; transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease; }
.progress-pct { position: relative; font-size: 16px; font-weight: 700; color: #14B8A6; z-index: 1; }

.error-state { flex-direction: column; align-items: center; gap: 12px; }
.error-icon { font-size: 32px; }
.error-msg { color: var(--error); font-weight: 500; text-align: center; }
.btn-retry { background: none; border: 1px solid var(--border); color: var(--muted); font-family: var(--font-body); font-size: 14px; padding: 10px 22px; border-radius: 8px; cursor: pointer; transition: border-color .2s, color .2s; }
.btn-retry:hover { border-color: var(--teal); color: var(--teal); }

.success-state { flex-direction: column; align-items: center; gap: 12px; }
.success-icon { font-size: 40px; }
.success-msg { font-size: 16px; font-weight: 600; }
.btn-another { background: none; border: 1px solid var(--teal); color: var(--teal); font-family: var(--font-body); font-size: 14px; padding: 10px 22px; border-radius: 8px; cursor: pointer; transition: background .2s; }
.btn-another:hover { background: var(--teal-glow); }

/* PAYWALL */
.paywall { flex-direction: column; align-items: center; gap: 10px; padding: 8px; }
.paywall-icon { font-size: 32px; }
.paywall-title { font-size: 16px; font-weight: 700; }
.paywall-sub { font-size: 13px; color: var(--muted); text-align: center; max-width: 340px; }
.paywall-actions { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.btn-signup-nudge { background: var(--teal); color: #fff; border: none; font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 11px 22px; border-radius: 8px; cursor: pointer; transition: background .2s; }
.btn-signup-nudge:hover { background: var(--teal-dim); }
.paywall-link { font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }

.hidden { display: none !important; }
.loading, .error-state, .success-state, .paywall { display: flex; }

.trust-note { font-size: 12px; color: var(--dimmer); margin-bottom: 28px; }
.suppliers { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.supplier-label { font-size: 12px; color: var(--dimmer); text-transform: uppercase; letter-spacing: .08em; }
.supplier-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.badge { font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 4px 12px; }

/* PRICING */
.pricing-section { padding: 80px 24px; background: var(--bg); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-top: 40px; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; display: flex; flex-direction: column; gap: 6px; position: relative; transition: border-color .2s; }
.pricing-card:hover { border-color: var(--teal); }
.pricing-card-highlight { border-color: var(--teal); background: #0D2420; }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--teal); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 100px; white-space: nowrap; }
.plan-badge-green { background: #059669; }
.plan-name { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--text); margin-top: 8px; }
.plan-price { font-size: 32px; font-weight: 800; color: var(--teal); line-height: 1.1; margin: 6px 0 2px; }
.plan-period { font-size: 13px; color: var(--dimmer); margin-bottom: 14px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; flex: 1; }
.plan-features li { font-size: 13px; color: var(--muted); }
.btn-plan { background: var(--teal); color: #fff; border: none; font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 12px; border-radius: 9px; cursor: pointer; transition: background .2s; width: 100%; }
.btn-plan:hover { background: var(--teal-dim); }
.btn-plan-ghost { background: none; border: 1px solid var(--border); color: var(--muted); }
.btn-plan-ghost:hover { border-color: var(--teal); color: var(--teal); background: none; }

/* SECTIONS */
.output-section, .steps-section { padding: 80px 24px; }
.output-section { background: var(--surface); }
.steps-section  { background: var(--bg); }
.section-inner { max-width: 900px; margin: 0 auto; }
h2 { font-family: var(--font-display); font-size: clamp(22px, 3.5vw, 34px); font-weight: 800; letter-spacing: -.5px; margin-bottom: 10px; }
.section-sub { color: var(--muted); font-size: 16px; margin-bottom: 40px; }

.sheets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.sheet-card { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 16px; transition: border-color .2s; }
.sheet-card:hover { border-color: var(--teal); }
.sheet-card-highlight { border-color: var(--teal); background: #0A1F1D; }
.sheet-header { display: flex; align-items: center; gap: 14px; }
.sheet-icon { font-size: 28px; }
.sheet-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--teal); margin-bottom: 2px; }
.sheet-name { font-size: 17px; font-weight: 700; color: var(--text); }
.sheet-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: -4px; }
.sheet-fields { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sheet-fields li { font-size: 13px; color: var(--muted); padding-left: 16px; position: relative; }
.sheet-fields li::before { content: '✓'; position: absolute; left: 0; color: var(--teal); font-size: 11px; font-weight: 700; top: 1px; }

.steps { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.step { flex: 1; min-width: 180px; display: flex; gap: 14px; align-items: flex-start; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--teal-glow); border: 1px solid var(--teal); color: var(--teal); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-body strong { display: block; font-size: 15px; margin-bottom: 4px; }
.step-body p { font-size: 13px; color: var(--muted); }
.step-arrow { color: var(--teal); font-size: 20px; padding-top: 8px; flex-shrink: 0; }

/* BLOG */
.blog-section { padding: 80px 24px; background: var(--bg); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; text-decoration: none; display: flex; justify-content: space-between; align-items: center; transition: border-color .2s, background .2s; }
.blog-card:hover { border-color: var(--teal); background: var(--surface2); }
.blog-card-tag { font-size: 14px; font-weight: 600; color: var(--text); }
.blog-card-arrow { font-size: 16px; color: var(--teal); }

/* FOOTER */
footer { padding: 32px 24px; border-top: 1px solid var(--border); }
.footer-inner { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.footer-note { font-size: 12px; color: var(--dimmer); }
.footer-link { color: var(--teal); text-decoration: none; transition: opacity .2s; }
.footer-link:hover { opacity: 0.8; }

/* AUTH MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; width: 100%; max-width: 400px; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--dimmer); font-size: 18px; cursor: pointer; transition: color .2s; }
.modal-close:hover { color: var(--text); }
.modal-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.modal-tab { flex: 1; background: none; border: none; color: var(--dimmer); font-family: var(--font-body); font-size: 15px; font-weight: 600; padding: 10px; cursor: pointer; transition: color .2s; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.modal-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.modal-form { display: flex; flex-direction: column; gap: 10px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.form-input { background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: var(--font-body); font-size: 15px; padding: 11px 14px; border-radius: 8px; outline: none; transition: border-color .2s; }
.form-input:focus { border-color: var(--teal); }
.auth-error { background: #2D0F0F; border: 1px solid #7F1D1D; color: var(--error); font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; }

@media (max-width: 600px) {
  .card { padding: 24px 16px; }
  .step-arrow { display: none; }
  .steps { flex-direction: column; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* Auth enhancements */
.auth-success { background: #0D2420; border: 1px solid #14B8A6; color: #14B8A6; font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; }
.btn-forgot { background: transparent !important; border: none; color: var(--dimmer); font-family: var(--font-body); font-size: 13px; cursor: pointer; padding: 4px 0; text-align: left; transition: color .2s; display: block; }
.btn-forgot:hover { color: var(--teal); }
.password-criteria { display: flex; flex-direction: column; gap: 5px; margin: 8px 0; }
.criteria-item { font-size: 12px; color: #F87171; transition: color .3s; }
.criteria-item.met { color: #10B981; }
.nav-email { font-size: 12px; color: var(--dimmer); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Input wrap for show/hide toggle */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .form-input { flex: 1; padding-right: 40px; }
.toggle-pw { position: absolute; right: 10px; background: none; border: none; cursor: pointer; font-size: 16px; color: var(--dimmer); padding: 0; line-height: 1; transition: color .2s; }
.toggle-pw:hover { color: var(--teal); }

/* Remember me row */
.remember-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.remember-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--dimmer); cursor: pointer; }
.remember-label input[type="checkbox"] { accent-color: var(--teal); width: 14px; height: 14px; cursor: pointer; }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface2); border-top: 1px solid var(--border); padding: 14px 24px; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 13px; color: var(--muted); z-index: 999; }
.cookie-dismiss { background: var(--teal); color: #fff; border: none; font-family: var(--font-body); font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 7px; cursor: pointer; white-space: nowrap; transition: background .2s; }
.cookie-dismiss:hover { background: var(--teal-dim); }