:root {
  --blue: #0b55d9;
  --blue-dark: #022b77;
  --blue-deep: #001f58;
  --yellow: #ffd503;
  --red: #df1f2d;
  --ink: #071552;
  --muted: #687796;
  --line: #d7dfec;
  --soft: #f5f8ff;
  --surface: #fbfdff;
  --green: #188351;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 213, 3, .16) 0 18%, transparent 18%),
    linear-gradient(180deg, #eef4ff 0%, #fff 46%, #f8fbff 100%);
}

a {
  color: var(--blue);
  text-decoration: none;
}

.page {
  min-height: 100vh;
}

.flag-bar {
  display: grid;
  grid-template-columns: 36% 31% 33%;
  height: 6px;
}

.flag-bar span:nth-child(1) {
  background: #1673f7;
}

.flag-bar span:nth-child(2) {
  background: var(--yellow);
}

.flag-bar span:nth-child(3) {
  background: var(--red);
}

.hero {
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.public-hero {
  min-height: 250px;
  padding: 24px 16px 62px;
  background:
    linear-gradient(112deg, rgba(0, 30, 86, .98) 0%, rgba(0, 61, 147, .96) 58%, rgba(6, 96, 198, .94) 100%),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 30px);
}

.public-hero::before {
  content: "";
  position: absolute;
  inset: 80px 90px auto auto;
  width: 760px;
  height: 250px;
  opacity: .18;
  background:
    linear-gradient(155deg, transparent 0 32%, rgba(255, 255, 255, .45) 32% 33%, transparent 33%),
    linear-gradient(25deg, transparent 0 45%, rgba(255, 255, 255, .35) 45% 46%, transparent 46%),
    linear-gradient(90deg, transparent 0 12%, rgba(255, 255, 255, .25) 12% 13%, transparent 13% 26%, rgba(255, 255, 255, .25) 26% 27%, transparent 27% 40%, rgba(255, 255, 255, .25) 40% 41%, transparent 41%),
    linear-gradient(0deg, transparent 0 35%, rgba(255, 255, 255, .25) 35% 36%, transparent 36% 58%, rgba(255, 255, 255, .22) 58% 59%, transparent 59%);
}

.public-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, .15);
}

.hero-inner,
.container,
.public-container {
  width: min(1260px, calc(100% - 48px));
  margin: 0 auto;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  position: relative;
  z-index: 1;
}

.ministry-logo {
  width: min(230px, 30vw);
  height: auto;
  filter: brightness(0) invert(1);
}

.workshop-logo {
  width: min(270px, 30vw);
  height: auto;
}

.hero-copy {
  position: relative;
  z-index: 1;
  margin-top: 30px;
}

.hero-copy h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(27px, 2.7vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 800;
}

.hero-copy p {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 0 0;
  max-width: 880px;
  color: rgba(255, 255, 255, .96);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.55;
}

.hero-copy p span {
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 999px;
  background: var(--yellow);
  flex: 0 0 auto;
}

.public-container {
  position: relative;
  margin-top: -34px;
  padding-bottom: 56px;
}

.panel,
.wizard-card {
  background: var(--white);
  border: 1px solid rgba(185, 198, 219, .92);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(3, 28, 82, .14);
}

.wizard-card {
  padding: 26px 30px 24px;
}

.stepper {
  display: grid;
  grid-template-columns: 1.5fr .42fr 1.5fr .42fr 1.2fr .42fr 1.3fr;
  align-items: center;
  gap: 14px;
  padding: 0 4px 24px;
  border-bottom: 1px solid var(--line);
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
  color: #354564;
  text-align: left;
  cursor: pointer;
  min-height: 74px;
  transition: border-color .18s ease, background-color .18s ease;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 2px solid #aebbd0;
  color: #52617d;
  font-size: 17px;
  font-weight: 800;
  background: #fff;
  flex: 0 0 auto;
}

.step strong {
  display: block;
  font-size: 14px;
  color: #33405f;
}

.step small {
  display: block;
  margin-top: 5px;
  color: #6e7c97;
  font-size: 12px;
  line-height: 1.25;
}

.step.is-active,
.step.is-complete {
  border-color: rgba(11, 85, 217, .22);
  background: #f4f8ff;
}

.step.is-active .step-number,
.step.is-complete .step-number {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 85, 217, .25);
}

