/* ============================================================
   DataVault Design System — main.css
   Palette: Deep Teal + Warm Orange on Warm Cream
   Font: Outfit (Google Fonts)
   ============================================================ */

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

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* --- Primary: Deep Teal --- */
  --c-primary:        #0D9488;
  --c-primary-dark:   #0F766E;
  --c-primary-darker: #115E59;
  --c-primary-light:  #CCFBF1;
  --c-primary-xlight: #F0FDFA;

  /* --- Accent: Warm Orange --- */
  --c-accent:         #F97316;
  --c-accent-dark:    #EA580C;
  --c-accent-light:   #FFEDD5;
  --c-accent-xlight:  #FFF7ED;

  /* --- Neutrals --- */
  --c-bg:             #FFFBF5;
  --c-surface:        #FFFFFF;
  --c-surface-raised: #FEFCF9;
  --c-surface-sunken: #F5F4F0;

  /* --- Text --- */
  --c-text:           #1C1917;
  --c-text-secondary: #78716C;
  --c-text-tertiary:  #A8A29E;
  --c-text-inverse:   #FFFFFF;

  /* --- Border --- */
  --c-border:         #E7E5E4;
  --c-border-light:   #F5F5F4;

  /* --- Semantic --- */
  --c-success:        #059669;
  --c-success-light:  #ECFDF5;
  --c-warning:        #D97706;
  --c-warning-light:  #FFFBEB;
  --c-error:          #DC2626;
  --c-error-light:    #FEF2F2;
  --c-info:           #0EA5E9;
  --c-info-light:     #F0F9FF;

  /* --- Typography Scale --- */
  --font:             'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs:   0.875rem; /* ~14px */
  --fs-sm:   1rem;     /* ~16px */
  --fs-base: 1.125rem; /* ~18px */
  --fs-lg:   1.25rem;  /* ~20px */
  --fs-xl:   1.5rem;   /* ~24px */
  --fs-2xl:  1.875rem; /* ~30px */
  --fs-3xl:  2.25rem;  /* ~36px */
  --fs-4xl:  2.75rem;  /* ~44px */
  --fs-5xl:  3.5rem;   /* ~56px */
  --fs-6xl:  4.25rem;  /* ~68px */

  /* --- Spacing Scale (4px base) --- */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* --- Border Radius --- */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* --- Shadows --- */
  --sh-sm:      0 1px 3px rgba(28,25,23,0.06), 0 1px 2px rgba(28,25,23,0.04);
  --sh-md:      0 4px 6px -1px rgba(28,25,23,0.07), 0 2px 4px -1px rgba(28,25,23,0.04);
  --sh-lg:      0 10px 15px -3px rgba(28,25,23,0.08), 0 4px 6px -2px rgba(28,25,23,0.04);
  --sh-xl:      0 20px 25px -5px rgba(28,25,23,0.08), 0 10px 10px -5px rgba(28,25,23,0.03);
  --sh-accent:  0 4px 24px rgba(249,115,22,0.22);
  --sh-primary: 0 4px 24px rgba(13,148,136,0.22);
  --sh-card:    0 2px 8px rgba(28,25,23,0.06), 0 0 1px rgba(28,25,23,0.08);

  /* --- Transitions --- */
  --t-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   350ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Layout --- */
  --container:        1240px;
  --container-narrow: 820px;
  --nav-h:            72px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --c-bg:             #0C0A09;
    --c-surface:        #1C1917;
    --c-surface-raised: #292524;
    --c-surface-sunken: #111110;
    --c-text:           #FAFAF9;
    --c-text-secondary: #A8A29E;
    --c-text-tertiary:  #78716C;
    --c-border:         #292524;
    --c-border-light:   #1C1917;
  }
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font-family: var(--font);
  font-size: var(--fs-base);
}
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-text);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }
.flex-1 { flex: 1; }

