:root {
  --sp-radius: 18px;
  --sp-card-border: rgba(255, 255, 255, 0.12);
  --sp-card-shadow: 0 16px 40px rgba(5, 11, 26, 0.35);
  --sp-nav-border: rgba(255, 255, 255, 0.08);
  --sp-muted: rgba(255, 255, 255, 0.7);
  --sp-text: #e2e8f0;
  --sp-primary: #38bdf8;
  --sp-primary-600: #0ea5e9;
  --sp-accent: #818cf8;
  --sp-bg: #050b1a;
  --sp-card: rgba(10, 22, 46, 0.62);
  --sp-card-soft: rgba(15, 23, 42, 0.5);
  --primary-inverse: #f8fafc;
}

html[data-bs-theme="light"] {
  --sp-muted: #52607a;
  --sp-text: #0f172a;
  --sp-primary: #2563eb;
  --sp-primary-600: #1d4ed8;
  --sp-accent: #06b6d4;
  --sp-bg: #eef2f7;
  --sp-card: rgba(255, 255, 255, 0.82);
  --sp-card-soft: rgba(255, 255, 255, 0.92);
  --sp-card-border: rgba(15, 23, 42, 0.08);
  --sp-card-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  --sp-nav-border: rgba(15, 23, 42, 0.08);
  --primary-inverse: #ffffff;
}

body {
  background:
    radial-gradient(900px circle at 20% 10%, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(700px circle at 80% 25%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(900px circle at 55% 85%, rgba(34, 197, 94, 0.1), transparent 60%),
    var(--sp-bg);
  color: var(--sp-text);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", sans-serif;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Montserrat", "Manrope", "Segoe UI", "Helvetica Neue", sans-serif;
  letter-spacing: -0.01em;
}

body.sp-public h2,
body.sp-public h3,
body.sp-public h4 {
  color: #f8fafc;
}

a {
  text-decoration: none;
  color: #7dd3fc;
}

a:hover,
a:focus {
  color: #38bdf8;
}

a[role="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  background: var(--sp-primary);
  color: var(--primary-inverse);
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

a[role="button"]:hover,
a[role="button"]:focus {
  background: var(--sp-primary-600);
  color: var(--primary-inverse);
  transform: translateY(-1px);
}

a[role="button"].secondary {
  background: transparent;
  color: var(--sp-text);
  border-color: var(--sp-nav-border);
}

a[role="button"].secondary:hover,
a[role="button"].secondary:focus {
  background: rgba(148, 163, 184, 0.15);
  color: var(--sp-text);
}

article,
section > article {
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-card-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

form label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--sp-muted);
  font-size: 0.9rem;
}

.sp-auth {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0;
}

.sp-auth-card {
  width: min(520px, 100%);
}


.sp-auth-card article,
.sp-auth article {
  width: 100%;
}

.sp-auth h1,
.sp-auth h2 {
  margin-bottom: 0.35rem;
}

.sp-auth p {
  margin-top: 1rem;
}

.sp-auth-note {
  margin-top: 1rem;
  color: var(--sp-muted);
}

.sp-auth-subtitle {
  margin-top: 0.5rem;
  color: var(--sp-muted);
  text-align: center;
}

.sp-auth-form-centered {
  margin: 0 auto;
  width: min(900px, 100%);
}

.sp-auth-form-compact {
  width: min(50%, 520px);
}

.sp-auth-form-compact input,
.sp-auth-form-compact button {
  width: 100%;
}

.sp-form-page {
  display: flex;
  justify-content: center;
}

.sp-form-card {
  width: min(900px, 100%);
}

.sp-form-card form {
  width: 100%;
}

.sp-form-stack {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.sp-form-stack > * {
  width: min(900px, 100%);
}

.width95 {
  width: 95%;
}

.secondary {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--sp-text);
}

.secondary:hover {
  background: rgba(148, 163, 184, 0.35);
}

.error {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.error:hover {
  background: rgba(239, 68, 68, 0.3);
}

mark.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 0.2rem 0.4rem;
  border-radius: 0.4rem;
}

html[data-bs-theme="light"] .secondary {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

html[data-bs-theme="light"] .secondary:hover {
  background: rgba(15, 23, 42, 0.1);
}

html[data-bs-theme="light"] .error {
  color: #dc2626;
}

.sp-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  color: #f87171;
  font-size: 0.85rem;
}

.errorlist li {
  margin: 0.2rem 0;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.form-check-label {
  margin: 0;
  color: var(--sp-muted);
}

html[data-bs-theme="light"] form label,
html[data-bs-theme="light"] .form-check-label {
  color: #475569;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
a[role="button"] {
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--sp-card-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--sp-text);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

input[type="submit"],
a[role="button"],
button[type="submit"] {
  width: 100%;
}

@media (min-width: 768px) {
  input[type="submit"],
  a[role="button"],
  button[type="submit"] {
    width: auto;
    min-width: 180px;
  }
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
a[role="button"]:hover {
  background: rgba(255, 255, 255, 0.16);
}

button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
a[role="button"]:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.2);
}

html[data-bs-theme="light"] button,
html[data-bs-theme="light"] input[type="submit"],
html[data-bs-theme="light"] input[type="button"],
html[data-bs-theme="light"] input[type="reset"],
html[data-bs-theme="light"] a[role="button"] {
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}

html[data-bs-theme="light"] button:hover,
html[data-bs-theme="light"] input[type="submit"]:hover,
html[data-bs-theme="light"] input[type="button"]:hover,
html[data-bs-theme="light"] input[type="reset"]:hover,
html[data-bs-theme="light"] a[role="button"]:hover {
  background: rgba(15, 23, 42, 0.08);
}

.sp-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.sp-container-fluid {
  width: 100%;
  padding: 1.5rem;
}

.sp-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
  margin-bottom: 0.75rem;
}

.sp-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sp-full {
  grid-column: 1 / -1;
}

fieldset[role="search"] {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0;
  align-items: center;
  margin-top: 0.75rem;
}

fieldset[role="search"] input[type="search"] {
  width: 100%;
  flex: 1 1 auto;
  box-sizing: border-box;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

fieldset[role="search"] input[type="submit"] {
  width: auto;
  white-space: nowrap;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
  height: 100%;
}

.sp-modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.sp-modal::backdrop {
  background: rgba(2, 6, 23, 0.95);
}

.sp-modal article {
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-card-shadow);
  color: #fff;
  padding: 1.5rem;
  max-width: 700px;
  width: min(90vw, 700px);
}

.sp-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--sp-text);
}

