/* MFP Recruitment — Food company recruitment theme */
:root {
  --color-bg: #faf8f5;
  --color-surface: #fff;
  --color-ink: #1c1917;
  --color-ink-muted: #57534e;
  --color-accent: #c2410c;
  --color-accent-hover: #9a3412;
  --color-accent-soft: #fff7ed;
  --color-herb: #3d5a45;
  --color-herb-soft: #ecfdf5;
  --color-border: #e7e5e4;
  --color-pending: #d97706;
  --color-approved: #15803d;
  --color-rejected: #b91c1c;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 8px 32px rgba(28, 25, 23, 0.08);
  /* Star rating (Play Store style) */
  --star-filled: #ffc107;
  --star-filled-glow: #ffb300;
  --star-empty: #e0e0e0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
}

body.landing {
  padding-top: 0;
}

/* Reduce autofill distraction: make autofilled inputs match normal styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--color-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--color-bg) inset !important;
  transition: background-color 0s 500000s;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Applicants table page: use full viewport width (same pattern as Kanban) */
main.applicants-table-page.main-content {
  max-width: none;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.applicants-table-page .container {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-ink);
  text-decoration: none;
}

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

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

/* Nav links: default gray. Buttons (.btn-primary, .btn-ghost) get their own color below. */
.nav a:not(.btn-primary):not(.btn-ghost) {
  color: var(--color-ink-muted);
  text-decoration: none;
  font-weight: 500;
}

.nav a:not(.btn-primary):not(.btn-ghost):hover {
  color: var(--color-accent);
}

/* Nav buttons: primary = white text, ghost = muted (so .nav a never applies to them) */
/* Higher specificity so .nav a never overwrites: anchor in nav with .btn-primary */
.site-header .nav a.btn-primary,
.nav a.btn-primary,
.nav .btn-primary {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.site-header .nav a.btn-primary:hover,
.nav a.btn-primary:hover,
.nav .btn-primary:hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.nav a.btn-ghost,
.nav .btn-ghost {
  color: var(--color-ink-muted);
}

.nav a.btn-ghost:hover {
  color: var(--color-ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-ink-muted);
}

.btn-ghost:hover {
  background: var(--color-border);
  color: var(--color-ink);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-tag {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-ink);
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--color-ink-muted);
  max-width: 42ch;
  margin: 0 0 1.75rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 70% 20%, var(--color-accent-soft) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 20% 80%, var(--color-herb-soft) 0%, transparent 45%);
  pointer-events: none;
}

/* Landing hero with photo */
.hero-landing {
  padding: 5rem 0 6rem;
  min-height: 72vh;
  display: flex;
  align-items: center;
}

.hero-landing .hero-inner {
  max-width: 640px;
}

.hero-landing .hero-title {
  max-width: 14ch;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-landing .hero-lead {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hero-landing .hero-cta {
  box-shadow: 0 4px 20px rgba(194, 65, 12, 0.35);
}

.hero-landing .hero-bg {
  display: none;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(28, 25, 23, 0.75) 0%, rgba(28, 25, 23, 0.4) 45%, rgba(28, 25, 23, 0.15) 70%);
  pointer-events: none;
  z-index: 1;
}

.hero-landing .hero-tag {
  color: #fbbf24;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

.hero-landing .hero-title {
  color: #fff;
}

.hero-landing .hero-lead {
  color: rgba(255, 255, 255, 0.92);
}

/* Photo strip — Life at MFP */
.landing-photo-strip {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
}

.strip-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 0.35rem;
  text-align: center;
}

.strip-lead {
  text-align: center;
  color: var(--color-ink-muted);
  margin: 0 0 2.5rem;
}

.photo-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .photo-strip-grid {
    grid-template-columns: 1fr;
  }
}

.photo-strip-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.photo-strip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(28, 25, 23, 0.12);
}

.photo-strip-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.photo-strip-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-strip-card:hover .photo-strip-img img {
  transform: scale(1.05);
}

.photo-strip-card figcaption {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-ink);
}

/* How it works — landing (modern horizontal flow, colorful) */
.landing-how-it-works {
  padding: 4.5rem 0 4rem;
  background: linear-gradient(180deg, #fff7ed 0%, #fef3c7 25%, #ecfdf5 60%, #f5f3ff 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.landing-how-it-works .how-it-works-title {
  text-align: center;
  margin-bottom: 0.35rem;
  color: #1c1917;
}

.landing-how-it-works .how-it-works-lead {
  text-align: center;
  margin-bottom: 2.75rem;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
  color: #57534e;
}

.how-steps-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 auto;
  max-width: 1100px;
  padding: 0 0.5rem;
}

.how-step-card {
  flex: 1 1 0;
  min-width: 200px;
  max-width: 260px;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: visible;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.how-step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.how-step-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  border-radius: 0 14px 0 24px;
  box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.how-step-badge-1 { background: #c2410c; background: var(--color-accent, #c2410c); }
.how-step-badge-2 { background: #3d5a45; background: var(--color-herb, #3d5a45); }
.how-step-badge-3 { background: #0284c7; }
.how-step-badge-4 { background: #6d28d9; }

.how-step-card-inner {
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.how-step-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.how-step-icon svg {
  width: 40px;
  height: 40px;
}

.how-step-card.step-1 .how-step-icon { color: #c2410c; color: var(--color-accent, #c2410c); }
.how-step-card.step-2 .how-step-icon { color: #3d5a45; color: var(--color-herb, #3d5a45); }
.how-step-card.step-3 .how-step-icon { color: #0284c7; }
.how-step-card.step-4 .how-step-icon { color: #6d28d9; }

.how-step-card .how-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1c1917;
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.3;
}

.how-step-card .how-step-desc {
  font-size: 0.9rem;
  color: #57534e;
  margin: 0;
  line-height: 1.55;
  flex: 1;
}

.how-step-connector {
  width: 24px;
  min-width: 24px;
  align-self: center;
  height: 2px;
  background: linear-gradient(90deg, #c2410c 0%, #3d5a45 100%);
  position: relative;
  opacity: 0.5;
}

.how-step-connector::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #3d5a45;
  border-right: 0;
  margin-right: -5px;
}

.how-it-works-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 2rem;
  margin-top: 2.5rem;
  padding: 1.35rem 1.5rem;
  background: #3d5a45;
  background: linear-gradient(135deg, #3d5a45 0%, #2d4a35 100%);
  border-radius: 14px;
  border: none;
  box-shadow: 0 4px 16px rgba(61, 90, 69, 0.3);
}

.how-benefit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
}

.how-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .how-steps-flow {
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .how-step-card {
    max-width: 100%;
    min-width: 0;
  }
  .how-step-connector {
    width: 2px;
    min-width: 2px;
    height: 20px;
    background: var(--color-border);
  }
  .how-step-connector::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .landing-how-it-works {
    padding: 3rem 0 3rem;
  }
  .how-it-works-benefits {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem 1rem;
  }
}

/* Landing benefits & special pay */
.landing-benefits {
  padding: 4rem 0 4.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.benefits-section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.benefits-section-lead {
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

.landing-benefits .benefits-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 2rem;
  max-width: 64rem;
  margin: 0 auto;
  align-items: stretch;
}

.landing-benefits .benefits-block {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.benefits-block-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-herb, #2d4a38);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e8e8e8;
}

.benefits-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.benefits-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.benefits-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
}

.benefits-icon svg {
  width: 26px;
  height: 26px;
}

.benefits-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-ink);
}

@media (max-width: 540px) {
  .landing-benefits {
    padding: 3rem 0 3.5rem;
  }
  .landing-benefits .benefits-grid {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .landing-benefits .benefits-block {
    flex: 1 1 auto;
    min-width: auto;
    padding: 1.5rem 1.25rem;
  }
}

/* Jobs section on landing */
.landing-main .jobs-section {
  padding: 4rem 0 5rem;
  background: var(--color-surface);
}

.landing-main .job-card {
  border-radius: 14px;
  padding: 2rem;
  border: 1px solid var(--color-border);
}

/* CTA landing */
.cta-landing {
  background: linear-gradient(135deg, var(--color-herb) 0%, #2d4a38 100%);
  color: #fff;
  padding: 3.5rem 0 4rem;
}

.cta-landing .section-title {
  color: #fff;
  margin-bottom: 0.5rem;
}

.cta-landing p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1.5rem;
}

.cta-landing a:not(.btn) {
  color: #fbbf24;
  font-weight: 600;
}

.cta-landing .btn {
  background: #fff;
  color: var(--color-herb);
  -webkit-text-fill-color: var(--color-herb);
  border: none;
}

.cta-landing .btn:hover {
  background: var(--color-bg);
  color: var(--color-herb);
  -webkit-text-fill-color: var(--color-herb);
}

/* Thank you page (after application submit) */
.thank-you-page .thank-you-main {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0 4rem;
}

.thank-you-section {
  width: 100%;
}

.thank-you-card {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.thank-you-icon {
  color: var(--color-herb, #2d4a38);
  margin-bottom: 1.25rem;
}

.thank-you-icon svg {
  display: block;
  margin: 0 auto;
}

.thank-you-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--color-ink);
}

.thank-you-lead {
  font-size: 1.05rem;
  color: var(--color-ink-muted);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.thank-you-message {
  text-align: left;
  background: rgba(61, 90, 69, 0.06);
  border: 1px solid rgba(61, 90, 69, 0.2);
  border-left: 4px solid var(--color-herb, #2d4a38);
  border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.thank-you-message p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-ink);
}

.thank-you-message p:last-child {
  margin-bottom: 0;
}

.thank-you-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.thank-you-actions .btn-lg {
  margin: 0;
}

.cta-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.alert-success {
  background: var(--color-herb-soft);
  color: var(--color-approved);
}

.alert-error {
  background: #fef2f2;
  color: var(--color-rejected);
}

/* Sections */
.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.section-lead {
  color: var(--color-ink-muted);
  margin: 0 0 2rem;
}

.jobs-section {
  padding: 3rem 0 4rem;
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.job-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s, transform 0.2s;
}

.job-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.job-dept {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-herb);
  margin-bottom: 0.5rem;
}

.job-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.job-location {
  display: block;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  margin: 0 0 0.35rem;
}

.job-desc {
  font-size: 0.95rem;
  color: var(--color-ink-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.job-card .btn {
  width: 100%;
}

/* Jobs section: toolbar, search, count */
.jobs-section-header {
  margin-bottom: 1rem;
}
.jobs-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
  margin-bottom: 0.5rem;
}
.jobs-section-heading .section-title {
  margin: 0;
}
.jobs-count {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-ink-muted);
  margin: 0;
}
.jobs-section-lead {
  margin-top: 0;
}
.jobs-alert {
  margin-bottom: 1.5rem;
}
.jobs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--color-bg, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
}
.jobs-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.jobs-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-ink-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jobs-search-input {
  width: 100%;
  padding: 0.6rem 0.85rem 0.6rem 2.5rem;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.jobs-search-input::placeholder {
  color: var(--color-ink-muted);
}
.jobs-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15);
}
.jobs-filter-wrap {
  flex-shrink: 0;
}
.jobs-filter-select {
  padding: 0.6rem 2rem 0.6rem 0.85rem;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
  min-width: 160px;
}
.jobs-filter-select:focus {
  outline: none;
  border-color: var(--color-accent);
}
.jobs-toolbar-result {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  flex: 1;
  text-align: right;
}
@media (max-width: 640px) {
  .jobs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .jobs-search-wrap {
    max-width: none;
  }
  .jobs-toolbar-result {
    text-align: left;
  }
}
.jobs-no-results {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  margin-top: 1rem;
}
.jobs-no-results-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-ink);
}
.jobs-no-results-text {
  font-size: 0.95rem;
  color: var(--color-ink-muted);
  margin: 0;
}
.jobs-empty {
  color: var(--color-ink-muted);
  font-size: 1.05rem;
  margin: 0;
}

.cta-section {
  padding: 2.5rem 0 3rem;
  text-align: center;
  color: var(--color-ink-muted);
}

.cta-section a {
  color: var(--color-accent);
  font-weight: 500;
}

/* Main content (dashboard, apply, admin) */
.main-content {
  padding: 2rem 0 3rem;
}

.page-head {
  margin-bottom: 2rem;
}

.page-head h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.page-head .job-dept {
  margin-bottom: 0.5rem;
}

.back-link {
  display: inline-block;
  color: var(--color-ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--color-accent);
}

/* ========== Apply page: progress + mobile-friendly, Google-style ========== */
.apply-page .container-apply {
  max-width: 640px;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}
.apply-page .main-content {
  padding-top: 1.5rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}
.apply-page .apply-page-head {
  margin-bottom: 1.5rem;
}
.apply-page .apply-page-head h1 {
  font-size: 1.75rem;
  line-height: 1.25;
}
.apply-page .apply-page-head .job-location,
.apply-page .apply-page-head .job-dept {
  font-size: 0.9375rem;
  color: var(--color-ink-muted);
}
.apply-page .form-hint.slot-booking-hint {
  margin-bottom: 1rem;
}

/* Progress bar — clean, Material-like; sticky so always visible */
.apply-progress {
  position: sticky;
  top: 56px;
  top: calc(56px + env(safe-area-inset-top, 0));
  z-index: 50;
  margin-bottom: 1.75rem;
  padding: 1rem 0 1.25rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  margin-left: calc(-1 * max(1.25rem, env(safe-area-inset-left)));
  margin-right: calc(-1 * max(1.25rem, env(safe-area-inset-right)));
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.apply-progress-bar-wrap {
  height: 6px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.apply-progress-bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.apply-progress-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-ink-muted);
  margin: 0 0 0.75rem;
  text-align: center;
}
.apply-progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--color-ink-muted);
  justify-content: center;
}
.apply-progress-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.apply-progress-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background 0.25s ease;
}
.apply-progress-step.complete .apply-progress-step-dot {
  background: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}
