/* ============================================================
   StockGuard — Adobe-inspired Design System
   ============================================================ */

/* ── Google Fonts ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Custom Properties ───────────────────────────────────── */
:root {
  --red:          #FF0000;
  --red-dark:     #CC0000;
  --red-glow:     rgba(255,0,0,0.15);
  --dark:         #1a1a1a;
  --darker:       #0f0f0f;
  --dark-card:    #242424;
  --dark-border:  rgba(255,255,255,0.08);
  --gray:         #2c2c2c;
  --mid-gray:     #6e6e6e;
  --light-gray:   #f2f2f2;
  --border:       #e0e0e0;
  --white:        #ffffff;
  --text:         #1a1a1a;
  --text-muted:   #6e6e6e;

  --font:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius:       4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.06);
  --shadow-md:    0 4px 24px rgba(0,0,0,.10);
  --shadow-lg:    0 12px 48px rgba(0,0,0,.14);
  --shadow-red:   0 4px 24px rgba(255,0,0,.30);
  --transition:   all .2s ease;
  --sidebar-w:    240px;
}

/* ── Reset / Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  margin: 0;
}

h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Typography Scale ────────────────────────────────────── */
.display-hero  { font-size: clamp(2.4rem, 5.5vw, 4.5rem); font-weight: 900; line-height: 1.0; letter-spacing: -0.04em; }
.display-1     { font-size: clamp(2rem, 4vw, 3.2rem);      font-weight: 800; letter-spacing: -0.03em; }
.display-2     { font-size: clamp(1.6rem, 3vw, 2.4rem);    font-weight: 700; letter-spacing: -0.02em; }
.section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.lead-text     { font-size: 1.1rem; font-weight: 400; line-height: 1.7; color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: var(--white);
}

.btn-outline-dark {
  background: transparent;
  color: var(--dark);
  border-color: var(--dark);
}
.btn-outline-dark:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--mid-gray);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn-lg { font-size: 1rem; padding: 14px 32px; }
.btn-sm { font-size: 0.80rem; padding: 7px 16px; }