.sp-modal .close {
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--sp-card-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--sp-text);
}

.sp-modal .close::before,
.sp-modal .close::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  background: currentColor;
}

.sp-modal .close::before {
  transform: rotate(45deg);
}

.sp-modal .close::after {
  transform: rotate(-45deg);
}

details[role="list"] {
  position: relative;
}

details[role="list"] summary {
  list-style: none;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--sp-card-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--sp-text);
  cursor: pointer;
}

details[role="list"] summary::-webkit-details-marker {
  display: none;
}

details[role="list"][open] summary {
  background: rgba(255, 255, 255, 0.16);
}

details[role="list"] [role="listbox"] {
  position: absolute;
  z-index: 1200;
  margin-top: 0.5rem;
  background: rgba(10, 22, 46, 0.95);
  border: 1px solid var(--sp-card-border);
  border-radius: 1rem;
  box-shadow: var(--sp-card-shadow);
  padding: 0.75rem;
  min-width: 220px;
}

details[role="list"] select {
  width: 100%;
  margin-top: 0.5rem;
}

html[data-bs-theme="light"] details[role="list"] summary {
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}

html[data-bs-theme="light"] details[role="list"][open] summary {
  background: rgba(15, 23, 42, 0.08);
}

html[data-bs-theme="light"] details[role="list"] [role="listbox"] {
  background: rgba(255, 255, 255, 0.95);
}

.sp-user-menu {
  position: relative;
}

.sp-user-trigger {
  padding: 0.4rem 0.6rem;
}

.sp-user-panel {
  display: grid;
  gap: 0.6rem;
}

.sp-user-section {
  display: grid;
  gap: 0.5rem;
}

.sp-user-divider {
  height: 1px;
  background: var(--sp-card-border);
  margin: 0.2rem 0;
}

.sp-user-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-user-menu [role="listbox"] {
  right: 0;
  left: auto;
}

.sp-user-menu .sp-user-panel {
  background: rgba(10, 22, 46, 0.95);
  border-radius: 1rem;
}

html[data-bs-theme="light"] .sp-user-menu .sp-user-panel {
  background: rgba(255, 255, 255, 0.95);
}

/* Base tables */
table {
  width: 100%;
  border-collapse: collapse;
}

table[role="grid"] {
  width: 100%;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--sp-card-border);
}

thead th {
  font-weight: 600;
  color: var(--sp-text);
}

tbody tr:hover {
  background: var(--sp-card-soft);
}

.sortable th {
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.sortable th.dir-d::after {
  color: inherit;
  content: " ▼";
}

.sortable th.dir-u::after {
  color: inherit;
  content: " ▲";
}

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--sp-card-border);
  background: var(--sp-card-soft);
  color: var(--sp-text);
  margin-bottom: 0.75rem;
}

.alert-info {
  background: rgba(56, 189, 248, 0.2);
}

.alert-success {
  background: rgba(16, 185, 129, 0.2);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.2);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.2);
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #0f172a;
  color: #fff;
  text-align: center;
  padding: 6px 8px;
  border-radius: 8px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Grade boxes */
.gradebox_outer {
  display: flex;
  justify-content: center;
}