.apply-progress-step.complete {
  color: var(--color-ink);
  font-weight: 500;
}

/* Apply form card: elevation + rounded, mobile-first */
.apply-page .application-form.apply-form {
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  border: 1px solid var(--color-border);
}
.apply-page .apply-section {
  margin-bottom: 2rem;
}
.apply-page .apply-section:last-of-type {
  margin-bottom: 1rem;
}
.apply-page .apply-section > .form-group:first-child {
  margin-top: 0;
}
.apply-page .form-group-slot.slot-booking-block {
  margin-bottom: 0;
}

/* Touch-friendly inputs (min 44px tap target) */
.apply-page .application-form .form-group input[type="text"],
.apply-page .application-form .form-group input[type="email"],
.apply-page .application-form .form-group input[type="tel"],
.apply-page .application-form .form-group input[type="number"],
.apply-page .application-form .form-group input[type="password"],
.apply-page .application-form .form-group select,
.apply-page .application-form .form-group textarea {
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.apply-page .application-form .form-group textarea {
  min-height: 120px;
  padding: 0.75rem 1rem;
}
.apply-page .application-form .form-group select {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2357534e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}
.apply-page .application-form .btn {
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.apply-page .application-form .btn-lg {
  min-height: 52px;
  padding: 0.875rem 1.75rem;
  font-size: 1.0625rem;
}
.apply-page .application-form .form-actions {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  gap: 0.75rem;
}
.apply-page .application-form .form-actions .btn {
  flex: 1;
  min-width: 0;
}
@media (min-width: 480px) {
  .apply-page .application-form .form-actions .btn { flex: 0 1 auto; }
}

/* Yes/No and multiselect: larger tap targets */
.apply-page .yesno-options,
.apply-page .multiselect-options {
  gap: 0.5rem;
}
.apply-page .yesno-option,
.apply-page .multiselect-option {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.apply-page .yesno-option:focus-within,
.apply-page .multiselect-option:focus-within {
  outline: none;
  background: var(--color-accent-soft);
}

/* Slot picker: stacked on small screens, touch-friendly */
.apply-page .slot-picker-compact {
  flex-direction: column;
  gap: 1.25rem;
}
.apply-page .slot-calendar-wrap {
  width: 100%;
  min-width: 0;
  padding: 1rem;
}
.apply-page .slot-calendar-day-avail,
.apply-page .slot-calendar-day {
  min-width: 40px;
  min-height: 40px;
  max-width: 44px;
  max-height: 44px;
  font-size: 0.9rem;
}
.apply-page .slot-time-select {
  min-height: 48px;
  padding: 0.75rem 1rem;
  width: 100%;
  max-width: none;
}
.apply-page .slot-calendar-prev,
.apply-page .slot-calendar-next {
  min-width: 44px;
  min-height: 44px;
}

/* Mobile: progress bar sticks just below site header (viewport is already below browser chrome) */
@media (max-width: 768px) {
  .apply-page .apply-progress {
    top: 56px;
    top: calc(56px + env(safe-area-inset-top, 0));
  }
}
@media (max-width: 600px) {
  .apply-page .page-head h1 {
    font-size: 1.5rem;
  }
  .apply-page .apply-progress {
    padding: 0.75rem 0;
    margin-bottom: 1.25rem;
    top: 60px;
    top: calc(60px + env(safe-area-inset-top, 0));
  }
  .apply-page .application-form.apply-form {
    padding: 1.25rem;
    border-radius: 12px;
  }
  .apply-page .form-group {
    margin-bottom: 1.25rem;
  }
}
@media (min-width: 600px) {
  .apply-page .slot-picker-compact {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .apply-page .slot-time-wrap {
    min-width: 220px;
  }
}

/* Dashboard header */
.dashboard-header {
  padding: 1.5rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}
.dashboard-header-text {
  flex: 1;
  min-width: 0;
}
.dashboard-header .page-head h1 {
  margin-bottom: 0.35rem;
}
.dashboard-welcome {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--color-ink-muted);
  line-height: 1.5;
}
.dashboard-status-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
}

/* Application list (dashboard) */
.application-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.application-list.dashboard-cards {
  margin-top: 1.5rem;
}

.application-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.application-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1.25rem 1.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.application-card-header-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}
.application-card-header-left h3 {
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.application-card-header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.app-appointment-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-ink-muted);
  background: var(--color-bg-muted, #f5f5f5);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
}
.app-appointment-icon {
  font-size: 0.9em;
}
.app-message-btn {
  white-space: nowrap;
}
.app-message-btn.has-unread {
  font-weight: 600;
  color: var(--color-accent);
}
.app-main {
  padding: 1rem 1.75rem 1.5rem;
  min-width: 0;
  overflow-wrap: break-word;
}

.application-card-footer {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-muted, rgba(0, 0, 0, 0.02));
}

.app-message-btn-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.app-message-btn-bottom:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.app-message-btn-bottom .inbox-badge {
  margin-left: 0.5rem;
}

.application-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border);
}

.application-card-pending {
  border-left: 4px solid var(--color-pending);
}
.application-card-approved,
.application-card-stage_1,
.application-card-stage_2,
.application-card-stage_3 {
  border-left: 4px solid var(--color-approved);
}
.application-card-accepted {
  border-left: 4px solid var(--color-approved);
}
.application-card-denied,
.application-card-rejected {
  border-left: 4px solid var(--color-rejected);
}

.application-card-header-left h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
.application-card-header-left .app-dept {
  margin: 0;
}
.app-main .app-dept {
  display: none;
}
.app-main h3 {
  display: none;
}
.application-card-header-left .app-location {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--color-ink-muted);
  margin: 0;
}
.application-card-header-left .app-dept {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-herb);
  background: var(--color-herb-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.app-main time {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  font-weight: 500;
}

.app-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.app-appointment {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  font-weight: 500;
}

.status {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.status-pending {
  background: #fef3c7;
  color: #b45309;
}

.status-approved {
  background: var(--color-herb-soft);
  color: var(--color-approved);
}

.status-accepted {
  background: #dcfce7;
  color: #166534;
}

.status-rejected,
.status-denied {
  background: #fee2e2;
  color: var(--color-rejected);
}

.status-hired {
  background: #ccfbf1;
  color: #0f766e;
}

[class^="status-stage_"] {
  background: var(--color-herb-soft);
  color: var(--color-approved);
}

.schedule-next-stage-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.schedule-next-stage-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
}

/* Schedule insight (upcoming interviews) */
.schedule-insight-block {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--color-bg-muted, #f8f9fa);
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.schedule-insight-block summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-ink);
}

