/* ============================
   CodeBid — Design System
   ============================ */
:root {
  --black: #0b0b10;
  --black-soft: #15131c;
  --white: #ffffff;
  --purple-900: #2b0a66;
  --purple-700: #6b32e0;
  --purple-600: #8c52ff;
  --purple-500: #9d6bff;
  --purple-300: #c9aeff;
  --purple-100: #f1e8ff;
  --purple-50: #f8f5ff;
  --gray-50: #f9f9fb;
  --gray-100: #ebebef;
  --gray-200: #d8d8e0;
  --gray-300: #c4c4ce;
  --gray-500: #8a8a96;
  --gray-700: #4a4a55;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
  --shadow-xs: 0 1px 2px rgba(11,11,16,0.05);
  --shadow-sm: 0 2px 8px rgba(11,11,16,0.06);
  --shadow-md: 0 8px 24px rgba(46,16,101,0.10);
  --shadow-lg: 0 20px 48px rgba(46,16,101,0.14);

  --font-base: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
  font-family: var(--font-base);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-footer { margin-top: auto; }

h1, h2, h3, h4 { margin: 0 0 0.4em; line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; }
p { margin: 0 0 1em; color: var(--gray-700); }
a { color: var(--purple-600); text-decoration: none; }
a:hover { color: var(--purple-700); }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

.icon {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.text-center { text-align: center; }
.muted { color: var(--gray-500); }

/* ============================
   Buttons
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--purple-600);
  color: var(--white);
  box-shadow: 0 1px 3px rgba(140,82,255,0.35);
}
.btn-primary:hover { background: var(--purple-700); color: var(--white); box-shadow: 0 2px 8px rgba(140,82,255,0.45); }
.btn-outline { background: transparent; color: var(--black); border-color: var(--gray-200); }
.btn-outline:hover { border-color: var(--purple-600); color: var(--purple-600); }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.75); border: none; }
.btn-ghost:hover { color: var(--white); }
.btn-subtle { background: var(--gray-50); color: var(--gray-700); border-color: var(--gray-100); }
.btn-subtle:hover { background: var(--gray-100); color: var(--black); }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-sm { padding: 6px 13px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-link {
  background: none; border: none;
  color: var(--purple-600); text-decoration: underline;
  cursor: pointer; font: inherit; padding: 0;
}
.btn-link:hover { color: var(--purple-700); }

/* ============================
   Badges
   ============================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge-open { background: var(--purple-100); color: var(--purple-700); }
.badge-closing { background: #fde8e8; color: #b42318; }
.badge-category { background: var(--gray-100); color: var(--gray-700); }
.badge-buyer { background: #e8f5e9; color: #2e7d32; }
.badge-supplier { background: #e3f2fd; color: #1565c0; }
.badge-pending  { background: var(--gray-100); color: var(--gray-700); }
.badge-accepted { background: #e8f5e9; color: #2e7d32; }
.badge-declined { background: #fde8e8; color: #b42318; }
.badge-awarded  { background: #fff3e0; color: #c75000; }

/* ============================
   Header
   ============================ */
.site-header {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo-accent { color: var(--purple-500); }
.logo-icon { width: 22px; height: 22px; }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  margin-left: 36px;
  gap: 24px;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
/* Hide post-tender nav link until role is confirmed as buyer */
a[data-page="post-tender"] { display: none; }
body[data-role="buyer"] a[data-page="post-tender"] { display: inline; }

.main-nav a {
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  font-size: 0.88rem;
  transition: color 0.12s;
}
.main-nav a:hover, .main-nav a.active { color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 4px;
  background: rgba(140,82,255,0.12);
  border: 1px solid rgba(140,82,255,0.2);
  color: var(--purple-300);
  font-size: 0.8rem;
  font-weight: 600;
}

.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; }

.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--gray-300);
  border-radius: 4px;
  flex-shrink: 0;
}
.notif-bell:hover { color: var(--white); background: rgba(255,255,255,0.07); }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: #e53935;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  min-width: 14px;
  height: 14px;
  border-radius: 8px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    background: #0f0d16;
    flex-direction: column; align-items: stretch;
    margin-left: 0; padding: 16px 20px 20px;
    gap: 16px; display: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .main-nav.open { display: flex; }
  .nav-links { flex-direction: column; gap: 14px; }
  .header-actions { flex-direction: column; align-items: stretch; }
  .account-pill { justify-content: center; }
  .nav-toggle { display: block; margin-left: auto; }
}

