body {
  background: #f5f7fb;
  color: #1f2937;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.navbar-search {
  min-width: min(100%, 360px);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(37, 99, 235, 0.82)),
    #111827;
}

.auth-card {
  width: min(100%, 420px);
  border: 0;
  border-radius: 8px;
}

.stat-card,
.form-card {
  border-radius: 8px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.info-box,
.content-panel {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px;
  height: 100%;
}

.pre-line {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.table-text {
  max-width: 420px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 991.98px) {
  .navbar-search {
    min-width: 100%;
  }
}

/* ── Mobile stacked tables ── */
@media (max-width: 575.98px) {
  .table-responsive:has(.table-mobile-stacked) {
    overflow: visible;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .table-mobile-stacked thead {
    display: none;
  }

  .table-mobile-stacked,
  .table-mobile-stacked tbody,
  .table-mobile-stacked tr,
  .table-mobile-stacked td {
    display: block;
    width: 100%;
  }

  .table-mobile-stacked tbody tr {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
  }

  .table-mobile-stacked td {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border: none !important;
    border-bottom: 1px solid #f0f2f5 !important;
  }

  .table-mobile-stacked td:last-child {
    border-bottom: none !important;
  }

  .table-mobile-stacked td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.72rem;
    color: #6c757d;
    min-width: 90px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .table-mobile-stacked td[data-label=""] {
    justify-content: flex-end;
    gap: 0.4rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .table-mobile-stacked td[data-label=""] .btn-group {
    display: flex;
    width: 100%;
  }

  .table-mobile-stacked td[data-label=""] .btn-group .btn {
    flex: 1;
    text-align: center;
  }

  .table-mobile-stacked td.text-truncate {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }
}
