:root {
  --rees-bg: #f5f7fb;
  --rees-surface: rgba(255, 255, 255, 0.9);
  --rees-surface-strong: #ffffff;
  --rees-border: rgba(15, 23, 42, 0.08);
  --rees-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --rees-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --rees-primary: #123d8f;
  --rees-primary-2: #0ea5e9;
  --rees-success: #16a34a;
  --rees-warning: #d97706;
  --rees-danger: #dc2626;
  --rees-text: #0f172a;
  --rees-text-soft: #64748b;
  --rees-radius: 22px;
}

body {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.07), transparent 22%),
    radial-gradient(circle at top left, rgba(18, 61, 143, 0.08), transparent 24%),
    var(--rees-bg) !important;
  color: var(--rees-text);
}

.content {
  background: transparent;
}

main.content {
  padding-bottom: 2rem;
}

.card,
.rees-glass,
.topnav,
.dropdown-menu,
.table,
.modal-content,
.list-group-item,
.accordion-item {
  border-color: var(--rees-border) !important;
}

.card,
.dropdown-menu,
.modal-content,
.accordion-item {
  border-radius: var(--rees-radius) !important;
  box-shadow: var(--rees-shadow-soft);
}

.card {
  background: var(--rees-surface) !important;
  backdrop-filter: blur(8px);
}

.topnav {
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,.78) !important;
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.07);
}

.topnav-userbtn,
.topnav-iconbtn,
.topnav-search-group {
  box-shadow: none;
}

.btn {
  border-radius: 14px;
  font-weight: 600;
}

.btn-primary,
.btn-dark {
  box-shadow: 0 10px 22px rgba(18, 61, 143, 0.18);
}

.form-control,
.form-select,
.input-group-text {
  border-radius: 14px !important;
  min-height: 46px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 0 0 .2rem rgba(14, 165, 233, 0.12);
}

.table {
  overflow: hidden;
  border-radius: 18px;
  background: var(--rees-surface-strong);
}

.table thead th {
  background: #f8fafc;
  border-bottom-width: 1px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--rees-text-soft);
}

.rees-page-shell {
  display: grid;
  gap: 1.1rem;
}

.rees-page-hero {
  border: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(135deg, rgba(18,61,143,.12), rgba(14,165,233,.08) 48%, rgba(16,185,129,.08));
  border-radius: 28px;
  box-shadow: var(--rees-shadow);
  padding: 1.35rem 1.5rem;
}

.rees-page-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 800;
  color: var(--rees-text);
}

.rees-page-subtitle {
  margin: .35rem 0 0;
  color: var(--rees-text-soft);
}

.rees-kpi-card {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--rees-shadow-soft);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82));
}

.rees-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 999px;
  border: 1px solid var(--rees-border);
  padding: .42rem .72rem;
  background: rgba(255,255,255,.8);
  font-size: .82rem;
  color: var(--rees-text-soft);
}

.rees-alert-stack {
  position: sticky;
  top: 5.3rem;
  z-index: 1030;
  display: grid;
  gap: .7rem;
  margin: 0 0 1rem;
}

.rees-inline-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .85rem;
  align-items: flex-start;
  border-radius: 20px;
  padding: .9rem 1rem;
  border: 1px solid var(--rees-border);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--rees-shadow-soft);
}

.rees-inline-alert__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 61, 143, 0.08);
  color: var(--rees-primary);
}

.rees-inline-alert__title {
  font-weight: 700;
  margin-bottom: .12rem;
}

.rees-inline-alert__text {
  color: var(--rees-text-soft);
}

.rees-inline-alert__close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
}
.rees-inline-alert__close:hover { background: rgba(148,163,184,.12); color: var(--rees-text); }

.rees-alert-success { border-color: rgba(22,163,74,.18); }
.rees-alert-success .rees-inline-alert__icon { background: rgba(22,163,74,.12); color: var(--rees-success); }
.rees-alert-warning { border-color: rgba(217,119,6,.18); }
.rees-alert-warning .rees-inline-alert__icon { background: rgba(217,119,6,.12); color: var(--rees-warning); }
.rees-alert-error, .rees-alert-danger { border-color: rgba(220,38,38,.18); }
.rees-alert-error .rees-inline-alert__icon, .rees-alert-danger .rees-inline-alert__icon { background: rgba(220,38,38,.12); color: var(--rees-danger); }

.rees-empty-state {
  display: grid;
  place-items: center;
  gap: .75rem;
  min-height: 220px;
  text-align: center;
  border: 1px dashed rgba(100,116,139,.25);
  border-radius: 24px;
  background: rgba(255,255,255,.58);
  padding: 1.5rem;
}

.rees-form-errors {
  border: 1px solid rgba(220,38,38,.16);
  background: rgba(254,242,242,.92);
  color: #991b1b;
  border-radius: 18px;
  padding: .9rem 1rem;
  margin-bottom: 1rem;
}

.rees-section-card {
  border-radius: 24px;
  border: 1px solid var(--rees-border);
  background: rgba(255,255,255,.88);
  box-shadow: var(--rees-shadow-soft);
}

@media (max-width: 991.98px) {
  .rees-alert-stack { top: 1rem; }
  .rees-page-hero { border-radius: 22px; padding: 1rem; }
}
