/* Shared UI styles for student and admin pages */
:root {
  --portal-primary: #0d6efd;
  --portal-primary-dark: #0b5ed7;
  --portal-bg: #f4f7fb;
  --portal-border: #dfe6ef;
  --portal-text: #213547;
}

body {
  background: radial-gradient(circle at top right, #e9f2ff 0%, var(--portal-bg) 42%, #f8fafc 100%);
  color: var(--portal-text);
}

.page-shell {
  padding-bottom: 2rem;
}

.panel-card {
  border: 1px solid var(--portal-border);
  border-radius: 0.9rem;
  box-shadow: 0 6px 20px rgba(15, 35, 95, 0.08);
}

.panel-card .card-header {
  border-bottom: 0;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: #fff;
}

.portal-header {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  box-shadow: 0 6px 18px rgba(13, 110, 253, 0.24);
}

.portal-title {
  letter-spacing: 0.2px;
  font-weight: 700;
}

.portal-subtitle {
  color: #5d6d7e;
}

.navbar-blue {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: #fff;
}

.navbar-blue .nav-link {
  color: #eaf2ff;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.5rem 0.9rem;
  transition: all 0.2s ease;
}

.navbar-blue .nav-link:hover,
.navbar-blue .nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.navbar-blue .nav-link.active {
  color: #0a58ca !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-user-badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
}

.filter-card {
  border: 1px solid var(--portal-border);
  border-radius: 0.8rem;
  background: #fff;
}

.kpi-card {
  border: 1px solid var(--portal-border);
  border-radius: 0.75rem;
  background: #fff;
  height: 100%;
}

.kpi-card .kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c7a89;
}

.kpi-card .kpi-value {
  font-size: 1.28rem;
  font-weight: 700;
}

.kpi-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f1ff;
  color: #0a58ca;
}

.table thead th {
  white-space: nowrap;
  font-size: 0.86rem;
}

.table tbody td {
  font-size: 0.9rem;
}

th.documents-header {
  text-align: center !important;
}

.btn-doc {
  min-width: 140px;
}

.alert {
  border: 0;
  border-radius: 0.7rem;
}

.upload-instructions code {
  color: #0a58ca;
  background: #e8f0ff;
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
}

.status-list .list-group-item {
  border: 0;
  border-bottom: 1px solid #edf1f6;
  padding: 0.6rem 0.9rem;
}

.status-list .list-group-item:last-child {
  border-bottom: 0;
}

.section-title {
  font-weight: 700;
  border-left: 4px solid var(--portal-primary);
  padding-left: 0.7rem;
  margin-bottom: 0.9rem;
  color: #0a58ca;
}

.select2-container {
  z-index: 9999;
}

.login-panel {
  max-width: 420px;
}

.select2-container .select2-selection--single {
  height: calc(2.25rem + 2px) !important;
  border: 1px solid #ced4da !important;
  border-radius: 0.375rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 2.15rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(2.25rem + 2px) !important;
}

@media (max-width: 991.98px) {
  .navbar-blue .container {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .navbar-blue .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  .navbar-blue .nav-link {
    white-space: nowrap;
  }
}

@media (max-width: 767.98px) {
  .portal-header .container,
  .navbar-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .kpi-card .kpi-value {
    font-size: 1.1rem;
  }
}
