:root {
  --orange: #f47b26;
  --blue: #005bea;
  --dark: #111827;
  --dark-2: #1f2937;
  --muted: #6b7280;
  --light: #f9fafb;
  --card: #ffffff;
  --border: #e5e7eb;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --success-border: #a7f3d0;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --error-border: #fecaca;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 123, 38, 0.12), transparent 28rem),
    radial-gradient(circle at top right, rgba(0, 91, 234, 0.10), transparent 28rem),
    var(--light);
  color: var(--dark);
}

.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
  color: white;
  border-radius: 28px;
  padding: 32px;
  margin-bottom: 22px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 55px rgba(17, 24, 39, 0.18);
}

.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -90px;
  background: var(--orange);
  opacity: 0.25;
  border-radius: 999px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f9fafb;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  letter-spacing: -0.07em;
  line-height: 0.92;
  position: relative;
  z-index: 1;
}

.hero p {
  margin: 0;
  color: #d1d5db;
  font-size: 1.12rem;
  max-width: 760px;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.04);
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.instructions ul {
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.name-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.name-pill {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.9rem;
  font-weight: 700;
}

.employee-info {
  display: grid;
  grid-template-columns: 1fr 1fr 220px;
  gap: 12px;
  margin-bottom: 20px;
}

.employee-info label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-size: 1rem;
  background: white;
  color: var(--dark);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.03);
}

input:focus,
select:focus {
  outline: 3px solid rgba(0, 91, 234, 0.16);
  border-color: var(--blue);
}

input::placeholder {
  color: #9ca3af;
}

.edit-link-box {
  display: none;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.edit-link-box.show {
  display: block;
}

.edit-link-box strong {
  display: block;
  margin-bottom: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.06);
}

.photo {
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(135deg, #e5e7eb, #f3f4f6);
  overflow: hidden;
  position: relative;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(17, 24, 39, 0.92);
  color: white;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: bold;
  font-size: 0.85rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 14px;
}

.clues {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.status {
  display: none;
  margin: 18px 0;
  padding: 14px;
  border-radius: 16px;
  line-height: 1.45;
  font-weight: 700;
}

.status.show {
  display: block;
}

.status.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.status.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.loading {
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}

.submit-bar {
  position: sticky;
  bottom: 0;
  background: rgba(249, 250, 251, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  margin: 28px -24px -24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 20;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: white;
  padding: 14px 24px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(244, 123, 38, 0.25);
}

button.secondary {
  background: var(--dark);
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.20);
}

button:hover {
  filter: brightness(0.96);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .employee-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wrap {
    padding: 18px;
  }

  .hero {
    border-radius: 22px;
    padding: 26px;
  }

  .submit-bar {
    margin-left: -18px;
    margin-right: -18px;
    margin-bottom: -18px;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding: 14px;
  }

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

  .panel {
    border-radius: 18px;
  }

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

  .submit-bar {
    margin-left: -14px;
    margin-right: -14px;
    margin-bottom: -14px;
  }

  button {
    width: 100%;
  }
}

.recover-box {
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.6fr);
  gap: 18px;
  align-items: end;
  box-shadow: 0 12px 28px rgba(30, 58, 138, 0.08);
}

.recover-copy strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 5px;
}

.recover-copy p {
  margin: 0;
  line-height: 1.4;
  font-weight: 700;
  color: #1d4ed8;
}

.recover-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
}

.recover-actions label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e3a8a;
}

.recover-actions input {
  background: white;
  border-color: #bfdbfe;
}

.recover-actions button {
  white-space: nowrap;
  min-height: 48px;
  padding-left: 22px;
  padding-right: 22px;
}

@media (max-width: 900px) {
  .recover-box {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .recover-actions {
    grid-template-columns: 1fr 1fr;
  }

  .recover-actions button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .recover-box {
    padding: 16px;
  }

  .recover-actions {
    grid-template-columns: 1fr;
  }
}

.hidden-button {
  display: none !important;
}

.recover-box {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-left: 6px solid #005bea;
  color: #111827;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.6fr);
  gap: 18px;
  align-items: end;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
}

.recover-copy strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 5px;
  color: #0f172a;
}

.recover-copy p {
  margin: 0;
  line-height: 1.4;
  font-weight: 700;
  color: #475569;
}

.recover-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
}

.recover-actions label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
}

.recover-actions button {
  white-space: nowrap;
  min-height: 48px;
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 900px) {
  .recover-box {
    grid-template-columns: 1fr;
  }

  .recover-actions {
    grid-template-columns: 1fr 1fr;
  }

  .recover-actions button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .recover-actions {
    grid-template-columns: 1fr;
  }
}