.section { padding: var(--sp-20) 0; }
.section--sm { padding: var(--sp-12) 0; }
.section--lg { padding: var(--sp-24) 0; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,251,245,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border-light);
  display: flex;
  align-items: center;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--c-text);
}

.nav__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav__link {
  font-weight: 500;
  color: var(--c-text-secondary);
  transition: color var(--t-fast);
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
}
.nav__link:hover { color: var(--c-text); }
.nav__link--active { color: var(--c-primary); font-weight: 600; }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  color: var(--c-text);
  font-size: var(--fs-xl);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--t-base);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--t-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.1); }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
  box-shadow: var(--sh-primary);
}
.btn--primary:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  box-shadow: 0 6px 28px rgba(13,148,136,0.32);
  transform: translateY(-1px);
}

.btn--accent {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
  box-shadow: var(--sh-accent);
}
.btn--accent:hover {
  background: var(--c-accent-dark);
  border-color: var(--c-accent-dark);
  box-shadow: 0 6px 28px rgba(249,115,22,0.35);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn--outline:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-xlight);
}

.btn--outline-accent {
  background: transparent;
  color: var(--c-accent);
  border-color: var(--c-accent);
}
.btn--outline-accent:hover {
  background: var(--c-accent-xlight);
}

.btn--ghost {
  background: transparent;
  color: var(--c-text-secondary);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--c-surface-sunken);
  color: var(--c-text);
}

.btn--lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-base);
  border-radius: var(--r-full);
}

.btn--sm {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
}

.btn--xl {
  padding: var(--sp-5) var(--sp-10);
  font-size: var(--fs-lg);
  font-weight: 700;
  border-radius: var(--r-full);
}

.btn--full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-card);
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-base);
}

.card:hover {
  box-shadow: var(--sh-lg);
  transform: translateY(-2px);
}

.card--flat { box-shadow: none; }
.card--flat:hover { transform: none; box-shadow: var(--sh-sm); }

.card--accent {
  border-color: var(--c-accent-light);
  background: var(--c-accent-xlight);
}

.card--primary {
  border-color: var(--c-primary-light);
  background: var(--c-primary-xlight);
}

.card__body { padding: var(--sp-8); }
.card__body--lg { padding: var(--sp-10); }
.card__header {
  padding: var(--sp-6) var(--sp-8);
  border-bottom: 1px solid var(--c-border-light);
}
.card__footer {
  padding: var(--sp-5) var(--sp-8);
  border-top: 1px solid var(--c-border-light);
  background: var(--c-surface-sunken);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--primary { background: var(--c-primary-light); color: var(--c-primary-darker); }
.badge--accent  { background: var(--c-accent-light);  color: var(--c-accent-dark); }
.badge--success { background: var(--c-success-light); color: var(--c-success); }
.badge--warning { background: var(--c-warning-light); color: var(--c-warning); }
.badge--error   { background: var(--c-error-light);   color: var(--c-error); }
.badge--neutral { background: var(--c-surface-sunken); color: var(--c-text-secondary); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-label {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--c-text);
}

.form-label span {
  color: var(--c-text-tertiary);
  font-weight: 400;
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--c-text-secondary);
  margin-top: var(--sp-1);
}

.input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--fs-base);
  font-family: var(--font);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}

.input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light);
}

.input::placeholder { color: var(--c-text-tertiary); }

.input--error {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px var(--c-error-light);
}

.input--lg {
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-lg);
  border-radius: var(--r-lg);
}

select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  padding-right: var(--sp-10);
}

textarea.input { resize: vertical; min-height: 100px; }

.form-error {
  font-size: var(--fs-xs);
  color: var(--c-error);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-top: var(--sp-1);
}

/* ============================================================
   DROPZONE
   ============================================================ */
.dropzone {
  border: 2px dashed var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-12) var(--sp-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--c-surface);
  position: relative;
}

.dropzone:hover, .dropzone--over {
  border-color: var(--c-primary);
  background: var(--c-primary-xlight);
}

