:root {
  color-scheme: light;
  --brand-primary: #1d3b90;
  --brand-accent: #2f5cc4;
  --brand-bg: #f8f9fa;
  --text-color: #212529;
  --surface-1: #ffffff;
  --surface-2: #eef4ff;
  --border-color: #dee2e6;
  --shadow-soft: 0 14px 36px rgba(11, 25, 48, 0.12);
  --shadow-card: 0 6px 18px rgba(11, 25, 48, 0.08);
  --toggle-outline: rgba(255, 255, 255, 0.38);
  --theme-gold: #c8b46a;
  --theme-gold-soft: rgba(200, 180, 106, 0.32);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --brand-primary: #000000;
  --brand-accent: #1a1a1a;
  --brand-bg: #050505;
  --text-color: #f2f2f2;
  --surface-1: #000000;
  --surface-2: #0b0b0b;
  --border-color: rgba(255, 255, 255, 0.12);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.56);
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.4);
  --toggle-outline: rgba(255, 255, 255, 0.28);
  --theme-gold: #d4bf76;
  --theme-gold-soft: rgba(212, 191, 118, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(47, 92, 196, 0.12), transparent 30%),
    linear-gradient(180deg, #f4f7fc 0%, var(--brand-bg) 50%, #eef3fb 100%);
  color: var(--text-color);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(180deg, #000000 0%, var(--brand-bg) 50%, #050505 100%);
}

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

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 1200;
  background: var(--brand-primary);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.35rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

html[data-theme="dark"] .site-header {
  background: #000000;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 96px;
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: 0.02em;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.brand-wordmark {
  font-size: 1.2rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-btn[data-lang="el"] {
  order: 1;
}

.lang-btn[data-lang="en"] {
  order: 2;
}

.lang-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--toggle-outline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
  background: #fff;
  color: var(--brand-primary);
  border-color: #fff;
  box-shadow: 0 3px 10px rgba(14, 29, 64, 0.18);
}

.flag-icon {
  display: block;
  width: 24px;
  height: 24px;
  font-size: 0;
  line-height: 0;
  border-radius: 999px;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow:
    0 0 0 1px rgba(17, 34, 68, 0.12),
    0 2px 6px rgba(11, 25, 48, 0.18);
}

.lang-btn[data-lang="en"] .flag-icon {
  background-image: url("assets/images/uk_flag.png");
}

.lang-btn[data-lang="el"] .flag-icon {
  background-image: url("assets/images/greece_flag.png");
}

.theme-btn {
  order: 3;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--theme-gold-soft);
  background: transparent;
  color: var(--theme-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.theme-btn:hover,
.theme-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(200, 180, 106, 0.58);
}

.theme-btn[data-mode="light"] {
  background: rgba(255, 255, 255, 0.1);
}

.theme-btn[data-mode="dark"] {
  background: rgba(6, 10, 20, 0.28);
  box-shadow: inset 0 0 0 1px rgba(200, 180, 106, 0.1);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 1.05rem;
  line-height: 1;
  text-align: center;
  transform: translateY(-0.5px);
}

.theme-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.header-cta {
  background: #fff;
  color: var(--brand-primary);
}

.header-cta:hover,
.header-cta:focus-visible,
.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--brand-accent) 0%, var(--brand-primary) 100%);
  color: #fff;
  box-shadow: 0 8px 16px rgba(29, 59, 144, 0.25);
}

