:root {
  --color-primary: #233f98;
  --color-primary-dark: #173173;
  --color-primary-soft: #edf2ff;
  --color-background: #f6f8fc;
  --color-surface: #ffffff;
  --color-surface-muted: #f1f4f9;
  --color-text: #20283a;
  --color-text-muted: #667085;
  --color-border: #dfe5ef;
  --color-accent: #d2ad57;
  --color-white: #ffffff;
  --color-danger: #c83d3d;
  --color-success: #2d7a4b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 12px 35px rgba(31, 49, 91, 0.1);
  --shadow-card: 0 8px 24px rgba(31, 49, 91, 0.08);
  --container-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--color-text);
  font-family: Inter, "Noto Sans", "Segoe UI", Arial, sans-serif;
  background: var(--color-background);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.container,
.nav-inner,
.page,
.site-footer {
  width: min(100%, var(--container-width));
  margin-inline: auto;
  padding-inline: 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--color-white);
  box-shadow: 0 1px 0 var(--color-border);
}

.header-top {
  background: var(--color-white);
}

.header-top .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-primary-dark);
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 900;
}

.header-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-primary-dark);
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 19px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.nav-toggle-lines::before {
  transform: translateY(-6px);
}

.nav-toggle-lines::after {
  transform: translateY(4px);
}

.nav-bar {
  background: var(--color-primary-dark);
}

.nav-bar .nav-inner {
  display: flex;
  align-items: center;
  min-height: 46px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}

.nav-user {
  font-weight: 800;
}

.nav-logout {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  cursor: pointer;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
}

.page {
  padding-block: 44px 58px;
}

.page-header,
.page-banner {
  margin-bottom: 28px;
}

.page-banner {
  padding: 42px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(35, 63, 152, 0.95), rgba(23, 49, 115, 0.88)),
    linear-gradient(135deg, #1f3f98, #5a73bb);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.page-banner .eyebrow,
.page-banner .lead {
  color: rgba(255, 255, 255, 0.82);
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 12px;
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 800;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.2rem, 2.7vw + 1rem, 4rem);
}

h2 {
  font-size: clamp(1.45rem, 1vw + 1rem, 2rem);
}

h3 {
  font-size: 1.2rem;
}

.lead {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--color-text-muted);
  font-size: 1.04rem;
  line-height: 1.72;
}

.stack {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  gap: 22px;
}

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

.panel,
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.panel {
  padding: 24px;
}

.card {
  padding: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(35, 63, 152, 0.28);
  box-shadow: var(--shadow-soft);
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover,
button.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(35, 63, 152, 0.18);
}

.button.secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: rgba(35, 63, 152, 0.38);
}

.button.ghost {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-color: transparent;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--color-success);
  font-weight: 800;
  line-height: 1.55;
}

.status.is-error {
  color: var(--color-danger);
}

.muted {
  color: var(--color-text-muted);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--color-text);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: 0 1px 0 rgba(31, 49, 91, 0.03);
}

input {
  min-height: 46px;
  padding: 10px 13px;
}

input[type="checkbox"] {
  width: auto;
  min-height: 0;
  accent-color: var(--color-primary);
}

select {
  min-height: 46px;
  padding: 10px 13px;
}

textarea {
  min-height: 210px;
  padding: 14px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(35, 63, 152, 0.14);
  border-color: rgba(35, 63, 152, 0.58);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mt-md {
  margin-top: 18px;
}

.mt-lg {
  margin-top: 24px;
}

.site-footer {
  padding-block: 30px 40px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .page-banner {
    padding: 34px;
  }
}

@media (max-width: 768px) {
  .header-top .nav-inner {
    min-height: 56px;
  }

  .header-label {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-bar .nav-inner {
    min-height: auto;
    padding: 0;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-primary-dark);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    min-height: 48px;
    padding-inline: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-meta {
    display: none;
  }

  .page {
    padding-block: 32px 46px;
  }

  .page-banner {
    padding: 28px;
  }
}

@media (max-width: 576px) {
  .container,
  .nav-inner,
  .page,
  .site-footer {
    padding-inline: 16px;
  }

  .page {
    padding-top: 24px;
  }

  .panel,
  .card {
    padding: 18px;
  }

  .button,
  button.button {
    width: 100%;
  }

  .button-row {
    flex-direction: column;
  }
}
