/* =========================================================
   INFLIBNET Online Recruitment System — v4
   Editorial notice-board style: cream paper background, a
   solid navy masthead, deep navy + orange accents sampled
   from the INFLIBNET logo, card-grid advertisement posts.
   ========================================================= */

:root {
  --paper: #f5f6f9;
  --paper-raised: #ffffff;
  --paper-sunk: #eef0f6;
  --line: #d7dbe6;
  --line-soft: #e6e9f0;

  --ink: #1a1d29;
  --ink-soft: #4d5266;
  --ink-faint: #82869c;

  /* sampled from the INFLIBNET logo: navy globe + text, orange "I" mark */
  --teal: #12276b;
  --teal-deep: #0a1a4c;
  --teal-wash: #e6eaf5;

  --amber: #e8720f;
  --amber-deep: #b8590a;
  --amber-wash: #fdeee0;

  --good: #2f6b3a;
  --good-wash: #e7f0e5;
  --urgent: #c23a17;
  --urgent-wash: #fbe8e0;

  --font-serif: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

/* Guarantee [hidden] always wins over component display rules (flex/grid, etc.) */
[hidden] { display: none !important; }

html { overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page-backdrop { flex: 1; }

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

.font-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.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;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 999;
  background: var(--teal-deep);
  color: #fff;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 0 0 6px 0;
}

.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Utility strip ---------- */
.utility-strip {
  background: var(--teal-deep);
  color: #cfe3df;
  font-size: 0.76rem;
  padding: 6px 0;
}

.utility-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.utility-inner a { color: #fff; font-weight: 600; }
.utility-inner a:hover { color: var(--amber); }

/* ---------- Masthead ---------- */
.masthead {
  background: var(--teal);
  border-bottom: 4px solid var(--amber);
  padding: 18px 0;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

.brand-mark {
  width: 68px;
  height: 68px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.brand-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 4px;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: #cfd6ec;
  margin: 3px 0 0;
}

.topnav { display: flex; gap: 10px; }

.btn-ghost {
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

.btn-solid {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  background: var(--amber);
  color: #fff;
  transition: background-color 0.15s ease;
}

.btn-solid:hover { background: var(--amber-deep); color: #fff; }

.btn-ghost,
.btn-solid {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  line-height: 1.2;
}

button.btn-solid,
button.btn-ghost {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

.topnav-logout-form { margin: 0; }

/* ---------- Page ---------- */
.page-backdrop {
  position: relative;
  background: url("../images/bg1.jpg") center 22% / cover fixed no-repeat;
}

.page-backdrop-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(245, 246, 249, 0.2) 0%, rgba(245, 246, 249, 0.35) 100%);
}

.page {
  position: relative;
  padding: 32px 0 60px;
}

/* Section header */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--teal);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(10, 26, 76, 0.04), 0 10px 22px -16px rgba(10, 26, 76, 0.25);
}

.section-header h1,
.section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 0;
}

.text-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-deep);
}

.text-link:hover { color: var(--amber); }

/* ---------- Advertisement ---------- */
.notice {
  background: rgba(255, 255, 255, 0.94);
  margin-bottom: 36px;
  padding: 16px 20px 20px;
  border-radius: 4px;
}

.notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--teal);
}

.notice-head h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 0;
}