.gradebox {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 150px;
  width: 50%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  font-size: 64px;
  font-weight: 700;
  color: #fff;
  border: 1px solid var(--sp-card-border);
  box-shadow: var(--sp-card-shadow);
}

.score-darkgreen { background-color: #0f7a2b; }
.score-green { background-color: #14892c; }
.score-blue { background-color: #4a6785; }
.score-orange { background-color: darkorange; }
.score-yellow { background-color: #ffd351; color: #0f172a; }
.score-lightred { background-color: #ef4444; }
.score-red { background-color: #d04437; }
.score-darkred { background-color: darkred; }
.score-gray { background-color: darkgray; color: #0f172a; }

/* Misc helpers */
.scrollable-table {
  overflow-x: auto;
}

#map {
  height: 420px;
  width: 100%;
  border-radius: var(--sp-radius);
  border: 1px solid var(--sp-card-border);
  box-shadow: var(--sp-card-shadow);
  margin-bottom: 0.75rem;
}

.account_header {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-card-shadow);
}

.center { text-align: center; }
.left { text-align: left; }
.right { text-align: right; }

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.subscription-info {
  display: block;
}

.subscription-info-title {
  white-space: nowrap;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.subscription-info-details {
  display: block;
  line-height: 1.6;
}

.form-row label {
  color: var(--sp-muted);
  font-size: 0.9rem;
}

.account-section-title {
  margin-top: 2rem;
}

.sp-actions {
  margin-top: 1rem;
}

.sp-actions small {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--sp-muted);
}

.sp-actions a[role="button"],
.sp-actions button,
.sp-actions input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sp-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
  justify-content: flex-start;
}

.sp-button-group > * {
  min-width: 200px;
  display: flex;
  flex: 1 1 200px;
}

.sp-button-group > * > a,
.sp-button-group > * > button,
.sp-button-group > * > input[type="submit"] {
  max-width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  font-size: 1rem;
}

.sp-button-group-tight > * {
  min-width: 160px;
  flex: 1 1 160px;
  max-width: 100%;
}

.sp-form-note {
  margin-bottom: 0.75rem;
  color: var(--sp-muted);
}

.sp-button-group #submit_button,
.sp-button-group .width_240px,
.sp-button-group .width240px {
  width: 100% !important;
}
.submit-row {
  display: flex;
  justify-content: flex-start;
}

.help {
  color: var(--sp-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.errornote {
  color: #f87171;
  margin-bottom: 0.75rem;
}

.sp-nav {
  background: rgba(8, 16, 33, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid var(--sp-nav-border);
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
}

html[data-bs-theme="light"] .sp-nav {
  background: rgba(255, 255, 255, 0.75);
}

.sp-nav .navbar-brand {
  color: var(--sp-text);
}

.sp-nav .nav-link {
  color: var(--sp-muted);
}

.sp-nav .nav-link:hover,
.sp-nav .nav-link:focus {
  color: var(--sp-text);
}

.sp-nav .form-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--sp-card-border);
  color: var(--sp-text);
}

html[data-bs-theme="light"] .sp-nav .form-select {
  background: rgba(255, 255, 255, 0.9);
  color: var(--sp-text);
}

.sp-pill {
  border-radius: 999px;
}

.btn-primary {
  background-color: var(--sp-primary);
  border: 1px solid var(--sp-primary);
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--primary-inverse);
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary:hover {
  background-color: var(--sp-primary-600);
  border-color: var(--sp-primary-600);
}

html[data-bs-theme="light"] .btn-primary {
  background-color: transparent;
  color: var(--sp-primary);
  border: 1px solid var(--sp-primary);
  box-shadow: none;
}

html[data-bs-theme="light"] .btn-primary:hover {
  background-color: rgba(37, 99, 235, 0.08);
  border: 1px solid var(--sp-primary-600);
  color: var(--sp-primary-600);
}

.btn-outline-primary {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
}

.sp-icon-btn {
  padding: 0.25rem 0.55rem;
  line-height: 1;
  font-size: 0.85rem;
  border-radius: 999px;
}

.btn-outline-danger {
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
}

.btn-outline-dark {
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
}

.btn-lg {
  padding: 0.95rem 2.1rem;
  font-size: 1.05rem;
}

.sp-hero {
  padding: 3.5rem 0 2rem;
}

.sp-hero-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
  margin-top: 2.5rem;
}

.sp-section {
  padding: 3.5rem 0;
}

.sp-glass {
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-card-shadow);
  backdrop-filter: blur(12px);
}

.sp-card-grid .card {
  height: 100%;
}

.sp-card-soft {
  background: var(--sp-card-soft);
}

.sp-kpi {
  border-radius: 16px;
  padding: 1.5rem;
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  box-shadow: var(--sp-card-shadow);
}

.sp-kpi .sp-kpi-value {
  font-size: 2rem;
  font-weight: 700;
}

.sp-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.sp-status-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.sp-status-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.sp-status-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.sp-status-info {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

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

.sp-feature-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sp-primary);
  font-weight: 700;
  border: 1px solid var(--sp-card-border);
  z-index: 1;
}

.sp-feature-icon::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 16px;
  background: radial-gradient(
      circle at 30% 30%,
      rgba(56, 189, 248, 0.55),
      transparent 60%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(129, 140, 248, 0.4),
      transparent 60%
    );
  filter: blur(10px);
  opacity: 0.85;
  z-index: -1;
}

.sp-feature-icon:focus-visible {
  outline: 2px solid var(--sp-primary);
  outline-offset: 3px;
}

.sp-feature-icon button,
.sp-feature-icon[role="button"] {
  cursor: pointer;
}

.sp-logos span {
  color: var(--sp-muted);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sp-footer {
  border-top: 1px solid var(--sp-nav-border);
  margin-top: 3rem;
}

.table thead th {
  font-weight: 600;
  color: var(--sp-text);
}

.form-control,
.form-select {
  border-radius: 0.85rem;
  border: 1px solid var(--sp-card-border);
  background: var(--sp-card-soft);
  color: var(--sp-text);
}

input,
select,
textarea {
  border-radius: 0.85rem;
  border: 1px solid var(--sp-card-border);
  background: var(--sp-card-soft);
  color: var(--sp-text);
  padding: 0.55rem 0.75rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.2);
  outline: none;
}

.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--sp-muted) 50%),
    linear-gradient(135deg, var(--sp-muted) 50%, transparent 50%),
    linear-gradient(to right, var(--sp-card-soft), var(--sp-card-soft));
  background-position:
    calc(100% - 1.05rem) 55%,
    calc(100% - 0.85rem) 55%,
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
}

