@charset "UTF-8";
:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root {
  --ink: #0B1B33;
  --brand: #006FD6;
  --brand-dark: #005CB3;
  --brand-50: #E8F2FE;
  --brand-100: #CCE2FB;
  --accent: #0088FF;
  --gold: #C9A227;
  --gold-50: #FBF5E2;
  --gold-700: #7A5F0C;
  --surface: #F7F8FA;
  --card: #fff;
  --hairline: #E3E7ED;
  --hairline-strong: #CBD2DC;
  --text: #1E2A3B;
  --text-muted: #5F6B7F;
  --text-subtle: #94A0B2;
  --slate-50: #F7F8FA;
  --slate-100: #EEF1F5;
  --slate-200: #E3E7ED;
  --slate-300: #CBD2DC;
  --slate-400: #94A0B2;
  --slate-500: #5F6B7F;
  --slate-600: #4A5668;
  --slate-700: #344052;
  --success-fg: #166A43;
  --success-bg: #E6F4EC;
  --success-dot: #1E7F4F;
  --warning-fg: #855000;
  --warning-bg: #FDF3DC;
  --warning-dot: #D18A00;
  --danger-fg: #A3271D;
  --danger-bg: #FCEBE9;
  --danger-dot: #D0402F;
  --info-fg: #1F5680;
  --info-bg: #E8F0F7;
  --info-dot: #2C6A9A;
  --neutral-fg: #4A5668;
  --neutral-bg: #EEF1F5;
  --neutral-dot: #94A0B2;
  --primary-fg: #005CB3;
  --primary-bg: #E6F1FD;
  --primary-dot: #006FD6;
  --gold-fg: #7A5F0C;
  --gold-bg: #FAF3DC;
  --gold-dot: #C9A227;
  --navy-fg: #0B1B33;
  --navy-bg: #E6EAF1;
  --navy-dot: #0B1B33;
  --radius-card: 8px;
  --radius-control: 4px;
  --radius-pill: 4px;
  --shadow-pop: 0 8px 24px -8px rgba(11, 27, 51, 0.12), 0 1px 3px rgba(11, 27, 51, 0.04);
  --shadow-pop-lg: 0 16px 40px -12px rgba(11, 27, 51, 0.16), 0 2px 6px rgba(11, 27, 51, 0.04);
  --ease: cubic-bezier(.2, 0, .2, 1);
  --speed: .18s;
  --focus-ring: 0 0 0 3px rgba(0, 111, 214, .32);
  --content-max: 1024px;
  --topbar-h: 4rem;
  --sidebar-w: 16.5rem;
  --sidebar-w-collapsed: 4.75rem;
  --sidebar-bg: #0B1B33;
  --sidebar-text: #B7C1D1;
  --sidebar-muted: #6F7D93;
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-active: rgba(255, 255, 255, .09);
  --tap: 2.75rem;
  --row-h: 3.5rem;
  --bs-border-radius: 4px;
  --bs-border-radius-sm: 4px;
  --bs-border-radius-lg: 8px;
  --bs-border-radius-xl: 8px;
  --bs-border-radius-xxl: 8px;
  --bs-border-radius-2xl: 8px;
  --bs-border-radius-pill: 4px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  letter-spacing: -0.01em;
  word-spacing: 0.03em;
}

h1, .h1 {
  letter-spacing: -0.02em;
}

.text-ink {
  color: var(--ink) !important;
}

.text-muted,
.text-body-secondary {
  color: var(--text-muted) !important;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  letter-spacing: 0.02em;
}

.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.2em;
}

a,
button,
.btn,
.form-control,
.form-select,
.form-check-input,
.nav-link,
.dropdown-item,
.page-link {
  transition: color var(--speed) var(--ease), background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.page-link:focus-visible {
  outline: 0;
}

::selection {
  background: var(--brand-100);
  color: var(--ink);
}

hr {
  border-top-color: var(--hairline);
}

.hairline {
  border: 1px solid var(--hairline);
}

.hairline-top {
  border-top: 1px solid var(--hairline);
}

@media (pointer: coarse) {
  .btn,
  .form-control,
  .form-select,
  .nav-link,
  .dropdown-item,
  .page-link {
    min-height: var(--tap);
  }
  .btn-icon {
    min-width: var(--tap);
  }
  .btn-close {
    min-width: var(--tap);
    min-height: var(--tap);
    box-sizing: border-box;
    background-position: center;
  }
}
.visually-hidden-focusable:focus {
  position: fixed !important;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.625rem 1rem !important;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-control);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-control);
  background: var(--brand-50);
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.8125rem;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.avatar-lg {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.125rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  box-shadow: none !important;
}
.btn:focus-visible {
  box-shadow: var(--focus-ring) !important;
}
.btn .icon {
  width: 1.125rem;
  height: 1.125rem;
  vertical-align: 0;
}

.btn-sm {
  gap: 0.375rem;
}
.btn-sm .icon {
  width: 1rem;
  height: 1rem;
}

.btn-lg .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: #004A91;
  --bs-btn-active-border-color: #004A91;
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
}

.btn-dark,
.btn-navy {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--ink);
  --bs-btn-border-color: var(--ink);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #16294A;
  --bs-btn-hover-border-color: #16294A;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #050C17;
  --bs-btn-active-border-color: #050C17;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--ink);
  --bs-btn-disabled-border-color: var(--ink);
}

.btn-secondary {
  --bs-btn-color: var(--ink);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: var(--hairline-strong);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-bg: var(--slate-50);
  --bs-btn-hover-border-color: var(--slate-400);
  --bs-btn-active-color: var(--ink);
  --bs-btn-active-bg: var(--slate-100);
  --bs-btn-active-border-color: var(--slate-400);
  --bs-btn-disabled-color: var(--slate-500);
  --bs-btn-disabled-bg: #fff;
  --bs-btn-disabled-border-color: var(--hairline);
}

.btn-ghost {
  --bs-btn-color: var(--slate-600);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-bg: var(--slate-100);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--ink);
  --bs-btn-active-bg: var(--slate-200);
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: var(--slate-400);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
}

.btn-danger {
  --bs-btn-bg: #B42F22;
  --bs-btn-border-color: #B42F22;
  --bs-btn-hover-bg: #982519;
  --bs-btn-hover-border-color: #982519;
  --bs-btn-active-bg: #7F1E14;
  --bs-btn-active-border-color: #7F1E14;
}

.btn-outline-danger {
  --bs-btn-color: var(--danger-fg);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #E8B4AE;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #B42F22;
  --bs-btn-hover-border-color: #B42F22;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #982519;
  --bs-btn-active-border-color: #982519;
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-dark);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #9CC8F5;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
}