.step.is-active strong,
.step.is-complete strong {
  color: var(--blue);
}

.step-line {
  height: 2px;
  background: linear-gradient(90deg, #d0daea, #b8c6dc);
}

.wizard-section {
  padding: 30px 0 24px;
  border-bottom: 1px solid #e4e9f2;
}

.wizard-section.is-hidden,
.is-hidden {
  display: none !important;
}

.section,
.section h2 {
  margin: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 22px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(180deg, #eef5ff, #e4eeff);
  color: var(--blue);
}

.section-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.secure-badge {
  align-self: center;
  border-radius: 8px;
  padding: 9px 13px;
  border: 1px solid #d8e3f5;
  background: #f7fbff;
  color: var(--blue);
  font-size: 12px;
  white-space: nowrap;
}

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

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

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

.field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.required,
.check-card b {
  color: var(--red);
}

.input-shell {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  min-height: 52px;
  border: 1px solid #bcc8dc;
  border-radius: 8px;
  background: #fbfdff;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.input-shell:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 85, 217, .12);
}

.input-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  align-self: stretch;
  border-right: 1px solid #e2e8f2;
  color: #61708d;
  font-size: 11px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  outline: 0;
  min-height: 50px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: transparent;
}

input::placeholder,
textarea::placeholder {
  color: #9aa8c0;
}

select {
  cursor: pointer;
}

textarea {
  min-height: 104px;
  padding: 12px;
  border: 1px solid #bfcade;
  border-radius: 8px;
  resize: vertical;
  background: #fff;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #cfdbea;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  font-weight: 700;
}

.check-card input {
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
  accent-color: var(--blue);
}

.wizard-actions,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-width: 150px;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 11px 20px;
  background: linear-gradient(180deg, #0e61ed, #0845c8);
  color: #fff;
  box-shadow: 0 4px 0 var(--yellow);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.03);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.btn.ghost,
.btn.secondary {
  background: #fff;
  color: #7a879f;
  border: 1px solid #d3dce9;
  box-shadow: none;
}

.alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.alert.error {
  background: #ffe8e7;
  color: #8f1714;
}

.alert.success {
  background: #e7f8ef;
  color: #17613a;
  border: 1px solid rgba(24, 131, 81, .18);
}

.thanks-hero {
  min-height: 230px;
}

.thanks-container {
  max-width: 760px;
}

.thanks-panel {
  text-align: center;
  padding: 34px;
}

.thanks-panel h2 {
  margin: 12px 0 18px;
  font-size: 24px;
}

.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}

.hint,
.muted {
  color: var(--muted);
  font-size: 14px;
}

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

.form-panel {
  margin-top: -34px;
  position: relative;
}

.section {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

.section h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #eef3f9;
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

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

.stat {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat strong {
  display: block;
  font-size: 28px;
}

.admin-page {
  background:
    linear-gradient(180deg, #eef4ff 0, #f8fbff 260px, #fff 100%);
}

.admin-hero {
  background:
    linear-gradient(112deg, rgba(0, 30, 86, .98), rgba(0, 63, 153, .96)),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 30px);
  color: #fff;
  padding: 18px 0 76px;
}

.admin-hero-inner,
.admin-container,
.login-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  font-weight: 800;
}

.admin-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-nav a {
  color: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
}

.admin-nav a:hover,
.admin-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .34);
}

.admin-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-top: 40px;
}

.admin-title-row h1,
.login-brand h1 {
  margin: 8px 0 0;
  color: #fff;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.admin-title-row p,
.login-brand p {
  margin: 10px 0 0;
  max-width: 620px;
  color: rgba(255, 255, 255, .84);
  line-height: 1.55;
}

.admin-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-container {
  margin-top: -44px;
  padding-bottom: 48px;
}

.admin-stats {
  gap: 16px;
  margin-bottom: 18px;
}

.admin-stats .stat {
  position: relative;
  min-height: 116px;
  padding: 18px 20px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(3, 28, 82, .1);
}

.admin-stats .stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: var(--blue);
}

.admin-stats .stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-stats .stat strong {
  margin-top: 14px;
  font-size: 38px;
  line-height: 1;
  color: var(--ink);
}

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

.users-grid {
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  align-items: start;
}

.admin-panel {
  padding: 0;
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  margin: 0;
  font-size: 18px;
}

.panel-title span,
.table-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-table {
  min-width: 100%;
}