.form-select option {
  background: var(--sp-card);
  color: var(--sp-text);
}

.sp-placeholder-italic::placeholder {
  color: var(--sp-muted);
  font-style: italic;
  opacity: 0.85;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.2);
}

.sp-page-header {
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  border-radius: 1rem;
  padding: 1.5rem;
}

.sp-empty-state {
  border: 1px dashed var(--sp-card-border);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  color: var(--sp-muted);
}

.sp-table-wrap {
  overflow-x: auto;
}

tr.sp-row-link {
  cursor: pointer;
}

tr.sp-row-link:hover {
  background: var(--sp-card-soft);
}

.supplier-question-row .chevron {
  transition: transform 0.2s ease;
}

.supplier-question-row[aria-expanded="true"] .chevron {
  transform: rotate(90deg);
}

.sp-table-compact .table td,
.sp-table-compact .table th {
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
}

.sp-table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--sp-card-soft);
}

.sp-chart {
  height: 160px;
}

.sp-chart-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8px, 1fr));
  gap: 6px;
  align-items: end;
  height: 100%;
}

.sp-chart-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  height: 100%;
}

.sp-chart-bar {
  border-radius: 6px;
  min-height: 2px;
}

.sp-chart-ok {
  background: rgba(34, 197, 94, 0.75);
}

.sp-chart-fail {
  background: rgba(248, 113, 113, 0.85);
}

.sp-chart-delay {
  background: rgba(56, 189, 248, 0.7);
}

.sp-app-shell {
  display: flex;
  min-height: 100vh;
  gap: 1.5rem;
  padding: 1.5rem;
}

.sp-app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sp-sidebar {
  width: 260px;
  border-radius: var(--sp-radius);
  border: 1px solid var(--sp-card-border);
  overflow: hidden;
}

.sp-sidebar .offcanvas-body {
  padding: 1.25rem;
}

.sp-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  color: var(--sp-text);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.sp-sidebar-toggle {
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
}

.sp-sidebar-link:hover {
  background: rgba(56, 189, 248, 0.12);
  color: var(--sp-text);
}

.sp-sidebar-link.active {
  background: rgba(56, 189, 248, 0.2);
  color: var(--sp-text);
}

.sp-sidebar-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sp-sidebar-label {
  flex: 1;
  font-size: 0.95rem;
}

.sp-sidebar-badge {
  font-size: 0.75rem;
}

.sp-topbar .form-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--sp-card-border);
  color: var(--sp-text);
}

html[data-bs-theme="light"] .sp-topbar .form-select {
  background: rgba(255, 255, 255, 0.9);
  color: var(--sp-text);
}

body[data-sidebar="collapsed"] .sp-sidebar {
  width: 88px;
}

body[data-sidebar="collapsed"] .sp-sidebar-label,
body[data-sidebar="collapsed"] .sp-sidebar-badge {
  display: none;
}

body[data-sidebar="collapsed"] .sp-sidebar-link {
  justify-content: center;
}