/* ── Navbar ──────────────────────────────────────────────── */
.sg-navbar {
  background: var(--darker);
  padding: 0 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  height: 56px;
  display: flex;
  align-items: center;
}
.sg-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sg-navbar .brand-icon {
  width: 32px; height: 32px;
  background: var(--red);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 900;
}
.sg-navbar .nav-link {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: var(--radius);
  transition: var(--transition);
}
.sg-navbar .nav-link:hover,
.sg-navbar .nav-link.active {
  color: var(--white) !important;
  background: rgba(255,255,255,0.07);
}
.navbar-toggler {
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 8px;
}
.navbar-toggler-icon {
  filter: invert(1);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  background: var(--darker);
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(255,0,0,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 20% 20%, rgba(255,0,0,0.04) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,0,0,0.1);
  border: 1px solid rgba(255,0,0,0.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #ff6666;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.4); }
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 20px;
}
.hero-title .accent { color: var(--red); }
.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  margin-bottom: 36px;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
}
.hero-stat-lbl {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Hero Demo Card ──────────────────────────────────────── */
.demo-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.demo-card-header {
  background: var(--gray);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.demo-dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-dot.red   { background: #ff5f56; }
.demo-dot.yel   { background: #ffbd2e; }
.demo-dot.grn   { background: #27c93f; }
.demo-card-body { padding: 20px; }
.demo-upload-area {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.demo-upload-area .scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: scan-move 2.5s ease-in-out infinite;
  top: 0;
}
@keyframes scan-move {
  0%   { top: 0;    opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.demo-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.demo-thumb {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #333, #555);
  border-radius: 3px;
  flex-shrink: 0;
}
.demo-match-info { flex: 1; min-width: 0; }
.demo-match-name {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-match-source { font-size: 0.68rem; color: rgba(255,255,255,0.3); }
.demo-score {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}
.score-high   { background: rgba(220,53,69,0.2);  color: #ff6b6b; }
.score-med    { background: rgba(255,193,7,0.2);   color: #ffc107; }
.score-low    { background: rgba(40,167,69,0.2);   color: #5cb85c; }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 90px 0; }
.section-dark  { background: var(--darker); color: var(--white); }
.section-gray  { background: var(--light-gray); }
.section-white { background: var(--white); }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 60px; }

/* ── Feature Cards ───────────────────────────────────────── */
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: var(--transition);
  height: 100%;
}
.feature-card:hover {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), var(--shadow-md);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px; height: 48px;
  background: rgba(255,0,0,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--red);
  margin-bottom: 20px;
}
.feature-card h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Steps ───────────────────────────────────────────────── */
.step-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  height: 100%;
}
.step-num {
  width: 40px; height: 40px;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}
.step-content h6 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.step-content p {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.45);
  margin: 0;
  line-height: 1.6;
}

/* ── Pricing ─────────────────────────────────────────────── */
.billing-toggle {
  display: inline-flex;
  background: var(--light-gray);
  border-radius: 100px;
  padding: 4px;
  gap: 0;
  margin: 0 auto 48px;
}
.billing-toggle .btn-toggle {
  border: none;
  background: transparent;
  border-radius: 100px;
  padding: 8px 22px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.billing-toggle .btn-toggle.active {
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.annual-badge {
  background: rgba(255,0,0,0.1);
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  vertical-align: middle;
  margin-left: 4px;
}

.pricing-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  height: 100%;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.pricing-card:hover {
  border-color: var(--red);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.pricing-card.popular {
  border-color: var(--red);
  box-shadow: var(--shadow-red);
}
.pricing-card .plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: var(--white);
  font-size: 0.70rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.plan-name {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.plan-price {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 6px;
}
.plan-price .amount {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}
.plan-price .currency {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.plan-price .period {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.plan-annual-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 18px;
}
.plan-annual-note .save { color: var(--red); font-weight: 600; }
.plan-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}
.plan-features {
  list-style: none;
  padding: 0; margin: 0 0 28px;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.84rem;
  color: var(--text);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li .check {
  color: var(--red);
  font-size: 0.78rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── Testimonials ────────────────────────────────────────── */
.testimonial-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: 28px;
}
.testimonial-stars { color: #f5c518; font-size: 0.85rem; margin-bottom: 14px; }
.testimonial-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  margin-bottom: 20px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.t-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.t-name { font-size: 0.85rem; font-weight: 700; color: var(--white); }
.t-role { font-size: 0.76rem; color: rgba(255,255,255,0.35); }

/* ── CTA Section ─────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, #1a0000 0%, var(--darker) 40%, var(--darker) 60%, #1a0000 100%);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(255,0,0,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Footer ──────────────────────────────────────────────── */
.sg-footer {
  background: var(--darker);
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  padding: 60px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-brand { margin-bottom: 12px; }
.footer-tagline { font-size: 0.82rem; color: rgba(255,255,255,0.3); margin-bottom: 0; }
.footer-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(255,255,255,0.4);
  transition: color .2s;
}
.footer-links a:hover { color: var(--white); }
.footer-divider {
  border-color: rgba(255,255,255,0.06);
  margin: 40px 0 20px;
}

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--darker);
  display: flex;
  align-items: center;
}
.auth-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 44px;
  width: 100%;
  max-width: 440px;
  margin: auto;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.auth-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}
.auth-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.02em;
}
.form-control,
.form-select {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: var(--white) !important;
  border-radius: var(--radius) !important;
  font-size: 0.88rem;
  padding: 11px 14px;
  transition: var(--transition);
  font-family: var(--font);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px var(--red-glow) !important;
  background: rgba(255,255,255,0.07) !important;
  outline: none;
  color: var(--white) !important;
}
.form-control::placeholder { color: rgba(255,255,255,0.25); }
.form-control option { background: var(--dark-card); color: var(--white); }

.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.25);
  font-size: 0.76rem;
  margin: 20px 0;
}
.divider-or::before,
.divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  border-radius: var(--radius);
  padding: 11px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}
.btn-google:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--white);
}
.btn-google img { width: 18px; height: 18px; }
.auth-link { color: rgba(255,255,255,0.4); font-size: 0.84rem; text-align: center; margin-top: 20px; }
.auth-link a { color: var(--red); font-weight: 600; }

.auth-bg-visual {
  background: var(--darker);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  min-height: 100vh;
}
.auth-bg-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(255,0,0,0.08) 0%, transparent 70%);
}

/* ── Dashboard Layout ────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--light-gray);
}
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--darker);
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  border-right: 1px solid rgba(255,255,255,0.05);
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.sidebar-nav { padding: 16px 10px; flex: 1; }
.sidebar-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.25);
  padding: 6px 10px;
  margin-top: 12px;
  display: block;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.55);
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(255,255,255,0.06);
  color: var(--white);
}
.sidebar-link.active { color: var(--white); }
.sidebar-link.active i { color: var(--red); }
.sidebar-link i { font-size: 0.9rem; width: 16px; }
.sidebar-usage {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.usage-label { font-size: 0.72rem; color: rgba(255,255,255,0.35); margin-bottom: 6px; font-weight: 600; }
.usage-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 4px;
}
.usage-bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 100px;
  transition: width .4s ease;
}
.usage-bar-fill.warn  { background: #f5a623; }
.usage-bar-fill.full  { background: #dc3545; }
.usage-count { font-size: 0.72rem; color: rgba(255,255,255,0.35); }

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}
.app-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
}
.user-name { font-size: 0.84rem; font-weight: 600; }

.app-content { padding: 32px; flex: 1; }

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); border-color: #ccc; }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.stat-icon.red   { background: rgba(255,0,0,0.08);   color: var(--red); }
.stat-icon.blue  { background: rgba(13,110,253,0.08); color: #0d6efd; }
.stat-icon.green { background: rgba(25,135,84,0.08);  color: #198754; }
.stat-icon.gold  { background: rgba(255,193,7,0.08);  color: #ffc107; }
.stat-num { font-size: 1.8rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.stat-lbl { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; }
.stat-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ── Scan Tool ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--white);
  position: relative;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--red);
  background: rgba(255,0,0,0.02);
}
.upload-icon {
  font-size: 3rem;
  color: var(--border);
  margin-bottom: 16px;
  display: block;
}
.upload-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.upload-hint { font-size: 0.84rem; color: var(--text-muted); }
.upload-formats {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.format-badge {
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* Scanning Progress */
.scan-progress-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  display: none;
}
.scan-image-preview {
  width: 160px; height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0 auto 24px;
  display: block;
  border: 2px solid var(--border);
  position: relative;
}
.scan-beam {
  width: 160px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  margin: -6px auto 24px;
  border-radius: 100px;
  animation: scan-anim 1.5s ease-in-out infinite;
}
@keyframes scan-anim {
  0%   { transform: translateY(-60px); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(60px); opacity: 0; }
}
.scan-status-text { font-size: 0.88rem; color: var(--text-muted); }
.progress { height: 4px; border-radius: 100px; background: var(--border); }
.progress-bar { background: var(--red); border-radius: 100px; transition: width .3s ease; }