.btn-soft {
  --bs-btn-color: var(--brand-dark);
  --bs-btn-bg: var(--brand-50);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--brand-dark);
  --bs-btn-hover-bg: var(--brand-100);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-100);
  --bs-btn-active-border-color: transparent;
}

.btn-gold {
  --bs-btn-color: var(--ink);
  --bs-btn-bg: var(--gold);
  --bs-btn-border-color: var(--gold);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-bg: #B8931F;
  --bs-btn-hover-border-color: #B8931F;
  --bs-btn-active-color: var(--ink);
  --bs-btn-active-bg: #A3831B;
  --bs-btn-active-border-color: #A3831B;
}

.btn-link {
  --bs-btn-color: var(--brand-dark);
  --bs-btn-hover-color: var(--brand-dark);
  --bs-btn-font-weight: 600;
  padding-left: 0;
  padding-right: 0;
  text-decoration: none;
}
.btn-link:hover {
  text-decoration: underline;
}

.btn-ghost-danger {
  --bs-btn-color: var(--danger-fg);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--danger-fg);
  --bs-btn-hover-bg: var(--danger-bg);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--danger-fg);
  --bs-btn-active-bg: #F8DAD6;
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: var(--slate-400);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
}

.btn-icon {
  padding: 0;
  width: 2.75rem;
  height: 2.75rem;
}
.btn-icon.btn-sm {
  width: 2.25rem;
  height: 2.25rem;
}

.btn[aria-busy=true] {
  pointer-events: none;
  opacity: 0.75;
}

@media (max-width: 575.98px) {
  .btn-block-mobile {
    width: 100%;
  }
}

.btn-copy.is-copied {
  --bs-btn-color: var(--success-fg);
  --bs-btn-border-color: #A9D6BC;
  --bs-btn-bg: var(--success-bg);
  --bs-btn-hover-color: var(--success-fg);
  --bs-btn-hover-bg: var(--success-bg);
}

.btn-close {
  --bs-btn-close-focus-shadow: var(--focus-ring);
  border-radius: var(--radius-control);
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.375rem;
  background-size: 0.75rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.form-label {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.form-required {
  color: var(--danger-dot);
  font-weight: 600;
}

.form-optional {
  margin-left: auto;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.form-control,
.form-select {
  min-height: 2.75rem;
}
.form-control:hover:not(:focus):not(:disabled):not([readonly]),
.form-select:hover:not(:focus):not(:disabled):not([readonly]) {
  border-color: var(--slate-400);
}
.form-control:disabled, .form-control[readonly],
.form-select:disabled,
.form-select[readonly] {
  color: var(--slate-600);
}

.form-control-sm,
.form-select-sm {
  min-height: 2.25rem;
}

textarea.form-control {
  min-height: 6rem;
  line-height: 1.6;
}

.form-control.is-invalid,
.form-select.is-invalid {
  background-image: none;
  padding-right: 1rem;
  border-color: var(--danger-dot);
}
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(208, 64, 47, 0.16);
}

.form-control.is-valid {
  background-image: none;
}

.invalid-feedback {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  font-weight: 500;
  color: var(--danger-fg);
}
.invalid-feedback .icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.input-icon {
  position: relative;
}
.input-icon > .icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: var(--slate-400);
  pointer-events: none;
}
.input-icon > .form-control,
.input-icon > .form-select {
  padding-left: 2.625rem;
}

.input-group-text {
  font-weight: 500;
  color: var(--slate-600);
  background: var(--slate-50);
}

.input-group > .btn {
  min-height: 2.75rem;
}

.form-check-input:focus {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.check-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: var(--tap);
  padding: 0.75rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--card);
  cursor: pointer;
}
.check-option:hover {
  border-color: var(--hairline-strong);
}
.check-option:has(.form-check-input:checked) {
  border-color: var(--brand);
  background: var(--brand-50);
}
.check-option .form-check-input {
  float: none;
  margin: 0.125rem 0 0;
}

.check-option__title {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.check-option__text {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-check {
  min-height: 1.5rem;
}

.form-check-input {
  margin-top: 0.2em;
  cursor: pointer;
}
.form-check-input:hover:not(:checked) {
  border-color: var(--slate-400);
}

.form-check-label {
  cursor: pointer;
}

.form-switch .form-check-input {
  height: 1.25em;
  margin-top: 0.15em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.5rem;
}
.form-grid > * {
  min-width: 0;
}
.form-grid > .form-grid__full {
  grid-column: 1 / -1;
}
@media (max-width: 767.98px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-section__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.settings-section__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 1010;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.action-bar__note {
  margin-right: auto;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
@media (max-width: 575.98px) {
  .action-bar {
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  }
  .action-bar .btn {
    flex: 1 1 auto;
  }
  .action-bar__note {
    flex-basis: 100%;
  }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.toolbar > * {
  min-width: 0;
}

.password-field {
  position: relative;
}
.password-field .form-control {
  padding-right: 3rem;
}
.password-field .password-toggle {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--slate-500);
}
.password-field .password-toggle:hover {
  color: var(--ink);
  background: var(--slate-100);
}

.photo-upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  border: 1.5px dashed var(--hairline-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  transition: border-color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}
.photo-upload:hover {
  border-color: var(--brand);
}
.photo-upload:focus-within {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}
.photo-upload.is-dragging {
  border-color: var(--accent);
  border-style: solid;
  background: var(--brand-50);
}
.photo-upload.has-image {
  border-style: solid;
  border-color: var(--hairline);
  background: var(--card);
}
.photo-upload.is-invalid {
  border-color: var(--danger-dot);
}
@media (max-width: 575.98px) {
  .photo-upload {
    flex-direction: column;
    text-align: center;
  }
}

.photo-upload__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 6.5rem;
  height: 6.5rem;
  border-radius: var(--radius-card);
  background: var(--slate-100);
  color: var(--slate-400);
  overflow: hidden;
}
.photo-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-upload__preview .icon {
  width: 2.5rem;
  height: 2.5rem;
}

.photo-upload__body {
  flex: 1 1 auto;
  min-width: 0;
}

.photo-upload__title {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.photo-upload__meta {
  margin: 0.125rem 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.photo-upload__meta.is-error {
  color: var(--danger-fg);
  font-weight: 500;
}

.photo-upload__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
@media (max-width: 575.98px) {
  .photo-upload__actions {
    justify-content: center;
  }
}

.photo-upload__button {
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.photo-upload__drop {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
@media (hover: none) {
  .photo-upload__drop {
    display: none;
  }
}

/* The real input covers the zone, so a click anywhere opens the file picker and drops land on it. */
.photo-upload__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}
.filter-bar .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.filter-bar .form-field {
  margin-bottom: 0;
}
.filter-bar > * {
  flex: 1 1 11rem;
  min-width: 0;
}
.filter-bar .filter-bar__search {
  flex: 2 1 16rem;
}
.filter-bar .filter-bar__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
}
@media (max-width: 767.98px) {
  .filter-bar > *,
  .filter-bar .filter-bar__search {
    flex-basis: 100%;
  }
  .filter-bar .filter-bar__actions .btn {
    flex: 1;
  }
}

.filter-bar--flush {
  margin-bottom: 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
}
@media (min-width: 768px) {
  .filter-bar--flush {
    padding: 1rem 1.25rem;
  }
}

.rich-editor {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-control);
  background: var(--card);
  overflow: hidden;
}
.rich-editor:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 111, 214, 0.18);
}
.rich-editor .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: var(--slate-50);
  font-family: var(--font-body, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}
.rich-editor .ql-container.ql-snow {
  border: 0;
  font-family: var(--font-body, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-size: 0.9375rem;
}
.rich-editor .ql-editor {
  min-height: 16rem;
  color: var(--ink);
  line-height: 1.6;
}
.rich-editor .ql-snow .ql-stroke {
  stroke: var(--slate-600);
}
.rich-editor .ql-snow .ql-fill {
  fill: var(--slate-600);
}
.rich-editor .ql-snow button:hover .ql-stroke,
.rich-editor .ql-snow button.ql-active .ql-stroke {
  stroke: var(--brand);
}
.rich-editor .rich-editor__source {
  display: block;
  width: 100%;
  min-height: 20rem;
  padding: 1rem;
  border: 0;
  outline: 0;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  color: var(--ink);
  background: var(--card);
}

.rich-editor__modes {
  display: flex;
  gap: 0.25rem;
  padding: 0.375rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--card);
}

.rich-editor__mode {
  padding: 0.375rem 0.75rem;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--slate-600);
  font-size: 0.8125rem;
  font-weight: 600;
}
.rich-editor__mode:hover {
  color: var(--ink);
  background: var(--slate-100);
}
.rich-editor__mode.is-active {
  color: var(--brand-dark);
  background: var(--brand-50);
}

.status-badge {
  --badge-fg: var(--neutral-fg);
  --badge-bg: var(--neutral-bg);
  --badge-dot: var(--neutral-dot);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-control);
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  vertical-align: middle;
  letter-spacing: 0.005em;
}