.dropzone--over { transform: scale(1.01); }

.dropzone__icon {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  display: block;
  animation: float 3s ease-in-out infinite;
}

.dropzone__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--sp-2);
}

.dropzone__sub {
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
}

.dropzone__or {
  margin: var(--sp-4) 0;
  color: var(--c-text-tertiary);
  font-size: var(--fs-sm);
  position: relative;
}

.dropzone__or::before,
.dropzone__or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--c-border);
}
.dropzone__or::before { right: calc(50% + 1.5rem); }
.dropzone__or::after  { left:  calc(50% + 1.5rem); }

.dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ============================================================
   PROGRESS STEPS
   ============================================================ */
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--sp-10);
}

.step {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}

.step__bubble {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-base);
  transition: all var(--t-base);
  flex-shrink: 0;
  z-index: 1;
  background: var(--c-border);
  color: var(--c-text-tertiary);
}

.step--active .step__bubble {
  background: var(--c-primary);
  color: white;
  box-shadow: var(--sh-primary);
}

.step--done .step__bubble {
  background: var(--c-success);
  color: white;
}

.step__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-text-tertiary);
  margin-top: var(--sp-2);
  text-align: center;
  white-space: nowrap;
}

.step--active .step__label { color: var(--c-primary); }
.step--done .step__label   { color: var(--c-success); }

.step__connector {
  flex: 1;
  height: 2px;
  background: var(--c-border);
  margin: 0 var(--sp-2);
  transition: background var(--t-base);
}

.step--done + .step .step__connector,
.step--done .step__connector {
  background: var(--c-success);
}

.step__wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  box-shadow: var(--sh-card);
}

.stat-card__label {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  font-weight: 500;
}

.stat-card__value {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--c-text);
  line-height: 1;
}

.stat-card__trend {
  font-size: var(--fs-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-card__trend--up   { color: var(--c-success); }
.stat-card__trend--down { color: var(--c-error); }
.stat-card__icon {
  font-size: 1.5rem;
  margin-bottom: var(--sp-2);
}

/* ============================================================
   DATASET CARD (marketplace)
   ============================================================ */
.dataset-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-card);
}

.dataset-card:hover {
  box-shadow: var(--sh-xl);
  transform: translateY(-3px);
  border-color: var(--c-primary-light);
}

.dataset-card__stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}

.dataset-card__body { padding: var(--sp-5); flex: 1; }

.dataset-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.dataset-card__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--sp-2);
  line-height: 1.3;
}

.dataset-card__meta {
  font-size: var(--fs-xs);
  color: var(--c-text-tertiary);
  margin-bottom: var(--sp-4);
}

.dataset-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--c-surface-sunken);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
}

.dataset-card__stat-label { font-size: var(--fs-xs); color: var(--c-text-secondary); }
.dataset-card__stat-val   { font-size: var(--fs-base); font-weight: 700; color: var(--c-text); }
.dataset-card__stat-val--accent { color: var(--c-accent); }

.dataset-card__footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--c-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.dataset-card__timer {
  font-size: var(--fs-xs);
  color: var(--c-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

/* ============================================================
   BID PANEL
   ============================================================ */
.bid-panel {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--sh-xl);
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-6));
}

.bid-panel__price {
  font-size: var(--fs-4xl);
  font-weight: 900;
  color: var(--c-accent);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.bid-panel__label {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-6);
}

.bid-panel__timer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  text-align: center;
}

.bid-panel__time-block {
  background: var(--c-surface-sunken);
  border-radius: var(--r-md);
  padding: var(--sp-3);
}

.bid-panel__time-val {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--c-text);
  display: block;
}

.bid-panel__time-label {
  font-size: 10px;
  color: var(--c-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-weight: 600;
  color: var(--c-text-secondary);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--c-border);
  background: var(--c-surface-sunken);
  white-space: nowrap;
}