.admin-table th {
  background: #f2f6fc;
  color: #354564;
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table td {
  color: #263655;
}

.admin-table tbody tr:hover {
  background: #f8fbff;
}

.admin-filters {
  grid-template-columns: minmax(260px, 2fr) minmax(240px, 1fr) auto;
  margin-bottom: 18px;
  padding: 18px;
  box-shadow: 0 16px 38px rgba(3, 28, 82, .09);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.table-toolbar strong {
  display: block;
  color: var(--ink);
}

.admin-table-panel {
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(3, 28, 82, .08);
}

.user-form {
  display: grid;
  gap: 18px;
  padding: 0 20px 20px;
}

.user-form .panel-title {
  margin: 0 -20px;
}

.user-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  padding: 5px 9px;
  background: #eef4ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.table-action {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #d3dce9;
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(112deg, rgba(0, 30, 86, .98), rgba(0, 70, 176, .94)),
    linear-gradient(180deg, #eef4ff, #fff);
}

.login-shell {
  min-height: calc(100vh - 6px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  align-items: center;
  gap: 56px;
  padding: 48px 0;
}

.login-brand {
  color: #fff;
}

.login-brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.login-brand > span {
  display: block;
  margin-top: 18px;
  color: var(--yellow);
  font-weight: 800;
}

.login-card {
  padding: 28px;
  box-shadow: 0 26px 70px rgba(0, 16, 55, .28);
}

.login-card-header {
  margin-bottom: 22px;
}

.login-card-header h2 {
  margin: 8px 0 0;
  font-size: 26px;
}

.login-card-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.login-card .field + .field {
  margin-top: 16px;
}

.login-actions {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.login-actions .btn {
  width: 100%;
}

@media (max-width: 1100px) {
  .stepper {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding-inline: 0;
  }

  .step-line {
    display: none;
  }

  .step {
    align-items: flex-start;
  }

  .section-heading {
    grid-template-columns: auto 1fr;
  }

  .secure-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .admin-title-row,
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-nav {
    justify-content: flex-start;
  }

  .admin-grid,
  .users-grid,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-shell {
    gap: 26px;
  }
}

@media (max-width: 760px) {
  .flag-bar {
    height: 5px;
  }

  .public-hero {
    min-height: 210px;
    padding: 18px 14px 34px;
  }

  .hero-inner,
  .public-container,
  .container {
    width: min(100% - 24px, 100%);
  }

  .hero-top {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }

  .ministry-logo,
  .workshop-logo {
    width: auto;
    max-width: calc(50% - 5px);
    max-height: 54px;
    object-fit: contain;
  }

  .hero-copy {
    margin-top: 14px;
  }

  .hero-copy p {
    align-items: flex-start;
    gap: 9px;
    margin-top: 8px;
  }

  .hero-copy p span {
    width: 34px;
    margin-top: 7px;
  }

  .public-container {
    margin-top: -22px;
  }

  .wizard-card {
    padding: 18px 16px 18px;
  }

  .stepper {
    display: flex;
    overflow-x: auto;
    padding: 0 0 18px;
    scrollbar-width: thin;
  }

  .step {
    min-width: 172px;
  }

  .step-number {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .wizard-section {
    padding: 24px 0 20px;
  }

  .section-heading {
    gap: 14px;
  }

  .section-icon {
    width: 52px;
    height: 52px;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .grid,
  .filters,
  .stats {
    grid-template-columns: 1fr;
  }

  .input-shell {
    min-height: 54px;
  }

  .wizard-actions .btn,
  .actions .btn {
    width: 100%;
  }

  .wizard-actions {
    flex-direction: column-reverse;
  }

  .admin-hero {
    padding: 16px 0 58px;
  }

  .admin-hero-inner,
  .admin-container,
  .login-shell {
    width: min(100% - 24px, 100%);
  }

  .admin-brand {
    min-width: 0;
  }

  .admin-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-nav a {
    text-align: center;
  }

  .admin-title-row .btn,
  .table-toolbar .btn {
    width: 100%;
  }

  .admin-container {
    margin-top: -34px;
  }

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

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .login-shell {
    min-height: calc(100vh - 5px);
    padding: 26px 0;
  }

  .login-brand img {
    width: 62px;
    height: 62px;
  }

  .login-card {
    padding: 22px;
  }
}