.status-badge__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: var(--radius-control);
  background: var(--badge-dot);
  flex-shrink: 0;
}

.status-badge--success {
  --badge-fg: var(--success-fg);
  --badge-bg: var(--success-bg);
  --badge-dot: var(--success-dot);
}

.status-badge--warning {
  --badge-fg: var(--warning-fg);
  --badge-bg: var(--warning-bg);
  --badge-dot: var(--warning-dot);
}

.status-badge--danger {
  --badge-fg: var(--danger-fg);
  --badge-bg: var(--danger-bg);
  --badge-dot: var(--danger-dot);
}

.status-badge--info {
  --badge-fg: var(--info-fg);
  --badge-bg: var(--info-bg);
  --badge-dot: var(--info-dot);
}

.status-badge--neutral {
  --badge-fg: var(--neutral-fg);
  --badge-bg: var(--neutral-bg);
  --badge-dot: var(--neutral-dot);
}

.status-badge--primary {
  --badge-fg: var(--primary-fg);
  --badge-bg: var(--primary-bg);
  --badge-dot: var(--primary-dot);
}

.status-badge--gold {
  --badge-fg: var(--gold-fg);
  --badge-bg: var(--gold-bg);
  --badge-dot: var(--gold-dot);
}

.status-badge--navy {
  --badge-fg: var(--navy-fg);
  --badge-bg: var(--navy-bg);
  --badge-dot: var(--navy-dot);
}

