:root {
  /* Brand palette */
  --portal-ink: #1e1f1f;       /* Primary text (brand near-black) */
  --portal-surface: #ffffff;   /* Primary background */
  --portal-accent: #e41c86;    /* Primary accent */
  --portal-soft: #fbdded;      /* Secondary / soft background */
  --portal-accent-deep: #b9156a;
  --portal-muted: #5a5b5b;
  --portal-line: #e6d6df;

  /* aliases expected by Login.cshtml */
  --primary-color: var(--portal-accent);
  --border-color: var(--portal-line);
  --dark-bg: var(--portal-ink);
  --font-sans: system-ui, -apple-system, sans-serif;
}

*:focus-visible {
  outline: 2px solid var(--portal-accent);
  outline-offset: 2px;
  box-shadow: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--portal-ink);
  background: var(--portal-surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

.portal-heading {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.1;
}

.py-lg-6 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.portal-nav {
  background: var(--portal-surface);
  border-bottom: 1px solid var(--portal-line);
}

.site-logo {
  height: 1.7rem;
  width: auto;
  display: block;
}

.logo-mark {
  width: 0.9rem;
  height: 0.9rem;
  display: inline-block;
  border-radius: 50%;
  background: var(--portal-accent);
}

.brand-copy {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-link {
  color: var(--portal-ink);
  font-weight: 600;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--portal-accent);
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--portal-accent);
}

.lead {
  color: var(--portal-muted);
  max-width: 46rem;
}

.btn-portal-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--portal-accent);
  --bs-btn-border-color: var(--portal-accent);
  --bs-btn-hover-bg: var(--portal-accent-deep);
  --bs-btn-hover-border-color: var(--portal-accent-deep);
  --bs-btn-active-bg: var(--portal-accent-deep);
  --bs-btn-active-border-color: var(--portal-accent-deep);
}

.btn-portal-link {
  --bs-btn-color: var(--portal-ink);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--portal-ink);
  --bs-btn-hover-bg: var(--portal-soft);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--portal-ink);
  --bs-btn-active-bg: var(--portal-soft);
  --bs-btn-active-border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.panel-card {
  border: 1px solid var(--portal-line);
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.panel-card p {
  color: var(--portal-muted);
}

.stat-card-open {
  border-left: 3px solid var(--portal-accent);
}

.stat-card-review {
  border-left: 3px solid #f0a500;
}

.stat-card-approved {
  border-left: 3px solid #2a9e52;
}

.portal-dashboard-page {
  min-height: 100vh;
  background: #fafafa;
}

.access-denied-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fafafa;
}

.access-denied-header {
  background: var(--portal-surface);
  border-bottom: 1px solid var(--portal-line);
  padding: 0.75rem 0;
}

.access-denied-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.access-denied-panel {
  max-width: 34rem;
  width: 100%;
  text-align: center;
}

.access-denied-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--portal-soft);
  color: var(--portal-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.access-denied-copy {
  font-size: 0.95rem;
}

.member-sidebar {
  background: #ffffff;
  border: 1px solid var(--portal-line);
  position: sticky;
  top: 1rem;
}

.member-nav-list .nav-link {
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0.6rem 0.75rem;
}

.member-nav-list .nav-link.active {
  background: var(--portal-soft);
  color: var(--portal-ink);
  border-color: var(--portal-accent);
}

.member-nav-list .nav-link:not(.active):hover {
  border-color: var(--portal-line);
}

.dashboard-content {
  min-height: calc(100vh - 11rem);
}

.profile-avatar {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--portal-soft);
  color: var(--portal-accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.nav-avatar-btn .profile-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.72rem;
}

.dashboard-table thead th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
  border-bottom-width: 1px;
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  border-radius: 0.25rem;
  font-weight: 600;
}

.status-review {
  color: var(--portal-ink);
  background: #f9d8ea;
}

.status-pending {
  color: var(--portal-ink);
  background: #f1f1f1;
}

