/* Layoff Signal — styles.css */
/* App-first design: feels like a native mobile/PWA app */

:root {
  --primary: #0A0A0A;
  --secondary: #6B7280;
  --accent: #2563EB;
  --accent-light: #EFF6FF;
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  --success: #10B981;
  --success-light: #ECFDF5;
  --blue: #2563EB;
  --blue-light: #EFF6FF;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', sans-serif;
  color: var(--primary);
  background: var(--bg);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV BAR (sticky, app-style) ─────────────────────────────── */
nav {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(56px + var(--safe-top));
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--primary);
}

.signal-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

.nav-logo span {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--primary); }

/* ── BOTTOM TAB BAR (mobile only) ──────────────────────────────── */
.tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  z-index: 200;
}

.tab-bar-inner {
  display: flex;
  justify-content: space-around;
  padding: 8px 0 4px;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--secondary);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 8px;
  transition: color 0.15s;
  min-width: 60px;
}

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

.tab-item.active {
  color: var(--accent);
}

.tab-item.active svg {
  stroke-width: 2.25;
}

.tab-item-submit {
  color: var(--accent) !important;
}

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary:hover  { opacity: 0.85; }

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 0.55rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-secondary:active { transform: scale(0.97); }
.btn-secondary:hover  { background: var(--border); }

/* ── CARDS ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ── HERO ───────────────────────────────────────────────────────── */
.hero {
  padding: 2.5rem 1.25rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 1rem;
  color: var(--secondary);
  max-width: 480px;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── STATS STRIP ────────────────────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  max-width: calc(900px - 2.5rem);
  margin-left: auto;
  margin-right: auto;
}

.stat-cell {
  padding: 1.25rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  display: block;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

/* ── SECTION ────────────────────────────────────────────────────── */
.section {
  padding: 0 1.25rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

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

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── TABLE ──────────────────────────────────────────────────────── */
.table-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  background: #FAFAFA;
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--secondary);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.data-table th:hover { color: var(--primary); }
.data-table th.sorted { color: var(--primary); }

.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover td { background: #FAFAFA; }

.company-name { font-weight: 600; }
.role-secondary { font-size: 0.75rem; color: var(--secondary); margin-top: 1px; }

/* ── BADGES ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-green { background: var(--success-light); color: #059669; }
.badge-red   { background: #FEF2F2; color: #DC2626; } /* keep red for semantic "No" */
.badge-grey  { background: var(--bg);            color: var(--secondary); }

/* ── HOW IT WORKS ───────────────────────────────────────────────── */
.how-section {
  background: var(--surface);
  margin: 0 1.25rem 2rem;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  max-width: calc(900px - 2.5rem);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 769px) {
  .how-section {
    margin: 0 1.25rem 2rem;
  }
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.step { display: flex; flex-direction: column; gap: 0.6rem; }

.step-number {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step h3  { font-size: 0.9rem; font-weight: 700; }
.step p   { font-size: 0.8rem; color: var(--secondary); line-height: 1.55; }

/* ── SUBMIT FORM PAGE ───────────────────────────────────────────── */
.form-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 6rem; /* bottom pad for tab bar */
}

.form-page-header {
  margin-bottom: 1.25rem;
}
.form-page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}
.form-page-header p {
  color: var(--secondary);
  font-size: 0.9rem;
}

.privacy-notice {
  background: var(--blue-light);
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: var(--blue);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  line-height: 1.5;
}

.form-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 1rem;
}

.form-section {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.form-section:last-child { border-bottom: none; }

.form-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.form-group:last-child { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}
.label-opt { font-weight: 400; color: var(--secondary); }

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.875rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--primary);
  background: white;
  transition: border-color 0.15s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.checkbox-row:hover { background: var(--bg); }
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--primary);
  padding: 0;
  border: none;
  background: none;
}
.checkbox-row label {
  font-size: 0.875rem;
  cursor: pointer;
  font-weight: 500;
  flex: 1;
}

.form-submit-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
}
.form-submit-btn:hover  { opacity: 0.85; }
.form-submit-btn:active { transform: scale(0.98); }
.form-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── DATA PAGE ──────────────────────────────────────────────────── */
.data-page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 6rem;
}