@media (max-width: 991.98px) {
  .sp-app-shell {
    padding: 1rem;
  }

  .sp-sidebar {
    width: 100%;
    border-radius: 0;
  }
}

.sp-detail-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.sp-detail-panel.show {
  max-height: 300px;
  opacity: 1;
}

.sp-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.sp-icon-wrap::before {
  content: "";
  position: absolute;
  inset: -28px;
  background:
    radial-gradient(circle at 30% 30%, var(--sp-glow-a), transparent 70%),
    radial-gradient(circle at 70% 40%, var(--sp-glow-b), transparent 72%);
  border-radius: 999px;
  pointer-events: none;
}

.sp-icon {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
  color: currentColor;
  opacity: 0.95;
}

/* LetsSecure layout helpers to align with ServiceProof styling */
.sp-topbar {
  position: relative;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--sp-radius);
}

.sp-topbar-left,
.sp-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sp-topbar-account {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sp-topbar-account-title {
  font-weight: 600;
  color: var(--sp-text);
}

.sp-topbar-account-title a {
  color: inherit;
}

.sp-topbar-field {
  display: flex;
  align-items: center;
}

.small {
  font-size: 0.85rem;
}

.sp-public-topbar {
  position: sticky;
  top: 1rem;
  z-index: 1050;
  margin: 1rem auto 2.5rem;
  width: min(1200px, 92vw);
  flex-direction: column;
  align-items: stretch;
}

.sp-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}

.sp-public-logo img {
  max-height: 44px;
  width: auto;
  border-radius: 10px;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] .sp-public-logo img {
  background: transparent;
}

.sp-logo-light {
  display: none;
  background: transparent;
}

html[data-bs-theme="light"] .sp-logo-dark {
  display: none;
}

html[data-bs-theme="light"] .sp-logo-light {
  display: inline-block;
}

.sp-public-nav {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem 1rem;
  font-weight: 600;
}

.sp-public-nav a {
  color: var(--sp-text);
  opacity: 0.85;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.ls-panel-logo {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  border-radius: var(--sp-radius);
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
}

.ls-panel-logo img {
  max-width: 100%;
  height: auto;
}

.ls-logo-light {
  display: none;
}

body.sp-public:has(#theme-toggle:checked) .ls-logo-dark {
  display: none;
}

body.sp-public:has(#theme-toggle:checked) .ls-logo-light {
  display: block;
}

.sp-public-nav .sp-theme-switch {
  margin-left: 0.35rem;
  white-space: nowrap;
}

.sp-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--sp-text);
}

.sp-lang-switch a {
  color: var(--sp-text);
  opacity: 0.85;
}

.sp-lang-switch a.is-active {
  opacity: 1;
}

.sp-lang-divider {
  color: var(--sp-muted);
}

.sp-nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}

.sp-nav-toggle-btn {
  display: none;
  width: 36px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--sp-nav-border);
  background: transparent;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.sp-nav-toggle-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--sp-text);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sp-public-nav a:hover,
.sp-public-nav a:focus {
  opacity: 1;
  color: var(--sp-primary);
}

body.sp-public .clean-navbar {
  display: none !important;
}

body.sp-public .page {
  padding-top: 2rem;
}

body.sp-public .page-footer,
body.sp-public .clean-block {
  color: var(--sp-text);
}

body.sp-public .page-footer {
  background: transparent;
}

body.sp-public .text-black-50,
body.sp-public .text-muted {
  color: var(--sp-muted) !important;
}

body.sp-public .clean-card,
body.sp-public .clean-pricing-item,
body.sp-public .clean-testimonial-item,
body.sp-public .clean-block.clean-form form,
body.sp-public .clean-block.payment-form form,
body.sp-public .clean-block.clean-gallery .item .image {
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  box-shadow: var(--sp-card-shadow);
  color: var(--sp-text);
}

body.sp-public .clean-card .card-body,
body.sp-public .clean-pricing-item p,
body.sp-public .clean-testimonial-item p {
  color: var(--sp-muted);
}

.sp-public-home {
  min-height: 100vh;
}

.sp-public-hero {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding-bottom: 3rem;
}

.sp-public-hero-tight {
  padding-bottom: 2rem;
}

.sp-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2.5rem;
  padding: 3rem;
}

.sp-hero-panel-centered {
  grid-template-columns: 1fr;
  text-align: center;
}

.sp-hero-copy h1 {
  font-size: clamp(2.4rem, 2.6vw + 1.6rem, 4rem);
  line-height: 1.05;
  margin: 0.75rem 0 1rem;
  color: #f8fafc;
}

.sp-hero-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--sp-muted);
  font-weight: 600;
}

.sp-hero-lede {
  font-size: 1.1rem;
  color: var(--sp-muted);
  max-width: 560px;
}

.sp-hero-lede-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.sp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}

.sp-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--sp-muted);
  font-size: 0.85rem;
}