.status-approved {
  color: var(--portal-ink);
  background: #d7f1de;
}

.status-rejected {
  color: var(--portal-ink);
  background: #fad6e3;
}

.dashboard-table tbody tr.row-link {
  cursor: pointer;
}

.dashboard-table tbody tr.row-link:hover {
  background: var(--portal-soft);
}

.dashboard-table tbody tr.row-link:focus-within {
  outline: 2px solid var(--portal-accent);
  outline-offset: -2px;
}

.status-timeline {
  list-style: none;
  padding-left: 0;
  margin: 0;
  position: relative;
}

.status-timeline::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--portal-line);
}

.status-timeline li {
  position: relative;
  padding-left: 1.75rem;
  padding-bottom: 1rem;
}

.status-timeline li:last-child {
  padding-bottom: 0;
}

.status-timeline-dot {
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--portal-line);
  box-sizing: border-box;
}

.status-dot-done {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
}

.status-dot-current {
  background: #fff;
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 3px rgba(228, 28, 134, 0.18);
}

.status-dot-future {
  background: #fff;
  border-color: var(--portal-line);
}

.activity-feed {
  margin: 0;
  padding: 0;
}

.activity-feed-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--portal-line);
}

.activity-feed-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-dot {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.5rem;
}

.activity-dot-status {
  background: var(--portal-soft);
  color: var(--portal-accent);
}

.activity-feed-body {
  min-width: 0;
}

.activity-time {
  color: var(--portal-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.wizard-step {
  animation: wizardStepIn 0.3s ease backwards;
}

.wizard-step.wizard-step-exit {
  animation: wizardStepOut 0.25s ease both;
}

@keyframes wizardStepIn {
  from {
    opacity: 0;
    transform: translateX(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes wizardStepOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-1.5rem);
  }
}

@keyframes wizardStepInReverse {
  from {
    opacity: 0;
    transform: translateX(-1.5rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes wizardStepOutReverse {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(1.5rem);
  }
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--portal-muted);
}

.section-subhead {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #555;
}

.requirement-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  border-top: 1px solid var(--portal-line);
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--portal-line);
}

.requirement-icon {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: #f1f1f1;
  color: #555;
}

.requirement-done .requirement-icon {
  background: #d7f1de;
  color: #1f6d3a;
}

.requirement-progress .requirement-icon {
  background: var(--portal-soft);
  color: var(--portal-accent-deep);
}

.requirement-attention .requirement-icon {
  background: #fad6e3;
  color: var(--portal-accent-deep);
}

.requirement-pending .requirement-icon {
  background: #f1f1f1;
  color: #555;
}

.btn-action {
  --bs-btn-color: var(--portal-accent);
  --bs-btn-hover-color: var(--portal-accent-deep);
  --bs-btn-padding-x: 0.4rem;
  --bs-btn-padding-y: 0.15rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-action + .btn-action {
  border-left: 1px solid var(--portal-line);
  margin-left: 0.25rem;
  padding-left: 0.6rem;
}

.btn-action-danger {
  --bs-btn-color: #b9156a;
  --bs-btn-hover-color: #8e0f51;
}

/* Table chevron column */
.table-chevron {
  width: 1.5rem;
  text-align: right;
  color: #bbb;
}

.row-link:hover .table-chevron,
.row-link:focus-within .table-chevron {
  color: var(--portal-accent);
}

/* Empty state */
.table-empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--portal-muted);
}

.wizard-progress {
  height: 0.45rem;
  background: #ececec;
}

.wizard-progress-bar {
  height: 100%;
  background: var(--portal-accent);
  transition: width 180ms ease;
}

.wizard-step {
  min-height: 18rem;
}

.simple-card {
  background: #fff;
  border: 1px solid var(--portal-line);
  cursor: pointer;
}

.simple-card p {
  color: var(--portal-muted);
}

.form-shell {
  background: #fff;
  border: 1px solid var(--portal-line);
}

