:root {
  --color-brand: #2E6C87;
  --color-brand-dark: #1F4F63;
  --color-ink: #011627;
  --color-charcoal: #2E2E2E;
  --color-cta: #3CA9BF;
  --color-cta-dark: #2C8DA1;
  --color-white: #FFFFFF;
  --color-offwhite: #F9F8F8;
  --color-border: #E3E7E9;
  --color-muted: #5B6770;
  --color-alert: #D94948;

  --font-heading: "Montserrat", "Segoe UI", -apple-system, sans-serif;
  --font-body: "Roboto", "Segoe UI", -apple-system, sans-serif;

  --container-width: 1240px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 20px rgba(1, 22, 39, 0.08);
  --shadow-lg: 0 12px 40px rgba(1, 22, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-brand);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section--alt {
  background: var(--color-offwhite);
}

.section--dark {
  background: var(--color-ink);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--color-white);
}

.eyebrow {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-cta);
  margin-bottom: 0.5em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--color-cta);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-cta-dark);
  box-shadow: var(--shadow);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-ink);
}

.btn--dark {
  background: var(--color-ink);
  color: var(--color-white);
}

.btn--dark:hover {
  background: var(--color-brand-dark);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container-width);
  margin: 0 auto;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-ink);
}

.brand img {
  height: 40px;
  width: auto;
  transition: transform 0.18s ease;
}

.brand:hover img {
  transform: scale(1.08);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-ink);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-brand);
  border-bottom-color: var(--color-cta);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--color-offwhite);
  color: var(--color-ink);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.15s ease;
}

.icon-link:hover {
  background: var(--color-border);
}

.icon-link .icon-inline {
  width: 19px;
  height: 19px;
}

.icon-link .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-cta);
  color: var(--color-white);
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  margin: 5px 0;
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(1, 22, 39, 0.88), rgba(1, 22, 39, 0.82)),
    url('/images/hero-bg.jpg') center / cover no-repeat;
  color: var(--color-white);
  padding: 110px 0 90px;
  text-align: center;
  position: relative;
}

.hero--slideshow {
  overflow: hidden;
  background: var(--color-ink);
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(1, 22, 39, 0.88), rgba(1, 22, 39, 0.82));
}

.hero .eyebrow {
  color: var(--color-cta);
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 0.4em;
}

.hero p {
  max-width: 640px;
  margin: 0 auto 1.75em;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Intro */
.intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* Hours strip */
.hours-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.hours-strip__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hours-strip__item img {
  width: 36px;
  height: 36px;
}

.hours-strip__item strong {
  display: block;
  font-family: var(--font-heading);
  color: var(--color-ink);
}

/* Accreditation banner */
.accreditation {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--color-offwhite);
  border-radius: var(--radius);
  padding: 32px;
  flex-wrap: wrap;
}

.accreditation img {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.accreditation h3 {
  margin-bottom: 0.3em;
}

.accreditation p {
  margin: 0;
  color: var(--color-muted);
}

/* Grid */
.grid {
  display: grid;
  gap: 28px;
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Cards */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card--link {
  display: block;
  text-align: center;
}

.card__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-offwhite);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}

.card p {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin: 0;
}

.unit-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-white);
}

.unit-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.unit-card__label {
  padding: 18px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-ink);
  text-align: center;
}

/* Forms */
.form {
  max-width: 640px;
}

.form--wide {
  max-width: 100%;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-ink);
  margin-bottom: 6px;
}

.field .required {
  color: var(--color-alert);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-charcoal);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(46, 108, 135, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.permission-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-offwhite);
}

.permission-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--color-charcoal);
  cursor: pointer;
}

.permission-check input {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.access-summary {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.access-summary strong {
  color: var(--color-ink);
}

.form-message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
}

.form-message.is-visible {
  display: block;
}

.form-message--success {
  background: #e6f6ea;
  color: #1f7a3d;
}

.form-message--error {
  background: #fbeaea;
  color: #b83232;
}

/* Branch cards */
.branch-card {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
}

.branch-card h3 {
  margin-bottom: 0.3em;
}

.branch-card .branch-meta {
  color: var(--color-muted);
  margin-bottom: 4px;
}

.branch-card .branch-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.branch-card__map {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: var(--radius);
  margin-top: 16px;
}

/* Leads / team */
.lead-card {
  text-align: center;
  padding: 32px 24px;
}

.lead-card .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.lead-card .avatar-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--color-offwhite);
  box-shadow: var(--shadow);
}

