:root {
  color-scheme: light;
  --ink: #101827;
  --muted: #657187;
  --line: #ded7ce;
  --line-strong: #d2c8bc;
  --paper: #ffffff;
  --bg: #fbf6ee;
  --cream: #fffaf3;
  --accent: #e96f3d;
  --accent-dark: #bd4d27;
  --accent-soft: #fff0e7;
  --warn: #a24622;
  --shadow: 0 26px 70px rgb(86 64 42 / 10%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgb(241 184 108 / 30%), transparent 28rem),
    linear-gradient(90deg, #fbf3e8 0%, #fffefa 35%, #ffffff 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.site-header {
  width: min(1140px, calc(100% - 32px));
  height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #111;
  box-shadow: 0 10px 30px rgb(56 38 24 / 10%);
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.3;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.secure-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.secure-note::before {
  content: "lock";
  margin-right: 6px;
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 0.78rem;
}

.page {
  width: min(820px, calc(100% - 32px));
  margin: 30px auto 64px;
}

.schedule-page {
  width: min(880px, calc(100% - 32px));
}

.intro {
  margin: 0 auto 30px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}

.intro p {
  margin: 0;
}

.schedule-intro {
  display: grid;
  gap: 10px;
}

.schedule-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.15;
}

.intro strong {
  color: var(--accent-dark);
  font-weight: 900;
}

.form-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

form {
  display: grid;
}

.form-section {
  display: grid;
  gap: 26px;
  padding: 36px 32px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 82%);
}

.form-section:nth-of-type(even) {
  background: var(--cream);
}

.section-heading {
  display: grid;
  gap: 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 1.8rem);
  line-height: 1.25;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

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

label {
  display: grid;
  gap: 9px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

label b,
legend b {
  color: var(--accent-dark);
}

label small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.6;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

textarea {
  min-height: 126px;
  resize: vertical;
  line-height: 1.65;
}

input::placeholder,
textarea::placeholder {
  color: #8b93a3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 4px rgb(233 111 61 / 14%);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

legend {
  padding: 0;
  font-size: 0.92rem;
  font-weight: 850;
}

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

.choice-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  padding: 0 10px;
  color: var(--ink);
  font-weight: 850;
  text-align: center;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice:has(input:checked) span {
  color: var(--accent-dark);
}

.submit-area {
  display: grid;
  gap: 18px;
  padding: 28px 32px 36px;
  background: #fff;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.7;
}

.check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 3px;
}

.message {
  min-height: 24px;
  color: var(--warn);
  font-weight: 800;
}

button,
.secondary,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 8px;
  padding: 0 20px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
}

.submit-button {
  width: 100%;
  min-height: 58px;
  font-size: 1.03rem;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary,
.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.secondary:hover,
.secondary-button:hover {
  background: var(--cream);
}

.shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px 16px;
}

.login-panel {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 42px);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form button {
  width: 100%;
}

.shell.compact .form-panel {
  margin-top: 8vh;
}

.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 40px);
}

.lead {
  margin: 16px 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.done h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4rem);
}

.done h2 {
  margin-top: 0;
}

