:root {
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #0ea5e9;
  --brand-strong: #0369a1;
}

body {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
}

#content-wrapper {
  background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 45%, #f0fdfa 100%);
}

#accordionSidebar .nav-item {
  margin-bottom: .2rem;
}

#accordionSidebar .nav-item.active .nav-link,
#accordionSidebar .nav-link:hover,
#accordionSidebar .nav-link:focus {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.26), rgba(14, 165, 233, 0.08));
  border-radius: .65rem;
}

.card,
.modal-content,
.dropdown-menu,
.table,
.form-control,
.btn,
.pagination .page-link,
.custom-select,
.input-group-text {
  border-radius: .75rem;
}

.card {
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(2, 6, 23, .06);
}

.card-header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--line);
}

.card-header h4 {
  margin: 0;
  min-height: 2rem;
}

.card-header .btn {
  margin-top: 0;
}

.table {
  background: var(--surface);
  overflow: hidden;
}

.table thead th {
  background: var(--surface-soft);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.table td,
.table th {
  border-top: 1px solid #f1f5f9;
  vertical-align: middle;
}

.form-control,
.custom-select,
.custom-file-label {
  border: 1px solid #cbd5e1;
  box-shadow: none;
  min-height: 2.65rem;
}

.form-control:focus,
.custom-select:focus {
  border-color: #7dd3fc;
  box-shadow: 0 0 0 .2rem rgba(14, 165, 233, .15);
}

.btn-primary,
.btn-success {
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  border: 0;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
  filter: brightness(0.96);
  color: #fff;
}

.h3.mb-2.text-gray-800 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a !important;
  margin-bottom: 1rem !important;
}

.muted-text {
  color: #64748b !important;
}

.table-responsive {
  border-radius: .8rem;
}

.modal-header {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.modal-footer {
  border-top: 1px solid #e2e8f0;
}

.alert { border: 0; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-info { background: #e0f2fe; color: #075985; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-danger { background: #fee2e2; color: #991b1b; }

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

#collectionlist tr:hover {
  background: #f8fafc;
}

.card.col-6 {
  max-width: 860px;
  width: 100%;
  flex: 0 0 100%;
}

@media (max-width: 991px) {
  #accordionSidebar { min-height: auto; }
  .card-header .btn.float-right { float: none !important; width: 100%; }
}

/* Modal stacking and positioning hardening */
.modal {
  z-index: 2055 !important;
}

.modal-backdrop {
  z-index: 2050 !important;
}

.modal.show .modal-dialog {
  margin: 1.75rem auto;
}
