:root {
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #f8fbff;
  --ink: #112033;
  --muted: #607186;
  --line: rgba(17, 32, 51, 0.1);
  --brand: #153a72;
  --brand-deep: #0f2744;
  --accent: #57a6ff;
  --job: #9b5b10;
  --job-soft: #fff2df;
  --shadow: 0 24px 60px rgba(15, 39, 68, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(87, 166, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(21, 58, 114, 0.12), transparent 22%),
    linear-gradient(180deg, #f4f8fc 0%, #e8eef6 100%);
}

body.locked {
  overflow: hidden;
}

.page-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(11, 27, 48, 0.88), rgba(9, 24, 42, 0.78)),
    url("./assets/field-photo.jpg") center / cover;
}

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

.auth-card {
  width: min(100%, 470px);
  padding: 28px 24px;
  border-radius: 28px;
  background: rgba(248, 251, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 28px 70px rgba(6, 15, 26, 0.3);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-logo {
  width: 124px;
  max-width: 36vw;
  height: auto;
}

.auth-card h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 6vw, 34px);
  line-height: 1.12;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.auth-eyebrow {
  color: var(--brand);
}

.auth-copy {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.auth-form label,
.search-helper,
.search-kicker,
.status-text,
.summary-card span,
.detail-item span,
.notes-text,
.login-message {
  color: var(--muted);
}

.search-label {
  color: var(--ink);
}

.auth-form input,
.auth-form button,
.search-box input,
.search-box button,
.filter-chip {
  min-height: 54px;
  border-radius: 18px;
  border: 0;
  font-size: 16px;
}

.auth-form input,
.search-box input {
  padding: 0 18px;
  background: white;
  color: var(--ink);
  outline: 2px solid transparent;
}

.auth-form input:focus,
.search-box input:focus {
  outline-color: rgba(87, 166, 255, 0.4);
}

.auth-form button,
.logout-button {
  background: linear-gradient(135deg, var(--brand), #29579e);
  color: white;
  font-weight: 700;
}

.login-message {
  min-height: 21px;
  margin: 2px 2px 0;
  font-size: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: url("./assets/field-photo.jpg") center center / cover;
  transform: scale(1.03);
}

.hero-overlay {
  background:
    linear-gradient(120deg, rgba(10, 25, 45, 0.84), rgba(20, 55, 101, 0.72) 56%, rgba(24, 76, 142, 0.56)),
    linear-gradient(180deg, transparent 0%, rgba(10, 24, 42, 0.24) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  padding: 22px;
  color: #f4f9ff;
}

.hero-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(5, 14, 25, 0.18);
}

.brand-logo {
  display: block;
  width: min(260px, 56vw);
  height: auto;
}

.logout-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.hero-copy-group {
  margin-top: auto;
  max-width: 640px;
}

.hero h1 {
  margin: 10px 0 0;
  font-size: clamp(32px, 7vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 580px;
  color: rgba(244, 249, 255, 0.9);
  line-height: 1.7;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-notes span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

.search-panel,
.summary-card,
.result-card {
  backdrop-filter: blur(16px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.search-panel {
  margin-top: 18px;
  padding: 20px;
  border-radius: 26px;
}

.search-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.search-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.search-label {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.search-helper {
  margin: 0;
  font-size: 13px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-box button {
  padding: 0 18px;
  background: linear-gradient(135deg, #1d4f96, #2f73d2);
  color: white;
  font-weight: 700;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  min-height: 42px;
  padding: 0 14px;
  background: #edf3fb;
  color: #36506e;
  font-size: 14px;
  font-weight: 700;
}

.filter-chip.active {
  background: var(--brand-deep);
  color: white;
}

.status-text {
  margin: 12px 4px 0;
  min-height: 21px;
  font-size: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.summary-card {
  border-radius: 22px;
  padding: 18px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  color: var(--brand-deep);
}

.summary-job strong {
  color: var(--job);
}

.results {
  display: grid;
  gap: 14px;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 26px;
}

.result-card.job_notice {
  background: linear-gradient(180deg, rgba(255, 248, 239, 0.92), rgba(255, 255, 255, 0.82));
}

.card-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--brand);
}

.result-card.job_notice .card-accent {
  background: linear-gradient(180deg, #c37b24, #8c5510);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-badge,
.sub-badge,
.meta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.service-badge {
  background: rgba(21, 58, 114, 0.12);
  color: var(--brand);
}

.result-card.job_notice .service-badge {
  background: rgba(195, 123, 36, 0.12);
  color: var(--job);
}

.sub-badge {
  background: rgba(87, 166, 255, 0.12);
  color: #1458a5;
}

.meta-badge {
  background: rgba(17, 32, 51, 0.06);
  color: #3c4f66;
}

.company-name {
  margin: 10px 0 0;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-strong);
}

.result-card.job_notice .detail-item {
  background: var(--job-soft);
}

.detail-item span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.detail-item strong,
.notes-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
  white-space: pre-line;
}

.notes-block {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.notes-block.hidden {
  display: none;
}

.notes-block summary {
  cursor: pointer;
  font-weight: 700;
}

.empty-state {
  padding: 30px 22px;
  border: 1px dashed rgba(17, 32, 51, 0.18);
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

@media (max-width: 720px) {
  .page-shell {
    padding: 16px 12px 48px;
  }

  .auth-brand,
  .hero-topbar,
  .search-heading,
  .card-top {
    flex-direction: column;
  }

  .hero {
    min-height: 420px;
  }

  .hero-content {
    min-height: 420px;
    padding: 18px;
  }

  .brand-badge {
    width: fit-content;
  }

  .summary-grid,
  .detail-grid,
  .search-box {
    grid-template-columns: 1fr;
  }

  .company-name {
    font-size: 22px;
  }
}