.data-header {
  margin-bottom: 1.25rem;
}
.data-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}
.data-header p { color: var(--secondary); font-size: 0.875rem; }

.filters-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 0.6rem 0.875rem 0.6rem 2.25rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--surface);
}
.search-input:focus { outline: none; border-color: var(--primary); }

.filter-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--surface);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

.results-meta {
  font-size: 0.8rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}

.load-more-wrap {
  text-align: center;
  padding: 1.5rem 0 0;
}

/* ── ALERTS ─────────────────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.alert-success { background: var(--success-light); color: #059669; border: 1px solid #A7F3D0; }
.alert-error   { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

/* ── HERO BANNER (blue gradient) ────────────────────────────────── */
.hero-banner {
  background: linear-gradient(155deg, #0d1f52 0%, #1a3580 45%, #2563eb 100%);
  padding: 4rem 1.5rem 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative background circles */
.hero-banner::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.hero-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.hero-logo-wrap {
  margin-bottom: 2.25rem;
  display: flex;
  justify-content: center;
}

.hero-logo-wrap img,
.hero-logo-wrap svg {
  height: 68px;
  width: auto;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.25));
}

.hero-headline {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  color: white;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 1rem;
}

.hero-subtext {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  max-width: 480px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.hero-banner-cta {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-solid {
  background: white;
  color: #1a3580;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-hero-solid:hover  { opacity: 0.92; }
.btn-hero-solid:active { transform: scale(0.97); }

.btn-hero-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.38);
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-hero-outline:hover  { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }
.btn-hero-outline:active { transform: scale(0.97); }

/* Stats strip sits right below the blue hero */
.stats-strip { margin-top: 0; border-radius: 0 0 16px 16px; }

@media (max-width: 480px) {
  .hero-banner-cta { flex-direction: column; align-items: center; }
  .btn-hero-solid, .btn-hero-outline { width: 100%; justify-content: center; }
  .hero-logo-wrap img, .hero-logo-wrap svg { height: 54px; }
}

/* ── COMPANY AUTOCOMPLETE ───────────────────────────────────────── */
.autocomplete-wrap {
  position: relative;
}

.suggestions-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 100;
  list-style: none;
  padding: 0.3rem 0;
  margin: 0;
  max-height: 220px;
  overflow-y: auto;
}

.suggestions-list li {
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.1s;
  border-radius: 6px;
  margin: 0 0.25rem;
}
.suggestions-list li:hover,
.suggestions-list li.active {
  background: var(--accent-light);
  color: var(--accent);
}

/* ── FUZZY MATCH BANNER ─────────────────────────────────────────── */
.fuzzy-banner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding: 0.6rem 0.875rem;
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #92400E;
}

.fuzzy-accept-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.fuzzy-accept-btn:hover { opacity: 0.8; }

.fuzzy-dismiss-btn {
  background: none;
  border: none;
  padding: 0;
  color: #92400E;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.7;
  font-family: inherit;
  margin-left: auto;
}
.fuzzy-dismiss-btn:hover { opacity: 1; }

/* ── EMPTY / LOADING ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--secondary);
}
.empty-state h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--primary); }
.empty-state p  { font-size: 0.875rem; }

.loading-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--secondary);
  font-size: 0.875rem;
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  color: var(--secondary);
  font-size: 0.75rem;
  line-height: 1.8;
}
footer a { color: inherit; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Show bottom tab bar, hide nav links */
  .tab-bar { display: block; }
  .nav-links { display: none; }

  /* Body needs padding for tab bar */
  body { padding-bottom: calc(64px + var(--safe-bottom)); }

  .hero { padding: 1.5rem 1.25rem 1.5rem; }
  .hero h1 { font-size: 2rem; }

  .form-row { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }

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

  /* Table: scroll horizontally */
  .table-card { overflow-x: auto; }
  .data-table th, .data-table td { padding: 0.7rem 0.875rem; }

  /* Stats strip */
  .stat-value { font-size: 1.4rem; }

  /* Filters */
  .filter-select { flex: 1; min-width: 120px; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary { width: 100%; justify-content: center; }
}