.lead-card .role {
  color: var(--color-cta-dark);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* Test menu */
.test-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.test-search__icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--color-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.test-search input[type="search"] {
  width: 100%;
  padding: 16px 52px;
  border: 2px solid var(--color-border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-white);
  color: var(--color-charcoal);
  box-shadow: 0 2px 10px rgba(1, 22, 39, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

.test-search input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.test-search input[type="search"]::placeholder {
  color: var(--color-muted);
}

.test-search input[type="search"]:focus {
  outline: none;
  border-color: var(--color-cta);
  box-shadow: 0 0 0 5px rgba(60, 169, 191, 0.18), 0 4px 16px rgba(1, 22, 39, 0.08);
}

.test-search input[type="search"]:focus ~ .test-search__icon {
  color: var(--color-cta-dark);
}

.test-search__clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--color-offwhite);
  color: var(--color-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.test-search__clear:hover {
  background: var(--color-cta);
  color: var(--color-white);
}

.test-search__clear[hidden] {
  display: none;
}

.test-search__count {
  text-align: center;
  margin: 14px 0 40px;
  font-size: 0.85rem;
  color: var(--color-muted);
  min-height: 1.2em;
}

.test-category {
  margin-bottom: 40px;
}

.test-category h3 {
  border-bottom: 2px solid var(--color-cta);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.test-list {
  columns: 3;
  column-gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.test-list li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  break-inside: avoid;
  padding: 6px 0;
  font-size: 0.94rem;
}

.test-list li a {
  color: var(--color-charcoal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.test-list li a:hover {
  color: var(--color-brand);
  border-bottom-color: var(--color-cta);
}

.test-add-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.test-add-icon svg {
  width: 13px;
  height: 13px;
}

.test-add-icon:hover:not(:disabled) {
  background: var(--color-cta);
  color: var(--color-white);
  border-color: var(--color-cta);
}

.test-add-icon:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Custom test builder */
.custom-test-list {
  columns: 2;
  column-gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-test-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  break-inside: avoid;
  transition: background 0.12s ease;
}

.custom-test-item:hover {
  background: var(--color-offwhite);
}

.custom-test-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--color-cta);
  flex-shrink: 0;
  cursor: pointer;
}

.custom-test-item__name {
  flex: 1;
  font-size: 0.92rem;
  color: var(--color-charcoal);
}

.custom-test-item__price {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
}

.custom-test-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--color-ink);
  color: var(--color-white);
  padding: 16px 0;
  box-shadow: 0 -4px 20px rgba(1, 22, 39, 0.15);
}

.custom-test-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Package list */
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.package-card {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.package-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.package-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-offwhite);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.package-card h4 {
  margin: 0;
  font-size: 1rem;
}

/* Shop */
.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: var(--color-white);
}

.product-card .price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-ink);
  margin: 10px 0 18px;
}

/* Cart / checkout table */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-border);
}