.status-badge--lg {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.375rem;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.badge {
  letter-spacing: 0.01em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--card);
  color: var(--slate-600);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.chip.is-complete {
  border-color: transparent;
  background: var(--brand-50);
  color: var(--brand-dark);
}

.voter-no {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-control);
  background: var(--navy-bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.card {
  box-shadow: none;
}
@media (max-width: 575.98px) {
  .card {
    --bs-card-spacer-x: 1rem;
    --bs-card-spacer-y: 1rem;
    --bs-card-cap-padding-x: 1rem;
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  min-height: 3.75rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  background: var(--card);
  border-bottom: 1px solid var(--hairline);
}
.card-header > .min-w-0 {
  flex: 1 1 12rem;
}

.card-title {
  font-family: var(--font-heading, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
}

.card-subtitle {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0.125rem 0 0;
}

.card-footer {
  background: var(--slate-50);
  border-top: 1px solid var(--hairline);
}

.card-footer--actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
}
@media (max-width: 575.98px) {
  .card-footer--actions .btn {
    flex: 1 1 auto;
  }
}
.card-footer .pagination-wrap {
  width: 100%;
  margin-top: 0;
}

.card-section {
  padding: var(--bs-card-spacer-y, 1.5rem) var(--bs-card-spacer-x, 1.5rem);
}
.card-section + .card-section {
  border-top: 1px solid var(--hairline);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.section-heading__title {
  margin: 0;
  font-family: var(--font-heading, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.section-heading__text {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

.page-stack {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}
.page-stack > * {
  min-width: 0;
  margin-bottom: 0;
}

.page-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
.page-grid > * {
  min-width: 0;
}
@media (min-width: 1200px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  }

}

.kv-list {
  margin: 0;
}

.kv-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--hairline);
}
.kv-list__row:first-child {
  padding-top: 0;
  border-top: 0;
}
.kv-list__row:last-child {
  padding-bottom: 0;
}
.kv-list__row > dt {
  flex: 0 1 auto;
  max-width: 50%;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}
.kv-list__row > dd {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  text-align: right;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.kv-list--left .kv-list__row {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
}
.kv-list--left .kv-list__row > dt {
  max-width: none;
}
.kv-list--left .kv-list__row > dd {
  text-align: left;
}
@media (max-width: 575.98px) {
  .kv-list--left .kv-list__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kv-list--flush .kv-list__row,
.kv-list--flush .kv-list__row:first-child,
.kv-list--flush .kv-list__row:last-child {
  padding: 0.875rem var(--bs-card-spacer-x, 1.5rem);
}
.kv-list--flush .kv-list__row:first-child {
  border-top: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tag .icon {
  width: 0.875rem;
  height: 0.875rem;
}

a.card:hover {
  border-color: var(--hairline-strong);
  text-decoration: none;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.page-header__main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 18rem;
  min-width: 0;
}

.page-header__back {
  white-space: nowrap;
}
.page-header__back .icon {
  width: 1rem;
  height: 1rem;
}

.page-header__text {
  flex: 1 1 auto;
  min-width: 0;
}

.page-header__title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.page-header__title {
  min-width: 0;
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 767.98px) {
  .page-header__title {
    font-size: 1.25rem;
  }
}

.page-header__meta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.375rem;
}
.page-header__meta > * {
  margin: 0 !important;
}

.page-header__context {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-header__eyebrow {
  font-weight: 600;
  color: var(--slate-700);
}

.page-header__dot {
  margin: 0 0.375rem;
  color: var(--text-subtle);
}

.page-header__text > .page-header__subtitle {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
@media (max-width: 575.98px) {
  .page-header__actions {
    width: 100%;
  }
  .page-header__actions > .btn {
    flex: 1 1 auto;
  }
  .page-header__actions > .page-header__back {
    flex: 0 0 auto;
  }
  .page-header__actions:has(> .page-header__back:only-child) {
    justify-content: flex-end;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-grid > * {
  min-width: 0;
}
@media (max-width: 575.98px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  min-width: 0;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  color: inherit;
}
.stat-card:is(a):hover {
  border-color: var(--hairline-strong);
  color: inherit;
  text-decoration: none;
}
.stat-card:is(a):focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stat-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-control);
  background: var(--slate-100);
  color: var(--slate-600);
}
.stat-card__icon .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.stat-card--primary .stat-card__icon {
  background: var(--primary-bg);
  color: var(--primary-fg);
}

.stat-card--success .stat-card__icon {
  background: var(--success-bg);
  color: var(--success-fg);
}

.stat-card--warning .stat-card__icon {
  background: var(--warning-bg);
  color: var(--warning-fg);
}

.stat-card--danger .stat-card__icon {
  background: var(--danger-bg);
  color: var(--danger-fg);
}

.stat-card--info .stat-card__icon {
  background: var(--info-bg);
  color: var(--info-fg);
}

.stat-card--gold .stat-card__icon {
  background: var(--gold-bg);
  color: var(--gold-fg);
}

.stat-card--navy .stat-card__icon {
  background: var(--navy-bg);
  color: var(--navy-fg);
}

.stat-card__value {
  font-family: var(--font-heading, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.stat-card__hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--slate-50);
  color: var(--slate-500);
}
.empty-state__icon .icon {
  width: 1.375rem;
  height: 1.375rem;
}

.empty-state__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.empty-state__text {
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 0;
}

.empty-state--compact {
  padding: 2rem 1rem;
}
.empty-state--compact .empty-state__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
}

.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.empty-state--bordered {
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--radius-card);
  background: var(--card);
}

.skeleton {
  display: block;
  background: var(--slate-100);
  border-radius: var(--radius-control);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

.skeleton-text {
  height: 0.75rem;
  margin-bottom: 0.625rem;
}
.skeleton-text:last-child {
  width: 60%;
  margin-bottom: 0;
}

.skeleton-title {
  height: 1.125rem;
  width: 40%;
  margin-bottom: 1rem;
}

.skeleton-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-control);
}

.skeleton-block {
  height: 8rem;
  border-radius: var(--radius-card);
}

@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.progress {
  overflow: hidden;
}

.progress-bar {
  transition: width 0.2s var(--ease);
}

.vote-bar {
  height: 0.625rem;
  border-radius: var(--radius-pill);
  background: var(--slate-100);
  overflow: hidden;
}
.vote-bar > span {
  display: block;
  height: 100%;
  background: var(--slate-400);
  border-radius: inherit;
}
.vote-bar.is-winner > span {
  background: var(--gold);
}

@media (max-width: 575.98px) {
  .stat-card {
    padding: 1rem;
  }
  .stat-card__value {
    font-size: 1.375rem;
  }
}
.table {
  margin-bottom: 0;
  vertical-align: middle;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.table > thead > tr > th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-500);
  background: var(--slate-50);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  padding-top: 0.6875rem;
  padding-bottom: 0.6875rem;
}
.table > tbody > tr > td {
  height: var(--row-h);
  color: var(--text);
}
.table > tbody > tr:last-child > * {
  border-bottom: 0;
}
.table > tbody > tr {
  transition: background-color var(--speed) var(--ease);
}
.table td.num,
.table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table th.actions-col,
.table td.actions-col {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.table .row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  white-space: nowrap;
}
.table .row-title {
  font-weight: 600;
  color: var(--ink);
}
.table a.row-title:hover {
  color: var(--brand-dark);
}
.table .row-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.table .row-media {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.table .row-media > .min-w-0 {
  display: flex;
  flex-direction: column;
}
.table .cell-muted {
  color: var(--text-muted);
}
.table .cell-nowrap {
  white-space: nowrap;
}

.table-sm > tbody > tr > td {
  height: auto;
}

.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: var(--slate-50);
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--hairline);
}

.table-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  /* Wide tables scroll inside the card between the stacked breakpoint and desktop, never the page. */
  overflow-x: auto;
  /* Keeps visually-hidden header labels inside the card, or they widen the page. */
  position: relative;
}
.table-card > .table-responsive > .table > thead > tr > th:first-child,
.table-card > .table > thead > tr > th:first-child,
.table-card > .table-responsive > .table > tbody > tr > td:first-child,
.table-card > .table > tbody > tr > td:first-child,
.card > .table-responsive > .table > thead > tr > th:first-child,
.card > .table-responsive > .table > tbody > tr > td:first-child {
  padding-left: 1.25rem;
}
.table-card > .table-responsive > .table > thead > tr > th:last-child,
.table-card > .table > thead > tr > th:last-child,
.table-card > .table-responsive > .table > tbody > tr > td:last-child,
.table-card > .table > tbody > tr > td:last-child,
.card > .table-responsive > .table > thead > tr > th:last-child,
.card > .table-responsive > .table > tbody > tr > td:last-child {
  padding-right: 1.25rem;
}

.table-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: 3.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--hairline);
}
.table-card__header > .min-w-0 {
  flex: 1 1 12rem;
}

.table-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.table-card__footer .pagination-wrap {
  width: 100%;
  margin-top: 0;
}

.bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--brand-50);
  border-bottom: 1px solid var(--brand-100);
  font-weight: 500;
  color: var(--brand-dark);
}