.btn-details {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  padding: 6px 16px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-details:hover {
  background: var(--teal);
  color: #fff;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.chip-open { background: var(--good-wash); color: var(--good); }
.chip-urgent { background: var(--urgent-wash); color: var(--urgent); margin-left: 8px; }

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Post table */
.post-table-scroll {
  overflow-x: auto;
}

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

.post-table thead th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-align: left;
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.post-table thead th:first-child { padding-left: 6px; }

.post-table tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.88rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.post-table tbody td:first-child { padding-left: 6px; }
.post-table thead th:last-child,
.post-table tbody td:last-child { padding-left: 28px; width: 1%; }
.post-table tbody tr:last-child td { border-bottom: none; }

.post-table tbody tr { transition: background-color 0.15s ease; }
.post-table tbody tr:hover { background: var(--paper-sunk); }
.post-table tbody tr.is-urgent { background: var(--urgent-wash); }
.post-table tbody tr.is-urgent:hover { background: #f8ddcf; }

.post-table .post-name {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  white-space: normal;
}

.post-table .chip { margin-left: 8px; vertical-align: middle; }

/* Educational Details table — mirrors the legacy application_form.php
   SSC/HSC/Bachelor/Master/PhD grid, but requiredness is data-driven off
   the post record instead of hardcoded post-ID checks. */
.edu-table-hint { margin: 0 0 4px; }

.edu-or-hint {
  padding: 8px 12px;
  margin: 0 0 10px;
  background: var(--amber-wash);
  color: var(--amber-deep);
  border-radius: 6px;
}

.edu-table-scroll {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.edu-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.edu-table thead th {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  text-align: left;
  padding: 10px 6px;
  background: var(--paper-sunk);
  border-bottom: 1px solid var(--line);
  white-space: normal;
  line-height: 1.3;
}

.edu-table tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.edu-table tbody tr:last-child td { border-bottom: none; }
.edu-table tbody tr:hover { background: var(--paper-sunk); }

.edu-table tbody td input,
.edu-table tbody td select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 6px;
}

.edu-table tbody td input[type="file"] {
  padding: 5px 2px;
  font-size: 0.72rem;
}

.edu-table tbody td input:focus,
.edu-table tbody td select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-wash);
}

.edu-readonly {
  background: var(--paper-sunk) !important;
  color: var(--ink-soft) !important;
}

.edu-row-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.edu-post-requirements {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.edu-post-req-row {
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.edu-post-req-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}

/* Experience Details — mirrors legacy application_form.php's expr_table
   (Organisation/Position/From-To/Experience/Nature of Duties/Pay Scale/
   Type of Organisation/Certificate), but each entry renders as a two-line
   card instead of one cramped 9-column table row, so every field has
   enough width to actually show what's typed into it. Rows are added by
   cloning a <template> instead of ten pre-rendered PHP row blocks. */
.expr-note {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #fff4f2;
  border: 1px solid #ffd4cc;
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #b3261e;
}

.expr-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.expr-row {
  padding: 10px 14px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20, 24, 44, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.expr-row:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-wash);
}

.expr-row-line1 {
  display: grid;
  grid-template-columns: 30px 1.2fr 1fr 1.4fr 1fr;
  gap: 10px;
  align-items: start;
}

.expr-row-line1 > *,
.expr-row-line2 > * {
  min-width: 0;
}

.expr-row-line1 input,
.expr-row-line1 select,
.expr-row-line2 input,
.expr-row-line2 select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.expr-row-line2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.expr-row .form-field {
  gap: 3px;
}

.expr-row .form-field label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.expr-row .form-field input,
.expr-row .form-field select {
  padding: 7px 10px;
  font-size: 0.84rem;
}

.expr-row .form-field input[type="file"] {
  padding: 5px 8px;
  font-size: 0.76rem;
}

.expr-row-num-field {
  align-items: center;
}

.expr-row-num-field label { visibility: hidden; }

.expr-row-num-field .edu-row-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--teal-wash);
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
}

.expr-daterow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.expr-daterow .expr-from,
.expr-daterow .expr-to {
  flex: 1 1 0;
  min-width: 0;
}

.expr-current-check {
  display: flex;
  align-items: center;
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.expr-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.expr-total {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--teal-deep);
}

.expr-actions-cell { display: flex; gap: 10px; }

.expr-govt-field { max-width: 320px; margin-top: 20px; }

.btn-apply {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--amber);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 0 4px 12px -4px rgba(232, 114, 15, 0.55);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-apply:hover {
  background: var(--amber-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgba(232, 114, 15, 0.65);
}

.notice-note {
  font-size: 0.8rem;
  color: var(--ink-faint);
  padding-top: 12px;
  margin: 0;
}

.dash-empty-note {
  text-align: center;
  padding: 32px 12px;
  font-size: 0.9rem;
}

/* ---------- Query ---------- */
.query {
  margin-top: 30px;
  padding: 22px;
  background: var(--teal-wash);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.query h2 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 0 0 14px;
}

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

.query-list > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.query-list dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
}

.query-list dd {
  font-size: 0.9rem;
  color: var(--ink);
  margin: 0;
  overflow-wrap: anywhere;
}

/* ---------- Dashboard ---------- */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(10, 26, 76, 0.04), 0 10px 22px -16px rgba(10, 26, 76, 0.25);
}

.dash-eyebrow { color: var(--amber-deep); margin-bottom: 6px; }

.dash-welcome h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin: 0 0 4px;
}

.dash-sub {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin: 0;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}

.dash-stat {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-stat-value {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dash-stat-warn .dash-stat-value { color: var(--amber-deep); }

.dash-stat-label {
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.chip-review { background: var(--amber-wash); color: var(--amber-deep); }
.chip-rejected { background: var(--urgent-wash); color: var(--urgent); }

.dash-profile {
  margin-top: 30px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.dash-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-profile-head h2 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 0;
}

.dash-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-profile-list dd { overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-deep);
  color: #cfe3df;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}

.care-note {
  font-size: 0.8rem;
  margin: 0;
  max-width: 60ch;
}

.visitor-note {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin: 0;
}

/* ---------- Login ---------- */
.login-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  padding: 32px 32px 28px;
  box-shadow: 0 1px 2px rgba(10, 26, 76, 0.05), 0 24px 44px -24px rgba(10, 26, 76, 0.4);
}

.login-card-wide { max-width: 560px; }

.device-list {
  margin: 4px 0 24px;
  padding: 4px 0 0;
  border-top: 1px solid var(--line-soft);
}

.device-list .login-eyebrow { margin-top: 16px; }

.device-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.device-item:last-child { border-bottom: none; }

.device-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--paper-sunk);
  color: var(--teal);
}

.device-info { min-width: 0; }

.device-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.device-meta {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.form-field-span2 { grid-column: span 2; }

.form-hint {
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin: -8px 0 0;
}

.login-card-head { margin-bottom: 24px; }

.login-eyebrow { color: var(--amber-deep); margin-bottom: 8px; }

.login-card-head h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin: 0 0 8px;
}