.table td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--c-border-light);
  vertical-align: middle;
  color: var(--c-text);
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--c-surface-sunken); }

/* ============================================================
   ALERTS & NOTIFICATION
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  border: 1px solid transparent;
}

.alert__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert__title { font-weight: 600; margin-bottom: var(--sp-1); }

.alert--success {
  background: var(--c-success-light);
  border-color: #A7F3D0;
  color: var(--c-success);
}
.alert--warning {
  background: var(--c-warning-light);
  border-color: #FDE68A;
  color: var(--c-warning);
}
.alert--error {
  background: var(--c-error-light);
  border-color: #FCA5A5;
  color: var(--c-error);
}
.alert--info {
  background: var(--c-info-light);
  border-color: #BAE6FD;
  color: var(--c-info);
}
.alert--neutral {
  background: var(--c-surface-sunken);
  border-color: var(--c-border);
  color: var(--c-text-secondary);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

.modal-overlay--open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  max-width: 520px;
  width: 100%;
  padding: var(--sp-8);
  transform: translateY(12px) scale(0.97);
  transition: transform var(--t-spring);
}

.modal-overlay--open .modal {
  transform: translateY(0) scale(1);
}

.modal__title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  margin-bottom: var(--sp-2);
}

.modal__sub {
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-6);
}

.modal__close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: var(--c-surface-sunken);
  border: none;
  cursor: pointer;
  border-radius: var(--r-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-secondary);
  font-size: 1.1rem;
  transition: all var(--t-fast);
}
.modal__close:hover { background: var(--c-border); color: var(--c-text); }

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
.sidebar-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--sp-8);
  align-items: start;
}

.sidebar {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-card);
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-6));
}

.sidebar__title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-tertiary);
  margin-bottom: var(--sp-4);
}

.sidebar__nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  color: var(--c-text-secondary);
  font-weight: 500;
  font-size: var(--fs-sm);
  transition: all var(--t-fast);
  margin-bottom: var(--sp-1);
}

.sidebar__nav-link:hover {
  background: var(--c-surface-sunken);
  color: var(--c-text);
}

.sidebar__nav-link--active {
  background: var(--c-primary-xlight);
  color: var(--c-primary);
  font-weight: 600;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: var(--sp-24) 0 var(--sp-20);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(249,115,22,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-primary-xlight);
  color: var(--c-primary-darker);
  border: 1px solid var(--c-primary-light);
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-6);
}

.hero__title {
  font-size: clamp(var(--fs-4xl), 6vw, var(--fs-6xl));
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: var(--sp-6);
}

.hero__title .highlight {
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: var(--fs-lg);
  color: var(--c-text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: var(--sp-10);
}

.hero__ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-12);
}

.hero__trust {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  font-weight: 500;
}

.hero__trust-item span { color: var(--c-success); }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-primary);
  margin-bottom: var(--sp-3);
}

.section-title {
  font-size: var(--fs-4xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--c-text);
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}

.section-sub {
  font-size: var(--fs-lg);
  color: var(--c-text-secondary);
  line-height: 1.7;
  max-width: 560px;
}

.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

/* ============================================================
   HOW IT WORKS STEPS
   ============================================================ */
.how-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-4);
}

.how-step__num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary-xlight), var(--c-primary-light));
  border: 2px solid var(--c-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-2xl);
  font-weight: 900;
  color: var(--c-primary);
  flex-shrink: 0;
}

.how-step__icon {
  font-size: 2rem;
}

.how-step__title {
  font-size: var(--fs-lg);
  font-weight: 700;
}

.how-step__body {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  line-height: 1.7;
}

/* ============================================================
   OAUTH BUTTONS
   ============================================================ */
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  border: 2px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--t-base);
  font-family: var(--font);
}

.oauth-btn:hover {
  border-color: var(--c-primary);
  background: var(--c-primary-xlight);
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}

