:root {
  /* Brand colors and surfaces */
  --page-bg: radial-gradient(1200px 600px at 20% -10%, rgba(13,110,253,.12), transparent 60%),
             radial-gradient(1000px 600px at 120% 10%, rgba(32,201,151,.10), transparent 60%),
             #0e0f12;
  --text: #e8edf2;
  --muted: #9aa4ad;
  --primary: #0d6efd;
  --accent: #20c997;
  --ring: #0dcaf0;

  /* Surfaces */
  --card-bg: #15171b;
  --card-border: #22262b;

  /* Shape & layout */
  --radius: 16px;
  --container-max: 1100px;
    color-scheme: dark;
}
select, input, textarea, button {
  color-scheme: dark;
}

/* Base page background overlay (keeps Bootstrap body classes intact) */
html,
body { min-height: 100%; background: transparent; }
body.bg-dark { background-color: transparent !important; }
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--page-bg);
  background-repeat: no-repeat;
  background-color: #0e0f12; /* fallback outside gradients */
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Layout helpers */
.container { max-width: var(--container-max); }

/* Navbar glass look */
.navbar.bg-body-tertiary {
  background: rgba(17, 19, 23, 0.7) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
}


/* Headings */
h1 { letter-spacing: 0.3px; font-weight: 700; }
h4 { margin-top: 1.75rem; color: #cfd7df; }

/* Cards shared styling */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card .small.text-muted { color: var(--muted) !important; }

/* Scrollbars (light, minimal) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(54, 47, 109, 0.28) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0.22)
  );
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.3)
  );
  background-clip: padding-box;
}

/* Modals: align with card look */
.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}
.modal-header,
.modal-footer {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.06);
}
.modal .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.8;
}
.modal .btn-close:hover { opacity: 1; }

/* Dropdowns: glassy dark surface */
.dropdown-menu {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  color: var(--text);
}
.dropdown-item { color: var(--text); }
.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}
.dropdown-divider { border-top-color: rgba(255, 255, 255, 0.08); }

/* Forms on dark surfaces */
.form-control,
.form-select,
.input-group-text {
  background-color: rgba(20, 22, 26, 0.65);
  color: #dfe6ee;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.form-control::placeholder { color: #9aa3ac; }
