/* ============================================================
   RFX App — Design System
   Extracted from variant-6 mockups. Sharp corners everywhere.
   No border-radius except 4px on status/rating badges.
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: #FFFFFF;
  color: #000000;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ────────────────────────────────────────────────────────────
   App Container
   ──────────────────────────────────────────────────────────── */
#app {
  min-height: 100vh;
}

.app-container {
  min-height: 100vh;
}

/* ────────────────────────────────────────────────────────────
   Top Bar / Navigation
   ──────────────────────────────────────────────────────────── */
.topbar {
  height: 60px;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E5E5;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-nav {
  display: flex;
  gap: 8px;
  flex: 1;
}

.topbar-item {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.topbar-item:hover {
  color: #000;
}

.topbar-item.active {
  color: #000;
  background: #F5F5F5;
}

.topbar-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-shrink: 0;
}

/* Search */
.search-box {
  padding: 8px 16px;
  background: #F5F5F5;
  border: 1px solid transparent;
  font-size: 14px;
  width: 200px;
  transition: all 0.15s;
  outline: none;
}

.search-box:focus {
  background: #FFFFFF;
  border-color: #000;
}

.search-box::placeholder {
  color: #999;
}

/* User Avatar */
.user-avatar {
  width: 32px;
  height: 32px;
  background: #000;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
}

/* ────────────────────────────────────────────────────────────
   Main Layout (sidebar + content)
   ──────────────────────────────────────────────────────────── */
.main-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* ────────────────────────────────────────────────────────────
   Sidebar
   ──────────────────────────────────────────────────────────── */
.sidebar {
  width: 200px;
  background: #FFFFFF;
  border-right: 1px solid #E5E5E5;
  min-height: calc(100vh - 60px);
  padding: 24px 16px;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-label {
  padding: 0 12px 12px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #666;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  margin-bottom: 2px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.sidebar-item:hover {
  color: #000;
}

.sidebar-item.active {
  color: #000;
  background: #F5F5F5;
}

.sidebar-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   Main Content Area
   ──────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 32px;
  min-width: 0;
}

.main-content-centered {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px;
}

.main-content-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

/* ────────────────────────────────────────────────────────────
   Page Header
   ──────────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-title-group h1,
.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
}

.page-subtitle {
  font-size: 14px;
  color: #999;
}

.page-title-sm {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
}

/* Back link */
.back-link {
  display: inline-block;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.15s;
}

.back-link:hover {
  color: #000;
}

/* ────────────────────────────────────────────────────────────
   Buttons
   ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0;
  font-family: inherit;
}

.btn-primary {
  background: #000;
  color: #FFF;
  border: none;
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: #FFFFFF;
  color: #666;
  border: 1px solid #E5E5E5;
}

.btn-secondary:hover {
  background: #F5F5F5;
  color: #000;
}

.btn-outline {
  background: #FFFFFF;
  color: #666;
  border: 1px solid #E5E5E5;
  padding: 8px 16px;
  font-size: 12px;
}

.btn-outline:hover {
  background: #F5F5F5;
  color: #000;
}

.btn-danger {
  background: #EF4444;
  color: #FFF;
  border: none;
}

.btn-danger:hover {
  background: #DC2626;
}

/* Size variants */
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

/* Icon button */
.icon-btn {
  padding: 6px 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #999;
  transition: all 0.15s;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.icon-btn:hover {
  background: #F5F5F5;
  color: #000;
}

/* Button for round actions */
.btn-round {
  padding: 10px 20px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0;
  font-family: inherit;
}

.btn-round:hover {
  background: #F5F5F5;
}

/* Banner button (on dark bg) */
.banner-btn {
  padding: 12px 24px;
  background: #FFFFFF;
  color: #000;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.banner-btn:hover {
  background: #F5F5F5;
}

/* Disabled state */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ────────────────────────────────────────────────────────────
   Filter Bar / Chips
   ──────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0;
  font-family: inherit;
}

.filter-chip:hover {
  background: #F5F5F5;
}

.filter-chip.active {
  color: #000;
  background: #FFFFFF;
  border-color: #E5E5E5;
}

/* ────────────────────────────────────────────────────────────
   Status Badges
   ──────────────────────────────────────────────────────────── */
.status-badge {
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.status-badge.active,
.status-badge.status-active {
  background: #10B981;
  color: #FFFFFF;
}

.status-badge.awaiting,
.status-badge.status-awaiting {
  background: #F59E0B;
  color: #FFFFFF;
}

.status-badge.completed,
.status-badge.status-completed {
  background: #6366F1;
  color: #FFFFFF;
}

.status-badge.draft,
.status-badge.status-draft {
  background: #9CA3AF;
  color: #FFFFFF;
}

.status-badge.cancelled,
.status-badge.status-cancelled {
  background: #EF4444;
  color: #FFFFFF;
}

.status-badge.invited,
.status-badge.status-invited {
  background: #3B82F6;
  color: #FFFFFF;
}

.status-badge.responded,
.status-badge.status-responded {
  background: #10B981;
  color: #FFFFFF;
}

.status-badge.awarded,
.status-badge.status-awarded {
  background: #6366F1;
  color: #FFFFFF;
}

.status-badge.regretted,
.status-badge.status-regretted {
  background: #9CA3AF;
  color: #FFFFFF;
}

.status-badge.excluded,
.status-badge.status-excluded {
  background: #EF4444;
  color: #FFFFFF;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   Round Badges
   ──────────────────────────────────────────────────────────── */
.round-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: #6366F1;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.round-badge.r2 { background: #8B5CF6; }
.round-badge.r3 { background: #EC4899; }
.round-badge.r4 { background: #F59E0B; }

/* Round indicator (on project detail header) */
.round-indicator {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: #000;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.round-indicator.r2 { background: #8B5CF6; }
.round-indicator.r3 { background: #EC4899; }
.round-indicator.r4 { background: #F59E0B; }

/* ────────────────────────────────────────────────────────────
   Rating Badges
   ──────────────────────────────────────────────────────────── */
.rating-badge {
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  white-space: nowrap;
}

.rating-excellent { background: #10B981; color: #FFFFFF; }
.rating-strong    { background: #3B82F6; color: #FFFFFF; }
.rating-good      { background: #8B5CF6; color: #FFFFFF; }
.rating-adequate  { background: #F59E0B; color: #FFFFFF; }
.rating-poor      { background: #EF4444; color: #FFFFFF; }

/* ────────────────────────────────────────────────────────────
   Tables
   ──────────────────────────────────────────────────────────── */
.table-container,
.projects-table,
.bids-table,
.suppliers-table {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #FAFAFA;
  border-bottom: 1px solid #E5E5E5;
}

th {
  padding: 14px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

td {
  padding: 16px 20px;
  font-size: 14px;
  color: #000;
  border-top: 1px solid #F5F5F5;
}

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover {
  background: #FAFAFA;
}

tbody tr.clickable {
  cursor: pointer;
}

/* Table cell variants */
.project-name-cell {
  font-weight: 700;
  color: #000;
  font-size: 15px;
}

.project-description-cell {
  color: #666;
  font-size: 13px;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supplier-cell {
  font-weight: 700;
  font-size: 15px;
}

.price-cell {
  font-weight: 700;
  color: #000;
  font-size: 16px;
}

.budget-cell {
  font-weight: 700;
  color: #000;
}

.date-cell {
  color: #999;
  font-size: 13px;
  white-space: nowrap;
}

.evaluation-cell {
  font-size: 13px;
  color: #666;
  max-width: 340px;
  line-height: 1.5;
}

.actions-cell {
  text-align: right;
  white-space: nowrap;
}

/* ────────────────────────────────────────────────────────────
   Progress Bar
   ──────────────────────────────────────────────────────────── */
.progress-bar-container {
  width: 100%;
  height: 4px;
  background: #F5F5F5;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #000;
  transition: width 0.3s ease;
}

.progress-bar.completed {
  background: #6366F1;
}

.progress-label {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  display: block;
}

/* ────────────────────────────────────────────────────────────
   Stats Grid
   ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #E5E5E5;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 11px;
  color: #999;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

/* ────────────────────────────────────────────────────────────
   Project Header Card
   ──────────────────────────────────────────────────────────── */
.project-header {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 36px;
  margin-bottom: 28px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.project-title-group {
  flex: 1;
}

.project-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-description {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
}

.status-text {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   Round Actions Bar
   ──────────────────────────────────────────────────────────── */
.round-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  margin-bottom: 28px;
}

.round-actions-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

/* ────────────────────────────────────────────────────────────
   AI Banner
   ──────────────────────────────────────────────────────────── */
.ai-banner {
  background: #000;
  color: #FFFFFF;
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.banner-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.banner-content p {
  font-size: 14px;
  opacity: 0.9;
}

/* ────────────────────────────────────────────────────────────
   Info Banner
   ──────────────────────────────────────────────────────────── */
.info-banner {
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  padding: 20px 24px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.info-banner strong {
  color: #000;
}

.info-banner.warning {
  background: #FFFBEB;
  border-color: #F59E0B;
}

.info-banner.error {
  background: #FEF2F2;
  border-color: #EF4444;
  color: #EF4444;
}

.info-banner.success {
  background: #F0FDF4;
  border-color: #10B981;
  color: #065F46;
}

/* ────────────────────────────────────────────────────────────
   Tabs
   ──────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 8px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  padding: 8px;
  margin-bottom: 28px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px 20px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  border-radius: 0;
}

.tab.active {
  background: #FFFFFF;
  color: #000;
  border: 1px solid #E5E5E5;
}

.tab:hover:not(.active) {
  color: #666;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #E5E5E5;
  color: #666;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  margin-left: 6px;
}

.tab.active .tab-badge {
  background: #000;
  color: #FFF;
}

/* ────────────────────────────────────────────────────────────
   Forms — Base
   ──────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 24px;
}

.form-group:last-child {
  margin-bottom: 0;
}

label,
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  margin-bottom: 8px;
}

.label-optional {
  font-weight: 400;
  color: #999;
  font-size: 12px;
  margin-left: 6px;
}

.form-hint {
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

.form-error {
  font-size: 12px;
  color: #EF4444;
  margin-top: 6px;
}

/* Inputs & Textareas */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="tel"],
select,
.input {
  width: 100%;
  padding: 10px 14px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  transition: all 0.15s;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
select:focus,
.input:focus {
  background: #FFFFFF;
  border-color: #000;
}

input::placeholder,
.input::placeholder {
  color: #BBB;
}

input[type="text"].error,
input[type="email"].error,
input[type="password"].error,
input[type="number"].error,
select.error,
.input.error {
  border-color: #EF4444;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  resize: vertical;
  transition: all 0.15s;
  outline: none;
  border-radius: 0;
  line-height: 1.6;
}

textarea:focus {
  background: #FFFFFF;
  border-color: #000;
}

textarea::placeholder {
  color: #BBB;
}

textarea.monospace {
  font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
  font-size: 13px;
}

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: #000;
  cursor: pointer;
  border-radius: 0;
}

/* Radio group cards (for disclosure options) */
.radio-card-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  cursor: pointer;
  transition: all 0.15s;
}

.radio-card:hover {
  background: #F5F5F5;
}

.radio-card.selected {
  background: #FFFFFF;
  border-color: #000;
}

.radio-card input[type="radio"] {
  width: auto;
  min-width: auto;
  margin-top: 3px;
  accent-color: #000;
}

.radio-card-content {
  flex: 1;
}

.radio-card-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.radio-card-description {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* Select custom arrow */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Inline form row (budget + currency) */
.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-row .form-group.narrow {
  flex: 0 0 140px;
}

/* ────────────────────────────────────────────────────────────
   Tags / Labels Input
   ──────────────────────────────────────────────────────────── */
.tags-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  min-height: 44px;
  align-items: center;
  transition: border-color 0.15s;
}

.tags-input-container:focus-within {
  background: #FFFFFF;
  border-color: #000;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #F5F5F5;
  border: 1px solid #E5E5E5;
  font-size: 12px;
  font-weight: 600;
  color: #000;
}

.tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

.tag-remove:hover {
  color: #000;
}

.tags-input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  outline: none;
  padding: 0;
}

.tags-input::placeholder {
  color: #BBB;
}

/* ────────────────────────────────────────────────────────────
   Divider
   ──────────────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
  color: #999;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E5E5;
}

/* ────────────────────────────────────────────────────────────
   Section Titles within cards
   ──────────────────────────────────────────────────────────── */
.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E5E5;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.section-description {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Subsection label (11px uppercase) */
.subsection-label {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

/* ────────────────────────────────────────────────────────────
   Cards / Content Boxes
   ──────────────────────────────────────────────────────────── */
.card {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 32px;
  margin-bottom: 24px;
}

.card-sm {
  padding: 20px 24px;
}

.card-lg {
  padding: 40px;
}

/* ────────────────────────────────────────────────────────────
   Wizard / Multi-Step Form
   ──────────────────────────────────────────────────────────── */
.form-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

/* Progress Sidebar */
.progress-sidebar {
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 32px;
}

.progress-title {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  margin-bottom: 6px;
  transition: all 0.15s;
  cursor: default;
}

.progress-step.active {
  background: #FFFFFF;
  color: #000;
  border: 1px solid #E5E5E5;
}

.progress-step.complete {
  color: #666;
}

.step-number {
  width: 28px;
  height: 28px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.progress-step.active .step-number {
  background: #000;
  color: #FFFFFF;
}

.progress-step.complete .step-number {
  background: #E5E5E5;
  color: #666;
}

/* Form Content Panel */
.form-content {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 40px;
}

/* Bottom actions row */
.bottom-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #E5E5E5;
}

/* ────────────────────────────────────────────────────────────
   Upload / Drop Zone
   ──────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #E5E5E5;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  background: #FAFAFA;
  margin-bottom: 32px;
  transition: all 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #000;
  background: #F5F5F5;
}

.upload-zone.has-file {
  border-style: solid;
  border-color: #000;
  background: #FFFFFF;
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.upload-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.upload-description {
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
  line-height: 1.5;
}

.upload-file-name {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  margin-bottom: 8px;
}

/* ────────────────────────────────────────────────────────────
   Priority Scale Slider
   ──────────────────────────────────────────────────────────── */
.priority-scale-container {
  margin-bottom: 8px;
}

.priority-scale-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
  color: #999;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #E5E5E5;
  outline: none;
  cursor: pointer;
  border-radius: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #000;
  cursor: pointer;
  border-radius: 0;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #000;
  cursor: pointer;
  border: none;
  border-radius: 0;
}

.priority-scale-value {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 8px;
}

/* ────────────────────────────────────────────────────────────
   Supplier Selection Panel
   ──────────────────────────────────────────────────────────── */
.suppliers-selection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.supplier-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  cursor: pointer;
  transition: all 0.15s;
}

.supplier-item:hover {
  background: #F5F5F5;
}

.supplier-item.selected {
  background: #000;
  color: #FFFFFF;
  border-color: #000;
}

.supplier-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #E5E5E5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}

.supplier-item.selected .checkbox {
  border-color: #FFFFFF;
  background: #FFFFFF;
  color: #000;
}

.supplier-name {
  font-size: 15px;
  font-weight: 700;
}

.supplier-meta {
  font-size: 13px;
  color: #999;
}

.supplier-item.selected .supplier-meta {
  color: rgba(255, 255, 255, 0.8);
}

.round-rating {
  padding: 4px 12px;
  background: #FFFFFF;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.supplier-item.selected .round-rating {
  background: #333;
  color: #FFFFFF;
}

.panel-actions {
  display: flex;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid #E5E5E5;
  align-items: center;
}

.selection-count {
  font-size: 13px;
  color: #666;
  font-weight: 600;
  flex: 1;
  display: flex;
  align-items: center;
}

/* ────────────────────────────────────────────────────────────
   Decision Banner
   ──────────────────────────────────────────────────────────── */
.decision-banner {
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  padding: 32px 36px;
  margin-bottom: 28px;
}

.decision-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.decision-actions {
  display: flex;
  gap: 12px;
}

/* ────────────────────────────────────────────────────────────
   Round / Email Preview Panels
   ──────────────────────────────────────────────────────────── */
.round-panel,
.email-preview {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 36px;
  margin-bottom: 28px;
  display: none;
}

.round-panel.active,
.email-preview.active {
  display: block;
}

.round-panel-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.round-panel-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Email preview */
.email-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E5E5E5;
}

.email-to {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.email-subject {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.supplier-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.supplier-tab {
  padding: 8px 16px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  border-radius: 0;
}

.supplier-tab.active {
  background: #000;
  color: #FFFFFF;
  border-color: #000;
}

.email-body {
  background: #FAFAFA;
  padding: 28px;
  border: 1px solid #E5E5E5;
  min-height: 300px;
  font-size: 14px;
  line-height: 1.8;
  color: #000;
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.email-edit-note {
  font-size: 12px;
  color: #999;
  margin-bottom: 20px;
  font-style: italic;
}

/* ────────────────────────────────────────────────────────────
   Email Preferences Section
   ──────────────────────────────────────────────────────────── */
.email-preferences-section {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 32px;
  display: none;
}

.email-preferences-section.active {
  display: block;
}

.email-instructions-box {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #000;
  resize: vertical;
  outline: none;
  border-radius: 0;
  transition: all 0.15s;
}

.email-instructions-box:focus {
  background: #FFFFFF;
  border-color: #000;
}

.history-link {
  font-size: 13px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 12px;
  display: inline-block;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.history-link:hover {
  color: #000;
}

/* Example box */
.example-box {
  background: #F5F5F5;
  border-left: 3px solid #000;
  padding: 16px;
  margin-top: 24px;
}

.example-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.example-content {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  white-space: pre-line;
  font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
}

/* ────────────────────────────────────────────────────────────
   Review Sections (wizard step 4)
   ──────────────────────────────────────────────────────────── */
.review-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #E5E5E5;
}

.review-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.review-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.review-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.review-label {
  font-size: 13px;
  font-weight: 700;
  color: #666;
  min-width: 160px;
  flex-shrink: 0;
}

.review-value {
  font-size: 13px;
  color: #000;
  flex: 1;
}

.review-value pre {
  font-family: inherit;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ────────────────────────────────────────────────────────────
   Modals
   ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 36px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  position: relative;
}

.modal-lg {
  max-width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 20px;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #000;
}

.modal-body {
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid #E5E5E5;
}

/* ────────────────────────────────────────────────────────────
   Auth Forms (login / signup)
   ──────────────────────────────────────────────────────────── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAFAFA;
  padding: 20px;
}

.auth-box {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 48px;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 14px;
  color: #999;
  margin-bottom: 32px;
}

.auth-footer {
  margin-top: 28px;
  font-size: 14px;
  color: #666;
  text-align: center;
}

.auth-footer a,
.auth-link {
  color: #000;
  font-weight: 700;
  text-decoration: underline;
}

.auth-footer a:hover,
.auth-link:hover {
  text-decoration: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #999;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E5E5;
}

.forgot-password-link {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  display: block;
  text-align: right;
  margin-top: 6px;
  margin-bottom: 0;
}

.forgot-password-link:hover {
  color: #000;
}

.terms-agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
}

.terms-agreement input[type="checkbox"] {
  width: auto;
  min-width: auto;
  margin-top: 2px;
}

.terms-agreement a {
  color: #000;
  text-decoration: underline;
  font-weight: 600;
}

/* ────────────────────────────────────────────────────────────
   Verification Banner (post-signup)
   ──────────────────────────────────────────────────────────── */
.verify-banner {
  background: #FFFBEB;
  border-bottom: 1px solid #F59E0B;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #92400E;
}

.verify-banner strong {
  font-weight: 700;
}

.verify-banner a,
.verify-banner button {
  color: #92400E;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

/* ────────────────────────────────────────────────────────────
   Loading States
   ──────────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 900;
  gap: 16px;
}

.loading-overlay.hidden {
  display: none;
}

.loading-message {
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.loading-timer {
  font-size: 13px;
  color: #999;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E5E5E5;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Inline loading state */
.loading-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  font-size: 14px;
  color: #666;
}

.loading-inline .spinner {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* Skeleton / shimmer */
.skeleton {
  background: linear-gradient(90deg, #F5F5F5 25%, #EBEBEB 50%, #F5F5F5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  display: block;
}

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

.skeleton-text {
  height: 14px;
  border-radius: 0;
  margin-bottom: 8px;
}

.skeleton-text.wide { width: 100%; }
.skeleton-text.medium { width: 70%; }
.skeleton-text.narrow { width: 40%; }

/* AI operation loading */
.ai-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  gap: 16px;
}

.ai-loading-label {
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.ai-loading-timer {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ai-cancel-btn {
  display: none;
  font-size: 13px;
  color: #666;
  background: none;
  border: 1px solid #E5E5E5;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  border-radius: 0;
}

.ai-cancel-btn.visible {
  display: block;
}

/* ────────────────────────────────────────────────────────────
   Tooltips
   ──────────────────────────────────────────────────────────── */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #E5E5E5;
  color: #666;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.15s;
}

.tooltip-icon:hover {
  background: #000;
  color: #FFFFFF;
}

.tooltip-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 14px;
  width: 260px;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: pre-wrap;
}

.tooltip-icon:hover + .tooltip-popup,
.tooltip-wrapper:hover .tooltip-popup {
  opacity: 1;
}

/* ────────────────────────────────────────────────────────────
   AI Badge (on pre-filled fields)
   ──────────────────────────────────────────────────────────── */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #F0FDF4;
  border: 1px solid #10B981;
  color: #065F46;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 8px;
}

/* ────────────────────────────────────────────────────────────
   Empty States
   ──────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state-description {
  font-size: 14px;
  color: #999;
  max-width: 360px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ────────────────────────────────────────────────────────────
   Tier / Usage
   ──────────────────────────────────────────────────────────── */
.usage-bar-container {
  background: #F5F5F5;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
}

.usage-bar {
  height: 100%;
  background: #000;
  transition: width 0.3s;
}

.usage-bar.near-limit {
  background: #F59E0B;
}

.usage-bar.at-limit {
  background: #EF4444;
}

.usage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 4px;
}

.usage-label {
  color: #666;
  font-weight: 600;
}

.usage-count {
  color: #000;
  font-weight: 700;
}

.upgrade-box {
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  padding: 28px;
  margin-top: 24px;
}

.upgrade-box-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.upgrade-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.upgrade-benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

.upgrade-benefit::before {
  content: '✓';
  font-weight: 700;
  color: #10B981;
}

/* ────────────────────────────────────────────────────────────
   Comparison View
   ──────────────────────────────────────────────────────────── */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.scenario-card {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 28px;
}

.scenario-card.recommended {
  border-color: #000;
}

.scenario-label {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.scenario-winner {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.scenario-price {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.scenario-rationale {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

/* ────────────────────────────────────────────────────────────
   Dropdown / Context Menu
   ──────────────────────────────────────────────────────────── */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  min-width: 160px;
  z-index: 300;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.dropdown-menu.hidden {
  display: none;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.1s;
  font-family: inherit;
  text-decoration: none;
}

.dropdown-item:hover {
  background: #F5F5F5;
}

.dropdown-item.danger {
  color: #EF4444;
}

.dropdown-item.danger:hover {
  background: #FEF2F2;
}

.dropdown-divider {
  height: 1px;
  background: #E5E5E5;
  margin: 4px 0;
}

/* ────────────────────────────────────────────────────────────
   Footer
   ──────────────────────────────────────────────────────────── */
.footer {
  padding: 20px 32px;
  border-top: 1px solid #E5E5E5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  margin-top: auto;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #999;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #000;
}

/* ────────────────────────────────────────────────────────────
   Accordion (Help page)
   ──────────────────────────────────────────────────────────── */
.accordion-item {
  border: 1px solid #E5E5E5;
  margin-bottom: 8px;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s;
  background: #FFFFFF;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.accordion-header:hover {
  background: #FAFAFA;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.2s;
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}

.accordion-item.open .accordion-content {
  padding: 16px 20px 20px;
  max-height: 2000px;
}

/* ────────────────────────────────────────────────────────────
   Mobile / Responsive
   ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar {
    display: none;
  }

  .topbar {
    padding: 0 20px;
    gap: 16px;
  }

  .main-content {
    padding: 24px 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .form-layout {
    grid-template-columns: 1fr;
  }

  .progress-sidebar {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px;
  }

  .progress-step {
    flex-shrink: 0;
    flex-direction: column;
    padding: 8px 12px;
    font-size: 11px;
    gap: 4px;
    text-align: center;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .page-title-group h1,
  .page-title {
    font-size: 24px;
  }

  .ai-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-content {
    padding: 24px;
  }

  .card {
    padding: 20px;
  }

  .filters-bar {
    gap: 8px;
  }

  .tabs {
    gap: 4px;
  }

  .tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Mobile: table becomes cards */
  .table-responsive {
    display: none;
  }

  .card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .card-list-item {
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    padding: 16px;
  }
}

@media (max-width: 640px) {
  /* Bottom tab navigation for mobile */
  .mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #FFFFFF;
    border-top: 1px solid #E5E5E5;
    display: flex;
    align-items: stretch;
    z-index: 200;
  }

  .mobile-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #999;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s;
  }

  .mobile-tab-item.active {
    color: #000;
  }

  .mobile-tab-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
  }

  body {
    padding-bottom: 64px;
  }

  .topbar {
    padding: 0 16px;
  }

  .main-content,
  .main-content-centered,
  .main-content-wide {
    padding: 20px 16px;
  }

  .search-box {
    display: none;
  }

  .auth-box {
    padding: 28px 24px;
  }
}

/* ────────────────────────────────────────────────────────────
   Utility Classes
   ──────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-muted { color: #999; }
.text-danger { color: #EF4444; }
.text-success { color: #10B981; }
.text-warning { color: #F59E0B; }

.font-mono {
  font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