.oauth-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--c-text-tertiary);
  font-size: var(--fs-sm);
  margin: var(--sp-5) 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

/* ============================================================
   ACCORDION (FAQ)
   ============================================================ */
.accordion-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-3);
  transition: box-shadow var(--t-base);
}

.accordion-item:hover { box-shadow: var(--sh-md); }

.accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  background: var(--c-surface);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--c-text);
  text-align: left;
  gap: var(--sp-4);
  transition: background var(--t-fast);
}

.accordion-btn:hover { background: var(--c-surface-raised); }

.accordion-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--c-surface-sunken);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  flex-shrink: 0;
  transition: transform var(--t-base), background var(--t-base);
}

.accordion-item--open .accordion-icon {
  transform: rotate(45deg);
  background: var(--c-primary-light);
  color: var(--c-primary);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow);
}

.accordion-item--open .accordion-body { max-height: 400px; }

.accordion-content {
  padding: 0 var(--sp-6) var(--sp-5);
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.8;
  border-top: 1px solid var(--c-border-light);
  padding-top: var(--sp-4);
}

/* ============================================================
   NOTIFICATIONS / TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  pointer-events: none;
}

.toast {
  background: var(--c-text);
  color: #fff;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  font-size: var(--fs-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  pointer-events: all;
  animation: slideInToast var(--t-spring) forwards;
  max-width: 340px;
}

.toast--success { background: var(--c-success); }
.toast--error   { background: var(--c-error); }
.toast--warning { background: var(--c-warning); }

/* ============================================================
   ENCRYPTION LOCK
   ============================================================ */
.encrypt-indicator {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-success-light);
  border: 1px solid #A7F3D0;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-success);
}

.encrypt-indicator__lock {
  animation: lockPulse 2s ease-in-out infinite;
}

/* ============================================================
   LOADING STATES
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--c-border) 25%, var(--c-border-light) 50%, var(--c-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner--lg {
  width: 48px;
  height: 48px;
  border-width: 3px;
}

/* ============================================================
   CHIPS / TAGS
   ============================================================ */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  transition: all var(--t-fast);
}

.chip:hover, .chip--selected {
  border-color: var(--c-primary);
  background: var(--c-primary-xlight);
  color: var(--c-primary-darker);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding: var(--sp-12) 0 var(--sp-8);
  border-bottom: 1px solid var(--c-border-light);
  margin-bottom: var(--sp-8);
}

.page-header__eyebrow {
  font-size: var(--fs-sm);
  color: var(--c-primary);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.page-header__title {
  font-size: var(--fs-4xl);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.page-header__sub {
  color: var(--c-text-secondary);
  font-size: var(--fs-lg);
  margin-top: var(--sp-2);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--c-text);
  color: rgba(255,255,255,0.75);
  padding: var(--sp-16) 0 var(--sp-8);
}

.footer__logo {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: white;
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer__tagline {
  font-size: var(--fs-sm);
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: var(--sp-6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}

.footer__col-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: white;
  margin-bottom: var(--sp-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer__link {
  display: block;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--sp-3);
  transition: color var(--t-fast);
}

.footer__link:hover { color: white; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   RANGE SLIDER
   ============================================================ */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--c-border);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-primary);
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--c-primary-light);
  transition: box-shadow var(--t-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px var(--c-primary-light);
}

/* ============================================================
   CHECKBOX & RADIO
   ============================================================ */
.check-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
  padding: var(--sp-2) 0;
}

.check-item input[type="checkbox"],
.check-item input[type="radio"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-sm);
  cursor: pointer;
  accent-color: var(--c-primary);
  flex-shrink: 0;
}

.check-item__label {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  font-weight: 500;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
}

.toggle__track {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--c-border);
  border-radius: var(--r-full);
  transition: background var(--t-base);
  flex-shrink: 0;
}

.toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--sh-sm);
  transition: transform var(--t-base);
}

