/* ResellAI — Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

:root {
  --blue-900: #0a1628;
  --blue-800: #0d2045;
  --blue-700: #0f3460;
  --blue-600: #1a4fa0;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --accent:   #2563eb;
  --accent-hover: #1d4ed8;
  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(37,99,235,.10), 0 2px 6px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(37,99,235,.15), 0 4px 16px rgba(0,0,0,.10);
  --shadow-glow: 0 0 40px rgba(37,99,235,.25);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── TYPOGRAPHY ─────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: var(--font-display); line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--gray-600); }
a  { color: inherit; text-decoration: none; }

/* ─── NAVBAR ─────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 68px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
}
.navbar-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 800;
  color: var(--blue-500);
  display: flex; align-items: center; gap: .4rem;
}
.navbar-logo span { color: var(--gray-900); }
.navbar-links { display: flex; align-items: center; gap: 2rem; }
.navbar-links a {
  font-size: .9rem; font-weight: 500; color: var(--gray-600);
  transition: color .2s;
}
.navbar-links a:hover { color: var(--blue-500); }
.navbar-actions { display: flex; align-items: center; gap: .75rem; }

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .65rem 1.4rem;
  font-family: var(--font-body); font-size: .9rem; font-weight: 600;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.btn-primary {
  background: var(--blue-500); color: var(--white);
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.4); }
.btn-outline {
  background: transparent; color: var(--blue-500);
  border: 1.5px solid var(--blue-400);
}
.btn-outline:hover { background: var(--blue-50); }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-lg { padding: .9rem 2rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn-sm { padding: .4rem 1rem; font-size: .82rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ─── CARDS ──────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ─── BADGES ─────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}
.badge-blue   { background: var(--blue-100); color: var(--blue-600); }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-orange { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }

/* ─── FORMS ──────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label { font-size: .85rem; font-weight: 600; color: var(--gray-800); }
.form-input {
  padding: .7rem 1rem; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: .95rem; color: var(--gray-900); background: var(--white);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-input:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-input::placeholder { color: var(--gray-400); }

/* ─── SECTION HELPERS ────────────────────────── */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

.text-center { text-align: center; }
.text-blue { color: var(--blue-500); }
.text-gray { color: var(--gray-600); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }

/* ─── GRID ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* ─── SECTION LABEL ──────────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-500);
  background: var(--blue-50); padding: .3rem .8rem;
  border-radius: 999px; margin-bottom: 1rem;
  border: 1px solid var(--blue-100);
}

/* ─── DIVIDER ────────────────────────────────── */
.divider { height: 1px; background: var(--gray-200); margin: 2rem 0; }

/* ─── ALERTS ─────────────────────────────────── */
.alert {
  padding: .9rem 1.2rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; display: flex; align-items: center; gap: .5rem;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-info    { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }

/* ─── LOADING SPINNER ────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
.spinner-blue {
  border: 2.5px solid var(--blue-100);
  border-top-color: var(--blue-500);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── SKELETON ───────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ─── STAT CARD ──────────────────────────────── */
.stat-card {
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
}
.stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--blue-600); }
.stat-label { font-size: .8rem; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .06em; }

/* ─── FLIP CARD ──────────────────────────────── */
.flip-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all .25s;
}
.flip-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.flip-card-img { width: 100%; height: 180px; object-fit: cover; background: var(--gray-100); }
.flip-card-body { padding: 1rem 1.1rem 1.2rem; }
.flip-card-title {
  font-weight: 600; font-size: .9rem; color: var(--gray-900);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: .6rem; line-height: 1.4;
}
.flip-card-prices { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.price-source { font-size: .8rem; color: var(--gray-400); }
.price-sell { font-size: 1.1rem; font-weight: 800; color: var(--gray-900); font-family: var(--font-display); }
.roi-badge {
  display: inline-flex; align-items: center;
  background: #d1fae5; color: #065f46;
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
}
.flip-card-footer { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ─── TABS ───────────────────────────────────── */
.tabs { display: flex; gap: .25rem; background: var(--gray-100); padding: .25rem; border-radius: var(--radius-sm); }
.tab-btn {
  flex: 1; padding: .5rem 1rem; font-size: .85rem; font-weight: 600;
  border: none; background: transparent; border-radius: 6px;
  cursor: pointer; color: var(--gray-600); transition: all .2s; font-family: var(--font-body);
}
.tab-btn.active { background: var(--white); color: var(--blue-500); box-shadow: var(--shadow-sm); }

/* ─── SIDEBAR (dashboard) ────────────────────── */
.dashboard-layout { display: flex; min-height: 100vh; padding-top: 68px; }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 1.5rem 1rem;
  position: fixed; top: 68px; left: 0; bottom: 0;
  overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: .2rem; }
.sidebar-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .9rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; color: var(--gray-600);
  cursor: pointer; transition: all .2s; border: none; background: none;
  width: 100%; text-align: left;
}
.sidebar-link:hover { background: var(--blue-50); color: var(--blue-500); }
.sidebar-link.active { background: var(--blue-50); color: var(--blue-500); font-weight: 600; }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-section-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gray-400); padding: .5rem .9rem .2rem;
  margin-top: .75rem;
}
.main-content { margin-left: 240px; flex: 1; padding: 2rem; min-width: 0; }

/* ─── MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-xl);
  padding: 2rem; max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg); animation: modal-in .25s ease;
}
@keyframes modal-in { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 1.3rem; line-height: 1; padding: .2rem; }
.modal-close:hover { color: var(--gray-900); }

/* ─── PROFIT CALC ────────────────────────────── */
.calc-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .3s; z-index: 90; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 1rem; }
  .calc-row { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* ─── HERO GRADIENT ──────────────────────────── */
.hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37,99,235,.12) 0%, transparent 70%),
    linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
}

/* ─── FOOTER ─────────────────────────────────── */
footer {
  background: var(--gray-900); color: var(--gray-400);
  padding: 3rem 0 2rem;
}
footer h4 { font-family: var(--font-display); color: var(--white); font-size: 1rem; margin-bottom: .75rem; }
footer a { color: var(--gray-400); font-size: .875rem; display: block; margin-bottom: .4rem; transition: color .2s; }
footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 2rem; padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; font-size: .8rem; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ─── PRICING CARDS ──────────────────────────── */
.pricing-card {
  border: 2px solid var(--gray-200); border-radius: var(--radius-xl);
  padding: 2rem; position: relative; transition: all .25s;
}
.pricing-card.featured {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(37,99,235,.08), var(--shadow-lg);
}
.pricing-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--blue-500); color: white;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .9rem; border-radius: 999px;
}
.price-amount {
  font-family: var(--font-display); font-size: 3rem; font-weight: 800;
  color: var(--gray-900); line-height: 1;
}
.price-period { font-size: .85rem; color: var(--gray-400); }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; margin: 1.5rem 0; }
.feature-list li { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--gray-700); }
.feature-list li::before { content: "✓"; color: var(--success); font-weight: 700; flex-shrink: 0; }
.feature-list li.locked { color: var(--gray-400); }
.feature-list li.locked::before { content: "✕"; color: var(--gray-300); }