/* Results */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.result-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  transition: var(--transition);
}
.result-item:hover { border-color: #bbb; box-shadow: var(--shadow-sm); }
.result-thumb {
  width: 72px; height: 54px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--light-gray);
}
.result-info { flex: 1; min-width: 0; }
.result-name { font-size: 0.88rem; font-weight: 600; margin-bottom: 3px; }
.result-meta { font-size: 0.76rem; color: var(--text-muted); }
.result-score-wrap { text-align: center; flex-shrink: 0; }
.score-ring {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.score-ring.high   { border-color: #dc3545; color: #dc3545; background: rgba(220,53,69,0.06); }
.score-ring.medium { border-color: #f5a623; color: #f5a623; background: rgba(245,166,35,0.06); }
.score-ring.low    { border-color: #198754; color: #198754; background: rgba(25,135,84,0.06); }
.score-label { font-size: 0.66rem; color: var(--text-muted); text-align: center; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  border: none;
  font-size: 0.86rem;
  padding: 12px 16px;
}
.alert-danger  { background: rgba(220,53,69,0.1); color: #842029; border-left: 3px solid #dc3545; }
.alert-success { background: rgba(25,135,84,0.1); color: #0a3622; border-left: 3px solid #198754; }
.alert-warning { background: rgba(255,193,7,0.1); color: #664d03; border-left: 3px solid #ffc107; }
.alert-info    { background: rgba(13,110,253,0.1); color: #052c65; border-left: 3px solid #0d6efd; }

/* Plan badge colors */
.badge-starter   { background: rgba(108,117,125,0.12); color: #6c757d; }
.badge-basic     { background: rgba(13,110,253,0.1);   color: #0d6efd; }
.badge-pro       { background: rgba(255,0,0,0.1);      color: var(--red); }
.badge-unlimited { background: rgba(102,16,242,0.1);   color: #6610f2; }

/* ── Table ───────────────────────────────────────────────── */
.sg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.sg-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  background: var(--light-gray);
}
.sg-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.sg-table tr:last-child td { border-bottom: none; }
.sg-table tr:hover td { background: rgba(0,0,0,0.015); }

/* ── Cards (generic) ─────────────────────────────────────── */
.sg-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sg-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sg-card-title { font-size: 0.92rem; font-weight: 700; }
.sg-card-body  { padding: 24px; }

/* ── Subscription Cards ──────────────────────────────────── */
.sub-card {
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.sub-card.active-plan {
  background: linear-gradient(135deg, #1a0000, #300000);
  border: 1px solid rgba(255,0,0,0.3);
  color: var(--white);
}
.sub-card .plan-watermark {
  position: absolute;
  right: -10px; bottom: -20px;
  font-size: 6rem;
  font-weight: 900;
  color: rgba(255,0,0,0.06);
  letter-spacing: -0.05em;
  user-select: none;
  pointer-events: none;
}

/* ── Responsive Sidebar ──────────────────────────────────── */
@media (max-width: 991px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main { margin-left: 0; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
  }
  .sidebar-overlay.visible { display: block; }
}

/* ── Hero responsive ─────────────────────────────────────── */
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 60px 0; min-height: auto; }
  .hero-stats { gap: 24px; }
}
@media (max-width: 767px) {
  .section { padding: 60px 0; }
  .auth-card { padding: 28px 24px; }
  .app-content { padding: 20px 16px; }
  .stat-card { padding: 18px; }
  .upload-zone { padding: 40px 20px; }
}

/* ── Utilities ───────────────────────────────────────────── */
.text-red     { color: var(--red); }
.bg-red       { background: var(--red); }
.border-red   { border-color: var(--red) !important; }
.fw-800       { font-weight: 800; }
.fw-900       { font-weight: 900; }
.ls-tight     { letter-spacing: -0.03em; }
.rounded-sm   { border-radius: var(--radius); }
.shadow-red   { box-shadow: var(--shadow-red); }
.cursor-pointer { cursor: pointer; }

/* Scrollbar */
::-webkit-scrollbar          { width: 5px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: rgba(0,0,0,0.15); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