.toggle--on .toggle__track { background: var(--c-primary); }
.toggle--on .toggle__thumb { transform: translateX(20px); }
.toggle__label { font-size: var(--fs-sm); font-weight: 500; color: var(--c-text-secondary); }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: var(--sp-20) var(--sp-8);
}

.empty-state__icon {
  font-size: 4rem;
  margin-bottom: var(--sp-5);
  display: block;
}

.empty-state__title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  margin-bottom: var(--sp-3);
}

.empty-state__body {
  color: var(--c-text-secondary);
  font-size: var(--fs-base);
  max-width: 380px;
  margin: 0 auto var(--sp-8);
  line-height: 1.7;
}

/* ============================================================
   FILTER SIDEBAR (marketplace)
   ============================================================ */
.filter-group {
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--c-border-light);
}
.filter-group:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.filter-group__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--sp-3);
}

/* ============================================================
   DATA PREVIEW TABLE
   ============================================================ */
.data-preview {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.data-preview__header {
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-surface-sunken);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.data-preview__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-text);
}

.data-preview__meta {
  font-size: var(--fs-xs);
  color: var(--c-text-tertiary);
}

.data-preview__scroll {
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--c-surface-sunken);
  border-top: 1px solid var(--c-border);
  color: var(--c-text-secondary);
}

.footer__col-title {
  color: var(--c-primary-dark);
}

.footer__link {
  color: var(--c-text-secondary);
  transition: color var(--t-fast);
  font-weight: 500;
}

.footer__link:hover {
  color: var(--c-primary);
  text-decoration: underline;
}

.divider {
  height: 1px;
  background: var(--c-border);
  width: 100%;
}

/* Dark mode footer contrast fix */
@media (prefers-color-scheme: dark) {
  .footer {
    background: #111110;
    color: #D6D3D1;
  }
  .footer__col-title {
    color: var(--c-primary-light);
  }
  .footer__link {
    color: #D6D3D1;
  }
  .footer__link:hover {
    color: #5EEAD4;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-10 { margin-top: var(--sp-10); }
.mt-12 { margin-top: var(--sp-12); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

.text-primary   { color: var(--c-primary); }
.text-accent    { color: var(--c-accent); }
.text-success   { color: var(--c-success); }
.text-warning   { color: var(--c-warning); }
.text-error     { color: var(--c-error); }
.text-secondary { color: var(--c-text-secondary); }
.text-sm        { font-size: var(--fs-sm); }
.text-xs        { font-size: var(--fs-xs); }
.text-lg        { font-size: var(--fs-lg); }
.text-xl        { font-size: var(--fs-xl); }
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }
.font-medium    { font-weight: 500; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.hidden { display: none !important; }
.visible { display: block !important; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

@keyframes lockPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes confetti {
  0%   { transform: translateY(0) rotate(0deg);    opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.animate-fade-up   { animation: fadeInUp 0.5s ease forwards; }
.animate-fade      { animation: fadeIn   0.4s ease forwards; }
.animate-shake     { animation: shake    0.4s ease; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar-layout { grid-template-columns: 200px 1fr; }
  .footer__grid   { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav__links  { display: none; }
  .nav__hamburger { display: flex; }

  .sidebar-layout  { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero__ctas { flex-direction: column; align-items: flex-start; }
  .hero__title { font-size: var(--fs-4xl); }
  .section-title { font-size: var(--fs-3xl); }
  .footer__grid  { grid-template-columns: 1fr; gap: var(--sp-8); }
  .bid-panel { position: static; }

  .btn--xl { padding: var(--sp-4) var(--sp-8); font-size: var(--fs-base); }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--sp-4); }
  .hero { padding: var(--sp-16) 0 var(--sp-12); }
  .section { padding: var(--sp-12) 0; }
  .hero__trust { gap: var(--sp-4); }
  .toast-container { left: var(--sp-4); right: var(--sp-4); }
  .toast { max-width: 100%; }
}