html[data-theme="dark"] .btn-primary {
  background: linear-gradient(180deg, #f1d98b 0%, #c8ab45 100%);
  color: #111111;
  border-color: rgba(241, 217, 139, 0.72);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(241, 217, 139, 0.18);
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus-visible {
  background: linear-gradient(180deg, #f7e29f 0%, #d3b353 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: var(--brand-primary);
  border-color: rgba(29, 59, 144, 0.2);
  backdrop-filter: blur(8px);
}

html[data-theme="dark"] .btn-secondary {
  background: #0a0a0a;
  color: #f2f2f2;
  border-color: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(16, 43, 111, 0.92), rgba(47, 92, 196, 0.78)),
    linear-gradient(180deg, #2047aa 0%, #163174 100%);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -120px auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
  pointer-events: none;
}

.hero-overlay {
  padding: 4.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.section-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  padding: 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.hero-card {
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-color);
}

html[data-theme="dark"] .hero-card {
  background: rgba(0, 0, 0, 0.94);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f2f2f2;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #d4e3ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading .eyebrow {
  color: var(--brand-accent);
}

html[data-theme="dark"] .section-heading .eyebrow {
  color: #d8c27d;
}

h1,
h2 {
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  max-width: 12ch;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--brand-primary);
}

html[data-theme="dark"] h2 {
  color: #f2f2f2;
}

.hero-text,
.section-heading p,
.form-note,
.feature-list {
  margin: 0;
}

.hero-text {
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.feature-list {
  padding-left: 1.15rem;
}

.feature-list li + li {
  margin-top: 0.65rem;
}

.application-section {
  padding: 2rem 0 4.5rem;
}

.section-card {
  padding: 2rem;
  background: linear-gradient(180deg, var(--surface-1) 0%, rgba(255, 255, 255, 0.96) 100%);
  border-color: var(--border-color);
  box-shadow: var(--shadow-card);
}

html[data-theme="dark"] .section-card {
  background: linear-gradient(180deg, #000000 0%, #080808 100%);
  border-color: rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .hero-card h2,
html[data-theme="dark"] .hero-card li,
html[data-theme="dark"] .section-heading,
html[data-theme="dark"] .section-heading h2,
html[data-theme="dark"] .section-heading p {
  color: #f2f2f2;
}

.section-heading {
  max-width: 72ch;
  margin-bottom: 1.5rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--brand-primary);
}

.required-field > span:first-of-type::after {
  content: " *";
  color: #c62828;
}

html[data-theme="dark"] .field,
html[data-theme="dark"] .form-section-title,
html[data-theme="dark"] .field-radio-group legend {
  color: #f2f2f2;
}

html[data-theme="dark"] .date-picker-toggle {
  color: #d6d6d6;
}

html[data-theme="dark"] .date-picker {
  background: #050505;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .date-picker-nav {
  background: #0b0b0b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f2f2f2;
}

html[data-theme="dark"] .date-picker-month {
  color: #f2f2f2;
}

html[data-theme="dark"] .date-picker-weekdays {
  color: #b6c2dd;
}

html[data-theme="dark"] .date-picker-day {
  color: #f2f2f2;
}

html[data-theme="dark"] .date-picker-day:hover,
html[data-theme="dark"] .date-picker-day:focus-visible {
  border-color: rgba(212, 191, 118, 0.32);
  background: rgba(212, 191, 118, 0.12);
}

html[data-theme="dark"] .date-picker-day.is-outside {
  color: #6f7786;
}

html[data-theme="dark"] .date-picker-day.is-selected {
  background: linear-gradient(180deg, #f1d98b 0%, #c8ab45 100%);
  color: #111111;
}

html[data-theme="dark"] .date-picker-day.is-today {
  border-color: rgba(212, 191, 118, 0.34);
}

.form-section + .form-section {
  margin-top: 1.5rem;
}

.form-section-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--brand-primary);
}

.field-full {
  grid-column: 1 / -1;
}

.date-input-shell {
  position: relative;
}

.date-input-shell #birth-date-display {
  padding-right: 3.3rem;
}

.date-picker-toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5b6472;
  font-size: 1rem;
  cursor: pointer;
}

.date-picker {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 50;
  width: min(320px, 100%);
  padding: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(11, 25, 48, 0.16);
}

.date-picker-header {
  display: grid;
  grid-template-columns: 2rem 1fr 2rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.date-picker-nav {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-primary);
  cursor: pointer;
}

.date-picker-month {
  text-align: center;
  color: var(--brand-primary);
  font-size: 0.95rem;
}

.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.date-picker-weekdays {
  margin-bottom: 0.45rem;
  color: #6a7280;
  font-size: 0.78rem;
  text-align: center;
}

.date-picker-day {
  min-height: 2.2rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-color);
  font: inherit;
  cursor: pointer;
}

.date-picker-day:hover,
.date-picker-day:focus-visible {
  border-color: rgba(29, 59, 144, 0.22);
  background: rgba(47, 92, 196, 0.08);
}

.date-picker-day.is-outside {
  color: #9aa3b2;
}

.date-picker-day.is-selected {
  background: linear-gradient(180deg, var(--brand-accent) 0%, var(--brand-primary) 100%);
  color: #fff;
}

.date-picker-day.is-today {
  border-color: rgba(29, 59, 144, 0.28);
}

.field-radio-group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.field-radio-group legend {
  padding: 0;
  margin-bottom: 0.45rem;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #fff;
}