/* Each td needs data-label="Column" or the stacked card shows no column name. */
@media (max-width: 767.98px) {
  .table-card:has(.table-stack) {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
  .table-card:has(.table-stack) > .table-card__header,
  .table-card:has(.table-stack) > .table-card__footer,
  .table-card:has(.table-stack) > .filter-bar--flush,
  .table-card:has(.table-stack) > .bulk-bar {
    margin-bottom: 0.75rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    background: var(--card);
  }
  .table-card:has(.table-stack) > .table-card__footer {
    margin: 0.75rem 0 0;
  }
  .table-stack > tbody > tr > td {
    height: auto;
  }
  .table-stack {
    display: block;
  }
  .table-stack > thead {
    display: none;
  }
  .table-stack > tbody {
    display: grid;
    gap: 0.75rem;
  }
  .table-stack > tbody > tr {
    display: block;
    padding: 0.5rem 1rem;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
  }
  .table-stack > tbody > tr > td {
    display: grid;
    grid-template-columns: minmax(5.5rem, 40%) minmax(0, 1fr);
    align-items: start;
    column-gap: 1rem;
    padding: 0.625rem 0 !important;
    border-bottom: 1px solid var(--hairline) !important;
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .table-stack > tbody > tr > td > * {
    grid-column: 2;
    justify-self: end;
  }
  .table-stack > tbody > tr > td:last-child {
    border-bottom: 0 !important;
  }
  .table-stack > tbody > tr > td::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1/span 20;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 0.125rem;
  }
  .table-stack > tbody > tr > td:not([data-label])::before, .table-stack > tbody > tr > td[data-label=""]::before {
    display: none;
  }
  .table-stack > tbody > tr > td:not([data-label]), .table-stack > tbody > tr > td[data-label=""] {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }
  .table-stack > tbody > tr > td:not([data-label]) > *, .table-stack > tbody > tr > td[data-label=""] > * {
    grid-column: 1;
    justify-self: stretch;
  }
  .table-stack > tbody > tr > td.num {
    text-align: right;
  }
  .table-stack .row-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}
.pagination-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.pagination-summary {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pagination {
  gap: 0.25rem;
  margin: 0;
  flex-wrap: wrap;
}
.pagination .page-link {
  gap: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-control) !important;
  font-weight: 500;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  margin-left: 0 !important;
}
.pagination .page-link:focus {
  box-shadow: var(--focus-ring);
}
.pagination .page-link .icon {
  width: 1rem;
  height: 1rem;
}
.pagination .page-item.disabled .page-link {
  border-color: var(--hairline);
}
.pagination .page-item.dots .page-link {
  border-color: transparent;
  background: transparent;
}

.dropdown-menu {
  box-shadow: var(--shadow-pop);
  animation: pop-in 0.16s var(--ease);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: var(--radius-control);
  font-weight: 500;
}
.dropdown-item .icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--slate-400);
}
.dropdown-item:hover .icon, .dropdown-item:focus .icon {
  color: var(--slate-600);
}
.dropdown-item.text-danger .icon {
  color: inherit;
}

.dropdown-header {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dropdown-toggle::after {
  display: none;
}

.modal-content {
  box-shadow: var(--shadow-pop-lg);
}

.modal-header {
  align-items: flex-start;
  border-bottom: 0;
  padding-bottom: 0.5rem;
}

.modal-title {
  font-family: var(--font-heading, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

.modal-body {
  padding-top: 0.5rem;
  color: var(--slate-600);
}

.modal-footer {
  border-top: 0;
  padding: 0 1.5rem 1.5rem;
  gap: 0.5rem;
}
.modal-footer > * {
  margin: 0;
}
@media (max-width: 575.98px) {
  .modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .modal-footer .btn {
    width: 100%;
  }
}

.modal-backdrop.show {
  backdrop-filter: none;
}

.confirm-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-control);
  margin-bottom: 1rem;
  background: var(--danger-bg);
  color: var(--danger-fg);
}
.confirm-modal__icon .icon {
  width: 1.375rem;
  height: 1.375rem;
}
.confirm-modal__icon.is-primary {
  background: var(--primary-bg);
  color: var(--primary-fg);
}
.confirm-modal__icon.is-warning {
  background: var(--warning-bg);
  color: var(--warning-fg);
}
.confirm-modal__icon.is-navy {
  background: var(--navy-bg);
  color: var(--navy-fg);
}

.confirm-modal__message {
  color: var(--slate-600);
  margin-bottom: 0;
}

.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: min(380px, 100vw - 2rem);
  pointer-events: none;
}
@media (max-width: 575.98px) {
  .toast-stack {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}

.toast {
  width: 100%;
  pointer-events: auto;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--hairline);
}

.toast-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 0.875rem 0.875rem 1rem;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-control);
  flex-shrink: 0;
}
.toast-icon .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.toast--success .toast-icon {
  background: var(--success-bg);
  color: var(--success-fg);
}

.toast--warning .toast-icon {
  background: var(--warning-bg);
  color: var(--warning-fg);
}

.toast--danger .toast-icon {
  background: var(--danger-bg);
  color: var(--danger-fg);
}

.toast--info .toast-icon {
  background: var(--info-bg);
  color: var(--info-fg);
}

.toast-text {
  flex: 1;
  min-width: 0;
  padding-top: 0.3125rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
}

.toast .btn-close {
  flex-shrink: 0;
}

.tooltip {
  --bs-tooltip-opacity: 1;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid var(--bs-alert-border-color, transparent);
  color: var(--ink);
}
.alert-body {
  font-size: 0.875rem;
  line-height: 1.55;
}
.alert-body .alert-title {
  font-size: 0.9375rem;
}
.alert > .icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}
.alert .alert-body {
  flex: 1;
  min-width: 0;
}
.alert .alert-title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.125rem;
}
.alert p:last-child,
.alert ul:last-child {
  margin-bottom: 0;
}
.alert .btn-close {
  position: static;
  padding: 0.375rem;
  margin: -0.125rem -0.25rem 0 0;
}

.alert-dismissible {
  padding-right: 1rem;
}

.alert-success {
  --bs-alert-color: var(--ink);
  --bs-alert-bg: var(--success-bg);
  --bs-alert-border-color: #CFE8DA;
  --bs-alert-link-color: var(--success-fg);
}
.alert-success > .icon {
  color: var(--success-fg);
}

.alert-warning {
  --bs-alert-color: var(--ink);
  --bs-alert-bg: var(--warning-bg);
  --bs-alert-border-color: #F2DFB0;
  --bs-alert-link-color: var(--warning-fg);
}
.alert-warning > .icon {
  color: var(--warning-fg);
}