.schedule-insight-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.schedule-insight-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.schedule-insight-table th,
.schedule-insight-table td {
  padding: 0.4rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.schedule-insight-table th {
  font-weight: 600;
  color: var(--color-ink-muted);
}

/* Reschedule form */
.reschedule-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.reschedule-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.reschedule-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.reschedule-select {
  min-width: 220px;
  padding: 0.4rem 0.5rem;
}

.reschedule-or {
  display: inline-block;
  margin: 0 0.5rem;
  color: var(--color-ink-muted);
  font-size: 0.9rem;
}

/* Stage attendance (Show / No-show) */
.stage-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.attendance-inline {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

.change-stage-date-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
}
.change-stage-date-inline input[type="date"],
.change-stage-date-inline .change-stage-time-select {
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem;
}
.stage-remove-inline {
  display: inline-flex;
  margin-left: 0.5rem;
}

.stage-remove-inline .btn-remove-stage {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  color: var(--muted, #666);
}

.stage-standardize-wrap {
  margin-top: 0.5rem;
}

.stage-standardize-wrap .btn-standardize-stages {
  font-size: 0.85rem;
}

.attendance-inline .btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
}

.attendance-badge {
  margin-left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.attendance-show {
  background: #d1fae5;
  color: #047857;
}

.attendance-no-show {
  background: #fee2e2;
  color: #b91c1c;
}

/* Additional files (attachments) */
.attachments-block {
  margin-top: 1rem;
}

.attachments-block ul {
  margin: 0.25rem 0 0 0;
  padding-left: 1.25rem;
}

.attachment-stage {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
}

.attachment-list {
  list-style: none;
  padding-left: 0;
}

.attachment-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.4rem;
  padding: 0.25rem 0;
}

.attachment-item .attachment-display {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.attachment-item .attachment-edit {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.attachment-item .form-inline {
  display: inline;
}

.attachment-item .form-inline input[type="text"] {
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  min-width: 12rem;
  max-width: 100%;
}

.btn-inline {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-ink-muted);
}

.btn-inline:hover {
  color: var(--color-ink);
  border-color: var(--color-ink-muted);
}

a.btn-inline.btn-view-download {
  text-decoration: none;
  display: inline-block;
}

.btn-remove-attachment:hover {
  color: var(--color-error, #c00);
  border-color: var(--color-error, #c00);
}

.add-file-form {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.add-file-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
}

.add-file-previews {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.add-file-preview-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.add-file-preview-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-file-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.add-file-preview-icon {
  font-size: 1.5rem;
}

.add-file-preview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.add-file-label-input {
  width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
}

.add-file-original-name {
  font-size: 0.8rem;
  color: var(--color-ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-ink-muted);
}

/* Star rating — Play Store–style yellow/gold */
.score-stars {
  letter-spacing: 0.08em;
  font-size: 1.05em;
}

.score-stars .score-star-filled {
  color: #ffc107 !important;
  text-shadow: 0 0 1px rgba(255, 179, 0, 0.5);
}

.score-stars .score-star-empty {
  color: #e0e0e0 !important;
}

.score-stars-empty {
  color: var(--color-ink-muted);
}

.score-out-of {
  font-size: 0.85em;
  font-weight: 500;
  color: var(--color-ink-muted);
}

.score-rating-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.score-rating-label {
  font-weight: 500;
}

.score-stars-input {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.score-star-btn {
  padding: 0.2rem 0.05rem;
  font-size: 1.5rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #e0e0e0 !important;
  -webkit-text-fill-color: #e0e0e0 !important;
  transition: color 0.2s ease, transform 0.15s ease;
}

.score-star-btn:hover {
  color: #ffc107 !important;
  -webkit-text-fill-color: #ffc107 !important;
  transform: scale(1.1);
}

/* Force yellow for filled stars (override any form/button inheritance) */
button.score-star-btn.filled,
.score-stars-input .score-star-btn.filled,
.admin-form .score-star-btn.filled {
  color: #ffc107 !important;
  -webkit-text-fill-color: #ffc107 !important;
  text-shadow: 0 0 1px rgba(255, 179, 0, 0.5);
}

.score-star-btn:focus {
  outline: 2px solid #ffb300;
  outline-offset: 2px;
}

.score-star-clear {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-ink-muted);
}

.score-star-clear:hover {
  color: var(--color-ink);
  border-color: var(--color-ink-muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-ink-muted);
}

.empty-state .btn {
  margin-top: 1rem;
}

/* Application form */
.application-form {
  /* max-width: 560px; */ /* temporarily disabled for full-width building */
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

/* Ensure name + phone inputs match the rest (text, number, select, textarea) */
.application-form .form-group input[type="text"],
.application-form .form-group input[type="email"],
.application-form .form-group input[type="tel"],
.application-form .form-group input[type="number"],
.application-form .form-group input[type="password"],
.application-form .form-group select,
.application-form .form-group textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  appearance: none;
  -webkit-appearance: none;
}
.application-form .form-group input:focus,
.application-form .form-group select:focus,
.application-form .form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.form-group .required {
  color: var(--color-accent);
}

/* Profile picture: compact professional empty state, mobile-friendly tap target */
.form-group-profile-photo .profile-photo-upload {
  position: relative;
}
.form-group-profile-photo .profile-photo-upload input[type="file"] {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}
.form-group-profile-photo .profile-photo-tap-target {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: 0.875rem 1rem;
  margin: 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--bg-muted, #f8fafc);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.form-group-profile-photo .profile-photo-tap-target:hover,
.form-group-profile-photo .profile-photo-tap-target:focus-within {
  border-color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.form-group-profile-photo .profile-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--border, #e2e8f0);
  color: var(--muted, #64748b);
}
.form-group-profile-photo .profile-photo-tap-target:hover .profile-photo-placeholder,
.form-group-profile-photo .profile-photo-tap-target:focus-within .profile-photo-placeholder {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary, #2563eb);
}
.form-group-profile-photo .profile-photo-tap-target-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.form-group-profile-photo .profile-photo-prompt-main {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text, #1e293b);
}
.form-group-profile-photo .profile-photo-prompt-sub {
  font-size: 0.8125rem;
  color: var(--muted, #64748b);
}
.form-group-profile-photo .profile-photo-chosen {
  font-size: 0.95rem;
  color: var(--success, #15803d);
  font-weight: 500;
}
.form-group-profile-photo .profile-photo-preview-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--bg-muted, #f8fafc);
  overflow: hidden;
}
.form-group-profile-photo .profile-photo-preview-wrap[hidden] {
  display: none !important;
}
.form-group-profile-photo .profile-photo-preview-wrap > img,
#profile_photo_preview,
.form-group-profile-photo .profile-photo-preview-img {
  display: block;
  max-width: 56px !important;
  max-height: 56px !important;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border, #e2e8f0);
  flex-shrink: 0;
  box-sizing: border-box;
}
.form-group-profile-photo .profile-photo-change-btn {
  cursor: pointer;
  margin: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}
@media (max-width: 480px) {
  .form-group-profile-photo .profile-photo-tap-target {
    min-height: 80px;
    padding: 1rem;
  }
  .form-group-profile-photo .profile-photo-placeholder {
    width: 52px;
    height: 52px;
  }
  .form-group-profile-photo .profile-photo-placeholder svg {
    width: 28px;
    height: 28px;
  }
}

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

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

.form-hint {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
}

.explanation {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  background: var(--color-ink-muted);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: help;
  margin-left: 0.2rem;
  vertical-align: middle;
  text-decoration: none;
  line-height: 1;
}

.form-hint a {
  color: var(--color-accent);
  font-weight: 500;
}

/* Application form questions (add/edit position) */
.form-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-question-row {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0;
  overflow: visible;
}

.form-question-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.form-question-row-header .question-number {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text, #1e293b);
}

.form-question-row-header .question-drag-handle {
  cursor: grab;
  padding: 0.25rem 0.5rem;
  color: var(--muted, #64748b);
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 6px;
  user-select: none;
}

.form-question-row-header .question-drag-handle:hover {
  color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.08);
}

.form-question-row-header .question-drag-handle:active {
  cursor: grabbing;
}

.form-question-row-dragging {
  opacity: 0.85;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
  z-index: 10;
  position: relative;
}

/* Drop indicator: clear bar between rows showing exact drop position */
.form-question-drop-indicator {
  display: none;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
  box-sizing: border-box;
}

.form-question-drop-indicator-visible {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin: 6px 0;
  padding: 0 1rem;
  background: rgba(37, 99, 235, 0.06);
  border: 2px dashed var(--primary, #2563eb);
  border-radius: 8px;
  pointer-events: auto;
  position: relative;
}

.form-question-drop-indicator-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary, #2563eb);
  background: var(--color-bg, #fff);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--primary, #2563eb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.form-question-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0;
}

.form-question-main .question-type-select {
  width: 140px;
  min-width: 140px;
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.form-question-main .question-label-input {
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.form-question-main .question-duplicate-btn,
.form-question-main .question-remove-btn {
  margin-left: 0.5rem;
}
.form-question-main .question-remove-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-question-main .question-required-label {
  margin: 0;
  white-space: nowrap;
  font-weight: 400;
}

.form-question-extra {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.form-question-extra .question-accept-wrap {
  min-width: 0;
}

.form-question-extra .question-options-wrap {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
}

.form-question-extra .question-accept-wrap {
  flex: 0 1 100%;
}

.question-accept-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.question-accept-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.question-accept-option input {
  margin: 0;
}

/* File upload: multiple images with preview and progress */
.file-upload-wrap {
  margin-top: 0.25rem;
}

.file-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.file-preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  flex-shrink: 0;
}

.file-preview-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-muted, #f5f5f5);
}

.file-preview-name {
  font-size: 0.75rem;
  color: var(--color-ink-muted);
  margin-top: 0.25rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-status {
  font-size: 0.875rem;
  color: var(--color-ink-muted);
  margin-top: 0.5rem;
}

.file-upload-progress {
  margin-top: 0.75rem;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.file-upload-progress-bar {
  height: 100%;
  background: var(--color-primary, #2563eb);
  border-radius: 3px;
  width: 0;
  transition: width 0.2s ease;
}

.file-upload-progress-indeterminate.file-upload-progress-bar {
  width: 30%;
  animation: file-upload-progress-pulse 1s ease-in-out infinite;
}

@keyframes file-upload-progress-pulse {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(350%); }
  100% { transform: translateX(-100%); }
}

.question-extra-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-ink-muted);
  margin-bottom: 0.3rem;
}

.form-question-extra input[type="text"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

/* Time slot selector (application form) – calendar / booking style */
.form-group-slot {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.slot-booking-block .slot-booking-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.slot-booking-hint {
  margin-bottom: 1.25rem;
  color: var(--color-ink-muted);
}

.slot-booking-empty {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--color-bg);
  border-radius: 12px;
  border: 1px dashed var(--color-border);
}

.slot-booking-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.slot-booking {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.slot-date-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.slot-date-heading {
  margin: 0;
  padding: 0.85rem 1.15rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.slot-date-day {
  color: var(--color-ink);
}

.slot-date-full {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-ink-muted);
}

.slot-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  padding: 1rem 1.15rem;
}

.slot-time-chip {
  margin: 0;
  cursor: pointer;
  display: block;
  position: relative;
}

.slot-time-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slot-time-chip-inner {
  display: block;
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
  text-align: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.slot-time-chip:hover .slot-time-chip-inner {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.slot-time-chip input[type="radio"]:focus-visible + .slot-time-chip-inner {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.slot-time-chip input[type="radio"]:checked + .slot-time-chip-inner {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--color-accent);
}

.slot-time-range {
  display: block;
  font-size: 0.95rem;
}

.slot-time-spots {
  display: block;
  font-size: 0.75rem;
  color: var(--color-ink-muted);
  margin-top: 0.2rem;
  font-weight: 400;
}

.slot-time-chip input[type="radio"]:checked + .slot-time-chip-inner .slot-time-spots {
  color: var(--color-accent);
}

/* Compact slot picker: calendar + time dropdown (Easy!Appointments style) */
.slot-picker-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}

.slot-calendar-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  min-width: 280px;
}

.slot-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.slot-calendar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink);
}

.slot-calendar-prev,
.slot-calendar-next {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-ink);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color 0.2s, background 0.2s;
}

.slot-calendar-prev:hover:not(:disabled),
.slot-calendar-next:hover:not(:disabled) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.slot-calendar-prev:disabled,
.slot-calendar-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.slot-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  text-align: center;
}

.slot-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.slot-calendar-day {
  aspect-ratio: 1;
  max-width: 36px;
  max-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: 8px;
  margin: 0 auto;
}

.slot-calendar-day-empty {
  color: var(--color-ink-muted);
  opacity: 0.5;
}

.slot-calendar-day-avail {
  border: 2px solid transparent;
  background: var(--color-bg);
  color: var(--color-ink);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}

.slot-calendar-day-avail:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.slot-calendar-day-selected {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

.slot-time-wrap {
  min-width: 200px;
  flex: 1;
}

.slot-time-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-ink);
}

.slot-time-select {
  width: 100%;
  max-width: 280px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-ink);
}

.slot-time-select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.slot-time-select:not(:disabled):focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}

/* Legacy list style (kept for backwards compatibility) */
.slot-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slot-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

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

.slot-option input[type="radio"]:checked + .slot-label {
  font-weight: 600;
}

.slot-option input[type="radio"] {
  flex-shrink: 0;
}

.slot-label {
  flex: 1;
}

.slot-spots {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  font-weight: 400;
}

.app-slot {
  font-size: 0.9rem;
  color: var(--color-herb);
  margin: 0.25rem 0 0;
}

.app-scheduled-interview {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  background: var(--color-accent-soft);
  border: 1px solid rgba(194, 65, 12, 0.2);
  border-radius: 10px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-width: 0;
  box-sizing: border-box;
}
.app-scheduled-interview strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}
.app-scheduled-interview-datetime {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-ink);
}

.app-location-note {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem 0.65rem 2.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-herb, #2d4a38);
  background: rgba(61, 90, 69, 0.08);
  border: 1px solid rgba(61, 90, 69, 0.25);
  border-radius: 8px;
  position: relative;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  min-width: 0;
  box-sizing: border-box;
}

.app-location-note::before {
  content: 'ℹ';
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-herb, #2d4a38);
  line-height: 1;
}

.app-details {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  font-size: 0.9rem;
}
.app-details dt {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink-muted);
  font-size: 0.85rem;
  overflow-wrap: break-word;
}
.app-details dd {
  margin: 0;
  font-weight: 500;
  color: var(--color-ink);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.app-details time {
  font-weight: 500;
}

.app-interview-location-details,
.app-meeting-address {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--color-herb-soft);
  border: 1px solid rgba(61, 90, 69, 0.15);
}
.app-interview-location-details strong,
.app-meeting-address strong {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-herb);
  display: block;
  margin-bottom: 0.4rem;
}
.app-interview-location-text,
.app-meeting-address-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-line;
  color: var(--color-ink);
}