.sp-hero-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.8), rgba(4, 15, 30, 0.9));
  border: 1px solid var(--sp-card-border);
  border-radius: calc(var(--sp-radius) - 4px);
  padding: 1.5rem;
  box-shadow: var(--sp-card-shadow);
}

html[data-bs-theme="light"] .sp-hero-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.9));
}

.sp-hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--sp-muted);
}

.sp-hero-card-header strong {
  font-size: 2.6rem;
  color: var(--sp-text);
}

.sp-hero-card-body {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.sp-hero-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--sp-muted);
}

.sp-hero-metric strong {
  font-size: 1.4rem;
  color: var(--sp-text);
}

.sp-hero-divider {
  height: 1px;
  background: var(--sp-card-border);
}

.sp-hero-alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--sp-text);
  font-weight: 600;
}

.sp-hero-alert strong {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--sp-primary);
}

.sp-public-section {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 0 0 3.5rem;
}

.sp-public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

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

.sp-principles-grid > article {
  grid-column: span 2;
}

.sp-principles-grid > article:nth-last-child(2),
.sp-principles-grid > article:last-child {
  grid-column: span 3;
}

.sp-public-card {
  padding: 2rem;
  min-height: 210px;
  display: grid;
  gap: 0.75rem;
}

.sp-public-card p {
  color: var(--sp-muted);
}

.sp-product-panels {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.sp-product-panel {
  min-height: 280px;
  padding: 2.4rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.sp-product-panel p {
  margin: 0;
}

.sp-product-panel .sp-link {
  margin-top: auto;
}

.sp-link {
  font-weight: 600;
  color: var(--sp-primary);
}

.sp-public-section-dark {
  padding-top: 1rem;
}

.sp-public-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.sp-public-list {
  display: grid;
  gap: 1.25rem;
}

.sp-public-list strong {
  display: block;
  font-size: 1rem;
}

.sp-public-list span {
  color: var(--sp-muted);
}

.sp-public-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem;
}

.sp-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.sp-pricing-card {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
  position: relative;
}

.sp-pricing-card h3 {
  margin: 0;
}

.sp-pricing-card header p {
  color: var(--sp-muted);
  margin: 0.35rem 0 0;
}

.sp-pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--sp-text);
}

.sp-pricing-price strong {
  font-size: 2.6rem;
}

.sp-pricing-price em {
  color: var(--sp-muted);
  font-style: normal;
  font-size: 0.9rem;
}

.sp-pricing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--sp-muted);
}

.sp-pricing-list li::before {
  content: \"•\";
  color: var(--sp-primary);
  margin-right: 0.5rem;
}

.sp-pricing-featured {
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 18px 50px rgba(56, 189, 248, 0.2);
}

.sp-pricing-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(56, 189, 248, 0.2);
  color: var(--sp-primary);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
}

.sp-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.sp-team-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem;
}

.sp-team-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(56, 189, 248, 0.18);
  color: var(--sp-primary);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sp-team-card-profile {
  display: grid;
  align-items: start;
  gap: 1rem;
}

.sp-team-photo {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 12px;
}

.sp-team-body p {
  color: var(--sp-muted);
  margin: 0.5rem 0 0;
}

.sp-public-about-copy {
  padding: 2rem;
  color: var(--sp-muted);
}

.sp-public-about-copy a {
  color: var(--sp-primary);
}

.sp-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.sp-contact-card {
  padding: 1.75rem;
  display: grid;
  gap: 0.5rem;
}

.sp-contact-card p {
  color: var(--sp-muted);
  margin: 0;
}

.sp-contact-split {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem;
}

.sp-testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.sp-testimonial-card {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.sp-testimonial-quote {
  font-size: 1.05rem;
  color: var(--sp-text);
}

.sp-testimonial-meta {
  display: grid;
  gap: 0.2rem;
  color: var(--sp-muted);
}

.sp-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.sp-faq-card {
  padding: 1.75rem;
  display: grid;
  gap: 0.75rem;
}

.sp-faq-card p {
  color: var(--sp-muted);
}

.sp-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.sp-step-card {
  padding: 1.75rem;
  display: grid;
  gap: 0.6rem;
}

.sp-step-number {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--sp-primary);
}

.sp-post-list {
  display: grid;
  gap: 1.5rem;
}

.sp-post-card {
  padding: 1.75rem;
  display: grid;
  gap: 0.6rem;
}

.sp-post-meta {
  color: var(--sp-muted);
  font-size: 0.85rem;
}

.sp-public-footer {
  width: min(1200px, 92vw);
  margin: 0 auto 2.5rem;
}

.sp-public-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.5rem 2rem;
}

.sp-public-footer-brand {
  display: grid;
  gap: 0.25rem;
  color: var(--sp-muted);
}

.sp-public-footer-brand strong {
  color: var(--sp-text);
}

.sp-public-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-weight: 600;
}