.alert-danger {
  --bs-alert-color: var(--ink);
  --bs-alert-bg: var(--danger-bg);
  --bs-alert-border-color: #F3CFCA;
  --bs-alert-link-color: var(--danger-fg);
}
.alert-danger > .icon {
  color: var(--danger-fg);
}

.alert-info {
  --bs-alert-color: var(--ink);
  --bs-alert-bg: var(--info-bg);
  --bs-alert-border-color: #CFDDEA;
  --bs-alert-link-color: var(--info-fg);
}
.alert-info > .icon {
  color: var(--info-fg);
}

.alert-neutral {
  --bs-alert-color: var(--ink);
  --bs-alert-bg: var(--card);
  --bs-alert-border-color: var(--hairline);
}
.alert-neutral > .icon {
  color: var(--slate-500);
}

.alert-gold {
  --bs-alert-color: var(--ink);
  --bs-alert-bg: var(--gold-50);
  --bs-alert-border-color: #EBDCA8;
}
.alert-gold > .icon {
  color: var(--gold-700);
}

.phase-stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  counter-reset: phase;
}

.phase-step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 0.25rem;
  text-align: center;
}
.phase-step::before {
  content: "";
  position: absolute;
  top: 0.6875rem;
  left: calc(-50% + 0.875rem);
  right: calc(50% + 0.875rem);
  height: 2px;
  background: var(--slate-200);
}
.phase-step:first-child::before {
  display: none;
}
.phase-step.is-done::before, .phase-step.is-current::before {
  background: var(--accent);
}

.phase-step__marker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-control);
  border: 2px solid var(--slate-300);
  background: var(--card);
  color: #fff;
}
.phase-step__marker .icon {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 3;
}

.phase-step.is-done .phase-step__marker {
  background: var(--accent);
  border-color: var(--accent);
}

.phase-step.is-current .phase-step__marker {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--brand-50);
}
.phase-step.is-current .phase-step__marker::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-control);
  background: var(--accent);
}

.phase-step__label {
  overflow-wrap: normal;
  hyphens: none;
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
}

.phase-step.is-current .phase-step__label {
  color: var(--ink);
  font-weight: 700;
}

.phase-step.is-done .phase-step__label {
  color: var(--slate-600);
}

.phase-step__date {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}
.phase-step__date > span {
  display: block;
}
.phase-step__time {
  color: var(--text-muted);
  font-weight: 500;
}
.phase-step.is-current .phase-step__date,
.phase-step.is-current .phase-step__time {
  color: var(--brand-dark);
}
.phase-step__date.is-pending {
  font-style: italic;
}

.phase-stepper-scroll {
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}
.phase-stepper-scroll .phase-stepper {
  min-width: 62rem;
}

@media (max-width: 767.98px) {
  .phase-stepper-scroll {
    overflow: visible;
  }
  .phase-stepper-scroll .phase-stepper {
    min-width: 0;
  }
  .phase-stepper {
    flex-direction: column;
  }
  .phase-step {
    display: grid;
    grid-template-columns: 1.5rem 1fr;
    column-gap: 0.875rem;
    text-align: left;
    padding: 0 0 1rem;
  }
  .phase-step::before {
    display: none;
  }
  .phase-step::after {
    content: "";
    position: absolute;
    top: 1.75rem;
    bottom: 0.25rem;
    left: 0.6875rem;
    width: 2px;
    background: var(--slate-200);
  }
  .phase-step.is-done::after {
    background: var(--accent);
  }
  .phase-step:last-child {
    padding-bottom: 0;
  }
  .phase-step:last-child::after {
    display: none;
  }
  .phase-step__marker {
    grid-row: span 2;
  }
  .phase-step__label {
    margin-top: 0.1875rem;
    font-size: 0.875rem;
  }
  .phase-step__date {
    font-size: 0.75rem;
  }
}
.countdown {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
}

.countdown__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.countdown__units {
  display: flex;
  gap: 0.5rem;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.5rem;
  padding: 0.5rem 0.375rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--card);
}

.countdown__value {
  font-family: var(--font-heading, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.countdown__unit-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown__done {
  font-weight: 600;
  color: var(--ink);
}

.countdown__done {
  display: none;
}

.countdown.is-done .countdown__done {
  display: block;
}

.countdown.is-done .countdown__units {
  display: none;
}

.app-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--slate-100);
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.app-tabs::-webkit-scrollbar {
  display: none;
}
.app-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  color: var(--slate-600);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
}
.app-tabs .nav-link:hover {
  color: var(--ink);
}
.app-tabs .nav-link.active {
  background: var(--card);
  color: var(--ink);
  border-color: var(--hairline);
}
.app-tabs .nav-link .icon {
  width: 1rem;
  height: 1rem;
}
.app-tabs .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: var(--radius-pill);
  background: var(--slate-200);
  color: var(--slate-600);
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.app-tabs .nav-link.active .tab-count {
  background: var(--brand-50);
  color: var(--brand-dark);
}

.app-tabs--underline {
  padding: 0;
  gap: 1.5rem;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
}
.app-tabs--underline .nav-link {
  padding: 0.75rem 0;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.app-tabs--underline .nav-link.active {
  background: transparent;
  border-bottom-color: var(--brand);
}

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

.milestone {
  position: relative;
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0;
  font-size: 0.9375rem;
}
.milestone:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(0.625rem - 0.5px);
  top: calc(50% + 0.75rem);
  height: calc(100% - 1.5rem);
  border-left: 1px solid var(--hairline-strong);
}
.milestone.is-done::after {
  border-left-color: var(--accent);
}

.milestone__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-control);
  border: 1.5px solid var(--hairline-strong);
  background: var(--card);
  color: #fff;
}
.is-done .milestone__marker {
  background: var(--accent);
  border-color: var(--accent);
}
.is-current .milestone__marker {
  border: 5px solid var(--accent);
  box-shadow: 0 0 0 4px var(--brand-50);
}

.milestone__label {
  color: var(--slate-600);
}
.is-current .milestone__label {
  color: var(--ink);
  font-weight: 600;
}

.milestone__now {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  padding: 0.0625rem 0.375rem;
  border-radius: var(--radius-control);
  background: var(--brand-50);
  color: var(--brand-dark);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 0.0625rem;
}

.milestone__date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: right;
}
.is-current .milestone__date {
  color: var(--brand-dark);
  font-weight: 600;
}

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-container {
  width: 100%;
  max-width: calc(var(--content-max) + 2.5rem);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (max-width: 575.98px) {
  .site-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--hairline);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(8px);
  }
}