html[data-theme="dark"] .radio-group {
  background: #050505;
  border-color: rgba(255, 255, 255, 0.2);
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-color);
  font-weight: 500;
}

.radio-option input {
  width: auto;
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #fff;
  color: var(--text-color);
  font: inherit;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #050505;
  border-color: rgba(255, 255, 255, 0.24);
  color: #f2f2f2;
}

html[data-theme="dark"] input:hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover {
  border-color: rgba(255, 255, 255, 0.34);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: #d4bf76;
  box-shadow: 0 0 0 0.2rem rgba(212, 191, 118, 0.2);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #7ea4ef;
  box-shadow: 0 0 0 0.2rem rgba(126, 164, 239, 0.22);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.field-note {
  color: #5b6472;
  font-size: 0.9rem;
  font-weight: 500;
}

.consent-checkbox-field {
  margin-top: 0.25rem;
}

.consent-checkbox-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  line-height: 1.5;
}

.consent-checkbox-wrap input[type="checkbox"] {
  margin-top: 0.2rem;
}

html[data-theme="dark"] .field-note,
html[data-theme="dark"] .form-note,
html[data-theme="dark"] .admin-muted,
html[data-theme="dark"] .admin-stat-label,
html[data-theme="dark"] .detail-list dt,
html[data-theme="dark"] .admin-auth-text {
  color: #b6c2dd;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-note {
  max-width: 58ch;
  color: #5b6472;
}

.cookie-banner {
  position: fixed;
  left: auto;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  display: grid;
  gap: 0.8rem;
  width: min(360px, calc(100vw - 2rem));
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #d6dfef;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(20, 30, 60, 0.16);
}

.cookie-banner-text {
  margin: 0;
  font-size: 0.92rem;
  color: #243152;
}

.cookie-banner .btn {
  width: 100%;
  min-height: 44px;
  padding-inline: 1rem;
}