.sp-public-footer-links a {
  color: var(--sp-muted);
}

.sp-public-footer-links a:hover,
.sp-public-footer-links a:focus {
  color: var(--sp-primary);
}

.sp-public-footer-copy {
  margin-top: 1rem;
  text-align: center;
  color: var(--sp-muted);
  font-size: 0.85rem;
}

@media (max-width: 991.98px) {
  .sp-hero-panel,
  .sp-public-split {
    grid-template-columns: 1fr;
  }

  .sp-hero-panel {
    padding: 2rem;
  }

  .sp-public-cta {
    padding: 2rem;
  }

  .sp-pricing-badge {
    position: static;
    margin-bottom: 0.5rem;
    width: fit-content;
  }
}

@media (max-width: 991.98px) {
  .sp-public-topbar {
    position: static;
    margin: 1rem 1rem 2rem;
    width: auto;
  }

  .sp-topbar-row {
    justify-content: flex-start;
  }

  .sp-nav-toggle {
    display: inline-block;
  }

  .sp-nav-toggle-btn {
    display: inline-flex;
  }

  .sp-public-nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.75rem;
    display: none;
  }

  .sp-public-topbar .sp-topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .sp-nav-toggle:checked ~ .sp-topbar-right .sp-public-nav {
    display: flex;
  }

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

  .sp-principles-grid > article,
  .sp-principles-grid > article:nth-last-child(2),
  .sp-principles-grid > article:last-child {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .sp-principles-grid {
    grid-template-columns: 1fr;
  }
}

.ls-sidebar-header {
  display: grid;
  gap: 0.35rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.ls-sidebar-header img {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.4rem;
  justify-self: center;
  max-width: 175px;
  height: auto;
}

.ls-sidebar-title {
  display: grid;
  gap: 0.2rem;
}

.links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.links li {
  margin: 0;
}

.sp-sidebar-link {
  text-decoration: none;
}

.sp-sidebar-label {
  color: inherit;
}

.sp-main-content {
  padding: 1.5rem;
}

@media (max-width: 991.98px) {
  .sp-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* DMARC tab pills */
.ls-tabbar {
  padding: 0;
  margin: 0.5rem 0 1.25rem;
}

.ls-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.ls-tablink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  padding: 0.55rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sp-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ls-tablist li {
  display: flex;
}

.ls-tablink:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--sp-text);
}

.ls-tablink.active {
  background: #1e74ff;
  color: #ffffff;
  border-color: #1e74ff;
  box-shadow: 0 10px 24px rgba(30, 116, 255, 0.35);
}

html[data-bs-theme="light"] .ls-tablist {
  background: transparent;
  border: 0;
}

html[data-bs-theme="light"] .ls-tablink {
  color: rgba(51, 65, 85, 0.9);
}

html[data-bs-theme="light"] .ls-tablink:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

html[data-bs-theme="light"] .ls-tablink.active {
  background: #1e74ff;
  color: #ffffff;
  border-color: #1e74ff;
  box-shadow: 0 10px 24px rgba(30, 116, 255, 0.3);
}

@media (max-width: 700px) {
  .ls-tablist {
    gap: 0.35rem;
  }

  .ls-tablink {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* Softjoy public site refresh */
body.sp-public {
  background:
    radial-gradient(900px circle at 15% -10%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(700px circle at 85% 10%, rgba(129, 140, 248, 0.2), transparent 55%),
    var(--sp-bg);
  color: var(--sp-text);
  min-height: 100vh;
}

.sp-public,
html,
body {
  background-color: var(--sp-bg);
}

.sp-theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--sp-nav-border);
  border-radius: 999px;
  padding: 0.2rem 0.4rem;
  background: var(--sp-card);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sp-text);
  opacity: 1;
}

.sp-theme-switch input {
  appearance: none;
  width: 20px;
  height: 12px;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  position: relative;
  border: 1px solid var(--sp-nav-border);
  cursor: pointer;
}

.sp-theme-switch input::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sp-text);
  transition: transform 0.2s ease;
}

.sp-theme-switch input:checked::after {
  transform: translateX(8px);
}

.sp-theme-switch label {
  cursor: pointer;
  margin: 0;
  display: inline-flex;
  gap: 0.3rem;
}

.sp-theme-label-light {
  display: none;
}

body.sp-public .sp-theme-label-dark {
  color: var(--sp-text);
  opacity: 0.85;
}

body.sp-public:has(#theme-toggle:checked) .sp-theme-label-dark {
  display: none;
}

body.sp-public:has(#theme-toggle:checked) .sp-theme-label-light {
  display: inline;
}