/* ============================
   Hero — split layout with image
   ============================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 640px;
  background: var(--black);
  overflow: hidden;
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px 80px 0;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--purple-300);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 22px;
  width: fit-content;
}
.hero h1 {
  font-size: 3.2rem;
  color: var(--white);
  max-width: 540px;
  line-height: 1.1;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  margin: 14px 0 0;
}
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.hero-stat-value { font-size: 1.4rem; font-weight: 800; color: var(--white); display: block; }
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 2px; display: block; }

.hero-image {
  position: relative;
  overflow: hidden;
}
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--black) 0%, transparent 35%);
  z-index: 1;
}
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11,11,16,0.3);
  z-index: 1;
}

/* ============================
   Landing page sections
   ============================ */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-dark { background: var(--black); color: var(--white); }
.section-dark h2 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.55); }
.section-tinted { background: var(--gray-50); }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple-600);
  margin-bottom: 12px;
}
.section-title { font-size: 2.2rem; max-width: 600px; }
.section-title.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-sub { max-width: 520px; color: var(--gray-500); font-size: 1rem; }
.section-sub.centered { text-align: center; margin: 0 auto; }
.section-header-block { margin-bottom: 52px; }
.section-header-block.centered { text-align: center; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--gray-100);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature-item {
  background: var(--white);
  padding: 32px 28px;
  transition: background 0.15s;
}
.feature-item:hover { background: var(--gray-50); }
.feature-icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--purple-100);
  color: var(--purple-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.feature-icon-wrap .icon { width: 20px; height: 20px; }
.feature-item h3 { font-size: 1rem; margin-bottom: 6px; }
.feature-item p { font-size: 0.88rem; margin: 0; }

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.how-col-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--purple-600); margin-bottom: 24px; display: block; }
.step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}
.step:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem;
  margin-top: 2px;
}
.step-body h4 { font-size: 0.95rem; margin-bottom: 4px; }
.step-body p { margin: 0; font-size: 0.88rem; color: var(--gray-500); }

.trust-bar {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 24px 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.trust-bar-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); white-space: nowrap; }
.trust-logos { display: flex; gap: 28px; flex-wrap: wrap; }
.trust-logos span { font-weight: 700; color: var(--gray-300); font-size: 0.95rem; letter-spacing: -0.01em; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial-card {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--white);
}
.testimonial-stars { color: var(--purple-500); font-size: 0.85rem; letter-spacing: 3px; margin-bottom: 12px; }
.testimonial-quote { font-size: 0.9rem; line-height: 1.65; color: var(--black); margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--purple-600); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem; flex-shrink: 0;
}
.testimonial-name { font-weight: 700; font-size: 0.85rem; }
.testimonial-role { font-size: 0.76rem; color: var(--gray-500); }

.cta-band {
  background: var(--purple-600);
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); font-size: 2.2rem; }
.cta-band p { color: rgba(255,255,255,0.7); max-width: 480px; margin: 0 auto 28px; }
.cta-band .btn-primary { background: var(--white); color: var(--purple-700); box-shadow: none; }
.cta-band .btn-primary:hover { background: var(--purple-100); color: var(--purple-700); }

/* ============================
   About section
   ============================ */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-image {
  overflow: hidden;
  aspect-ratio: 4/3;
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-copy .eyebrow { color: var(--purple-600); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px; display: block; }
.about-points { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.about-point { display: flex; gap: 12px; align-items: flex-start; }
.about-point .icon-dot {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--purple-100);
  color: var(--purple-600);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.about-point .icon-dot .icon { width: 12px; height: 12px; }
.about-point p { margin: 0; font-size: 0.9rem; }

/* ============================
   Page header (inner pages)
   ============================ */
.page-header {
  background: var(--black);
  padding: 40px 0 38px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.page-header h1 { color: var(--white); font-size: 1.6rem; margin-bottom: 4px; }
.page-header p { color: rgba(255,255,255,0.4); margin: 0; font-size: 0.9rem; }
.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============================
   Browse — horizontal filters + list view
   ============================ */
.browse-page { padding: 32px 0 80px; }

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar input[type="search"] { flex: 1; min-width: 220px; }
.filter-bar select { width: auto; }
.filter-bar .btn { flex-shrink: 0; }
.results-count { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 16px; }

.tender-list {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}
.tender-list-header {
  display: grid;
  grid-template-columns: 1fr 160px 130px 90px 60px 100px;
  gap: 16px;
  padding: 10px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}
.tender-row {
  display: grid;
  grid-template-columns: 1fr 160px 130px 90px 60px 100px;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.1s, border-left-color 0.1s;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: inherit;
}
.tender-row:last-child { border-bottom: none; }
.tender-row:hover { background: var(--gray-50); border-left-color: var(--purple-600); }
.tender-row-main {}
.tender-row-title { font-weight: 600; font-size: 0.9rem; color: var(--black); line-height: 1.3; }
.tender-row-company { font-size: 0.78rem; color: var(--gray-500); margin-top: 3px; }
.tender-row-cat { justify-self: start; }
.tender-row-budget { font-size: 0.88rem; font-weight: 700; color: var(--black); }
.tender-row-deadline { font-size: 0.82rem; color: var(--gray-500); }
.tender-row-bids { font-size: 0.82rem; color: var(--gray-500); }

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-500);
}
.empty-state p { margin: 0; font-size: 0.9rem; }

/* ============================
   Tender detail
   ============================ */
.tender-detail {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  padding: 40px 0 80px;
}
.detail-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
}
.detail-card:last-child { margin-bottom: 0; }
.detail-card h1 { font-size: 1.65rem; margin-bottom: 6px; }
.detail-meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
}
.detail-meta-item {}
.detail-meta-item .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500); margin-bottom: 3px; display: block; }
.detail-meta-item .value { font-weight: 700; font-size: 0.95rem; }