.site-nav {
  min-height: var(--topbar-h);
}
@media (max-width: 991.98px) {
  .site-nav .navbar-collapse {
    padding: 0.75rem 0 1rem;
    border-top: 1px solid var(--hairline);
    margin-top: 0.25rem;
  }
}
.site-nav .navbar-nav {
  gap: 0.25rem;
}
@media (min-width: 992px) {
  .site-nav .navbar-nav {
    margin-left: 2rem;
  }
}
.site-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem !important;
  border-radius: var(--radius-control);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--slate-600);
}
.site-nav .nav-link .icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--slate-400);
}
.site-nav .nav-link:hover {
  color: var(--ink);
  background: var(--slate-100);
}
.site-nav .nav-link.active {
  color: var(--brand-dark);
  background: var(--brand-50);
  font-weight: 600;
}
.site-nav .nav-link.active .icon {
  color: var(--brand);
}
@media (max-width: 991.98px) {
  .site-nav .nav-link {
    display: flex;
    min-height: var(--tap);
  }
}
.site-nav .navbar-toggler {
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--hairline);
  color: var(--ink);
}
@media (max-width: 991.98px) {
  .site-nav .navbar-toggler {
    display: inline-flex;
  }
}
.site-nav .navbar-toggler:focus {
  box-shadow: var(--focus-ring);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand__wordmark {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
}
@media (max-width: 575.98px) {
  .brand__wordmark {
    height: 1.75rem;
  }
}

.brand__icon {
  display: none;
  height: 2rem;
  width: auto;
}

.brand--lg {
  justify-content: center;
}
.brand--lg .brand__wordmark {
  height: 2.75rem;
  max-width: 16rem;
}

.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
  min-height: var(--tap);
}
.user-menu-toggle:hover {
  border-color: var(--hairline-strong);
}
.user-menu-toggle:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}
.user-menu-toggle .avatar {
  width: 2rem;
  height: 2rem;
}
.user-menu-toggle .icon {
  width: 1rem;
  height: 1rem;
  color: var(--slate-400);
}

.user-menu-name {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-head {
  padding: 0.625rem 0.75rem 0.75rem;
  margin-bottom: 0.375rem;
  border-bottom: 1px solid var(--hairline);
}
.user-menu-head strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.user-menu-head span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-auth-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
@media (max-width: 575.98px) {
  .site-auth-actions {
    gap: 0.25rem;
  }
  .site-auth-actions .btn {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }
}

.site-main {
  flex: 1 0 auto;
  padding: 2rem 0 3rem;
}
@media (max-width: 767.98px) {
  .site-main {
    padding: 1.25rem 0 2rem;
  }
}

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--hairline);
  background: var(--card);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding: 2.5rem 0 2rem;
}
@media (max-width: 767.98px) {
  .site-footer__top {
    flex-direction: column;
    padding: 2rem 0 1.5rem;
  }
}

.site-footer__about {
  max-width: 24rem;
}
.site-footer__about p {
  margin: 0.875rem 0 0;
  line-height: 1.6;
}

.site-footer__brand .brand__wordmark {
  height: 1.75rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
}
.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 500;
  color: var(--slate-600);
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}
.site-footer__nav a:hover {
  color: var(--brand);
}
@media (max-width: 767.98px) {
  .site-footer__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0 1rem;
  }
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
}
.site-footer__bottom a {
  color: var(--slate-600);
}

.site-footer__secure {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.site-footer__secure .icon {
  width: 0.9375rem;
  height: 0.9375rem;
  color: var(--brand);
}

.admin-body {
  --admin-bar-h: 4.5rem;
  --side-text: rgba(226, 232, 240, 0.72);
  --side-muted: rgba(226, 232, 240, 0.42);
  --side-line: rgba(255, 255, 255, 0.07);
  --side-hover: rgba(255, 255, 255, 0.045);
  --side-active: rgba(255, 255, 255, 0.08);
  --side-accent: #4DA8FF;
  min-height: 100vh;
}

.admin-sidebar.offcanvas-lg {
  --bs-offcanvas-width: 17.5rem;
  --bs-offcanvas-bg: var(--sidebar-bg);
  --bs-offcanvas-color: var(--side-text);
  background-color: var(--sidebar-bg) !important;
  color: var(--side-text);
  display: flex;
  flex-direction: column;
}
@media (min-width: 992px) {
  .admin-sidebar.offcanvas-lg {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1035;
    width: var(--sidebar-w);
    border-right: 1px solid var(--side-line);
    transition: width 0.2s var(--ease);
  }
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  height: var(--admin-bar-h);
  padding: 0 1.25rem 0 1.5rem;
  border-bottom: 1px solid var(--side-line);
  flex-shrink: 0;
}
.admin-sidebar__brand .brand__wordmark {
  height: 1.75rem;
  max-width: 10.5rem;
}
.admin-sidebar__brand .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
  opacity: 0.6;
}

.admin-sidebar__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0.875rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.sidebar-group__label {
  display: block;
  padding: 1.375rem 0.75rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--side-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.125rem;
  border-radius: var(--radius-control);
  color: var(--side-text);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.sidebar-link .icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--side-muted);
  transition: color var(--speed) var(--ease);
}
.sidebar-link:hover {
  color: #fff;
  background: var(--side-hover);
  text-decoration: none;
}
.sidebar-link:hover .icon {
  color: rgba(255, 255, 255, 0.85);
}
.sidebar-link:focus-visible {
  outline: 2px solid var(--side-accent);
  outline-offset: -2px;
}
.sidebar-link.active {
  color: #fff;
  background: var(--side-active);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  font-weight: 600;
}
.sidebar-link.active .icon {
  color: var(--side-accent);
}
.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: -0.875rem;
  top: 0.625rem;
  bottom: 0.625rem;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--side-accent);
}

.sidebar-link__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.375rem;
  border-radius: var(--radius-pill);
  background: rgba(0, 136, 255, 0.16);
  color: #8CC6FF;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-sidebar__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem;
  border-top: 1px solid var(--side-line);
}

.sidebar-account {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-account__toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.5rem 0.625rem 0.5rem 0.5rem;
  border: 1px solid var(--side-line);
  border-radius: var(--radius-control);
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.sidebar-account__toggle:hover,
.sidebar-account__toggle[aria-expanded=true] {
  background: var(--side-hover);
  border-color: rgba(255, 255, 255, 0.12);
}
.sidebar-account__toggle:focus-visible {
  outline: 2px solid var(--side-accent);
  outline-offset: 2px;
}

.sidebar-account__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-control);
  background: rgba(0, 136, 255, 0.14);
  color: #8CC6FF;
  font-family: var(--font-heading, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-account__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.sidebar-account__name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-account__role {
  font-size: 0.75rem;
  color: var(--side-muted);
}

.sidebar-account__chevron {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--side-muted);
}