html:has(#theme-toggle:checked),
body.sp-public:has(#theme-toggle:checked) {
  --sp-muted: #52607a;
  --sp-text: #0f172a;
  --sp-primary: #2563eb;
  --sp-primary-600: #1d4ed8;
  --sp-accent: #06b6d4;
  --sp-bg: #e3e7ed;
  --sp-card: rgba(255, 255, 255, 0.94);
  --sp-card-soft: rgba(255, 255, 255, 0.96);
  --sp-card-border: rgba(15, 23, 42, 0.08);
  --sp-card-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  --sp-nav-border: rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

html:has(#theme-toggle:checked),
body.sp-public:has(#theme-toggle:checked),
body.sp-public:has(#theme-toggle:checked) body {
  background-color: var(--sp-bg);
}

body.sp-public:has(#theme-toggle:checked) {
  background:
    radial-gradient(900px circle at 15% -10%, rgba(37, 99, 235, 0.14), transparent 60%),
    radial-gradient(700px circle at 85% 10%, rgba(14, 165, 233, 0.12), transparent 55%),
    var(--sp-bg);
}

body.sp-public:has(#theme-toggle:checked) .sp-logo-dark {
  display: none;
}

body.sp-public:has(#theme-toggle:checked) .sp-logo-light {
  display: inline-block;
}

body.sp-public:has(#theme-toggle:checked) .sp-hero-copy h1,
body.sp-public:has(#theme-toggle:checked) h2,
body.sp-public:has(#theme-toggle:checked) h3,
body.sp-public:has(#theme-toggle:checked) h4 {
  color: #0f172a;
}

body.sp-public:has(#theme-toggle:checked) a {
  color: var(--sp-primary);
}

body.sp-public:has(#theme-toggle:checked) a:hover,
body.sp-public:has(#theme-toggle:checked) a:focus {
  color: var(--sp-primary-600);
}

.sp-theme-toggle {
  border: 1px solid var(--sp-nav-border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: rgba(15, 23, 42, 0.4);
  color: var(--sp-text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

html[data-bs-theme="light"] .sp-theme-toggle {
  background: rgba(255, 255, 255, 0.8);
}

.sp-theme-toggle:hover,
.sp-theme-toggle:focus {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
}

.sp-public-topbar {
  position: static;
  top: auto;
}

.sp-topbar-row {
  background: var(--sp-card);
  border: 1px solid var(--sp-nav-border);
  border-radius: calc(var(--sp-radius) + 6px);
  padding: 0.9rem 1.4rem;
  backdrop-filter: none;
}

html[data-bs-theme="light"] .sp-topbar-row {
  background: rgba(255, 255, 255, 0.82);
}

.sp-public-nav a {
  position: relative;
}

.sp-public-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: var(--sp-primary);
  transition: width 0.2s ease;
}

.sp-public-nav a:hover::after,
.sp-public-nav a:focus::after {
  width: 100%;
}

.sp-public-nav a.is-active {
  color: var(--sp-muted);
}

.sp-public-nav a.is-active::after {
  width: 100%;
  background: rgba(148, 163, 184, 0.8);
}

.sp-public-hero {
  padding-bottom: 2.5rem;
}

.sp-hero-panel {
  background: var(--sp-card);
  border-radius: calc(var(--sp-radius) + 6px);
  border: 1px solid var(--sp-card-border);
  box-shadow: none;
}

html[data-bs-theme="light"] .sp-hero-panel {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.sp-hero-card {
  background: var(--sp-card-soft);
}

html[data-bs-theme="light"] .sp-hero-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(226, 232, 240, 0.85));
}

.sp-section-shell {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 0 0 3.5rem;
}

.sp-section-surface {
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  border-radius: calc(var(--sp-radius) + 10px);
  padding: 2.5rem;
  box-shadow: none;
}

html[data-bs-theme="light"] .sp-section-surface {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.sp-section-alt {
  background: var(--sp-card-soft);
  border-radius: calc(var(--sp-radius) + 14px);
  padding: 2.5rem;
  box-shadow: none;
}

html[data-bs-theme="light"] .sp-section-alt {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.7), rgba(255, 255, 255, 0.7));
}

.sp-section-header {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.sp-section-header p {
  color: var(--sp-muted);
  max-width: 680px;
}

.sp-public-card {
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  border-radius: calc(var(--sp-radius) + 4px);
  box-shadow: none;
}

html[data-bs-theme="light"] .sp-public-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.85));
}

.sp-public-card img {
  border-radius: calc(var(--sp-radius) - 4px);
}

.sp-section-divider {
  height: 1px;
  background: var(--sp-card-border);
  margin: 2rem 0;
}

.sp-public-footer-inner {
  background: var(--sp-card);
  border: 1px solid var(--sp-nav-border);
  border-radius: calc(var(--sp-radius) + 8px);
  backdrop-filter: none;
}

html[data-bs-theme="light"] .sp-public-footer-inner {
  background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 991.98px) {
  .sp-topbar-row {
    padding: 0.75rem 1rem;
  }

  .sp-section-surface,
  .sp-section-alt {
    padding: 1.75rem;
  }
}
