:root {
  --brand: #0ea47a;
  --brand-ink: #073b2d;
  --bg-soft: #f6f9fb;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  color: #1f2937;
}

.navbar {
  backdrop-filter: saturate(140%) blur(50px);
  background: rgba(0, 0, 0, .5) !important;
}

.brand-gradient {
  background: linear-gradient(135deg, var(--brand) 0%, #3bc6a3 100%);
}

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

.btn-brand {
  background: var(--brand);
  color: #fff;
}

.btn-brand:hover {
  background: #0c906b;
  color: #fff;
}

.section {
  padding: 72px 0;
}

.hero {
  padding-top: 96px;
}

.shadow-soft {
  box-shadow: 0 10px 30px rgba(14, 164, 122, .15);
}

.icon-badge {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: #111518;
  border: solid 2px var(--brand);
  color: var(--brand);
}

.stat {
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
}

.card {
  border: 1px solid #eef2f7;
}

.bg-soft {
  background: var(--bg-soft);
}

/* Glassy dark card style for sections that should match the dark UI with blur */
.glass-dark {
  background: rgba(17, 21, 24, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e9ecef;
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
}

/* Typography adjustments on dark glass */
.glass-dark .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Table styling inside glass-dark containers */
.glass-dark .table {
  --mdb-table-bg: transparent;
  --mdb-table-color: #e5e7eb;
  --mdb-table-border-color: rgba(255, 255, 255, 0.12);
  color: var(--mdb-table-color);
}
.glass-dark .table > :not(caption) > * > * {
  background-color: transparent;
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0); /* ensure transparent cells */
}
.glass-dark .table thead th,
.glass-dark .table thead td {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}
.glass-dark .table tbody tr + tr td,
.glass-dark .table tfoot tr + tr th,
.glass-dark .table tfoot tr + tr td {
  border-top-color: rgba(255, 255, 255, 0.12);
}

/* Section rows that used table-dark/table-light get subtle translucent backgrounds */
.glass-dark .table .table-dark > * > th,
.glass-dark .table .table-dark > * > td,
.glass-dark .table .table-dark {
  background-color: rgba(255, 255, 255, 0.06) !important;
}
.glass-dark .table .table-light > * > th,
.glass-dark .table .table-light > * > td,
.glass-dark .table .table-light {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Success total row in dark glass */
.glass-dark .table .table-success > * > th,
.glass-dark .table .table-success > * > td,
.glass-dark .table .table-success {
  background-color: rgba(14, 164, 122, 0.18) !important;
  color: #d9fff4;
  border-top-color: rgba(14, 164, 122, 0.35) !important;
}

/* Alerts inside glass-dark container */
.glass-dark .alert {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
}
.glass-dark .alert-success {
  background: rgba(14, 164, 122, 0.15);
  border-color: rgba(14, 164, 122, 0.35);
  color: #bff0e3;
}

.list-check li {
  margin-bottom: .4rem;
}

.list-check li i {
  color: var(--brand);
}

.pill {
  border: 1px solid #dce7e2;
  padding: .35rem .6rem;
  border-radius: 999px;
  font-size: .85rem;
}

.form-card {
  border-left: 4px solid var(--brand);
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.back-to-top {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 1000;
  display: none;
}

.ratio-hero {
  --mdb-aspect-ratio: 40%;
}

@media (min-width: 992px) {
  .ratio-hero {
    --mdb-aspect-ratio: 30%;
  }
}

/* AOS helpers */
@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ===== Dark Theme ===== */
:root {
  --bg: #0b0f12; /* page background */
  --surface: #111518; /* cards, navbar */
  --surface-2: #0f1417; /* soft sections */
  --text: #e5e7eb; /* primary text */
  --muted: #9ca3af; /* muted text */
  --border: rgba(255, 255, 255, 0.08);
}

html {
  color: var(--text);
  /* Anchor offset for in-page jumps */
  scroll-padding-top: 30px;
}

:target {
  scroll-margin-top: 30px;
}

body {
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, rgba(168, 237, 220, 0.25), transparent 70%),
  radial-gradient(1000px 700px at 110% 20%, rgba(14, 164, 122, 0.20), transparent 75%),
  linear-gradient(135deg, #0a0f0c 0%, #0c1411 30%, #0d1a15 65%, #0e2219 100%);
  background-attachment: fixed;
}

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


@media (max-width: 991.98px) {
  .navbar.bg-white.show, .navbar.bg-white:has(.navbar-collapse.show) {
    background: rgba(17, 21, 24, 0.95) !important;
    backdrop-filter: none;
  }
}

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

.navbar .nav-link:hover {
  color: var(--brand);
}

.section {
  background: transparent !important;
}

.bg-soft {
  background: transparent !important;
  backdrop-filter: none;
}

.card {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.shadow-soft {
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.brand-gradient {
  background: linear-gradient(135deg, var(--brand) 0%, #3bc6a3 100%);
}

/* Buttons */
.btn-brand {
  background: var(--brand);
  color: #0b0f12;
  border: none;
}

.btn-brand:hover {
  filter: brightness(0.95);
  color: #0b0f12;
}

.btn-outline-dark {
  color: #e5e7eb;
  border-color: #4b5563;
}

.btn-outline-dark:hover {
  background: #374151;
  color: #fff;
  border-color: #4b5563;
}

.btn-light {
  color: #0b0f12;
}

/* Links */
a {
  color: #b5ffe3;
}

a:hover {
  color: #9ff4d5;
}

/* Forms */
.form-label {
  color: var(--text);
}

.form-control, .form-select, .form-check-input {
  background: #0f1417;
  color: var(--text);
  border: 1px solid #2a2f35;
}

.form-control::placeholder {
  color: #6b7280;
}

.form-control:focus, .form-select:focus {
  color: var(--text);
  background: #0f1417;
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(14, 164, 122, .15);
}

.form-check-label {
  color: var(--text);
}

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

.invalid-feedback {
  color: #fca5a5;
}

/* Accordion */
.accordion-body {
  color: var(--text);
}

.accordion-item {
  background: transparent;
  border: 1px solid var(--border);
}

.accordion-button {
  background: var(--surface);
  color: var(--text);
}

.accordion-button:not(.collapsed) {
  color: var(--text);
  background: #151a1e;
  box-shadow: inset 0 -1px 0 var(--border);
}

.accordion-button::after {
  filter: invert(1) grayscale(1);
}

/* Toasts */
.toast.text-bg-success {
  background-color: #065f46 !important;
}

.toast.text-bg-danger {
  background-color: #7f1d1d !important;
}

/* Footer links */
.footer a {
  color: var(--muted);
}

.footer a:hover {
  color: var(--text);
}

/* Inputs in disabled/read-only states */
.form-control:disabled, .form-control[readonly] {
  background-color: #101419;
  color: #a1a1aa;
  border-color: #23272e;
}

/* Hr */
hr {
  border-color: var(--border);
}