/* ============================================================
   UI Polish — global refinements applied on top of the template
   Accent: #696cff | Body: #eef0f4 | Cards: #fff
   ============================================================ */

/* ---------- Cards ---------- */
.card {
  border: none;
  border-radius: 0.875rem;
  box-shadow: 0 3px 12px rgba(75, 70, 92, 0.08);
  transition: box-shadow 0.2s ease;
}

.card .card-header {
  background: transparent;
  border-bottom: 1px solid #f0f0f4;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.card .card-header h4,
.card .card-header h5,
.card .card-header h6 {
  font-weight: 600;
  color: #384551;
}

/* ---------- Tables ---------- */
.table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #8592a3;
  background: #f8f8fc;
  border-bottom: 1px solid #ecedf1;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  white-space: nowrap;
}

.table tbody td {
  vertical-align: middle;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  color: #4b5563;
  border-bottom: 1px solid #f3f4f8;
}

.table tbody tr {
  transition: background-color 0.12s ease;
}

.table-hover tbody tr:hover,
.table tbody tr:hover {
  background-color: rgba(105, 108, 255, 0.035);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: 0.5625rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #696cff 0%, #5f61e6 100%);
  border: none;
  box-shadow: 0 2px 6px rgba(105, 108, 255, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #5f61e6 0%, #5254cf 100%);
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.4);
  transform: translateY(-1px);
}

.btn-success {
  box-shadow: 0 2px 6px rgba(40, 199, 111, 0.25);
  border: none;
}

.btn-danger {
  box-shadow: 0 2px 6px rgba(255, 76, 81, 0.25);
  border: none;
}

.btn-sm {
  border-radius: 0.4375rem;
}

.btn:active {
  transform: translateY(0);
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
  border-radius: 0.5625rem;
  border-color: #e2e4ec;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #696cff;
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.12);
}

.form-label {
  font-weight: 500;
  color: #566a7f;
}

.form-check-input:checked {
  background-color: #696cff;
  border-color: #696cff;
}

.input-group-text {
  border-radius: 0.5625rem;
  border-color: #e2e4ec;
  background: #f8f8fc;
}

/* Choices.js aligned with form styling */
.choices__inner {
  border-radius: 0.5625rem !important;
  border-color: #e2e4ec !important;
  background: #fff !important;
}

.choices.is-focused .choices__inner {
  border-color: #696cff !important;
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.12);
}

.choices__list--multiple .choices__item {
  background: rgba(105, 108, 255, 0.12) !important;
  border: none !important;
  color: #696cff !important;
  border-radius: 0.375rem !important;
  font-weight: 500;
}

/* ---------- Badges ---------- */
.badge {
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: 0.4375rem;
  padding: 0.4em 0.65em;
}

/* ---------- Modals ---------- */
.modal-content {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(75, 70, 92, 0.22);
}

.modal-header {
  border-bottom: 1px solid #f0f0f4;
  padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
  font-weight: 600;
  color: #384551;
}

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

/* ---------- Dropdown menus ---------- */
.dropdown-menu {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 8px 28px rgba(75, 70, 92, 0.18);
  padding: 0.5rem 0;
}

.dropdown-item {
  transition: background-color 0.12s ease, color 0.12s ease;
}

.dropdown-item:hover {
  background: rgba(105, 108, 255, 0.08);
  color: #696cff;
}

/* ---------- Alerts ---------- */
.alert {
  border: none;
  border-radius: 0.75rem;
}

.alert-success {
  background: rgba(40, 199, 111, 0.12);
  color: #1f9d57;
}

.alert-danger {
  background: rgba(255, 76, 81, 0.12);
  color: #d9393e;
}

.alert-warning {
  background: rgba(255, 159, 67, 0.14);
  color: #b06a1e;
}

.alert-info {
  background: rgba(0, 186, 209, 0.12);
  color: #0a97a9;
}

/* ---------- Pagination ---------- */
.pagination .page-link {
  border: none;
  border-radius: 0.5rem !important;
  margin: 0 0.15rem;
  color: #566a7f;
  transition: all 0.12s ease;
}

.pagination .page-link:hover {
  background: rgba(105, 108, 255, 0.1);
  color: #696cff;
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #696cff 0%, #5f61e6 100%);
  box-shadow: 0 2px 6px rgba(105, 108, 255, 0.35);
  color: #fff;
}

/* ---------- Nav tabs / pills ---------- */
.nav-pills .nav-link.active {
  background: linear-gradient(135deg, #696cff 0%, #5f61e6 100%);
  box-shadow: 0 2px 6px rgba(105, 108, 255, 0.3);
}

.nav-tabs .nav-link.active {
  color: #696cff;
  border-bottom: 2px solid #696cff;
}

/* ---------- Avatars ---------- */
.avatar img,
.avatar .rounded-circle {
  object-fit: cover !important;
}

.w-px-40.h-auto.rounded-circle,
img.w-px-40.h-auto {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover !important;
}

.w-px-100.h-px-100,
img.w-px-100 {
  object-fit: cover !important;
}

/* Softer scrollbars (WebKit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #cfd2e0;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #b5b9cc;
  background-clip: content-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}