.next {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.next li + li {
  margin-top: 8px;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.admin-shell.wide {
  width: min(1540px, calc(100% - 20px));
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.admin-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.admin-search-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-search-row input {
  width: min(260px, 100%);
}

.admin-search-row button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 0.88rem;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.filter-tab {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid #d5cabe;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--muted);
  box-shadow: none;
  font-size: 0.84rem;
}

.filter-tab:hover,
.filter-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.admin-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgb(86 64 42 / 8%);
  scrollbar-width: thin;
}

.admin-filters input,
.admin-filters select {
  flex: 0 0 156px;
  min-height: 38px;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.admin-filters input[type="hidden"] {
  display: none;
}

.admin-filters #keyword {
  flex-basis: 240px;
}

.admin-filters #interviewDate {
  flex-basis: 150px;
}

.admin-help {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-stats {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.stats-details {
  display: inline-block;
}

.stats-details summary {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(86 64 42 / 7%);
  cursor: pointer;
  list-style: none;
}

.stats-details summary::-webkit-details-marker {
  display: none;
}

.stats-details span,
.stat-card span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.stats-details strong,
.stat-card strong {
  color: var(--accent-dark);
  font-size: 2.1rem;
  line-height: 1;
}

.stats-details small,
.stat-card small {
  margin-left: 2px;
  font-size: 1rem;
}

.stats-details em {
  color: var(--muted);
  font-size: 1rem;
  font-style: normal;
  font-weight: 800;
}

.stats-details[open] em {
  transform: rotate(180deg);
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.stat-card.mini {
  display: grid;
  gap: 6px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.stat-card.mini strong {
  font-size: 1.7rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  max-height: calc(100vh - 260px);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.applicant-table {
  min-width: 2280px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 0.82rem;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #8f5b3e;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.applicant-table td {
  white-space: nowrap;
}

.applicant-table th:first-child,
.applicant-table td:first-child {
  position: sticky;
  left: 0;
}

.applicant-table th:first-child {
  z-index: 3;
}

.applicant-table td:first-child {
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}

.applicant-table .question-cell {
  min-width: 220px;
  max-width: 300px;
  white-space: normal;
  line-height: 1.6;
}

.number-cell {
  text-align: right;
}

a {
  color: var(--accent-dark);
}

.row-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.secondary-row-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-dark);
  box-shadow: none;
}

.row-reminder-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.row-reminder-control select {
  min-height: 34px;
  width: 86px;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
}

.result-control {
  display: grid;
  gap: 7px;
  min-width: 240px;
}

.result-control > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.result-control > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.flag-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: #fff;
  color: var(--muted);
  box-shadow: none;
  font-size: 0.72rem;
}

.flag-button.active,
.flag-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.meeting-link {
  font-weight: 900;
}

.meet-url {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.invite-dialog {
  width: min(520px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 80px rgb(56 38 24 / 20%);
}

.invite-dialog::backdrop {
  background: rgb(16 24 39 / 42%);
}

.invite-dialog-inner {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.invite-dialog header,
.invite-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.invite-dialog h2,
.dialog-lead {
  margin: 0;
}

.dialog-lead {
  color: var(--muted);
  line-height: 1.7;
}

.icon-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  box-shadow: none;
  font-size: 0.82rem;
}

.staff-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.staff-checks label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

.staff-checks input {
  width: 16px;
  min-height: 16px;
  margin-right: 8px;
}

.schedule-card .form-section {
  border-bottom: 0;
}

.schedule-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}

.schedule-summary div {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.schedule-summary div:last-child {
  border-right: 0;
}

.schedule-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.schedule-summary strong {
  font-size: 1rem;
}

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

.slot-button {
  min-height: 82px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

.slot-button span {
  font-size: 0.98rem;
}

.slot-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.slot-button small {
  color: var(--muted);
  font-weight: 700;
}

.booking-complete {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.booking-complete h2,
.booking-complete p {
  margin: 0;
}

.empty {
  margin: 0;
  padding: 20px;
}

@media (max-width: 760px) {
  .site-header {
    height: auto;
    padding: 14px 0;
  }

  .secure-note {
    display: none;
  }

  .page {
    margin-top: 22px;
  }

  .intro {
    text-align: left;
  }

  .form-section,
  .submit-area {
    padding: 26px 18px;
  }

  .grid,
  .choice-grid,
  .choice-grid.compact,
  .choice-grid.two,
  .schedule-summary,
  .slot-list,
  .staff-checks,
  .admin-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .admin-actions {
    display: grid;
    justify-items: stretch;
  }

  .admin-search-row,
  .admin-stats {
    justify-content: stretch;
  }

  .admin-search-row input,
  .admin-search-row button,
  .stats-details,
  .stats-details summary {
    width: 100%;
  }
}
