:root {
  --theme-bg: #eef3f8;
  --theme-bg-soft: #f8fbff;
  --theme-surface: rgba(255, 255, 255, 0.94);
  --theme-surface-strong: #ffffff;
  --theme-border: rgba(15, 23, 42, 0.09);
  --theme-border-strong: rgba(15, 23, 42, 0.16);
  --theme-text: #0f172a;
  --theme-muted: #64748b;
  --theme-primary: #1d4ed8;
  --theme-primary-deep: #1e3a8a;
  --theme-accent: #f59e0b;
  --theme-success: #15803d;
  --theme-warning: #b45309;
  --theme-danger: #dc2626;
  --theme-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --theme-radius: 18px;
}

html {
  color-scheme: light;
}

body {
  color: var(--theme-text);
  background:
    radial-gradient(1200px 520px at 0% 0%, rgba(29, 78, 216, 0.08), transparent 58%),
    radial-gradient(900px 440px at 100% 0%, rgba(245, 158, 11, 0.07), transparent 45%),
    linear-gradient(180deg, var(--theme-bg-soft) 0%, var(--theme-bg) 100%);
  min-height: 100vh;
}

body::selection {
  background: rgba(29, 78, 216, 0.16);
}

a {
  color: var(--theme-primary);
}

a:hover {
  color: var(--theme-primary-deep);
}

.text-muted,
.small.text-muted,
.form-text,
.text-secondary {
  color: var(--theme-muted) !important;
}

.bg-light {
  background: transparent !important;
}

.bg-white {
  background: rgba(255, 255, 255, 0.92) !important;
}

.border,
.border-top,
.border-bottom,
.border-start,
.border-end {
  border-color: var(--theme-border) !important;
}

.shadow,
.shadow-sm {
  box-shadow: var(--theme-shadow) !important;
}

.rounded,
.rounded-3,
.rounded-4 {
  border-radius: 16px !important;
}

.navbar,
.topbar {
  backdrop-filter: blur(14px);
}

.navbar.bg-white.border-bottom,
.navbar.border-bottom,
.topbar {
  background: rgba(255, 255, 255, 0.86) !important;
  border-bottom: 1px solid var(--theme-border) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.navbar-brand,
.navbar .fw-bold,
.navbar a,
.navbar span {
  color: var(--theme-text);
}

.card,
.list-group-item,
.modal-content,
.dropdown-menu,
.accordion-item,
.offcanvas,
.table-responsive {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border) !important;
  border-radius: var(--theme-radius);
  box-shadow: var(--theme-shadow);
}

.card-header,
.modal-header,
.offcanvas-header {
  background: rgba(248, 250, 252, 0.88) !important;
  border-bottom: 1px solid var(--theme-border) !important;
  color: var(--theme-text);
  font-weight: 800;
}

.card-footer,
.modal-footer {
  background: rgba(248, 250, 252, 0.6) !important;
  border-top: 1px solid var(--theme-border) !important;
}

.list-group {
  gap: 0.55rem;
}

.list-group-item {
  margin-bottom: 0;
  border-radius: 16px !important;
}

.list-group-item.active {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.96), rgba(37, 99, 235, 0.92)) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 16px 36px rgba(29, 78, 216, 0.22);
}

.list-group-item.active *,
.list-group-item.active .text-muted,
.list-group-item.active .small {
  color: inherit !important;
}

.table {
  color: var(--theme-text);
}

.table thead th {
  color: var(--theme-muted);
  border-bottom-color: var(--theme-border-strong) !important;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table td,
.table th {
  border-color: rgba(148, 163, 184, 0.22) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(248, 250, 252, 0.72);
}

.table-hover > tbody > tr:hover > * {
  background-color: rgba(219, 234, 254, 0.32);
}

.form-control,
.form-select,
.input-group-text,
textarea.form-control {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.34);
  color: var(--theme-text);
  border-radius: 14px;
  min-height: 44px;
  box-shadow: none;
}

.form-control::placeholder,
.form-select::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow: 0 0 0 0.25rem rgba(29, 78, 216, 0.12);
}

.btn {
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.72rem 1rem;
  border-width: 1px;
}

.btn-sm {
  border-radius: 12px;
  padding: 0.5rem 0.8rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--theme-primary), #2563eb) !important;
  border-color: var(--theme-primary) !important;
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--theme-primary-deep), var(--theme-primary)) !important;
  border-color: var(--theme-primary-deep) !important;
}

.btn-outline-primary {
  color: var(--theme-primary) !important;
  border-color: rgba(29, 78, 216, 0.32) !important;
  background: rgba(29, 78, 216, 0.04);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #ffffff !important;
  background: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
}

.btn-outline-secondary {
  color: #334155 !important;
  border-color: rgba(100, 116, 139, 0.28) !important;
  background: rgba(100, 116, 139, 0.06);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #ffffff !important;
  background: #334155 !important;
  border-color: #334155 !important;
}

.btn-outline-danger {
  color: var(--theme-danger) !important;
  border-color: rgba(220, 38, 38, 0.28) !important;
  background: rgba(220, 38, 38, 0.05);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  color: #ffffff !important;
  background: var(--theme-danger) !important;
  border-color: var(--theme-danger) !important;
}

.btn-outline-dark {
  color: var(--theme-text) !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  background: rgba(15, 23, 42, 0.04);
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
  color: #ffffff !important;
  background: var(--theme-text) !important;
  border-color: var(--theme-text) !important;
}

.badge {
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.bg-primary,
.text-bg-primary {
  background: var(--theme-primary) !important;
}

.bg-secondary,
.text-bg-secondary {
  background: rgba(71, 85, 105, 0.12) !important;
  color: #334155 !important;
}

.bg-success,
.text-bg-success {
  background: rgba(22, 163, 74, 0.14) !important;
  color: #166534 !important;
}

.bg-danger,
.text-bg-danger {
  background: rgba(220, 38, 38, 0.14) !important;
  color: #991b1b !important;
}

.bg-warning,
.text-bg-warning {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #92400e !important;
}

.bg-info,
.text-bg-info {
  background: rgba(14, 165, 233, 0.16) !important;
  color: #0c4a6e !important;
}

.bg-dark,
.text-bg-dark {
  background: #0f172a !important;
  color: #ffffff !important;
}

.alert {
  border-radius: 16px;
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow);
}

.alert-success {
  background: rgba(220, 252, 231, 0.88);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.18);
}

.alert-danger,
.alert-error {
  background: rgba(254, 226, 226, 0.9);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.18);
}

.alert-warning {
  background: rgba(254, 243, 199, 0.92);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.18);
}

.alert-info,
.alert-primary {
  background: rgba(219, 234, 254, 0.9);
  color: #1e3a8a;
  border-color: rgba(59, 130, 246, 0.18);
}

.nav-pills .nav-link {
  border-radius: 999px;
  color: var(--theme-muted);
  font-weight: 700;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: linear-gradient(135deg, var(--theme-primary), #2563eb);
  color: #ffffff;
}

.pagination .page-link {
  color: var(--theme-primary);
  border-color: var(--theme-border);
}

.pagination .page-item.active .page-link {
  background: var(--theme-primary);
  border-color: var(--theme-primary);
}