.cart-table th {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.qty-input {
  width: 64px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.cart-summary {
  max-width: 380px;
  margin-left: auto;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-offwhite);
}

.cart-summary .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.cart-summary .row span:first-child {
  flex: 1;
}

.cart-summary .row span:last-child {
  flex-shrink: 0;
}

.cart-summary .row.total {
  font-weight: 700;
  font-size: 1.15rem;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 12px;
  color: var(--color-ink);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  background: var(--color-ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 24px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.social-links a:hover {
  background: var(--color-cta);
}

.icon-social {
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.85);
}

.social-links a:hover .icon-social {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

.icon-inline {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-icon svg {
  width: 38px;
  height: 38px;
}

.status-icon--success {
  background: #e6f6ea;
  color: #1f9d63;
}

.status-icon--error {
  background: #fbeaea;
  color: #cf3a4c;
}

.status-icon--pending {
  background: var(--color-offwhite);
  color: var(--color-brand);
}

/* Utility */
.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .package-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .test-list { columns: 2; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .grid--4, .grid--3, .grid--2, .package-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .test-list { columns: 1; }
  .custom-test-list { columns: 1; }
  .custom-test-bar__inner { justify-content: center; text-align: center; }
  .accreditation { flex-direction: column; text-align: center; }
  .cart-summary { margin-left: 0; }
}

/* Mobile nav open state */
.site-header.nav-open .main-nav {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  flex-direction: column;
  padding: 16px 24px 24px;
  border-bottom: 1px solid var(--color-border);
  gap: 4px;
}

/* Admin dashboard */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-overlay {
  display: none;
}

.admin-sidebar {
  width: 252px;
  flex-shrink: 0;
  background: var(--color-ink);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  transition: width 0.2s ease;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0.5px 0 0 white) drop-shadow(-0.5px 0 0 white) drop-shadow(0 0.5px 0 white) drop-shadow(0 -0.5px 0 white);
}

.brand__label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.sidebar-collapse-btn {
  margin-left: auto;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background 0.12s ease, transform 0.2s ease;
}

.sidebar-collapse-btn svg { width: 14px; height: 14px; }

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--color-white);
}

/* Collapsed (icon-only) sidebar */
.admin-sidebar.is-collapsed {
  width: 76px;
}

.admin-sidebar.is-collapsed .brand {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.admin-sidebar.is-collapsed .sidebar-footer {
  padding-left: 2px;
  padding-right: 2px;
}

.admin-sidebar.is-collapsed .sidebar-footer img {
  height: auto;
  max-width: 100%;
}

.admin-sidebar.is-collapsed .brand__label {
  display: none;
}

.admin-sidebar.is-collapsed .sidebar-collapse-btn {
  margin-left: 0;
  transform: rotate(180deg);
}

.admin-sidebar.is-collapsed .admin-nav-group {
  display: none;
}

.admin-sidebar.is-collapsed .admin-nav-item {
  justify-content: center;
  padding: 10px;
  gap: 0;
}

.admin-sidebar.is-collapsed .admin-nav-item span {
  display: none;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.admin-nav-group {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin: 14px 10px 6px;
}

.admin-nav-group:first-child {
  margin-top: 0;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.admin-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.admin-nav-item.is-active {
  background: var(--color-cta);
  color: var(--color-white);
}

.admin-nav-item.is-active .admin-nav-icon {
  opacity: 1;
}

.admin-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-ink);
  cursor: pointer;
}

.admin-menu-btn svg {
  width: 18px;
  height: 18px;
}

.admin-page-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0;
}

.admin-main {
  flex: 1;
  min-width: 0;
  background: var(--color-offwhite);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 5;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-topbar .who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-muted);
  padding-left: 14px;
  border-left: 1px solid var(--color-border);
}

.who__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.who__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.admin-topbar .who strong {
  color: var(--color-ink);
  font-size: 0.85rem;
}

.admin-content {
  padding: 28px 32px 40px;
}

.admin-section {
  display: none;
}

.admin-section.is-active {
  display: block;
}

.admin-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-search {
  width: 100%;
  max-width: 320px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--color-white);
  color: var(--color-charcoal);
}

.admin-filters .admin-search {
  margin-bottom: 0;
}

select.admin-search {
  max-width: 200px;
  cursor: pointer;
}

.admin-search:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(46, 108, 135, 0.15);
}

.admin-table-wrap {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow);
  /* Bounded so this box is the thing that actually scrolls — a sticky header only sticks
     against its nearest scrolling ancestor, and an unbounded overflow:auto box never scrolls
     internally (the page scrolls instead), which left the header non-sticky in practice. */
  max-height: calc(100vh - 260px);
  min-height: 160px;
}

.admin-table {
  width: 100%;
  min-width: 640px;
  /* separate + zero spacing, not collapse: sticky positioning on <th> is unreliable in
     Chromium inside border-collapse:collapse tables. Cells only ever set border-bottom,
     so this renders identically — no double-border artifacts from switching modes. */
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-white);
}

.admin-table th, .admin-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.88rem;
  vertical-align: top;
}