.bids-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.bid-row {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}
.bid-row:last-child { border-bottom: none; }
.bid-row-info { flex: 1; }
.bid-row-supplier { font-weight: 700; font-size: 0.9rem; }
.bid-row-meta { font-size: 0.78rem; color: var(--gray-500); margin-top: 2px; }
.bid-row-message { font-size: 0.85rem; color: var(--gray-700); margin-top: 8px; }
.bid-row-amount { font-size: 1.1rem; font-weight: 800; color: var(--purple-700); white-space: nowrap; }
.bid-row-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.btn-accept { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.btn-accept:hover { background: #1b5e20; border-color: #1b5e20; color: #fff; }
.btn-decline { background: #b42318; color: #fff; border-color: #b42318; }
.btn-decline:hover { background: #7f1d1d; border-color: #7f1d1d; color: #fff; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 88px;
}
.sidebar-card h3 { font-size: 1rem; margin-bottom: 16px; }

/* ============================
   Form inputs
   ============================ */
input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="password"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  font-size: 0.9rem;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.12s, box-shadow 0.12s;
}
input[type="file"] { padding: 8px 13px; cursor: pointer; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--purple-600);
  box-shadow: 0 0 0 3px rgba(140,82,255,0.12);
}

.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; font-size: 0.84rem; margin-bottom: 6px; color: var(--black); }
.form-row .hint { font-size: 0.76rem; color: var(--gray-500); margin-top: 5px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-currency-wrap { display: flex; gap: 0; }
.input-currency-wrap select { width: 100px; flex-shrink: 0; border-right: none; border-radius: 0; }
.input-currency-wrap input { flex: 1; border-radius: 0; }

.form-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple-700);
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
}
.form-section-title:first-child { margin-top: 0; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert-success { background: var(--purple-100); color: var(--purple-900); border: 1px solid var(--purple-300); }
.alert-error { background: #fff0f0; color: #b42318; border: 1px solid #fecaca; }

/* ============================
   Post tender / form pages
   ============================ */
.form-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 28px 96px;
}
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-xs);
}

/* ============================
   Gate panel
   ============================ */
.gate-panel {
  max-width: 520px;
  margin: 72px auto;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 56px 40px;
}
.gate-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--purple-100);
  color: var(--purple-700);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.gate-icon .icon { width: 24px; height: 24px; }
.gate-panel h2 { font-size: 1.4rem; margin-bottom: 8px; }
.gate-panel p { font-size: 0.9rem; }
.gate-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.gate-note { font-size: 0.8rem; color: var(--gray-500); margin-top: 16px; margin-bottom: 0; }

/* ============================
   Auth pages
   ============================ */
.auth-page { max-width: 440px; margin: 0 auto; padding: 64px 24px 96px; }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-xs);
}
.auth-footer-link { text-align: center; margin-top: 18px; font-size: 0.88rem; color: var(--gray-500); }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--gray-500); font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

