:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #172033;
  --muted: #667085;
  --border: #d8e0ec;
  --primary: #185adb;
  --primary-dark: #1245a8;
  --danger: #b42318;
  --danger-dark: #8f1b13;
  --success: #067647;
  --shadow: 0 14px 34px rgba(31, 42, 68, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-dark);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(216, 224, 236, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.site-header__inner,
.site-footer__inner,
.page-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.required-star {
  color: red;
}

.site-header__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

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

.nav__link {
  padding: 9px 11px;
  border-radius: 9px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.nav__link:hover,
.nav__link.is-active {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.nav__identity {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.page-shell {
  min-height: calc(100vh - 132px);
  padding: 36px 0 56px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer__inner {
  padding: 20px 0;
}

.page-heading {
  margin: 0 0 24px;
}

.page-heading--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 18px;
}

.lead {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

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

.nowrap {
  white-space: nowrap;
}

.pre-wrap {
  white-space: pre-wrap;
}

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

.form-card,
.filter-card {
  padding: 28px;
}

.form-card>.field,
.form-card>.upload-panel,
.form-card>.form-actions {
  margin-top: 22px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 680;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  outline: none;
  padding: 11px 12px;
  font-weight: 500;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

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

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(24, 90, 219, 0.12);
}

.checkbox-field {
  min-height: 47px;
  display: flex;
  align-items: center;
  gap: 9px;
  align-self: start;
  font-weight: 650;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
}

.upload-panel {
  padding: 20px;
  border: 1px dashed #aebdd1;
  border-radius: 12px;
  background: #f8fbff;
}

.help-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.image-preview {
  display: block;
  max-width: min(100%, 420px);
  max-height: 320px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}

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

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  padding: 10px 16px;
  text-decoration: none;
  transition: background 120ms ease, transform 120ms ease, opacity 120ms ease;
}

.button:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.button--secondary {
  border-color: #c9d4e3;
  background: #fff;
  color: #344054;
}

.button--secondary:hover {
  background: #f1f5f9;
  color: #172033;
}

.button--ghost {
  border-color: transparent;
  background: transparent;
  color: #344054;
}

.button--ghost:hover {
  background: #f1f5f9;
  color: #172033;
}

.button--danger {
  background: var(--danger);
}

.button--danger:hover {
  background: var(--danger-dark);
}

.button--small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.83rem;
}

.button--full {
  width: 100%;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.alert {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 10px;
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.alert--error {
  border-color: #f1aaa4;
  background: #fff1f0;
  color: #8f1b13;
}

.alert--success {
  border-color: #9bd8bd;
  background: #ecfdf3;
  color: #05603a;
}

.auth-layout {
  min-height: calc(100vh - 245px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 460px);
  padding: 34px;
}

.account-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
}

.account-actions .checkbox-field {
  display: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.account-actions .checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ad037a;
  cursor: pointer;
}

.account-actions .button {
  min-width: 140px;
}

.auth-card h1 {
  margin-bottom: 8px;
}

.auth-card .field {
  margin-top: 20px;
}

.auth-card .button {
  margin-top: 24px;
}

.center-card {
  width: min(100%, 620px);
  margin: 70px auto;
  padding: 48px;
  text-align: center;
}

.center-card .button {
  margin-top: 18px;
}

.success-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #dcfae6;
  color: var(--success);
  font-size: 2rem;
  font-weight: 900;
}

.filter-card {
  margin-bottom: 22px;
}

.filter-card .form-actions {
  margin-top: 20px;
}

.filter-card .alert {
  margin: 18px 0 0;
}

.table-card {
  overflow: hidden;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #e5eaf1;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475467;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:hover {
  background: #fbfdff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.details-cell {
  min-width: 220px;
  max-width: 420px;
}

.details-cell summary {
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
}

.details-cell h4 {
  margin: 14px 0 5px;
}

.details-cell p {
  margin: 0;
}

.empty-state {
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}

.user-list {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.user-card {
  padding: 24px;
}

.user-card hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.user-card .button {
  margin-top: 16px;
}

.user-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.user-card__heading h2 {
  margin: 0 0 4px;
}

.user-card__heading p {
  margin: 0;
  font-size: 0.84rem;
}

.status-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 800;
}

.status-badge--active {
  background: #dcfae6;
  color: #05603a;
}

.status-badge--inactive {
  background: #f2f4f7;
  color: #475467;
}

@media (max-width: 980px) {
  .form-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav__identity {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
    gap: 10px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .page-shell {
    width: min(100% - 22px, 1480px);
    padding-top: 24px;
  }

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

  .form-card,
  .filter-card,
  .auth-card,
  .user-card {
    padding: 20px;
  }

  .page-heading--split {
    align-items: flex-start;
    flex-direction: column;
  }

  .center-card {
    margin: 30px auto;
    padding: 30px 20px;
  }

  .user-card__heading {
    flex-direction: column;
  }

  .pagination {
    gap: 10px;
  }
}