.login-sub {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.form-field input,
.form-field select,
.form-field textarea {
  /* Without an explicit width these size to their intrinsic default (~20
     characters) and overflow a narrow container instead of shrinking. */
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

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

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2382869c'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%2382869c' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 38px;
}

.form-field select:disabled {
  background-image: none;
  background-color: var(--paper-sunk);
  color: var(--ink-faint);
  cursor: not-allowed;
}

.form-field input[type="file"] {
  padding: 9px 14px;
  font-size: 0.85rem;
}

.form-field input[type="date"] { color: var(--ink); }

.form-field input[type="checkbox"],
.form-field input[type="radio"] {
  width: auto;
  min-width: 0;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-faint); }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-wash);
}

.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--urgent);
  background: var(--urgent-wash);
}

.form-field input.is-invalid:focus,
.form-field select.is-invalid:focus,
.form-field textarea.is-invalid:focus {
  border-color: var(--urgent);
  box-shadow: 0 0 0 3px var(--urgent-wash);
}

.invalid-feedback {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--urgent);
  line-height: 1.3;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.form-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.form-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.btn-login-submit {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.92rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px -4px rgba(232, 114, 15, 0.55);
}

.btn-login-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  box-shadow: none;
}

.login-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-foot p {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin: 0;
}

.login-foot .font-mono { color: var(--ink-soft); overflow-wrap: anywhere; }

/* ---------- Apply form ---------- */
.apply-context {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.apply-required-note {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0 0 20px;
}

.req-mark { color: var(--urgent); }

.apply-subhead {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin: 8px 0 -2px;
}

.apply-subhead-note {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-faint);
}

.field-hint {
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin: 2px 0 0;
}

.field-hint-warn { color: var(--urgent); }

.field-error {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--urgent);
  margin: 2px 0 0;
  min-height: 0;
}

.field-error:empty { display: none; }

.admin-post-code {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--teal-deep);
  background: var(--teal-wash);
  padding: 4px 12px;
  border-radius: 6px;
}

.admin-req-intro {
  margin: -2px 0 14px;
}