.role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-card {
  position: relative;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.role-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.role-card .icon-wrap {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--purple-100); color: var(--purple-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.role-card .icon-wrap .icon { width: 16px; height: 16px; }
.role-card strong { display: block; font-size: 0.88rem; margin-bottom: 2px; }
.role-card span { font-size: 0.76rem; color: var(--gray-500); }
.role-card:has(input:checked) { border-color: var(--purple-600); background: var(--purple-50); }

#ms-signin-btn { font-size: 0.9rem; }
#ms-signin-btn .icon { width: 16px; height: 16px; margin-right: 2px; }

/* ============================
   Dashboard
   ============================ */
.dashboard-page { padding: 36px 0 80px; }
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.dashboard-header h2 { margin: 0; font-size: 1.4rem; }
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.stat-card-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-card-label { font-size: 0.78rem; color: var(--gray-500); margin-top: 2px; }

.dashboard-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.team-members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.team-member-card { background: var(--white); border: 1px solid var(--gray-100); padding: 16px 20px; }
.team-member-name { font-weight: 600; font-size: 0.9rem; color: var(--black); margin-bottom: 6px; }
.team-member-meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--gray-500); }

.chart-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  padding: 28px 28px 20px;
  position: relative;
  height: 360px;
  margin-top: 8px;
}
.chart-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* ============================
   Profile page
   ============================ */
.profile-page { max-width: 620px; margin: 0 auto; padding: 48px 28px 96px; }
.profile-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--purple-600);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  margin-bottom: 16px;
}
.profile-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}
.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--gray-100);
}
.profile-field:last-child { border-bottom: none; }
.profile-field-label { font-size: 0.84rem; color: var(--gray-500); }
.profile-field-value { font-size: 0.9rem; font-weight: 600; }

/* ============================
   Terms page
   ============================ */
.terms-section { margin-bottom: 40px; }
.terms-section h2 { font-size: 1.1rem; margin-bottom: 10px; }
.terms-section p, .terms-section ul { font-size: 0.92rem; }

/* Notification category checkboxes (profile page) */
.notif-category-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.notif-category-item { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; }
.notif-category-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--purple-600); flex-shrink: 0; }

/* ============================
   Notifications page
   ============================ */
.notif-page { max-width: 680px; margin: 0 auto; padding: 48px 28px 96px; }
.notif-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.notif-page-header h1 { margin: 0; }
.notif-list { border: 1px solid var(--gray-100); }
.notif-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  color: inherit;
  transition: background 0.1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--gray-50); }
.notif-item.is-unread { background: var(--purple-50); }
.notif-item.is-unread:hover { background: #ede8ff; }
.notif-dot {
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple-600);
  margin-top: 6px;
}
.notif-item:not(.is-unread) .notif-dot { visibility: hidden; }
.notif-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 3px; }
.notif-body { font-size: 0.82rem; color: var(--gray-500); }
.notif-time { font-size: 0.75rem; color: var(--gray-300); margin-top: 5px; }
.notif-empty { text-align: center; padding: 60px 20px; border: 1px solid var(--gray-100); }

/* ============================
   Footer
   ============================ */
.site-footer {
  background: var(--black);
  color: var(--gray-500);
  padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--white); font-weight: 800; font-size: 1.05rem; }
.footer-brand span { color: var(--purple-500); }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--gray-500); font-size: 0.84rem; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.8rem; }

/* ============================
   Responsive
   ============================ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-content { padding: 60px 0 40px; }
  .hero-image { height: 280px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { gap: 20px; }
  .about-split { grid-template-columns: 1fr; gap: 32px; }
  .how-grid { grid-template-columns: 1fr; gap: 32px; }
  .feature-list { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .tender-list-header { display: none; }
  .tender-row { grid-template-columns: 1fr auto; }
  .tender-row-cat, .tender-row-deadline, .tender-row-bids { display: none; }
  .tender-detail { grid-template-columns: 1fr; padding: 28px 0 60px; }
  .sidebar-card { position: static; }
  .detail-meta-row { gap: 16px; }
  .role-select { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr; }
}

/* ============================
   Page & section animations
   ============================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

body { animation: fadeIn 0.6s ease both; }

/* Hero entrance — staggered */
.hero-eyebrow { animation: fadeInUp 0.75s cubic-bezier(0.22,1,0.36,1) 0.15s both; }
.hero h1      { animation: fadeInUp 0.8s  cubic-bezier(0.22,1,0.36,1) 0.3s  both; }
.hero-sub     { animation: fadeInUp 0.8s  cubic-bezier(0.22,1,0.36,1) 0.42s both; }
.hero-actions { animation: fadeInUp 0.8s  cubic-bezier(0.22,1,0.36,1) 0.54s both; }
.hero-stats   { animation: fadeInUp 0.75s cubic-bezier(0.22,1,0.36,1) 0.65s both; }
.hero-image   { animation: fadeIn   1.3s  ease                         0.2s  both; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  body,
  .hero-eyebrow, .hero h1, .hero-sub,
  .hero-actions, .hero-stats, .hero-image { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