.form-copy {
  color: var(--portal-muted);
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.panel-card p.form-label {
  color: var(--portal-ink);
}

/* Required-field indicators */
.required-mark {
  color: var(--portal-accent);
  font-weight: 700;
}

.required-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  color: var(--portal-ink);
}

.required-legend .required-mark {
  font-size: 1.05rem;
  line-height: 1;
}

.form-control,
.form-select {
  border-radius: 0;
  border-color: #d6d8db;
  padding: 0.7rem 0.75rem;
}

.field-invalid {
  border-color: #d32f2f !important;
  background: #fff6f6;
}

.form-check-input.field-invalid {
  box-shadow: 0 0 0 0.2rem rgba(211, 47, 47, 0.18);
}

p.field-error,
.field-error {
  margin: 0.35rem 0 0;
  color: #d32f2f !important;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 0.2rem rgba(228, 28, 134, 0.2);
}

.form-check-input:checked {
  background-color: var(--portal-accent);
  border-color: var(--portal-accent);
}

.form-note {
  font-size: 0.95rem;
  color: var(--portal-muted);
}

/* Tooltip */
.tooltip-trigger {
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  color: #999;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: color 0.15s;
}

.tooltip-trigger:hover,
.tooltip-trigger:focus-visible {
  color: var(--portal-accent);
}

.field-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 0;
  z-index: 10;
  background: #222;
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.45rem 0.65rem;
  border-radius: 0.35rem;
  max-width: 22rem;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.field-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 1rem;
  border: 5px solid transparent;
  border-top-color: #222;
}

.field-tooltip-visible {
  display: block;
}

/* Sticky wizard nav on mobile */
.wizard-nav-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 0.75rem 0;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-top: 1px solid var(--portal-line);
}

@media (min-width: 768px) {
  .wizard-nav-bar {
    position: static;
    border-top: none;
    padding: 0;
    margin: 0;
    margin-top: 1.5rem;
  }
}

.char-counter {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #999;
  text-align: right;
  transition: color 0.2s;
}

.char-counter-near {
  color: #c0392b;
}

.form-note a {
  color: var(--portal-accent);
}

.form-note a:hover {
  color: var(--portal-accent-deep);
}

.signature-pad-shell {
  border: 1px solid #d6d8db;
  background: #fff;
  min-height: 10rem;
}

.signature-pad {
  width: 100%;
  height: 10rem;
  display: block;
  cursor: crosshair;
}

.quote-block {
  border-top: 3px solid var(--portal-accent);
  background: #fff;
  border-right: 1px solid var(--portal-line);
  border-bottom: 1px solid var(--portal-line);
  border-left: 1px solid var(--portal-line);
}

.quote-copy {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  line-height: 1.3;
}

.link-portal {
  color: var(--portal-accent);
  font-weight: 700;
  text-decoration-thickness: 1px;
}

.link-portal:hover {
  color: var(--portal-accent-deep);
}

footer {
  background: var(--portal-ink);
  color: #fff;
}

footer .text-body-secondary {
  color: #fff !important;
}

footer [class*="d-flex"] {
  justify-content: flex-end !important;
}

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, var(--portal-soft) 140%);
}

.login-page > main {
  flex: 1;
}

.login-card {
  background: #fff;
  border: 1px solid var(--portal-line);
}

.login-card hr {
  border-color: var(--portal-line);
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 0.75rem;
    border-top: 1px solid var(--portal-line);
    padding-top: 0.75rem;
  }

  .member-sidebar {
    position: static;
  }
}

/* ==========================================================================
   Logo hierarchy
   - .site-logo        : Cruelty Free International ORGANISATIONAL logo (top of page)
   - .programme-emblem : Approval Programme logo (central, prominent)
   ========================================================================== */