.sidebar-account .dropdown-menu {
  min-width: 14rem;
  margin-bottom: 0.5rem !important;
}

.sidebar-collapse-btn {
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--side-line);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--side-muted);
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.sidebar-collapse-btn .icon {
  width: 1.125rem;
  height: 1.125rem;
}
.sidebar-collapse-btn:hover {
  background: var(--side-hover);
  color: #fff;
}
.sidebar-collapse-btn:focus-visible {
  outline: 2px solid var(--side-accent);
  outline-offset: 2px;
}

.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
@media (min-width: 992px) {
  .admin-main {
    margin-left: var(--sidebar-w);
    transition: margin-left 0.2s var(--ease);
  }
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--admin-bar-h);
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--hairline);
}
@supports (backdrop-filter: blur(10px)) {
  .admin-topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
  }
}
@media (min-width: 1200px) {
  .admin-topbar {
    padding: 0 2.5rem;
  }
}
@media (max-width: 767.98px) {
  .admin-topbar {
    gap: 0.75rem;
    padding: 0 1rem;
  }
}

.topbar-election {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-phase {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--slate-600);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.topbar-phase.is-live {
  border-color: var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-dark);
}
@media (max-width: 575.98px) {
  .topbar-phase {
    display: none;
  }
}

.topbar-phase__dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: var(--radius-control);
  background: var(--slate-400);
}
.is-live .topbar-phase__dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 111, 214, 0.16);
}

.topbar-election__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.topbar-election__title {
  min-width: 0;
  font-family: var(--font-heading, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-election__title:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

.topbar-election__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-election__meta .icon {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--slate-400);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 0.875rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--card);
  color: var(--slate-600);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.topbar-link .icon {
  width: 1rem;
  height: 1rem;
}
.topbar-link:hover {
  border-color: var(--hairline-strong);
  color: var(--ink);
  text-decoration: none;
}
@media (max-width: 767.98px) {
  .topbar-link {
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    justify-content: center;
  }
}

.topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--card);
  color: var(--ink);
}
.topbar-icon-btn:focus-visible,
.topbar-link:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.topbar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-heading, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}
.topbar-avatar:hover {
  color: #fff;
  text-decoration: none;
}

.admin-content {
  flex: 1 0 auto;
  width: 100%;
  padding: 2rem 1.5rem 3rem;
}
@media (min-width: 1200px) {
  .admin-content {
    padding: 2rem 2.5rem 3rem;
  }
}
@media (max-width: 767.98px) {
  .admin-content {
    padding: 1.25rem 1rem 2rem;
  }
}

.admin-footer {
  padding: 1.25rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--hairline);
}
@media (min-width: 1200px) {
  .admin-footer {
    padding: 1.25rem 2.5rem;
  }
}

@media (min-width: 992px) {
  .sidebar-collapsed .admin-sidebar.offcanvas-lg {
    width: var(--sidebar-w-collapsed);
  }
  .sidebar-collapsed .admin-main {
    margin-left: var(--sidebar-w-collapsed);
  }
  .sidebar-collapsed .admin-sidebar__brand {
    justify-content: center;
    padding: 0;
  }
  .sidebar-collapsed .admin-sidebar__brand .brand__wordmark {
    display: none;
  }
  .sidebar-collapsed .admin-sidebar__brand .brand__icon {
    display: block;
  }
  .sidebar-collapsed .sidebar-link__text,
  .sidebar-collapsed .sidebar-account__text,
  .sidebar-collapsed .sidebar-account__chevron {
    display: none;
  }
  .sidebar-collapsed .sidebar-group__label {
    height: 1px;
    padding: 0;
    margin: 0.875rem 0.5rem;
    background: var(--side-line);
    font-size: 0;
  }
  .sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.5rem;
  }
  .sidebar-collapsed .sidebar-count {
    position: absolute;
    top: 0.125rem;
    right: 0.125rem;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    background: var(--brand);
    color: #fff;
  }
  .sidebar-collapsed .admin-sidebar__footer {
    flex-direction: column;
    padding: 0.875rem 0.5rem;
  }
  .sidebar-collapsed .sidebar-account__toggle {
    justify-content: center;
    min-height: 0;
    padding: 0.375rem;
    border-color: transparent;
  }
  .sidebar-collapsed .sidebar-collapse-btn .icon {
    transform: scaleX(-1);
  }
}
.auth-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--surface);
}

.auth-shell {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}
@media (max-width: 575.98px) {
  .auth-shell {
    justify-content: flex-start;
    padding: 2rem 1rem;
  }
}

.auth-brand {
  margin-bottom: 1.75rem;
}

.auth-card {
  width: 100%;
  max-width: 27rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 2.25rem 2rem;
}
@media (max-width: 575.98px) {
  .auth-card {
    padding: 1.75rem 1.25rem;
  }
}
.auth-card.auth-card--wide {
  max-width: 42rem;
}

.auth-card__title {
  font-size: 1.375rem;
  margin-bottom: 0.375rem;
}

.auth-card__text {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.auth-meta {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer {
  flex-shrink: 0;
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Results list: shared by the voter and admin results pages */
.result-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-row {
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
}

.result-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.result-row:last-child {
  padding-bottom: 0;
}

.result-row__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.result-row__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--slate-100);
  border-radius: var(--radius-control);
  color: var(--slate-600);
  font-size: 0.8125rem;
  font-weight: 700;
}

.result-row.is-winner .result-row__rank {
  background: var(--gold-bg);
  color: var(--gold-fg);
}

.result-row__who {
  flex: 1 1 0;
  min-width: 0;
}

.result-row__name,
.result-row__sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-row__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.result-row__sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.result-row__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.result-row__votes {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  margin-left: auto;
}

.result-row__unit {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
}

.result-row__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-left: 5.5rem;
}

.result-row__track {
  flex: 1 1 auto;
  height: 0.5rem;
}

.result-row__percent {
  width: 3.5rem;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: right;
  color: var(--text-muted);
}

.result-row.is-winner .result-row__percent {
  color: var(--gold-700);
}

@media (max-width: 575.98px) {
  .result-row__head {
    flex-wrap: wrap;
  }

  .result-row__meta {
    justify-content: space-between;
    width: 100%;
    padding-left: 3rem;
  }

  .result-list--contested .result-row__meta,
  .result-row__bar {
    padding-left: 2.5rem;
  }
}

/* Shared layout fixes */
.page-stack > .page-header,
.page-stack > .alert {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .table-stack td.actions-col,
  .table-stack th.actions-col {
    width: auto;
  }
}