html[data-theme="dark"] .cookie-banner {
  background: #0c111a;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

html[data-theme="dark"] .cookie-banner-text {
  color: #d5def2;
}

@media (max-width: 900px) {
  .hero-grid,
  .field-grid,
  .form-footer {
    grid-template-columns: 1fr;
  }

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

  .form-footer {
    display: grid;
    justify-content: stretch;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 88px;
    align-items: flex-start;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }

  .brand-wordmark {
    display: none;
  }

  .header-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .hero-overlay,
  .application-section {
    padding-top: 1.5rem;
  }

  .hero-copy,
  .hero-card,
  .section-card {
    padding: 1.35rem;
    border-radius: 16px;
  }

  .header-cta,
  .btn {
    width: 100%;
  }

  .cookie-banner {
    right: 0.75rem;
    bottom: 0.75rem;
    width: min(340px, calc(100vw - 1.5rem));
  }

  .hero-actions {
    flex-direction: column;
  }
}

.flash-stack {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.public-flash-stack {
  margin-top: 1rem;
}

.submission-success-panel {
  display: grid;
  gap: 1rem;
}

.submission-success-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.btn-placeholder[aria-disabled="true"] {
  opacity: 0.72;
}

.submission-review-card {
  padding: 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 59, 144, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.submission-review-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.submission-review-list div {
  display: grid;
  gap: 0.3rem;
}

.submission-review-list dt {
  color: #5b6472;
  font-weight: 700;
}

.submission-review-list dd {
  margin: 0;
  color: var(--text-color);
  white-space: pre-wrap;
}

.submission-review-empty {
  color: #5b6472;
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
}

.flash-success {
  background: #e9f8ef;
  border-color: #a7dfba;
  color: #175b2c;
}

.flash-error {
  background: #fff0f0;
  border-color: #f0b1b1;
  color: #8c1f1f;
}

.flash-info {
  background: #edf4ff;
  border-color: #bdd3fb;
  color: #234ea5;
}

html[data-theme="dark"] .flash-success,
html[data-theme="dark"] .flash-error,
html[data-theme="dark"] .flash-info {
  background: #050505;
}

html[data-theme="dark"] .flash-success {
  border-color: rgba(112, 201, 142, 0.38);
  color: #97e0ab;
}

html[data-theme="dark"] .submission-review-card {
  background: rgba(0, 0, 0, 0.48);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .submission-review-list dt,
html[data-theme="dark"] .submission-review-empty {
  color: #b6c2dd;
}

html[data-theme="dark"] .submission-review-list dd {
  color: #f2f2f2;
}

html[data-theme="dark"] .flash-error {
  border-color: rgba(240, 122, 122, 0.34);
  color: #ff9b9b;
}

html[data-theme="dark"] .flash-info {
  border-color: rgba(116, 158, 255, 0.34);
  color: #a9c2ff;
}

.admin-body,
.admin-auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(47, 92, 196, 0.12), transparent 28%),
    linear-gradient(180deg, #f3f6fb 0%, #eaf0fa 100%);
}

html[data-theme="dark"] .admin-body,
html[data-theme="dark"] .admin-auth-body {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 22%),
    linear-gradient(180deg, #000000 0%, #050505 100%);
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 41, 97, 0.94);
  color: #fff;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(13, 27, 61, 0.12);
}

html[data-theme="dark"] .admin-header {
  background: rgba(0, 0, 0, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 88px;
  padding: 0.9rem 0;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.9rem;
}

.admin-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-nav a {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.admin-nav form {
  margin: 0;
}

.admin-main {
  padding: 2rem 0 3rem;
}

.admin-panel,
.admin-auth-card,
.detail-card,
.admin-stat-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(206, 216, 236, 0.9);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(20, 41, 97, 0.08);
}

html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .admin-auth-card,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .admin-stat-card {
  background: rgba(0, 0, 0, 0.96);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.admin-panel {
  padding: 1.6rem;
}

.admin-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

html[data-theme="dark"] .admin-eyebrow {
  color: #f1d98b;
}

.admin-page-title,
.admin-auth-title {
  margin: 0;
  color: var(--brand-primary);
  max-width: none;
}

html[data-theme="dark"] .admin-page-title,
html[data-theme="dark"] .admin-auth-title {
  color: #f2f2f2;
}

.admin-muted {
  color: #5b6472;
}

.admin-stat-card {
  min-width: 150px;
  padding: 1rem 1.2rem;
}

.admin-stat-label {
  display: block;
  color: #5b6472;
  font-size: 0.92rem;
}

.admin-stat-value {
  display: block;
  margin-top: 0.35rem;
  font-size: 2rem;
  color: var(--brand-primary);
}

html[data-theme="dark"] .admin-stat-value {
  color: #f2f2f2;
}

.table-shell {
  overflow-x: auto;
}

.admin-dashboard-controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr) auto;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: end;
}

.admin-search-field input,
.admin-filter-field select {
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid #d6dfec;
  background: #ffffff;
  font: inherit;
  color: #1c2440;
}

.admin-filter-submit {
  white-space: nowrap;
}

html[data-theme="dark"] .admin-search-field input,
html[data-theme="dark"] .admin-filter-field select {
  background: #101010;
  color: #f5f5f5;
  border-color: rgba(255, 255, 255, 0.18);
}

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

.admin-table th,
.admin-table td {
  padding: 1rem 0.85rem;
  border-bottom: 1px solid #e5ebf5;
  text-align: left;
  vertical-align: top;
}

html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.admin-table th {
  color: var(--brand-primary);
  font-size: 0.9rem;
}

.admin-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-col-id {
  width: 72px;
  white-space: nowrap;
}

.admin-col-candidate,
.admin-col-profession,
.admin-col-email,
.admin-col-submitted,
.admin-col-status {
  min-width: 0;
}

.admin-col-email,
.admin-col-submitted {
  font-variant-numeric: tabular-nums;
}

.admin-col-action {
  width: 84px;
  text-align: center;
}

.admin-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
}

.admin-sort-link.is-active {
  font-weight: 700;
}

.admin-sort-indicator {
  font-size: 0.82rem;
  opacity: 0.75;
}

html[data-theme="dark"] .admin-table th {
  color: #f2f2f2;
}

.status-pills {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.status-pill.is-on {
  background: #e6f7ee;
  color: #17643a;
}

.status-pill.is-off {
  background: #fff3e6;
  color: #9c5c0d;
}

.admin-link-btn,
.admin-logout {
  min-height: auto;
}

.admin-icon-btn {
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}

.admin-logout {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: none;
}

.admin-logout:hover,
.admin-logout:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.52);
}

html[data-theme="dark"] .admin-logout {
  background: rgba(212, 191, 118, 0.16);
  color: #f7e29f;
  border-color: rgba(212, 191, 118, 0.42);
}

html[data-theme="dark"] .admin-logout:hover,
html[data-theme="dark"] .admin-logout:focus-visible {
  background: rgba(212, 191, 118, 0.24);
  color: #fff1be;
  border-color: rgba(212, 191, 118, 0.62);
}

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