.app-interview-location-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-herb);
  background: var(--color-surface);
  border: 1px solid rgba(61, 90, 69, 0.35);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.app-interview-location-map-btn:hover {
  background: rgba(61, 90, 69, 0.08);
  border-color: var(--color-herb);
  color: var(--color-herb);
}
.app-interview-location-map-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.app-submitted-details {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}
.app-submitted-details > strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-ink-muted);
  margin-bottom: 0.5rem;
}
.app-submitted-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 1rem;
  font-size: 0.9rem;
}
.app-submitted-list dt {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink-muted);
  overflow-wrap: break-word;
}
.app-submitted-list dd {
  margin: 0;
  color: var(--color-ink);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Admin */
.admin-page .filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.admin-page .filter-tabs a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-ink-muted);
  font-weight: 500;
}

.admin-page .filter-tabs a:hover,
.admin-page .filter-tabs a.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

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

.admin-application-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-application-card summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
}

.admin-application-card summary::-webkit-details-marker {
  display: none;
}

.admin-application-card summary::before {
  content: '▶';
  font-size: 0.7rem;
  color: var(--color-ink-muted);
  transition: transform 0.2s;
}

.admin-application-card[open] summary::before {
  transform: rotate(90deg);
}

.app-job {
  font-weight: 600;
}

.app-applicant {
  color: var(--color-ink-muted);
}

.app-detail {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.25rem;
  margin-top: 0;
}

.app-detail p {
  margin: 0.25rem 0;
}

.app-applicant-edit-form .app-edit-input {
  min-width: 200px;
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}
.app-applicant-edit-form p {
  margin-bottom: 0.5rem;
}

.answers-block {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--color-bg);
  border-radius: 8px;
}

.answers-block ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.admin-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Admin visitor stats bar */
.admin-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface-2, #f5f5f5);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--color-ink-muted);
}
.admin-stat strong {
  color: var(--color-ink);
  font-weight: 600;
}
.admin-stat-live strong {
  color: var(--color-accent, #0d6efd);
}
.admin-stat-link {
  color: inherit;
  text-decoration: none;
}
.admin-stat-link:hover {
  color: var(--color-accent);
}
.admin-stat-link:hover strong {
  color: inherit;
}
.admin-stat-link.admin-stat-live:hover strong {
  color: var(--color-accent);
}

/* Live admins bar (Redis presence) */
.admin-live-admins-bar .admin-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 0.35rem;
  vertical-align: middle;
  animation: admin-live-pulse 2s ease-in-out infinite;
}
@keyframes admin-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.admin-live-admins-bar .admin-live-you {
  color: var(--color-ink);
}

/* Admin sub-nav */
.admin-subnav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.admin-subnav a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-ink-muted);
  font-weight: 500;
}

.admin-subnav a:hover,
.admin-subnav a.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* Stage flow page */
.stage-flow-header {
  margin-bottom: 0.5rem;
}
.stage-flow-header h1 {
  margin: 0 0 0.35rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-ink);
}
.stage-flow-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-ink-muted, #64748b);
  line-height: 1.5;
  max-width: 52ch;
}

.stage-flow-page .admin-subnav {
  margin-bottom: 1.5rem;
}

.stage-flow-section {
  margin-bottom: 2.5rem;
  padding-top: 0.25rem;
}
.stage-flow-section-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stage-flow-section-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft, #fff7ed);
  color: var(--color-accent, #c2410c);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
}
.stage-flow-section-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-ink);
}
.stage-flow-section-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-ink-muted, #64748b);
  line-height: 1.5;
}