.admin-requirements {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-req-row {
  padding: 12px 16px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-req-check {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.admin-req-row-dynamic {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-req-row-dynamic .form-grid { margin: 0; }

.admin-req-notes-field { margin: 0; }

.admin-req-row-dynamic .admin-req-remove {
  align-self: flex-end;
}

.admin-skill-test-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-skill-test-fields:not(:empty) {
  padding: 12px;
  background: var(--paper-raised);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.admin-skill-field-row {
  background: var(--paper);
}

.admin-req-row-invalid {
  border-color: var(--urgent);
  background: var(--urgent-wash);
}

.admin-req-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-req-add { flex-shrink: 0; }

.admin-req-quickadd {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.admin-req-quickadd-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin-right: 2px;
}

.admin-req-chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-deep);
  background: var(--teal-wash);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-req-chip:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.admin-req-chip:before {
  content: "+ ";
}

.admin-req-exemption {
  margin-top: 14px;
}

.admin-req-exemption .field-hint { margin-top: 6px; }

.admin-degree-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-degree-card .form-grid { margin: 0; }

.admin-degree-req-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-degree-req-row .form-grid { margin: 0; }

/* Match Select2's chrome to the form's own inputs. */
.select2-container--default .select2-selection--multiple {
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  min-height: 44px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: var(--teal);
  background: #fff;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--teal-wash);
  border: 1px solid var(--teal);
  border-radius: 4px;
  color: var(--teal-deep);
  font-size: 0.82rem;
  padding: 2px 8px;
  margin: 3px 4px 3px 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--teal-deep);
  margin-right: 5px;
  font-weight: 700;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--teal);
}

.select2-dropdown {
  border-color: var(--line);
  border-radius: 6px;
}

.select2-container--default .select2-results__group {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* jQuery Validation marks the hidden native select, so show the error state
   on the Select2 box the user actually sees. */
.degree-req-degrees.is-invalid + .select2-container .select2-selection--multiple {
  border-color: var(--urgent);
}

.admin-degree-req-remove { align-self: flex-start; }
.admin-degree-or-field {
  padding: 12px 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-degree-or-field .field-hint { margin-top: 6px; }

.admin-description-box {
  padding: 12px 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-description-box p { margin: 0; }
.admin-description-box p + p { margin-top: 6px; white-space: pre-line; }

.admin-age-conditions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}

.admin-age-notes-field { margin: 0; }

.admin-age-inflibnet-field {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: var(--amber-wash);
  border-radius: 6px;
}

.admin-age-conditions .form-check:has(input:disabled),
.admin-age-inflibnet-field .form-check:has(input:disabled) {
  opacity: 0.5;
}

.admin-age-service-field {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: var(--paper-sunk);
  border-radius: 6px;
}

.admin-caste-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.admin-caste-check {
  padding: 9px 12px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.apply-context-post {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-deep);
}

.apply-form-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(10, 26, 76, 0.05), 0 24px 44px -24px rgba(10, 26, 76, 0.4);
  overflow: hidden;
}

.apply-tabs {
  display: flex;
  overflow-x: auto;
  background: var(--paper-sunk);
  border-bottom: 1px solid var(--line);
}

.apply-tab {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.apply-tab:hover { color: var(--teal); background: rgba(18, 39, 107, 0.04); }

.apply-tab.is-active {
  color: var(--teal-deep);
  border-bottom-color: var(--amber);
  background: var(--paper-raised);
}

.apply-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.apply-tab.is-active .apply-tab-num { background: var(--teal); color: #fff; }

.apply-form { padding: 28px 32px 32px; }

.apply-step { display: flex; flex-direction: column; gap: 18px; }

.apply-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

/* Keeps "Save as Draft" and "Submit" together on the right. */
.apply-step-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.apply-step-actions-end { justify-content: flex-end; }

.btn-step-next,
.btn-step-prev { width: auto; }

/* ---------- Admin panel ---------- */
.admin-body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

/* Admin masthead: top nav bar, no sidebar */
.admin-masthead {
  background: var(--teal-deep);
  border-bottom: 4px solid var(--amber);
}

.admin-masthead-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 32px;
}

.admin-masthead-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.admin-brand-mark { width: 38px; height: 38px; flex-shrink: 0; }

.admin-brand-title {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.admin-brand-subtitle {
  font-size: 0.72rem;
  color: #9aa4c7;
  margin: 0;
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 10px;
  border-bottom: 2px solid transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cfd6ec;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.admin-nav-label { white-space: nowrap; }

.admin-nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #8b95c2;
  transition: color 0.15s ease;
}

.admin-nav-link:hover { color: #fff; }
.admin-nav-link:hover .admin-nav-icon { color: #fff; }

.admin-nav-link.is-active {
  border-bottom-color: var(--amber);
  color: #fff;
}

.admin-nav-link.is-active .admin-nav-icon { color: var(--amber); }

.admin-nav-badge {
  background: var(--amber);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.admin-nav-dropdown {
  position: relative;
}

.admin-nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.admin-nav-caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: #8b95c2;
  transition: color 0.15s ease, transform 0.15s ease;
}

.admin-nav-link.is-active .admin-nav-caret { color: var(--amber); }

.admin-nav-dropdown.is-open .admin-nav-caret { transform: rotate(180deg); }

.admin-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 190px;
  padding: 8px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px -10px rgba(10, 26, 76, 0.35);
  z-index: 40;
}

.admin-nav-dropdown.is-open .admin-nav-dropdown-menu { display: block; }

.admin-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-nav-dropdown-item:hover { background: var(--paper-sunk); color: var(--ink); }

.admin-nav-dropdown-item.is-active {
  background: var(--teal-wash);
  color: var(--teal-deep);
}

.admin-nav-dropdown-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-faint);
}

.admin-nav-dropdown-item:hover .admin-nav-dropdown-icon,
.admin-nav-dropdown-item.is-active .admin-nav-dropdown-icon { color: var(--teal); }

/* Keep the desktop navigation on one calm, readable line on common laptop
   widths. The mobile breakpoint below still deliberately allows wrapping. */
@media (min-width: 901px) and (max-width: 1360px) {
  .admin-masthead-inner { gap: 16px; padding-inline: 24px; }
  .admin-nav { gap: 2px; }
  .admin-nav-link { gap: 6px; padding: 8px 10px 10px; font-size: 0.82rem; }
  .admin-nav-icon { width: 15px; height: 15px; }
}

.admin-masthead-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.admin-masthead-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #9aa4c7;
  transition: color 0.15s ease;
}

.admin-masthead-link:hover { color: #fff; }

button.admin-masthead-link {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.admin-masthead-logout-form { margin: 0; }

.admin-topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-topbar-username {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cfd6ec;
}

.admin-user-dropdown .admin-nav-dropdown-toggle.admin-topbar-user {
  padding: 4px 6px;
  border-radius: 999px;
}

.admin-user-dropdown .admin-nav-dropdown-toggle.admin-topbar-user:hover { background: rgba(255, 255, 255, 0.06); }

.admin-user-dropdown .admin-nav-caret { color: #9aa4c7; }

.admin-nav-dropdown-menu-right {
  left: auto;
  right: 0;
  transform: none;
}

.admin-nav-dropdown-logout-form { margin: 0; }

.admin-nav-dropdown-item-logout {
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.admin-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-avatar-sm {
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--teal-wash);
  color: var(--teal-deep);
}

/* ---------- Session timer (dark header) ---------- */
.session-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
  flex-shrink: 0;
}

.session-timer svg { flex-shrink: 0; }

.session-timer.text-success { color: #d1fae5; background-color: rgba(16, 185, 129, 0.2); }

.session-timer.text-warning {
  color: #fef3c7;
  background-color: rgba(245, 158, 11, 0.2);
  animation: session-timer-pulse 1.5s infinite;
}

.session-timer.text-danger { color: #fee2e2; background-color: rgba(239, 68, 68, 0.2); }

@keyframes session-timer-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

@media (max-width: 640px) {
  .session-timer span:not(.session-timer-icon) { display: none; }
}

.admin-page-head {
  padding: 24px 32px 0;
}

.admin-page-head-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin: 0 0 4px;
}

.admin-page-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-page-head h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin: 0;
}

.admin-page-head-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.admin-content {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 32px 48px;
  box-sizing: border-box;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(10, 26, 76, 0.04), 0 10px 22px -18px rgba(10, 26, 76, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px -2px rgba(10, 26, 76, 0.08), 0 18px 30px -16px rgba(10, 26, 76, 0.4);
}

.admin-stat-card-warn { border-color: #f0cab5; background: var(--urgent-wash); }

.admin-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  flex-shrink: 0;
}

.admin-stat-icon svg { width: 20px; height: 20px; }

.admin-stat-icon-teal { background: var(--teal-wash); color: var(--teal); }
.admin-stat-icon-amber { background: var(--amber-wash); color: var(--amber-deep); }
.admin-stat-icon-good { background: var(--good-wash); color: var(--good); }

.admin-stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.admin-stat-label {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-faint);
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}

.admin-panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(10, 26, 76, 0.04), 0 10px 22px -18px rgba(10, 26, 76, 0.3);
  overflow: hidden;
}

.admin-panel-side { padding: 20px; }

/* Notification editor: retain the shared form controls while grouping the
   related fields into clear, evenly spaced two-column sections. */
.notification-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.notification-form .form-grid { gap: 20px; }

.notification-option {
  padding: 14px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.notification-option .field-hint { margin: 2px 0 0; }

/* Keep the Advertisement list's Admit Card control narrow beside the count. */
.admin-admit-card-cell { white-space: nowrap; }
.admin-admit-card-cell .btn-details { min-width: 54px; padding: 7px 10px; }

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 2px solid var(--teal);
}

.admin-panel-side .admin-panel-head {
  padding: 0 0 14px;
  margin-bottom: 14px;
}

.admin-panel-head h2 {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin: 0;
}

.admin-panel-head-standalone {
  padding: 14px 18px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(10, 26, 76, 0.04), 0 10px 22px -16px rgba(10, 26, 76, 0.25);
}

.admin-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-breakdown li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
}

.admin-breakdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.admin-breakdown-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  align-self: center;
}

.admin-breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.admin-breakdown-dot-review { background: var(--amber-deep); }
.admin-breakdown-dot-good { background: var(--good); }
.admin-breakdown-dot-rejected { background: var(--urgent); }

.admin-breakdown-bar {
  grid-column: 1 / 2;
  height: 6px;
  border-radius: 999px;
  background: var(--paper-sunk);
  overflow: hidden;
}

.admin-breakdown-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
}

.admin-breakdown li:nth-child(1) .admin-breakdown-bar span { background: var(--amber-deep); }
.admin-breakdown li:nth-child(2) .admin-breakdown-bar span { background: var(--good); }
.admin-breakdown li:nth-child(3) .admin-breakdown-bar span { background: var(--urgent); }

.admin-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.admin-panel-foot-label {
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.admin-panel-foot-value {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--teal-deep);
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-details-warn {
  color: var(--urgent);
  border-color: var(--urgent);
}

.btn-details-warn:hover { background: var(--urgent); color: #fff; }

.admin-closed-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-faint);
}

.admin-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* A single filter control sitting in a panel header, beside its heading. */
.admin-table-filter {
  min-width: 240px;
  max-width: 320px;
}

.admin-result-count {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.admin-status-update {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.admin-status-update .form-field { flex: 1; max-width: 280px; }

.admin-status-update .btn-details-warn { margin-left: auto; align-self: center; }

.admin-role-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.admin-role-chip-super { background: var(--teal-wash); color: var(--teal-deep); }
.admin-role-chip-manager { background: var(--amber-wash); color: var(--amber-deep); }
.admin-role-chip-reviewer { background: var(--paper-sunk); color: var(--ink-soft); }

.admin-permissions-table tbody td:not(:first-child) { text-align: center; }
.admin-permissions-table thead th:not(:first-child) { text-align: center; }

.admin-perm-yes,
.admin-perm-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-perm-yes { background: var(--good-wash); color: var(--good); }
.admin-perm-no { background: var(--urgent-wash); color: var(--urgent); }

.admin-footer {
  padding: 16px 32px;
  background: var(--teal-deep);
  color: #cfe3df;
  font-size: 0.78rem;
}

.admin-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .container { padding-left: 28px; padding-right: 28px; }

  .masthead { padding: 16px 0; }
  .brand-mark { width: 56px; height: 56px; }
  .brand-title { font-size: 1.25rem; }
  .brand-subtitle { font-size: 0.76rem; }

  .page { padding: 24px 0 44px; }
  .section-header { padding: 12px 14px; }
  .section-header h1,
  .section-header h2 { font-size: 1.15rem; }

  .notice { padding: 14px 16px 16px; margin-bottom: 26px; }
  .query { padding: 18px; }

  .login-card { padding: 26px 22px 22px; }
  .login-wrap { padding: 24px 0; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .admin-caste-options { grid-template-columns: 1fr 1fr; }

  .apply-form { padding: 22px 18px 26px; }
  .apply-tab { flex: 0 0 auto; padding: 14px 16px; }

  .admin-content { padding: 18px 18px 32px; }
  .admin-page-head { padding: 20px 18px 0; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-panel-grid { grid-template-columns: 1fr; }
  .admin-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .admin-masthead-inner {
    flex-wrap: wrap;
    padding: 12px 18px;
    gap: 10px;
  }

  .admin-masthead-brand { flex: 1 1 auto; }

  .admin-masthead-right { gap: 12px; }

  .admin-masthead-link:not(.admin-masthead-link-logout) { display: none; }

  .admin-topbar-username { display: none; }

  .admin-nav {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .admin-nav-link {
    padding: 8px 12px;
    border-bottom: none;
    border-radius: 6px;
  }

  .admin-nav-link.is-active { background: rgba(232, 114, 15, 0.16); }
}

@media (max-width: 600px) {
  .utility-strip { display: none; }
  .page-backdrop { background-attachment: scroll; }
  .admin-caste-options { grid-template-columns: 1fr; }
  .admin-req-actions { flex-direction: column; align-items: flex-start; }
  .admin-req-quickadd { padding-left: 0; border-left: none; }
  .admin-age-conditions { grid-template-columns: 1fr; }

  .masthead-inner { gap: 14px; }
  .brand { width: 100%; }
  .brand-title { font-size: 1.1rem; }
  .topnav { width: 100%; }
  .topnav .btn-ghost,
  .topnav .btn-solid,
  .topnav-logout-form { flex: 1; text-align: center; }
  .topnav-logout-form .btn-solid { width: 100%; }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .notice-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Post table becomes stacked cards on narrow screens */
  .post-table-scroll { overflow-x: visible; }

  /* Educational Details table becomes stacked cards on narrow screens,
     same convention as .post-table above — fixed-percentage columns
     are unusable once inputs shrink past a minimum width. */
  .edu-table,
  .edu-table thead,
  .edu-table tbody,
  .edu-table tr,
  .edu-table th,
  .edu-table td {
    display: block;
    width: auto;
  }

  .edu-table colgroup { display: none; }
  .edu-table thead { display: none; }

  .edu-table tbody tr {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
  }

  .edu-table tbody tr:last-child { border-bottom: none; }

  .edu-table tbody td {
    padding: 6px 0;
    border-bottom: none;
  }

  .edu-table tbody td[data-label]::before {
    content: attr(data-label) " ";
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
  }

  .edu-table tbody td.edu-row-num {
    padding-bottom: 2px;
    font-weight: 700;
    color: var(--ink);
  }

  .edu-table tbody td.edu-row-num::before { content: none; }

  .edu-table tbody td input,
  .edu-table tbody td select {
    font-size: 0.9rem;
    padding: 9px 10px;
  }

  .expr-row-line1,
  .expr-row-line2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .expr-row-line2 { margin-top: 12px; }

  .expr-row-num-field {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .expr-row-num-field label { display: none; }

  .expr-daterow { flex-wrap: wrap; }

  .expr-actions-row {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .expr-actions-cell {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .expr-actions-cell .btn-details {
    width: 100%;
    text-align: center;
  }

  .post-table,
  .post-table thead,
  .post-table tbody,
  .post-table tr,
  .post-table th,
  .post-table td {
    display: block;
    width: auto;
  }

  .post-table thead { display: none; }

  .post-table tbody tr {
    padding: 14px 12px;
    margin: 0 -12px;
    border-bottom: 1px solid var(--line-soft);
  }

  .post-table tbody tr:last-child { border-bottom: none; }

  .post-table tbody td {
    padding: 3px 0;
    border-bottom: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .post-table tbody td:first-child,
  .post-table tbody td:last-child { padding-left: 0; width: auto; }

  .post-table tbody td[data-label]::before {
    content: attr(data-label) ": ";
    display: inline-block;
    min-width: 78px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
  }

  .post-table .post-name { margin-bottom: 4px; }

  .post-table td:last-child { margin-top: 10px; }
  .post-table .btn-apply {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  .notice-head { flex-wrap: wrap; }
  .btn-details { align-self: flex-start; }

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

  .dash-welcome { padding: 18px; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-stat:last-child { grid-column: 1 / -1; }
  .dash-profile { padding: 18px; }
  .dash-profile-head { flex-wrap: wrap; }

  .apply-step-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .apply-step-actions .btn-step-next,
  .apply-step-actions .btn-step-prev {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .admin-masthead-brand { flex: 1 1 auto; }
  .admin-masthead-right { flex: 1 1 100%; justify-content: space-between; margin-left: 0; }
  .admin-page-head-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-filters { grid-template-columns: 1fr; }
  .admin-status-update { flex-direction: column; align-items: stretch; }
  .admin-status-update .form-field { max-width: none; }
  .admin-status-update .btn-solid { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .container { padding-left: 18px; padding-right: 18px; }

  .brand-mark { width: 48px; height: 48px; }
  .brand-eyebrow { font-size: 0.6rem; }
  .brand-title { font-size: 1rem; }
  .brand-subtitle { font-size: 0.72rem; }

  .section-header h1,
  .section-header h2 { font-size: 1.05rem; }
  .notice-head h2 { font-size: 1rem; }

  .post-table tbody td[data-label]::before { display: block; margin-bottom: 2px; }
  .post-table tbody td { padding: 4px 0; }

  .care-note { font-size: 0.75rem; }
  .visitor-note { font-size: 0.75rem; }
}

/* ---------- Captcha ---------- */
.captcha-row {
  display: flex;
  align-items: center;
  /* Wraps only when the row genuinely runs out of room, so the code box sits
     beside the image on a normal form and drops below it on a phone. */
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.captcha-img {
  border: 1px solid var(--border, #d7dce2);
  border-radius: 6px;
  cursor: pointer;
  /* The generated image is 180x60 (config/captcha.php "mini"). aspect-ratio
     keeps that shape while letting it shrink on narrow screens, so a flex
     parent's stretch can't distort it. */
  width: 180px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  flex: 0 1 auto;
  object-fit: contain;
}

.captcha-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 1;
  font-size: 1.3rem;
  color: var(--ink, #1f2937);
  background: #fff;
  border: 1px solid var(--border, #d7dce2);
  border-radius: 6px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.captcha-refresh-btn:hover {
  background: #f4f6f8;
  border-color: #b7bec7;
}

.apply-captcha-field { max-width: 520px; }

.apply-captcha-field .captcha-row { width: 100%; }

/* The code box takes the space left beside the image and button, and needs a
   sensible minimum — below that the row wraps and it goes full width. */
.captcha-row input {
  /* Overrides the global 100% so flex sizing decides the width here. */
  width: auto;
  flex: 1 1 150px;
  min-width: 0;
  max-width: 260px;
}

@media (max-width: 480px) {
  .captcha-row input { max-width: none; }
}

/* ---------- Admin application review ---------- */
.review-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin-bottom: 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(10, 26, 76, 0.06);
}

.review-sticky-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
}

.review-sticky-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Photo, signature and eligibility sit side by side, stacking when narrow. */
.review-identity {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 28px;
  align-items: start;
  /* .admin-panel has no padding of its own — children supply it. */
  padding: 20px;
}

.review-identity-item { margin: 0; }

.review-identity-item figcaption {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.review-photo {
  display: block;
  width: 120px;
  height: 150px;
  object-fit: contain;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.review-signature {
  display: block;
  width: 180px;
  height: 70px;
  object-fit: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.review-missing {
  font-size: 0.8rem;
  color: var(--ink-faint);
  padding: 20px 0;
}

/* A rule separating the eligibility checks from the identity images. */
.review-eligibility {
  padding-left: 28px;
  border-left: 1px solid var(--line-soft);
}

.review-eligibility .apply-subhead { margin: 0 0 10px; }

.review-checks {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.review-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 0.86rem;
}

.review-check + .review-check { border-top: 1px solid var(--line-soft); }

.review-check .field-hint { display: block; margin-top: 2px; }

.review-check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.review-check-pass .review-check-mark { background: var(--good); }
.review-check-fail .review-check-mark { background: var(--urgent); }
.review-check-none .review-check-mark { background: var(--ink-faint); }

@media (max-width: 900px) {
  .review-identity { grid-template-columns: auto 1fr; }

  .review-eligibility {
    grid-column: 1 / -1;
    padding-left: 0;
    padding-top: 20px;
    border-left: none;
    border-top: 1px solid var(--line-soft);
  }
}

@media (max-width: 600px) {
  .review-identity { grid-template-columns: 1fr; }
  .review-sticky { position: static; }
}

@media print {
  .review-sticky { position: static; box-shadow: none; }
}
/* ---------- Single-page application view ---------- */
.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.view-post-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal);
}

.view-head-meta { text-align: right; }

.view-head-meta .field-hint { margin-top: 6px; }

.admin-panel > .view-application { padding: 0 20px 20px; }

.view-application > .view-section:first-child { padding-top: 20px; }

.view-section {
  padding-top: 20px;
  margin-bottom: 20px;
}

.view-section + .view-section { border-top: 1px solid var(--line); }

.view-section .apply-subhead {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.view-section-inner { margin-top: 14px; }

/* Label/value pairs sit in two columns on desktop, stacked on mobile. */
.view-row {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 4px 28px;
  padding: 10px 0;
  align-items: baseline;
}

.view-row + .view-row { border-top: 1px solid var(--line-soft); }

.view-row dt {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.view-row dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink);
  /* Reference blocks are free text with line breaks worth keeping. */
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.view-row dd .text-link { margin-left: 8px; }

.view-table-scroll { overflow-x: auto; }

.view-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.view-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.view-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

@media (max-width: 780px) {
  .view-row { grid-template-columns: 1fr; }

  .view-table thead { display: none; }

  .view-table tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .view-table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
    border: none;
  }

  /* The header row is hidden on mobile, so each cell names itself. */
  .view-table td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-faint);
    flex: 0 0 auto;
  }
}
/* ---------- Submitted confirmation ---------- */
.submitted-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  margin-bottom: 20px;
  background: var(--good-wash);
  border: 1px solid var(--good);
  border-radius: 8px;
}

.submitted-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
}

.submitted-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--good);
  margin-bottom: 4px;
}

.submitted-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 20px;
  margin-bottom: 18px;
}

.submitted-summary dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.submitted-summary dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
}

/* The printed copy is a receipt, so drop the site chrome and controls. */
@media print {
  .utility-strip,
  .masthead,
  .site-footer,
  .page-backdrop-scrim,
  .apply-step-actions,
  .skip-link {
    display: none !important;
  }

  .page-backdrop { background: none; }

  .apply-form-card {
    border: none;
    box-shadow: none;
  }
}
/* ---------- Upload Documents (Step 4) ---------- */
.doc-pay-online {
  margin-bottom: 16px;
  text-align: center;
}

.btn-pay-fees {
  background: var(--good);
  border-color: var(--good);
}

.btn-pay-fees:hover {
  background: #255a30;
  border-color: #255a30;
}

.doc-uploaded {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-uploaded-list {
  margin-top: 10px;
  padding-left: 0;
  list-style: none;
  font-size: 0.82rem;
}

.doc-uploaded-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--paper-sunk);
}

.doc-uploaded-list li + li { margin-top: 6px; }

.doc-uploaded-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ---------- Submit busy state ---------- */
.btn-solid.is-loading,
.btn-details.is-loading {
  /* Room for the spinner, and a dimmed look so it reads as "in progress". */
  position: relative;
  padding-left: 38px;
  opacity: 0.85;
  cursor: progress;
}

.btn-solid.is-loading::before,
.btn-details.is-loading::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .btn-solid.is-loading::before,
  .btn-details.is-loading::before { animation-duration: 2s; }
}

/* Block further interaction with a form that's already on its way. */
.is-submitting {
  pointer-events: none;
}

.is-submitting .btn-step-prev { opacity: 0.5; }
/* ---------- Form status message ---------- */
.form-status {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  max-height: 200px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.4s ease, max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
}

.form-status-dismissing {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  border-width: 0;
}

.form-status-success {
  background: var(--good-wash);
  color: var(--good);
  border: 1px solid var(--good);
}

.form-status-error {
  background: var(--urgent-wash);
  color: var(--urgent);
  border: 1px solid var(--urgent);
}

/* ---------- DataTables theming ---------- */
.dt-container {
  font-family: var(--font-body);
  color: var(--ink);
  padding: 16px 20px;
}

.dt-layout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dt-layout-row + .dt-layout-row { margin-top: 14px; }

.dt-layout-cell.dt-layout-full { width: 100%; }

.dt-length,
.dt-search,
.dt-info,
.dt-paging {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.dt-length { display: flex; align-items: center; gap: 6px; }
.dt-search { display: flex; align-items: center; gap: 8px; }

.dt-input {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: var(--ink);
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
}

select.dt-input { padding: 7px 28px 7px 10px; }

.dt-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-wash);
}

.dt-container table.post-table { margin: 14px 0; }

.dt-paging {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dt-paging .dt-paging-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  margin-left: 4px;
  padding: 0 10px !important;
  border: 1.5px solid var(--teal) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--teal) !important;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dt-paging .dt-paging-button:hover:not(.disabled):not(.current) {
  background: var(--teal) !important;
  color: #fff !important;
}

.dt-paging .dt-paging-button.current,
.dt-paging .dt-paging-button.current:hover {
  background: var(--amber) !important;
  border-color: var(--amber) !important;
  color: #fff !important;
  font-weight: 700;
  cursor: default;
}

.dt-paging .dt-paging-button.disabled,
.dt-paging .dt-paging-button.disabled:hover {
  border-color: var(--line) !important;
  background: transparent !important;
  color: var(--ink-faint) !important;
  cursor: not-allowed;
  opacity: 0.6;
}

.dt-processing {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

@media (max-width: 780px) {
  .dt-container { padding: 14px 16px; }
  .dt-layout-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Error pages ---------- */
.error-card { text-align: center; }

.error-code {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--amber);
  margin-bottom: 4px;
}

.error-card .login-card-head h1 {
  font-size: 1.25rem;
}

.error-actions {
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 400px) {
  .error-code { font-size: 2.4rem; }
}

/* ---------- Admin: URL / upload source toggle ---------- */
.admin-source-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  margin-bottom: 10px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.admin-source-toggle-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-source-toggle-btn:hover { color: var(--teal-deep); }

.admin-source-toggle-btn.is-active {
  background: var(--teal);
  color: #fff;
}

/* ---------- Admin: sectioned form cards (Add/Edit Post) ---------- */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  margin: 0 0 22px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
}

.form-section:last-of-type { margin-bottom: 0; }

.form-section .form-grid,
.form-section .form-field:not(.admin-degree-or-field) { margin: 0; }

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--teal-wash);
  color: var(--teal);
}

.form-section-icon svg { width: 16px; height: 16px; }

.form-section-titles { flex: 1; }

.form-section-head .apply-subhead {
  margin: 0;
  font-size: 1rem;
}

.form-section-desc {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 2px 0 0;
}

.form-section .admin-degree-card,
.form-section .admin-requirements,
.form-section .admin-req-actions,
.form-section .admin-req-exemption {
  background: var(--paper-raised);
}

/* Education step: "Clear" on an optional row, under its certificate cell. */
.edu-row-clear {
  margin-top: 6px;
  padding: 3px 12px;
  font-size: 0.72rem;
}

.edu-clear-note { color: var(--urgent); }

.edu-row-clear.is-empty { display: none; }