.programme-emblem {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.programme-emblem--xl {
  width: 340px;
}

.programme-emblem--lg {
  width: 280px;
}

.programme-emblem--sm {
  width: 100%;
  max-width: 170px;
}

/* Programme hero band: soft brand background with the prominent emblem */
.programme-hero {
  position: relative;
  overflow: hidden;
  background: var(--portal-soft);
  border-radius: 0.75rem;
}

.programme-hero .programme-emblem {
  margin-left: auto;
  margin-right: auto;
}

.programme-name {
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Highlighted programme description on the enquiry intro */
.programme-intro {
  position: relative;
  overflow: hidden;
  background: var(--portal-soft);
  border-left: 4px solid var(--portal-accent);
  border-radius: 0.5rem;
}

.programme-intro::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  border: 6px solid rgba(228, 28, 134, 0.12);
}

.programme-intro p {
  position: relative;
  z-index: 1;
  color: var(--portal-ink);
}

.programme-intro p:first-child {
  font-size: 1.05rem;
  font-weight: 600;
}

/* ==========================================================================
   Decorative circles (brand background design element)
   Pure-CSS layered circles so no extra markup is needed.
   ========================================================================== */

.circle-bg {
  position: relative;
  background-color: var(--portal-surface);
  background-repeat: no-repeat;
  background-image:
    radial-gradient(circle at 14% 22%, var(--portal-soft) 0 110px, transparent 111px),
    radial-gradient(circle at 90% 14%, transparent 0 64px, var(--portal-soft) 65px 70px, transparent 71px),
    radial-gradient(circle at 86% 88%, var(--portal-soft) 0 150px, transparent 151px),
    radial-gradient(circle at 4% 92%, transparent 0 50px, rgba(228, 28, 134, 0.12) 51px 56px, transparent 57px);
}

.circle-bg--soft {
  background-color: var(--portal-soft);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.6) 0 120px, transparent 121px),
    radial-gradient(circle at 92% 80%, rgba(255, 255, 255, 0.55) 0 140px, transparent 141px),
    radial-gradient(circle at 88% 16%, transparent 0 58px, rgba(228, 28, 134, 0.16) 59px 64px, transparent 65px);
}

/* Ensure content sits above the decorative circles */
.circle-bg > * {
  position: relative;
  z-index: 1;
}

/* Divider used on the portal home/landing page */
.landing-divider {
  width: 2.5rem;
  border-top: 2px solid var(--portal-accent);
  margin: 1.5rem auto;
}

/* Small decorative ring used inline near headings */
.deco-ring {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 3px solid var(--portal-accent);
  vertical-align: middle;
}

.content-block.mb-0 + .content-block {
  margin-top: 0 !important;
}

.media-placeholder {
  background: var(--portal-soft);
  border: 1px solid var(--portal-line);
  color: var(--portal-accent-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  min-height: 220px;
  text-align: center;
}

.video-frame {
  background: var(--portal-soft);
  border: 1px solid var(--portal-line);
  padding: 2rem;
}

.video-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-placeholder {
  background: var(--portal-ink);
  color: #fff;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-placeholder .play-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--portal-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--portal-soft);
  color: var(--portal-accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.accordion-button:not(.collapsed) {
  background: var(--portal-soft);
  color: var(--portal-ink);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(228, 28, 134, 0.2);
}

.not-found-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fafafa;
}

.not-found-header {
  background: var(--portal-surface);
  border-bottom: 1px solid var(--portal-line);
  padding: 0.75rem 0;
}

.not-found-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.not-found-panel {
  max-width: 34rem;
  width: 100%;
  text-align: center;
}

.not-found-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--portal-soft);
  color: var(--portal-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.not-found-code {
  font-weight: 700;
  color: var(--portal-line);
  font-size: 4rem;
  line-height: 1;
}

.server-error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fafafa;
}

.server-error-header {
  background: var(--portal-surface);
  border-bottom: 1px solid var(--portal-line);
  padding: 0.75rem 0;
}

.server-error-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.server-error-panel {
  max-width: 34rem;
  width: 100%;
  text-align: center;
}

.server-error-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--portal-soft);
  color: var(--portal-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.server-error-code {
  font-weight: 700;
  color: var(--portal-line);
  font-size: 4rem;
  line-height: 1;
}