.admin-table th {
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  background: var(--color-offwhite);
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table tbody tr:nth-child(even) {
  background: var(--color-offwhite);
}

.admin-table tbody tr:hover {
  background: #eef5f7;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-content .empty-state {
  background: var(--color-white);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
}

.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--color-offwhite);
  color: var(--color-muted);
}

.admin-badge--paid { background: #e6f6ea; color: #1f7a3d; }
.admin-badge--pending_payment { background: #fff3e0; color: #b9740b; }
.admin-badge--failed, .admin-badge--cancelled { background: #fbeaea; color: #b83232; }
.admin-badge--admin { background: #e6f0fb; color: #2058a8; }
.admin-badge--staff { background: var(--color-offwhite); color: var(--color-muted); }

/* Status dropdown — styled like a colored pill instead of a plain browser select */
.status-select {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 32px 6px 14px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  background-color: var(--color-offwhite);
  color: var(--color-muted);
  border-color: var(--color-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.status-select:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(1, 22, 39, 0.12);
}

.status-select:focus {
  outline: none;
  border-color: currentColor;
  box-shadow: 0 0 0 3px rgba(46, 108, 135, 0.15);
}

.status-select--pending_payment { background-color: #fff3e0; color: #b9740b; }
.status-select--paid { background-color: #e6f6ea; color: #1f7a3d; }
.status-select--failed { background-color: #fbeaea; color: #b83232; }
.status-select--cancelled { background-color: #f1f1f1; color: #6b6b6b; }

.status-select option {
  color: var(--color-ink);
  background: var(--color-white);
  font-weight: 600;
  text-transform: none;
}

.admin-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.admin-content-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
}

.admin-content-block textarea { min-height: 90px; }

/* Overview */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow);
}

.kpi-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(46, 108, 135, 0.1);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-card__icon svg { width: 22px; height: 22px; }

.kpi-card--alert .kpi-card__icon { background: rgba(217, 73, 72, 0.1); color: var(--color-alert); }
.kpi-card--cta .kpi-card__icon { background: rgba(60, 169, 191, 0.14); color: var(--color-cta-dark); }

.kpi-card__value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.2;
}

.kpi-card__label {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 20px;
  align-items: start;
}

.admin-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-ink);
  margin: 0 0 16px;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut__hole {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut__hole strong {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-ink);
}

.donut__hole span {
  font-size: 0.7rem;
  color: var(--color-muted);
}

.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.donut-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-charcoal);
}

.donut-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-legend__count {
  margin-left: auto;
  font-weight: 600;
  color: var(--color-ink);
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recent-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.88rem;
}

.recent-list li:last-child { border-bottom: none; }

.recent-list .who-name { color: var(--color-ink); font-weight: 600; }
.recent-list .recent-meta { color: var(--color-muted); font-size: 0.8rem; }
.recent-list .recent-amount { font-family: var(--font-heading); font-weight: 700; color: var(--color-ink); white-space: nowrap; }

/* Focus visibility for keyboard users */
.admin-nav-item:focus-visible,
.admin-menu-btn:focus-visible,
.sidebar-collapse-btn:focus-visible,
.btn:focus-visible,
.admin-search:focus-visible,
.status-select:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .admin-menu-btn { display: flex; }
  .sidebar-collapse-btn { display: none; }

  .admin-shell { position: relative; }

  .admin-sidebar,
  .admin-sidebar.is-collapsed {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }

  .admin-sidebar.is-collapsed .brand { flex-direction: row; padding-left: 10px; padding-right: 10px; }
  .admin-sidebar.is-collapsed .brand__label,
  .admin-sidebar.is-collapsed .admin-nav-group,
  .admin-sidebar.is-collapsed .admin-nav-item span { display: initial; }
  .admin-sidebar.is-collapsed .admin-nav-item { justify-content: flex-start; padding: 10px 12px; gap: 12px; }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(1, 22, 39, 0.45);
    z-index: 20;
  }

  .admin-overlay.is-open { display: block; }

  .admin-topbar { padding: 12px 16px; }
  .admin-topbar .who { padding-left: 0; border-left: none; }
  .who__meta { display: none; }
  .admin-content { padding: 18px; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