.detail-card {
  padding: 1.4rem;
}

.detail-card h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.detail-list {
  margin: 0;
}

.detail-list div + div {
  margin-top: 0.9rem;
}

.detail-list dt {
  color: #5b6472;
  font-size: 0.92rem;
}

.detail-list dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.detail-summary {
  margin: 0;
  white-space: pre-wrap;
}

.email-preview {
  margin: 0;
  padding: 1rem;
  border-radius: 16px;
  background: #f6f8fc;
  border: 1px solid #dfe6f2;
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.6;
}

html[data-theme="dark"] .email-preview {
  background: #050505;
  border-color: rgba(255, 255, 255, 0.18);
}

.template-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.template-form,
.template-preview {
  margin-top: 1rem;
}

.template-editor-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.template-sidebar {
  position: sticky;
  top: 1rem;
}

.template-sidebar-title,
.template-preview-title {
  margin-bottom: 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
}

.template-sidebar-list {
  display: grid;
  gap: 0.75rem;
}

.template-sidebar-item {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  padding: 1rem 1.1rem;
  text-align: left;
  border-radius: 18px;
  border: 1px solid #d9e3f2;
  background: #f8fbff;
  color: #1c2440;
  font: inherit;
  cursor: pointer;
}

.template-sidebar-item.is-active {
  border-color: rgba(35, 71, 156, 0.3);
  background: linear-gradient(180deg, #eef4ff 0%, #e8f0ff 100%);
  box-shadow: 0 12px 30px rgba(35, 71, 156, 0.08);
}

.template-editor-panel {
  display: grid;
  gap: 1.25rem;
}

.template-editor-panel[hidden] {
  display: none !important;
}

.template-editor-panel:not(.is-active) {
  display: none;
}

.template-language-switch {
  display: inline-flex;
  gap: 0.55rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: #edf2fb;
  width: fit-content;
}

.template-language-btn {
  min-height: auto;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #47607b;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.template-language-btn.is-active {
  background: #ffffff;
  color: var(--brand-primary);
  box-shadow: 0 8px 20px rgba(35, 71, 156, 0.12);
}

.template-cms-form,
.template-cms-preview {
  margin-top: 0;
}

.template-option-field {
  margin-top: 0.35rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #d9e3f2;
  border-radius: 12px;
  background: #f9fbff;
}

.template-language-panel {
  display: grid;
  gap: 1rem;
}

.template-language-panel[hidden] {
  display: none !important;
}

.template-language-panel:not(.is-active) {
  display: none;
}

html[data-theme="dark"] .template-sidebar-item {
  background: #0d1118;
  color: #f5f5f5;
  border-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .template-sidebar-item.is-active {
  background: linear-gradient(180deg, #162033 0%, #1d2940 100%);
  border-color: rgba(212, 191, 118, 0.28);
  box-shadow: none;
}

html[data-theme="dark"] .template-language-switch {
  background: #111827;
}

html[data-theme="dark"] .template-language-btn {
  color: #c2cedd;
}

html[data-theme="dark"] .template-language-btn.is-active {
  background: #1e293b;
  color: #ffffff;
  box-shadow: none;
}

html[data-theme="dark"] .template-option-field {
  background: #0d1118;
  border-color: rgba(255, 255, 255, 0.16);
}

.empty-state {
  padding: 2rem;
  text-align: center;
  border: 1px dashed #bfd0ec;
  border-radius: 18px;
  background: #f9fbff;
}

@media (max-width: 780px) {
  .admin-dashboard-controls {
    grid-template-columns: 1fr;
  }
}

html[data-theme="dark"] .empty-state {
  background: #050505;
  border-color: rgba(255, 255, 255, 0.22);
}

.admin-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.admin-auth-card {
  width: min(520px, 100%);
  padding: 2rem;
}

.admin-auth-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.admin-auth-logo {
  margin-bottom: 1rem;
}

.admin-auth-text {
  margin-top: 0.75rem;
  color: #5b6472;
}

.admin-auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .admin-panel-heading,
  .detail-grid,
  .template-grid,
  .template-editor-shell {
    grid-template-columns: 1fr;
  }

  .admin-panel-heading {
    display: grid;
  }

  .template-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .admin-topbar,
  .admin-header-actions,
  .admin-nav {
    display: grid;
  }

  .admin-header-actions {
    justify-items: stretch;
  }

  .admin-nav {
    justify-items: stretch;
  }
}
