/* TenderStack — Design System */
:root {
  --bg: #0e0e0e;
  --bg-surface: #171717;
  --bg-card: #1e1e1e;
  --fg: #f0ede6;
  --fg-muted: #9a9590;
  --accent: #e8a832;
  --accent-dim: rgba(232, 168, 50, 0.12);
  --border: rgba(240, 237, 230, 0.08);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --green: #22c55e;
  --red: #ef4444;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Navigation */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--fg); }
.btn-nav {
  background: var(--accent);
  color: #0e0e0e;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-nav:hover { opacity: 0.85; }

/* Hero */
.hero {
  padding: 140px 40px 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 500;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 5.5vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero-headline span { color: var(--accent); }
.hero-sub {
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent);
  color: #0e0e0e;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: rgba(240,237,230,0.25); }

/* Stats */
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat-item { text-align: left; }
.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
}
.stat-label { font-size: 13px; color: var(--fg-muted); margin-top: 4px; }

/* Form section */
.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
}
.form-title {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 8px;
}
.form-sub { color: var(--fg-muted); font-size: 14px; margin-bottom: 28px; }
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.form-input, .form-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 16px;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-select { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--fg-muted); margin-top: 6px; }
.form-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-muted);
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.tag-btn.selected {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.tag-btn:hover { border-color: var(--accent); color: var(--fg); }

/* Sections */
.section-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}
.section { padding: 80px 40px; }
.section-dark { background: var(--bg-surface); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.section-sub { font-size: 18px; color: var(--fg-muted); max-width: 600px; line-height: 1.65; margin-bottom: 48px; }

/* Feature cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}
.feature-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.feature-desc { font-size: 14px; color: var(--fg-muted); line-height: 1.65; }

/* Tenders list */
.tenders-grid {
  display: grid;
  gap: 16px;
}
.tender-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  transition: border-color 0.2s;
}
.tender-card:hover { border-color: rgba(240,237,230,0.18); }
.tender-main { flex: 1; }
.tender-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.tender-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.tender-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--fg-muted); }
.tender-meta-item { display: flex; align-items: center; gap: 4px; }
.tender-value { font-weight: 600; color: var(--fg); }

/* Auth modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}
.modal-close:hover { color: var(--fg); }
.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 8px;
}
.modal-sub { color: var(--fg-muted); font-size: 14px; margin-bottom: 28px; }
.form-error { background: rgba(239,68,68,0.1); border: 1px solid var(--red); border-radius: 6px; color: var(--red); padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.form-success { background: rgba(34,197,94,0.1); border: 1px solid var(--green); border-radius: 6px; color: var(--green); padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 14px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Dashboard / App */
.app-container {
  padding-top: 80px;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 80px;
}
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.app-title { font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.dashboard-card-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.dashboard-score {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
}
.dashboard-score-label { font-size: 14px; color: var(--fg-muted); margin-top: 4px; }
.dashboard-email { font-size: 14px; color: var(--fg-muted); }

/* Responsive */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-stats { gap: 20px; }
  .app-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 24px; }
  .site-nav { padding: 0 24px; }
}

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 13px;
}

/* Loading state */
.loading { opacity: 0.5; pointer-events: none; }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* No tenders / empty state */
.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--fg-muted);
}
.empty-state h3 { font-size: 18px; color: var(--fg); margin-bottom: 8px; }