.stage-flow-empty {
  background: var(--color-bg, #fafafa);
  border: 1px dashed var(--color-border, #e2e8f0);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.stage-flow-empty p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-ink-muted, #64748b);
  line-height: 1.5;
}

.stage-flow-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.stage-flow-card-form {
  margin-bottom: 1.5rem;
}
.stage-flow-card-title {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: 0.01em;
}
.stage-flow-groups-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stage-flow-card.group-card {
  padding: 1.25rem 1.5rem;
}
.group-card-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.6rem;
}
.group-card-header .group-name {
  font-size: 1rem;
}
.group-card-header .group-desc {
  color: var(--color-ink-muted, #64748b);
  font-size: 0.9rem;
}
.flow-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
}
.flow-badge-count {
  background: var(--color-bg, #f1f5f9);
  color: var(--color-ink-muted, #64748b);
  border: 1px solid var(--color-border, #e2e8f0);
}
.flow-badge-all {
  background: var(--color-herb-soft, #ecfdf5);
  color: var(--color-herb, #3d5a45);
}
.flow-badge-role {
  background: var(--color-accent-soft, #fff7ed);
  color: var(--color-accent, #c2410c);
}
.flow-badge-group {
  background: #e0e7ff;
  color: #3730a3;
}
.flow-badge-disabled {
  background: var(--color-bg, #f1f5f9);
  color: var(--color-ink-muted, #64748b);
  border: 1px solid var(--color-border, #e2e8f0);
}
.stage-flow-rules-table tr.rule-row-disabled {
  opacity: 0.75;
}
.stage-flow-rules-table tr.rule-row-disabled .flow-from,
.stage-flow-rules-table tr.rule-row-disabled .flow-to,
.stage-flow-rules-table tr.rule-row-disabled .flow-badge:not(.flow-badge-disabled) {
  color: var(--color-ink-muted, #64748b);
}
.group-card-form-inline {
  margin-left: auto;
}
.group-members {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.9rem;
}
.group-members-label {
  color: var(--color-ink-muted, #64748b);
  font-weight: 500;
  margin-right: 0.25rem;
}
.member-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 6px;
  font-size: 0.875rem;
}
.member-remove-inline { display: inline; }
.member-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.2rem;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--color-ink-muted);
}
.member-remove-btn:hover { color: var(--color-error, #dc2626); }
.add-member-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.add-member-inline select { padding: 0.25rem 0.5rem; font-size: 0.9rem; border-radius: 6px; border: 1px solid var(--color-border); }
.group-edit-form { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--color-border); }
.group-edit-form .form-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-end; }
.group-edit-form .form-row input[type="text"] { flex: 1; min-width: 120px; padding: 0.35rem 0.5rem; border-radius: 6px; border: 1px solid var(--color-border); }
.stage-flow-page .form-row { display: flex; gap: 0.75rem 1rem; flex-wrap: wrap; align-items: flex-end; }
.stage-flow-page .form-row .form-group { flex: 1; min-width: 0; }
.stage-flow-page .form-row .form-group-actions { flex: 0 0 auto; }
.stage-flow-page .form-row-flex { flex-wrap: wrap; }
.stage-flow-page .stage-flow-bidir-wrap {
  flex: 1 1 100%;
  align-self: flex-start;
  align-items: flex-start;
}
.stage-flow-page .stage-flow-bidir-wrap .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}
.stage-flow-page .stage-flow-bidir-hint {
  margin: 0.35rem 0 0;
  max-width: 42rem;
  font-size: 0.85rem;
  line-height: 1.35;
}

/* Rules table */
.stage-flow-rules-wrap {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.stage-flow-rules-table {
  margin: 0;
  width: 100%;
}
.stage-flow-rules-table .col-rule-num {
  width: 3rem;
  text-align: center;
  vertical-align: middle;
}
.stage-flow-rules-table .rule-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--color-bg, #f1f5f9);
  color: var(--color-ink-muted, #64748b);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
}
.stage-flow-rules-table .col-bidir {
  width: 4.5rem;
  text-align: center;
  vertical-align: middle;
}
.stage-flow-rules-table .rule-bidir-toggle-form {
  display: inline-flex;
  justify-content: center;
  margin: 0;
}
.stage-flow-rules-table .rule-bidir-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.25rem;
}
.stage-flow-rules-table .rule-bidir-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-primary, #c2410c);
}
.stage-flow-rules-table .rule-bidir-na,
.stage-flow-rules-table .rule-bidir-readonly {
  font-size: 0.85rem;
  color: var(--color-muted, #64748b);
}
.stage-flow-rules-table .col-enabled {
  width: 5rem;
  text-align: center;
  vertical-align: middle;
}
.stage-flow-rules-table .rule-enabled-toggle-form {
  display: inline-flex;
  justify-content: center;
  margin: 0;
}
.stage-flow-rules-table .rule-enabled-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.25rem;
}
.stage-flow-rules-table .rule-enabled-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-primary, #c2410c);
}
.stage-flow-rules-table .rule-enabled-readonly {
  font-size: 0.85rem;
  color: var(--color-muted, #64748b);
}
.stage-flow-rules-table .col-transition {
  min-width: 200px;
}
.stage-flow-rules-table .flow-from,
.stage-flow-rules-table .flow-to {
  font-size: 0.9rem;
}
.stage-flow-rules-table .flow-arrow {
  margin: 0 0.5rem;
  color: var(--color-ink-muted, #94a3b8);
  font-weight: 600;
}
.stage-flow-rules-table .col-allowed {
  min-width: 140px;
}
.stage-flow-rules-table .col-reorder {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
.rule-order-buttons {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: center;
}
.rule-order-form {
  display: inline;
  margin: 0;
}
.rule-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}
.rule-row-actions .rule-action-form { display: inline; margin: 0; }
.stage-flow-page .btn-icon {
  min-width: 2rem;
  padding: 0.25rem 0.4rem;
  font-size: 1rem;
  line-height: 1.2;
}
.stage-flow-page .btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
/* Stage flow action buttons – solid backgrounds like Apply now */
.stage-flow-page .btn-flow-danger {
  background: var(--color-error, #dc2626);
  color: #fff;
  border: 1px solid var(--color-error, #dc2626);
}
.stage-flow-page .btn-flow-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.stage-flow-page .btn-flow-success {
  background: var(--color-herb, #15803d);
  color: #fff;
  border: 1px solid var(--color-herb, #15803d);
}
.stage-flow-page .btn-flow-success:hover {
  background: #166534;
  border-color: #166534;
  color: #fff;
}
.stage-flow-page .btn-flow-warning {
  background: var(--color-pending, #d97706);
  color: #fff;
  border: 1px solid var(--color-pending, #d97706);
}
.stage-flow-page .btn-flow-warning:hover {
  background: #b45309;
  border-color: #b45309;
  color: #fff;
}
.stage-flow-page .btn-flow-edit {
  background: var(--color-accent, #c2410c);
  color: #fff;
  border: 1px solid var(--color-accent, #c2410c);
}
.stage-flow-page .btn-flow-edit:hover {
  background: var(--color-accent-hover, #9a3412);
  border-color: var(--color-accent-hover, #9a3412);
  color: #fff;
}
.stage-flow-page .btn-flow-duplicate {
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
}
.stage-flow-page .btn-flow-duplicate:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.stage-flow-page .btn-flow-secondary {
  background: var(--color-bg, #f1f5f9);
  color: var(--color-ink, #334155);
  border: 1px solid var(--color-border, #cbd5e1);
}
.stage-flow-page .btn-flow-secondary:hover {
  background: var(--color-border, #e2e8f0);
  color: var(--color-ink, #1e293b);
  border-color: var(--color-ink-muted, #94a3b8);
}
.stage-flow-page .btn-flow-order {
  color: var(--color-ink-muted, #64748b);
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-bg, #f8fafc);
}
.stage-flow-page .btn-flow-order:hover:not(:disabled) {
  background: var(--color-accent, #c2410c);
  color: #fff;
  border-color: var(--color-accent, #c2410c);
}
.stage-flow-rules-table .col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.stage-flow-page .inline-form { display: inline; }
.stage-flow-page .btn-danger-ghost:hover {
  color: var(--color-error, #dc2626);
  background: rgba(220, 38, 38, 0.08);
}

/* Settings page */
.admin-settings .admin-settings-nav-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.admin-settings .admin-settings-nav-row .admin-subnav {
  margin-bottom: 0;
  padding-bottom: 0;
}

.admin-settings .admin-settings-nav-row .settings-tabs {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.admin-settings .settings-tabs {
  display: flex;
  gap: 0.5rem;
}

.admin-settings .settings-tab {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-ink-muted);
  font-weight: 500;
}

.admin-settings .settings-tab:hover,
.admin-settings .settings-tab.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.admin-settings .settings-tab-panel {
  display: none;
}

.admin-settings .settings-tab-panel.active {
  display: block;
}

.admin-settings .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.mail-debug-log-wrap {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #1e293b;
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.8rem;
}
.mail-debug-log-summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.mail-debug-log {
  margin: 0;
  padding: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 20rem;
  overflow-y: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  line-height: 1.4;
}

.admin-settings .settings-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.admin-settings .settings-card h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.admin-settings .settings-card .application-form {
  max-width: none;
  padding: 0;
  border: none;
  box-shadow: none;
  margin-top: 1rem;
}

.admin-settings .settings-card-full {
  grid-column: 1 / -1;
}

.admin-settings .slot-form .form-row-3 {
  margin-bottom: 0;
}

.admin-settings .slot-form .form-group {
  margin-bottom: 1rem;
}

.admin-table tr.slot-past {
  opacity: 0.65;
}

.admin-table tr.slot-past td {
  color: var(--color-ink-muted);
}

/* Working days (by position) */
.working-days-form {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.working-days-form:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.working-days-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.working-days-position {
  min-width: 160px;
}

.working-days-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.working-days-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
  cursor: pointer;
  font-size: 0.95rem;
}

.working-days-label input {
  margin: 0;
}

.working-days-position-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.working-days-header {
  margin-bottom: 0.25rem;
}

.working-days-header .working-days-header-label {
  font-size: 0.8rem;
  color: var(--color-ink-muted);
  min-width: 4rem;
}

.working-days-day-row {
  margin-bottom: 0.35rem;
}

.working-days-day-check {
  min-width: 5rem;
}

.working-days-time {
  min-width: 8rem;
  width: 8rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-right: 0.25rem;
  box-sizing: border-box;
}

.time-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.time-ampm {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  min-width: 2rem;
}

.profile-select {
  min-width: 220px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.profile-assign-form {
  margin-bottom: 0.5rem;
}

.admin-settings .profile-form .working-days-day-row {
  margin-bottom: 0.35rem;
}

/* Time slot profile form: grid layout and quick fill */
.profile-form .working-days-header {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 100px 100px;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
}

.profile-quick-fill {
  display: grid !important;
  grid-template-columns: 80px 1fr 1fr 100px 100px !important;
  gap: 0.75rem !important;
  align-items: center !important;
  margin-bottom: 0.75rem !important;
  padding: 0.6rem 0.75rem !important;
  background: var(--color-bg) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 8px !important;
}

.profile-quick-fill .working-days-header-label {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  font-weight: 500;
}

.profile-quick-fill .profile-copy-all-times {
  white-space: nowrap;
}

.profile-form .working-days-day-row {
  display: grid !important;
  grid-template-columns: 80px 1fr 1fr 100px 100px !important;
  gap: 0.75rem !important;
  align-items: center !important;
  margin-bottom: 0.5rem !important;
  padding: 0.25rem 0 !important;
}

.profile-form .working-days-time {
  min-width: 0;
  width: 100%;
  max-width: 7rem;
}

.profile-form .working-days-day-row select {
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  min-width: 0;
}

.profile-form .working-days-day-row input[type="number"] {
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  width: 4rem;
  min-width: 0;
  box-sizing: border-box;
}

.profile-form .working-days-day-check {
  min-width: 0;
}

.profile-form .working-days-day-row:hover {
  background: rgba(0, 0, 0, 0.02);
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
  border-radius: 6px;
}

.profile-form .working-days-time::placeholder {
  color: var(--color-ink-muted);
  opacity: 0.8;
}

.profile-form .working-days-time:focus,
.profile-form .working-days-day-row select:focus,
.profile-form .working-days-day-row input[type="number"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.admin-table th {
  font-weight: 600;
  color: var(--color-ink-muted);
  font-size: 0.85rem;
}

.admin-table tbody tr:hover {
  background: var(--color-bg);
}

/* Stage builder: row form with label + description */
.stages-table .stage-row-form-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.stages-table .stage-label-input {
  width: 10rem;
  min-width: 8rem;
}
.stages-table .stage-desc-input {
  width: 14rem;
  min-width: 10rem;
  max-width: 100%;
}
.stages-table .stage-desc-display {
  max-width: 16rem;
  font-size: 0.9rem;
  color: var(--color-ink-muted);
}
.stages-table .stages-col-order {
  width: 3.25rem;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}
.stages-table .stage-order-buttons {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: center;
}
.stages-table .stage-order-form {
  display: inline;
  margin: 0;
}
.stages-table .stage-order-buttons .btn.btn-icon {
  min-width: 2rem;
  padding: 0.25rem 0.4rem;
  font-size: 1rem;
  line-height: 1.2;
}
.stages-table .stage-order-buttons .btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.stages-table .stage-order-buttons .btn-flow-order {
  color: var(--color-ink-muted, #64748b);
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-bg, #f8fafc);
}
.stages-table .stage-order-buttons .btn-flow-order:hover:not(:disabled) {
  background: var(--color-accent, #c2410c);
  color: #fff;
  border-color: var(--color-accent, #c2410c);
}
.stage-color-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.stage-color-picker {
  width: 2rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}
.stage-color-input {
  width: 5rem;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
.stage-color-display {
  font-size: 0.85rem;
}
.stage-color-swatch {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--color-border, #e2e8f0);
  vertical-align: middle;
  margin-right: 0.35rem;
}

.address-details-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}
.address-details-card {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
}
.address-details-title {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}
.address-details-meta {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  margin: 0 0 1rem;
}
.address-details-card .form-actions {
  margin-top: 1rem;
}

/* Mega applicants table */
.mega-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.mega-table-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.mega-table-filter .filter-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-ink-muted);
}

.mega-table-input,
.mega-table-select {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}

.mega-table-input {
  min-width: 12rem;
}

.mega-table-count {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  margin-left: auto;
}

.mega-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.mega-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.mega-table th,
.mega-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.mega-table td.mega-td-notes,
.mega-table td.mega-td-schedule {
  white-space: normal;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-table th.mega-th {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-ink-muted);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}

.mega-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.mega-table th.sortable:hover {
  color: var(--color-ink);
}

.mega-table th.sortable::after {
  content: ' ⇅';
  opacity: 0.4;
  font-size: 0.75rem;
}

.mega-table th.sort-asc::after {
  content: ' ↑';
  opacity: 1;
}

.mega-table th.sort-desc::after {
  content: ' ↓';
  opacity: 1;
}

.mega-table tbody tr:hover {
  background: var(--color-bg);
}

.mega-table .mega-td-id {
  width: 2.5rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  font-weight: 500;
}

.badge-you {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.text-muted {
  color: var(--color-ink-muted);
  font-size: 0.9rem;
}

.inline-form {
  display: inline;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.admin-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.admin-form input[type="number"],
.admin-form textarea {
  display: block;
  width: 100%;
  max-width: 300px;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.status-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Decision block — choose one: Schedule / Hire / Reject */
.decision-choices-wrap {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.decision-actions-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.decision-actions-container .decision-schedule-wrap {
  order: -1;
}

.decision-heading {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.25rem;
  color: var(--color-ink);
}

.decision-hint {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  margin: 0 0 1rem;
}

.decision-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.decision-option {
  flex: 1;
  min-width: 200px;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.decision-option:hover {
  border-color: var(--color-ink-muted);
  box-shadow: var(--shadow);
}

.app-detail-denial {
  font-size: 0.9rem;
  color: var(--color-ink-muted, #64748b);
  margin: 0.35rem 0 0 0;
  padding: 0.5rem 0;
  border-left: 3px solid var(--color-danger, #dc2626);
  padding-left: 0.75rem;
}
.denial-form-inline {
  margin-top: 0.75rem;
}
.denial-form-inline .denial-reason-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.denial-form-inline .denial-reason-label textarea {
  width: 100%;
  max-width: 28rem;
  min-height: 4rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 0.9rem;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
}
.denial-form-inline .denial-reason-label .required { color: #dc2626; }

.decision-option-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.decision-option-desc {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  margin: 0 0 0.75rem;
}

.decision-form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.decision-date-input {
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}

.schedule-datetime-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.schedule-datetime-wrap input[type="date"],
.schedule-datetime-wrap select.schedule-time-select,
.schedule-datetime-wrap select.reschedule-time-select,
.schedule-datetime-wrap select.kanban-form-input {
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}
.schedule-datetime-wrap select.schedule-time-select,
.schedule-datetime-wrap select.reschedule-time-select,
.schedule-datetime-wrap select.kanban-form-input {
  min-width: 5rem;
}

/* Distinct, harmonious action buttons (white text guaranteed) */
.btn-success {
  background: #15803d;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  border: none;
}

.btn-success:hover {
  background: #166534;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.btn-danger {
  background: #b91c1c;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  border: none;
}

.btn-danger:hover {
  background: #991b1b;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.btn-schedule {
  background: #2563eb;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  border: none;
}

.btn-schedule:hover {
  background: #1d4ed8;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.decision-option-hire .btn-success,
.decision-option-accept .btn-success,
.decision-option-reject .btn-danger,
.decision-option-schedule .btn-schedule {
  width: 100%;
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink-muted);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-brand .logo {
  font-size: 1.25rem;
}

.footer-brand p {
  margin: 0.5rem 0;
}

.social-link {
  color: var(--color-accent);
  font-weight: 500;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--color-ink-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-copy {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .site-header {
    overflow: visible;
  }
  .header-inner {
    padding: 0.6rem 0.75rem;
    min-width: 0;
    gap: 0.5rem;
  }
  .header-inner .logo {
    flex-shrink: 1;
    min-width: 0;
    font-size: 1rem;
    max-width: 45%;
  }
  .nav {
    gap: 0.35rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-shrink: 0;
    min-width: 0;
  }
  .nav a {
    font-size: 0.8125rem;
    padding: 0.35rem 0.25rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
  .nav .btn-ghost {
    padding: 0.35rem 0.4rem;
  }
  .logo {
    font-size: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .application-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1rem;
  }
  .application-item .app-meta {
    flex-direction: row;
    align-items: center;
  }
  .app-main {
    padding: 1rem 1rem 1.25rem;
  }
  .app-scheduled-interview {
    padding: 0.65rem 0.85rem;
  }
  .app-location-note {
    padding: 0.6rem 0.75rem 0.6rem 0.75rem;
    padding-left: 0.75rem;
  }
  .app-location-note::before {
    position: static;
    transform: none;
    display: block;
    margin-bottom: 0.25rem;
  }
  .app-details {
    grid-template-columns: 1fr;
    gap: 0.15rem 0;
  }
  .app-details dt {
    margin-top: 0.5rem;
  }
  .app-details dt:first-child {
    margin-top: 0;
  }
  .app-submitted-list {
    grid-template-columns: 1fr;
  }
  .app-submitted-list dt {
    margin-top: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--color-border);
  }
  .app-submitted-list dt:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
  .dashboard-header {
    padding: 1.25rem 1rem;
  }
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
  .thank-you-card {
    padding: 2rem 1.25rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .thank-you-title {
    font-size: 1.5rem;
  }
  .thank-you-message {
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--color-herb, #2d4a38);
    border-radius: 0 10px 10px 0;
  }
  .thank-you-message p {
    font-size: 0.9rem;
  }
  .thank-you-actions {
    flex-direction: column;
    width: 100%;
  }
  .thank-you-actions .btn,
  .thank-you-actions .btn-lg {
    width: 100%;
    margin: 0;
  }
}

/* ========== Kanban (Pipeline) ========== */
.kanban-page.main-content,
.kanban-page .main-content,
main.kanban-main { max-width: none; padding-left: 1rem; padding-right: 1rem; }
.kanban-main .kanban-container { width: 100%; min-height: 80vh; box-sizing: border-box; }

.kanban-main .kanban-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.kanban-main .kanban-header .admin-subnav { margin: 0.5rem 0 1rem 0; }
.kanban-main .kanban-title {
  font-family: var(--font-heading, 'DM Serif Display', serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text, #111);
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}
.kanban-main .kanban-subtitle {
  font-size: 0.9rem;
  color: var(--muted, #6b7280);
  margin: 0;
  }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  }
.kanban-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
}
.kanban-toolbar .kanban-search-wrap {
  margin-top: 0;
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;
}
.kanban-bulk-collapse {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.kanban-bulk-btn {
  margin: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--bg, #fff);
  color: var(--muted, #64748b);
  cursor: pointer;
  white-space: nowrap;
}
.kanban-bulk-btn:hover {
  border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.06);
}
.kanban-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  max-width: 320px;
  }
.kanban-search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--color-bg, #fff);
  }
.kanban-search-input:focus {
  outline: none;
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  }
.kanban-search-clear {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--color-bg, #fff);
  color: var(--muted, #6b7280);
  cursor: pointer;
  }
.kanban-search-clear:hover {
  background: var(--color-bg-muted, #f3f4f6);
  color: var(--text, #111);
  }
.kanban-card-search-hidden {
  display: none !important;
  }

/* Wrapper: horizontal scroll only; board is one row */
.kanban-main .kanban-board-wrap {
  display: block;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  box-sizing: border-box;
}
.kanban-main .kanban-board-wrap::-webkit-scrollbar { height: 8px; }
.kanban-main .kanban-board-wrap::-webkit-scrollbar-track { background: var(--bg-muted, #f3f4f6); border-radius: 4px; }
.kanban-main .kanban-board-wrap::-webkit-scrollbar-thumb { background: var(--muted, #9ca3af); border-radius: 4px; }

/* Board: CSS Grid = one column per stage, single row, no wrap */
.kanban-main .kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 1rem;
  min-height: 420px;
  align-items: start;
  width: max-content;
  min-width: 100%;
  padding-right: 1rem;
  box-sizing: border-box;
}

.kanban-main .kanban-column {
  display: block;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  box-sizing: border-box;
  background: var(--bg-muted, #f8fafc);
  border-radius: 12px;
  border: 1px solid var(--border, #e2e8f0);
  padding: 0.75rem;
  min-height: 360px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.kanban-column-drag-over {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.04);
}
.kanban-col-pending { border-top: 3px solid #94a3b8; }
.kanban-col-approved { border-top: 3px solid #3b82f6; }
.kanban-col-stage_2 { border-top: 3px solid #6366f1; }
.kanban-col-stage_3 { border-top: 3px solid #8b5cf6; }
.kanban-col-accepted { border-top: 3px solid #22c55e; background: rgba(34, 197, 94, 0.05); }
.kanban-col-hired { border-top: 3px solid #0d9488; background: rgba(13, 148, 136, 0.06); }
.kanban-col-denied { border-top: 3px solid #ef4444; background: rgba(239, 68, 68, 0.05); }
/* Stage color from Stage Builder: override .kanban-main .kanban-column background */
.kanban-main .kanban-column.kanban-column-custom-color {
  border-top: 3px solid var(--kanban-stage-color);
  background: color-mix(in srgb, var(--kanban-stage-color) 12%, var(--bg-muted, #f8fafc));
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .kanban-main .kanban-column.kanban-column-custom-color {
    background: var(--bg-muted, #f8fafc);
  }
}

.kanban-column-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.kanban-column-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.kanban-column-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
.kanban-column-search,
.kanban-column-sort {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--bg, #fff);
  color: var(--text, #1e293b);
  font-size: 0.78rem;
}
.kanban-column-search:focus,
.kanban-column-sort:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.kanban-column-description {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted, #64748b);
  margin: 0;
  max-height: 3.2em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.kanban-column-description:hover {
  max-height: none;
  -webkit-line-clamp: unset;
}
.kanban-column-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text, #1e293b);
  letter-spacing: 0.01em;
}
.kanban-column-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  background: var(--bg, #fff);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  min-width: 1.5rem;
  text-align: center;
}

.kanban-column-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 200px;
}

.kanban-card {
  background: var(--bg, #fff);
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  outline: none;
}
.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--border-hover, #cbd5e1);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card-dragging {
  opacity: 0.85;
  transform: scale(0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--primary, #2563eb);
  z-index: 100;
}

.kanban-card-updated {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  max-width: 56%;
  text-align: right;
  z-index: 1;
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
  line-height: 1.2;
}
.kanban-card-updated-time {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text, #334155);
}
.kanban-card-updated-by {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.kanban-card-inner:has(.kanban-card-updated) .kanban-card-title {
  padding-right: 42%;
}
.kanban-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text, #1e293b);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}
.kanban-card-meta {
  font-size: 0.8rem;
  color: var(--muted, #64748b);
  margin-bottom: 0.35rem;
}
.kanban-card-collapse-btn {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--text, #334155);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
}
.kanban-card-collapse-btn:hover {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}
.kanban-card-details {
  display: block;
  width: 100%;
}
.kanban-card.kanban-card-collapsed .kanban-card-details {
  display: none;
}
.kanban-card-id {
  font-size: 0.75rem;
  color: var(--muted, #94a3b8);
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}
.kanban-card-date {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  margin-top: 0.25rem;
}
.kanban-kye-status {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}
.kanban-kye-status .kanban-date-label {
  font-weight: 500;
  margin-right: 0.2rem;
}
.kanban-kye-filled {
  color: #047857;
}
.kanban-kye-missing {
  color: #b45309;
}
.kanban-card-date .kanban-date-label {
  font-weight: 500;
  color: var(--muted, #64748b);
  margin-right: 0.2rem;
}
.kanban-card-date-added {
  margin-top: 0.15rem;
}
.kanban-card-score {
  margin-top: 0.4rem;
  font-size: 0.9rem;
}
.kanban-card-score .score-star-filled { color: #f59e0b; }

.kanban-card-edit {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted, #64748b);
  text-decoration: none;
  font-weight: 500;
}
.kanban-card-edit:hover {
  color: var(--primary, #2563eb);
  text-decoration: underline;
}

/* Kanban modal: hidden by default, only visible with .kanban-modal-open */
.kanban-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(2px);
  display: none;
}
.kanban-modal-overlay.kanban-modal-open {
  display: flex;
}
.kanban-modal {
  background: var(--bg, #fff);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  width: 100%;
  padding: 1.5rem;
}
.kanban-modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: var(--text, #1e293b);
}
.kanban-modal-desc {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  margin: 0 0 1.25rem 0;
}
.kanban-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text, #374151);
  margin-bottom: 0.35rem;
}
.kanban-form-label .required { color: #dc2626; }
.kanban-form-input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}
.kanban-form-input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.kanban-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e5e7eb);
}
.kanban-modal-actions .btn { min-width: 5rem; }

/* Position form preview modal */
.position-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.position-preview-modal {
  background: var(--color-surface, #fff);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.position-preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.position-preview-modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-ink);
}
.position-preview-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--color-ink-muted);
}
.position-preview-close:hover {
  color: var(--color-ink);
}
.position-preview-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1 1 auto;
}
.position-preview-loading,
.position-preview-error {
  margin: 0;
  color: var(--color-ink-muted);
}
.position-preview-meta {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.position-preview-meta-row {
  margin: 0.35rem 0;
  font-size: 0.95rem;
}
.position-preview-set {
  color: var(--color-herb, #15803d);
  font-weight: 500;
}
.position-preview-not-set {
  color: var(--color-ink-muted);
  font-style: italic;
}
.position-preview-location-detail {
  display: block;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  margin-top: 0.2rem;
}
.position-preview-form-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--color-ink);
}
.position-preview-dept {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--color-ink-muted);
}
.position-preview-description {
  font-size: 0.9rem;
  color: var(--color-ink);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.position-preview-questions {
  list-style: none;
  padding: 0;
  margin: 0;
}
.position-preview-question {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.position-preview-q-label { font-weight: 500; }
.position-preview-q-type {
  font-size: 0.8rem;
  color: var(--color-ink-muted);
  background: var(--color-bg, #f1f5f9);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.position-preview-q-required {
  font-size: 0.75rem;
  color: var(--color-error, #dc2626);
}
.position-preview-no-questions {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: 0.9rem;
}

/* Sortable table headers */
.admin-table-sortable .th-sortable { white-space: nowrap; }
.admin-table-sortable .th-sort-link {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
  display: inline-block;
  padding: 0.15em 0;
}
.admin-table-sortable .th-sort-link:hover {
  text-decoration: underline;
  color: var(--color-accent, #c2410c);
}
.admin-table-sortable .th-actions { text-align: center; }
.admin-table-sortable .th-actions .th-actions-label { font-weight: 600; }

/* Positions table: action buttons – spacing and distinct colors */
.position-actions-cell {
  white-space: nowrap;
  vertical-align: middle;
}
.position-created-cell,
.position-last-edit-cell {
  font-size: 0.9rem;
  vertical-align: top;
}
.position-meta-by {
  display: block;
  font-weight: 500;
  color: var(--color-ink);
}
.position-meta-date {
  display: block;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  margin-top: 0.15rem;
}
.position-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.position-row-actions-two-rows {
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
}
.position-actions-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.2rem;
  justify-content: center;
}
.position-actions-row .btn-icon {
  width: 28px;
  height: 28px;
}
.position-actions-row .position-action-form {
  display: inline-flex;
  margin: 0;
}
.position-action-form {
  display: inline-flex;
  margin: 0;
}
.position-row-actions .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.position-row-actions .btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.position-row-actions .btn-icon svg {
  display: block;
}
.btn-position-preview.btn-icon,
.btn-position-logs.btn-icon,
.btn-position-history.btn-icon {
  background: var(--color-bg, #f1f5f9);
  color: var(--color-ink-muted, #64748b);
  border-color: var(--color-border, #cbd5e1);
}
.btn-position-preview.btn-icon:hover,
.btn-position-logs:hover,
.btn-position-history:hover {
  background: var(--color-border, #e2e8f0);
  color: var(--color-ink);
  border-color: var(--color-ink-muted, #94a3b8);
}
.btn-position-activate.btn-icon {
  background: var(--color-herb, #15803d);
  color: #fff;
  border-color: var(--color-herb, #15803d);
}
.btn-position-activate.btn-icon:hover {
  background: #166534;
  border-color: #166534;
  color: #fff;
}
.btn-position-deactivate.btn-icon {
  background: var(--color-pending, #d97706);
  color: #fff;
  border-color: var(--color-pending, #d97706);
}
.btn-position-deactivate.btn-icon:hover {
  background: #b45309;
  border-color: #b45309;
  color: #fff;
}
.btn-position-edit.btn-icon {
  background: var(--color-accent, #c2410c);
  color: #fff;
  border-color: var(--color-accent, #c2410c);
}
.btn-position-edit.btn-icon:hover {
  background: var(--color-accent-hover, #9a3412);
  border-color: var(--color-accent-hover, #9a3412);
  color: #fff;
}
.btn-position-duplicate.btn-icon {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.btn-position-duplicate.btn-icon:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.btn-position-delete.btn-icon {
  background: var(--color-error, #dc2626);
  color: #fff;
  border-color: var(--color-error, #dc2626);
}
.btn-position-delete.btn-icon:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.btn-position-delete.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Position history page */
.position-history-table { margin-top: 1rem; }
.position-history-action { font-size: 0.9rem; color: var(--muted, #64748b); }
.position-history-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.position-history-actions .position-action-form { display: inline-flex; }
.position-snapshot-meta { color: var(--muted, #64748b); margin-bottom: 1rem; }
.position-snapshot-content { margin-top: 1rem; }
.position-snapshot-details .position-preview-description { margin-top: 0.25rem; }

/* Right-click context menu on Kanban cards - moved to body by JS so position:fixed is viewport-relative */
.kanban-context-menu {
  position: fixed;
  z-index: 10000;
  min-width: 180px;
  padding: 0.25rem 0;
  background: var(--bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: none;
  left: 0;
  top: 0;
}
.kanban-context-menu.kanban-context-menu-visible {
  display: block;
}
.kanban-context-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  text-align: left;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--text, #1e293b);
  cursor: pointer;
}
.kanban-context-menu-item:hover {
  background: var(--bg-muted, #f1f5f9);
}

/* Applicant history modal - strict viewport bounds (vh/vw), only the list scrolls */
.kanban-history-overlay {
  padding: 2vh 2vw;
  box-sizing: border-box;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}
.kanban-history-modal {
  width: 100%;
  max-width: 90vw;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.kanban-history-modal .kanban-modal-title {
  flex-shrink: 0;
}
.kanban-history-subtitle {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  margin: 0 0 1rem 0;
  flex-shrink: 0;
}
.kanban-history-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.kanban-history-modal .kanban-modal-actions {
  flex-shrink: 0;
  margin-top: 1rem;
}
.kanban-history-loading {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted, #64748b);
}
.kanban-history-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border, #e2e8f0);
  margin-left: 0.5rem;
  padding-left: 1rem;
}
.kanban-history-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border, #f1f5f9);
  position: relative;
}
.kanban-history-item:last-child { border-bottom: none; }
.kanban-history-item::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 0.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
}
.kanban-history-date {
  display: block;
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  margin-bottom: 0.2rem;
}
.kanban-history-label {
  font-size: 0.9rem;
  color: var(--text, #1e293b);
}
.kanban-history-empty,
.kanban-history-error {
  padding: 1rem;
  color: var(--muted, #64748b);
  font-size: 0.9rem;
  margin: 0;
}
.kanban-history-error { color: #dc2626; }

/* Submitted form quick view modal (admin index + kanban) */
.submitted-form-overlay .submitted-form-content .answers-block {
  margin-top: 0;
}
.submitted-form-overlay .submitted-form-content .answers-block ul {
  margin-bottom: 0;
}

/* All attached documents viewer modal */
.docs-viewer-overlay .docs-viewer-content {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.docs-viewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 0.25rem 0;
}
.doc-card {
  background: var(--color-bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.doc-card-title {
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 0.75rem;
  color: var(--text, #1e293b);
  border-bottom: 1px solid var(--border, #e2e8f0);
  word-break: break-word;
}
.doc-card-preview {
  display: block;
  width: 100%;
  object-fit: contain;
  background: #fff;
}
.doc-card-image {
  max-height: 220px;
  min-height: 120px;
  cursor: zoom-in;
}
.doc-card-image:hover {
  opacity: 0.95;
}
.doc-card-pdf {
  height: 280px;
  border: none;
}
.doc-card-download,
.doc-card-open-new {
  display: inline-block;
  margin: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--primary, #2563eb);
  text-decoration: none;
}
.doc-card-download:hover,
.doc-card-open-new:hover {
  text-decoration: underline;
}
.doc-card-open-new {
  margin-top: 0.25rem;
}
.doc-card-other .doc-card-title {
  border-bottom: none;
}
.doc-card-other .doc-card-download {
  margin-top: 0.75rem;
}
.docs-viewer-overlay .kanban-history-empty {
  padding: 1.5rem;
  color: var(--muted, #64748b);
  margin: 0;
}

/* Docs upload zone (drag & drop + add files) */
.docs-upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 2px dashed var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--bg-muted, #f8fafc);
  transition: border-color 0.15s, background 0.15s;
}
.docs-upload-zone-drag {
  border-color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.06);
}
.docs-upload-zone-busy {
  opacity: 0.8;
  pointer-events: none;
}
.docs-upload-zone-text {
  color: var(--muted, #64748b);
  font-size: 0.9rem;
}
.docs-add-files-btn {
  font-size: 0.9rem;
}
.docs-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

/* Doc card title row with actions (rename / delete) */
.doc-card-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  flex-wrap: wrap;
}
.doc-card-title-wrap .doc-card-title {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  padding: 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text, #1e293b);
  word-break: break-word;
}
.doc-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.doc-card-action {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  background: #fff;
  color: var(--text, #1e293b);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.doc-card-action:hover {
  background: var(--bg-muted, #f1f5f9);
  border-color: var(--muted, #94a3b8);
}
.doc-card-rename { }
.doc-card-delete { color: var(--error, #dc2626); }
.doc-card-delete:hover { background: rgba(220, 38, 38, 0.08); border-color: var(--error, #dc2626); }
.doc-card-title-input {
  width: 100%;
  max-width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--primary, #2563eb);
  border-radius: 4px;
  box-sizing: border-box;
}
.doc-card:not(.doc-card-other) .doc-card-title-wrap {
  padding: 0.6rem 0.75rem;
}
.doc-card-other .doc-card-title-wrap { border-bottom: none; }

/* Full-page applicant history (admin/application_history_page.php) */
.applicant-history-subtitle { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text, #1e293b); }
.applicant-history-timeline {
  list-style: none;
  margin: 1.5rem 0 0 0;
  padding: 0;
  border-left: 2px solid var(--border, #e2e8f0);
  margin-left: 0.5rem;
  padding-left: 1.25rem;
}
.applicant-history-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border, #f1f5f9);
  position: relative;
}
.applicant-history-item:last-child { border-bottom: none; }
.applicant-history-item::before {
  content: '';
  position: absolute;
  left: -1.35rem;
  top: 0.85rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
}
.applicant-history-date {
  display: block;
  font-size: 0.8rem;
  color: var(--muted, #64748b);
  margin-bottom: 0.25rem;
}
.applicant-history-label { font-size: 0.95rem; color: var(--text, #1e293b); }
.applicant-history-by { color: var(--muted, #64748b); font-weight: normal; }

/* Activity log */
.logs-filter-form .filter-label { display: block; font-size: 0.8rem; color: var(--muted, #64748b); margin-bottom: 0.25rem; }
.logs-filter-select, .logs-filter-input { padding: 0.35rem 0.5rem; border: 1px solid var(--border, #e5e7eb); border-radius: 4px; }
.logs-filter-form .filter-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  color: var(--color-herb, #15803d);
  background: var(--color-herb-soft, #dcfce7);
  border: 1px solid var(--color-herb, #15803d);
  border-radius: 6px;
}
.logs-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.logs-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.logs-table th, .logs-table td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border, #e5e7eb); }
.logs-table th { background: var(--bg-muted, #f8fafc); font-weight: 600; }
.logs-table td.logs-details { max-width: 200px; word-break: break-word; }
.logs-details .logs-view-version { display: inline-block; margin-left: 0.5rem; font-size: 0.85rem; color: var(--color-accent, #c2410c); }
.logs-details .logs-view-version:hover { text-decoration: underline; }
.logs-pagination { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.logs-page-info { color: var(--muted, #64748b); font-size: 0.9rem; }

/* Calendar view */
.calendar-page .calendar-explanation { margin-bottom: 1rem; color: var(--muted, #64748b); }
.calendar-nav { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.calendar-month-title { margin: 0; font-size: 1.35rem; min-width: 180px; text-align: center; }
.calendar-grid-wrap { overflow-x: auto; }
.calendar-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.85rem; }
.calendar-grid th.calendar-dow { padding: 0.5rem 0.25rem; text-align: center; font-weight: 600; color: var(--muted, #64748b); border-bottom: 1px solid var(--border, #e5e7eb); }
.calendar-grid td.calendar-day { vertical-align: top; padding: 0.25rem; border: 1px solid var(--border, #e5e7eb); min-height: 100px; height: 120px; }
.calendar-day-other { background: var(--bg-muted, #f8fafc); color: var(--muted, #94a3b8); }
.calendar-day-today { background: rgba(37, 99, 235, 0.06); outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }
.calendar-day-num { font-weight: 600; margin-bottom: 0.25rem; color: var(--text, #1e293b); }
.calendar-day-other .calendar-day-num { color: var(--muted, #94a3b8); }
.calendar-day-events { display: flex; flex-direction: column; gap: 0.35rem; }
.calendar-event { display: block; padding: 0.35rem 0.5rem; border-radius: 4px; border-left: 3px solid var(--primary, #2563eb); background: rgba(37, 99, 235, 0.08); color: inherit; text-decoration: none; transition: background 0.15s; }
.calendar-event:hover { background: rgba(37, 99, 235, 0.14); }
.calendar-event-time { display: block; font-size: 0.75rem; font-weight: 600; color: var(--muted, #64748b); }
.calendar-event-name { display: block; font-weight: 500; }
.calendar-event-meta { display: block; font-size: 0.75rem; color: var(--muted, #64748b); }

/* Month view: count per day */
.calendar-day-head { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem; margin-bottom: 0.25rem; }
.calendar-day-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.35rem; font-size: 0.8rem; font-weight: 700; color: #fff; background: var(--primary, #2563eb); border-radius: 50%; text-decoration: none; line-height: 1; }
.calendar-day-count:hover { background: #1d4ed8; color: #fff; }
.calendar-day-more { display: block; font-size: 0.75rem; font-weight: 600; margin-top: 0.2rem; color: var(--primary, #2563eb); }
.calendar-day-more:hover { text-decoration: underline; }

/* Day view: timeline */
.calendar-day-view .calendar-nav { flex-wrap: wrap; }
.calendar-timeline-wrap { max-width: 640px; }
.calendar-timeline { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; overflow: hidden; }
.calendar-timeline-hour { display: flex; align-items: flex-start; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border, #e5e7eb); min-height: 3rem; }
.calendar-timeline-hour:last-child { border-bottom: none; }
.calendar-timeline-time { flex-shrink: 0; width: 4.5rem; font-weight: 600; font-size: 0.9rem; color: var(--muted, #64748b); }
.calendar-timeline-events { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.calendar-timeline-event { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0.75rem; border-radius: 6px; border-left: 4px solid var(--primary, #2563eb); background: rgba(37, 99, 235, 0.08); color: inherit; text-decoration: none; transition: background 0.15s; }
.calendar-timeline-event:hover { background: rgba(37, 99, 235, 0.14); }
.calendar-timeline-event-photo { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.calendar-timeline-event-photo-placeholder { width: 40px; height: 40px; flex-shrink: 0; border-radius: 6px; background: var(--muted, #64748b); opacity: 0.25; }
.calendar-timeline-event-body { flex: 1; min-width: 0; }
.calendar-timeline-event-time { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted, #64748b); }
.calendar-timeline-event-name { display: block; font-weight: 500; }
.calendar-timeline-event-meta { display: block; font-size: 0.8rem; color: var(--muted, #64748b); }
.calendar-timeline-event-gender,
.calendar-timeline-event-phone { display: block; font-size: 0.8rem; color: var(--muted, #64748b); }
.calendar-no-events { padding: 2rem; text-align: center; color: var(--muted, #64748b); }

/* Applicant profile picture and gender */
.app-card-avatar, .app-detail-avatar, .kanban-card-avatar, .mega-td-avatar, .dashboard-avatar { border-radius: 50%; object-fit: cover; vertical-align: middle; }
.app-card-avatar { margin-right: 0.35rem; }
.app-detail-photo { margin: 0 0 0.5rem 0; }
.app-detail-avatar { display: block; }
.app-gender { font-size: 0.85rem; color: var(--muted, #64748b); margin-left: 0.35rem; }
.app-id {
  font-size: 0.8rem;
  color: var(--muted, #64748b);
  font-variant-numeric: tabular-nums;
}
.app-id-inline { font-variant-numeric: tabular-nums; }
.admin-application-card summary { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; }
.kanban-card-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  padding: 2rem 0.85rem 0.75rem 0.85rem;
}
.kanban-card-avatar { flex-shrink: 0; }
.mega-td-applicant { display: flex; align-items: center; gap: 0.5rem; }
.mega-td-applicant .mega-td-avatar { flex-shrink: 0; }
.dashboard-profile { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dashboard-profile .dashboard-avatar { flex-shrink: 0; }

.app-meta-message-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-herb);
  text-decoration: none;
}
.app-meta-message-link:hover { text-decoration: underline; }
.app-meta-message-link.has-unread { color: var(--color-accent); }
.inbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-accent);
  border-radius: 999px;
  margin-left: 0.25rem;
}
.nav-inbox.has-unread { font-weight: 600; }

/* Inbox list (applicant + admin) */
.inbox-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.inbox-item { margin-bottom: 0.5rem; }
.inbox-link {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inbox-link:hover { border-color: var(--color-herb); box-shadow: var(--shadow); }
.inbox-link.has-unread { border-left: 3px solid var(--color-accent); }
.inbox-app-title { display: block; font-weight: 600; margin-bottom: 0.2rem; }
.inbox-app-meta { font-size: 0.85rem; color: var(--color-ink-muted); }
.inbox-snippet { display: block; font-size: 0.9rem; color: var(--color-ink-muted); margin-top: 0.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-inbox-list .inbox-link { position: relative; padding-right: 2.5rem; }
.admin-inbox-list .inbox-badge { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); margin-left: 0; }
.inbox-desc { color: var(--color-ink-muted); margin-bottom: 1rem; }

/* Applicant messages page */
.messages-context-card { margin-bottom: 1.5rem; }
.messages-context-card h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.messages-context-app { margin: 0; font-size: 0.95rem; color: var(--color-ink-muted); }
.messages-thread { margin-bottom: 1.5rem; }
.messages-empty { padding: 1rem; background: var(--color-bg); border-radius: 10px; color: var(--color-ink-muted); font-size: 0.95rem; }
.message-bubble {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  max-width: 85%;
}
.message-bubble-applicant {
  background: var(--color-herb-soft);
  border: 1px solid rgba(61, 90, 69, 0.2);
  margin-right: auto;
}
.message-bubble-admin {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  margin-left: auto;
}
.message-author { font-size: 0.8rem; font-weight: 600; color: var(--color-herb); display: block; margin-bottom: 0.25rem; }
.message-bubble-admin .message-author { color: var(--color-accent); }
.message-body { margin: 0 0 0.35rem; font-size: 0.95rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.message-time { font-size: 0.75rem; color: var(--color-ink-muted); }
.messages-reply-wrap { padding: 1.25rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; }
.messages-reply-title { font-size: 1rem; margin: 0 0 0.75rem; }
.messages-reply-form .form-actions { margin-top: 0.75rem; }

/* Admin application messages block */
.admin-messages-details {
  margin-top: 1rem;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
}
.admin-messages-toggle {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  background: var(--color-bg, #f8fafc);
  color: var(--color-primary, #2563eb);
  user-select: none;
}
.admin-messages-toggle:hover {
  background: var(--color-bg-muted, #f1f5f9);
}
.admin-messages-details[open] .admin-messages-toggle {
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  margin-bottom: 0;
}
.admin-messages-toggle::-webkit-details-marker,
.admin-messages-toggle::marker { display: none; }

.admin-messages-block {
  margin-top: 0;
  padding: 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}
.admin-messages-block > strong { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; }
.admin-messages-thread { list-style: none; padding: 0; margin: 0 0 1rem; }
.admin-message-item {
  margin-bottom: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.admin-message-applicant { background: var(--color-herb-soft); border-left: 3px solid var(--color-herb); }
.admin-message-admin { background: #f1f5f9; border-left: 3px solid var(--color-accent); }
.admin-message-author { font-weight: 600; font-size: 0.8rem; display: block; margin-bottom: 0.2rem; }
.admin-message-body { margin: 0 0 0.2rem; white-space: pre-wrap; word-break: break-word; }
.admin-message-time { font-size: 0.75rem; color: var(--color-ink-muted); }
.admin-messages-reply-form label { display: block; margin-bottom: 0.25rem; font-size: 0.85rem; }
.admin-messages-reply-form textarea { width: 100%; padding: 0.5rem; border-radius: 6px; border: 1px solid var(--color-border); font-size: 0.9rem; }
.admin-messages-reply-form button { margin-top: 0.5rem; }

/* Edit/Add position: question label and options inputs must not be clipped */
.form-questions-list .form-question-main .question-label-input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 100% !important;
  box-sizing: border-box;
}
.form-questions-list .form-question-extra .question-options-wrap input[type="text"],
.form-questions-list .form-question-extra .question-options-wrap textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Auto-growing question label and options textareas (edit/add position) */
.form-question-main .question-label-textarea,
.form-question-extra .question-options-textarea {
  resize: none;
  overflow-y: hidden;
  min-height: 2.75rem;
  vertical-align: top;
}

/* Bug reports (admin) */
.bugs-page .explanation { margin-bottom: 1.5rem; }
.bugs-report-card {
  background: linear-gradient(135deg, var(--color-herb-soft, #ecfdf5) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid var(--color-herb, #3d5a45);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(61, 90, 69, 0.08);
}
.bugs-report-card h2 { margin: 0 0 1rem; font-size: 1.15rem; color: var(--color-herb); }
.bugs-report-form .form-actions { margin-bottom: 0; }
.bugs-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.bugs-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-ink);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.bugs-summary-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}
.bugs-summary-item.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft, rgba(37, 99, 235, 0.08));
  color: var(--color-accent);
}
.bugs-summary-count {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.bugs-summary-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; opacity: 0.9; }
.bugs-summary-new.active { border-color: #64748b; background: #f1f5f9; color: #475569; }
.bugs-summary-progress.active { border-color: #f59e0b; background: #fffbeb; color: #b45309; }
.bugs-summary-fixed.active { border-color: var(--color-herb); background: var(--color-herb-soft); color: var(--color-herb); }
.bugs-list { margin-top: 0.5rem; }
.bugs-empty {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  color: var(--color-ink-muted);
}
.bugs-empty-icon { font-size: 2.5rem; margin: 0 0 0.5rem; }
.bugs-cards { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.bug-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.bug-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.bug-card-main { flex: 1; min-width: 0; }
.bug-card-title { margin: 0 0 0.5rem; font-size: 1.05rem; font-weight: 600; color: var(--color-ink); line-height: 1.35; }
.bug-card-description { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--color-ink-muted); line-height: 1.5; white-space: pre-wrap; }
.bug-card-meta { font-size: 0.8rem; color: var(--color-ink-muted); display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.bug-card-reporter { font-weight: 500; }
.bug-card-date { }
.bug-card-updated { font-style: italic; }
.bug-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.bug-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}
.bug-status-new { background: #e2e8f0; color: #475569; }
.bug-status-in_progress { background: #fef3c7; color: #b45309; }
.bug-status-fixed { background: var(--color-herb-soft); color: var(--color-herb); }
.bug-status-form { display: inline-flex; align-items: center; gap: 0.5rem; }
.bug-status-select {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

/* Native browser prompt (in-app browser detection on apply / thank-you) */
.native-browser-prompt {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.native-browser-prompt[hidden] {
  display: none !important;
}
.native-browser-prompt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.5);
  backdrop-filter: blur(4px);
}
.native-browser-prompt-card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  padding: 1.75rem;
  text-align: center;
}
.native-browser-prompt-icon {
  color: var(--color-accent);
  margin-bottom: 1rem;
}
.native-browser-prompt-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 0.75rem;
  color: var(--color-ink);
}
.native-browser-prompt-text {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--color-ink-muted);
  line-height: 1.55;
}
.native-browser-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.native-browser-prompt-actions .btn {
  min-width: 140px;
}
.native-browser-prompt-hint {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  margin: 0 0 1rem;
}
.native-browser-continue-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.25rem;
}
.native-browser-continue-link:hover {
  color: var(--color-accent);
}
