/* ── Base ── */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}
@media (min-width: 768px) {
  html { font-size: 15px; }
}
body {
  margin-bottom: 60px;
  background-color: #f4f6f9;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Focus rings ── */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ── Navbar ── */
.nav-hover { transition: background .2s; }
.nav-hover:hover { background: rgba(255,255,255,.15); }

/* ── Cards ── */
.card {
  border: none;
  border-radius: .75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: box-shadow .2s;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0;
}

/* ── Tables ── */
.table-card {
  background: #fff;
  border-radius: .75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  overflow: hidden;
}
.table-card .table {
  margin-bottom: 0;
}
.table-card .table thead {
  background: #f0f4f8;
}
.table-card .table thead th {
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #4a6785;
  border-bottom: 2px solid #e2e8f0;
  padding: .75rem 1rem;
}
.table-card .table tbody td {
  padding: .7rem 1rem;
  vertical-align: middle;
  border-color: #f0f4f8;
}
.table-card .table tbody tr:hover {
  background-color: #f8fafc;
}
.table-card .table tbody tr.table-primary {
  background-color: #e8f0fe !important;
}

/* ── Buttons ── */
.btn { border-radius: .5rem; font-weight: 500; }

.btn-primary {
  background: linear-gradient(135deg, #1e3a5f, #2d5f8a);
  border: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #16304f, #245070);
}

.btn-action {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  font-size: .85rem;
}

/* ── Stat cards ── */
.stat-card {
  background: #fff;
  border-radius: .75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  text-align: center;
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: .75rem;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e3a5f;
}
.stat-card .stat-label {
  font-size: .8rem;
  color: #6b7c93;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Accordion ── */
.accordion-item {
  border: none;
  border-radius: .75rem !important;
  margin-bottom: .5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
}
.accordion-button {
  font-weight: 600;
  color: #1e3a5f;
  background: #fff;
}
.accordion-button:not(.collapsed) {
  background: #f0f4f8;
  color: #1e3a5f;
  box-shadow: none;
}
.accordion-button:focus {
  box-shadow: none;
  border-color: #e2e8f0;
}

/* ── Alerts ── */
.alert {
  border: none;
  border-radius: .75rem;
}

/* ── Modals ── */
.modal-content {
  border: none;
  border-radius: .75rem;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
}
.modal-header {
  border-bottom: 1px solid #f0f4f8;
  background: #f8fafc;
  border-radius: .75rem .75rem 0 0;
}
.modal-footer {
  border-top: 1px solid #f0f4f8;
}

/* ── Badge ── */
.badge-stat {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .7rem;
  border-radius: .5rem;
  font-size: .8rem;
  font-weight: 500;
}

/* ── Image thumbnails ── */
.img-thumb-wrap {
  cursor: pointer;
  transition: transform .15s;
  display: inline-block;
}
.img-thumb-wrap:hover {
  transform: scale(1.05);
}
.img-thumb-wrap img {
  border-radius: .5rem;
  border: 1px solid #e2e8f0;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7c93;
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: .4;
}
