/* MockU Course Admin Tool - Custom Styles */

body {
  background-color: #f8f9fa;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.navbar-brand {
  font-weight: 600;
}

.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
}

.card-header {
  background-color: #e9ecef;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  color: #495057;
}

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5c636a;
  border-color: #565e64;
}

.table {
  margin-bottom: 0;
}

.table th {
  background-color: #f8f9fa;
  border-top: none;
  font-weight: 600;
  color: #495057;
  font-size: 0.875rem;
}

.table td {
  vertical-align: middle;
  font-size: 0.875rem;
}

.flash-message {
  border-radius: 0.375rem;
}

.alert-success {
  background-color: #d1e7dd;
  border-color: #badbcc;
  color: #0f5132;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c2c7;
  color: #842029;
}

.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
}

.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

input[readonly],
textarea[readonly],
select[readonly] {
  background-color: #f8f9fb;
  border-color: #dee2e6;
  border-style: dashed;
  color: #6c757d;
  cursor: not-allowed;
  box-shadow: inset 0 0 0 1px rgba(108, 117, 125, 0.2);
}

/* Logo styling */
.navbar-brand img {
  border-radius: 4px;
}

.override-status-text {
  color: #0d6efd;
  font-weight: 600;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.8rem;
  }

  .btn {
    font-size: 0.875rem;
  }
}

/* Action buttons styling */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.btn-outline-primary {
  color: #0d6efd;
  border-color: #0d6efd;
}

.btn-outline-primary:hover {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
}

.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

/* Container improvements */
.container {
  max-width: 1200px;
}

/* Form improvements */
.row.g-3 {
  margin-bottom: 1rem;
}

/* Table improvements */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.025);
}

/* Empty state styling */
.text-center {
  color: #6c757d;
  font-style: italic;
}

/* -----------------------------------------------------------------------
   Select loading state (setSelectLoading / setSelectReady in dashboard_utils)
   Loaded here (not panels.css) because base_dashboard.html only loads style.css.
   ----------------------------------------------------------------------- */
.select-loading-wrap {
  display: block;
}

.select-loading-wrap .select-loading-spinner {
  position: absolute;
  right: 2rem; /* leave room for the native select chevron */
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.select-loading-wrap select:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* --- Explore layout (shared data-view shell) --- */
.explore-sidebar {
  position: sticky;
  top: 1rem;
}
.explore-view-group {
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}
.explore-view-link {
  color: #343a40;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.7;
}
.explore-view-link:hover {
  background: #f1f3f5;
  color: #0b5ed7;
}
.explore-view-link.active {
  background: #e7f1ff;
  color: #0b5ed7;
  font-weight: 600;
}
.explore-view-link i {
  width: 1.1rem;
  text-align: center;
  color: #6c757d;
}
.explore-view-link.active i {
  color: #0b5ed7;
}

/* --- Institution dashboard (assessment cycle at a glance) --- */
.ih-card {
  border: 1px solid #e9ecef;
  border-radius: 12px;
}
.ih-hd {
  font-size: 0.9rem;
  font-weight: 600;
}
.ih-sub {
  font-size: 0.78rem;
  color: #6c757d;
}
.ih-term-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: #185fa5;
  background: #e6f1fb;
  border-radius: 999px;
  padding: 2px 12px;
}
.ih-pct {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}
.ih-progress {
  height: 10px;
  border-radius: 5px;
  background: #f1f3f5;
  overflow: hidden;
}
.ih-progress-fill {
  height: 100%;
  background: #198754;
  transition: width 0.4s ease;
}
.ih-chip {
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 2px 10px;
  text-decoration: none;
  white-space: nowrap;
}
.ih-chip:hover {
  filter: brightness(0.92);
}
.ih-chip-zero {
  opacity: 0.45;
}
.ih-due-late {
  color: #dc3545 !important;
  font-weight: 600;
}
.ih-due-closed {
  color: #198754 !important;
  font-weight: 600;
}
.ih-arow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #f1f3f5;
}
.ih-arow-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ih-arow-icon {
  font-size: 1.05rem;
  width: 1.3rem;
  text-align: center;
}
.ih-arow-title {
  font-size: 0.85rem;
  font-weight: 600;
}
.ih-clear {
  padding: 14px 0;
  font-size: 0.85rem;
  color: #198754;
}
.ih-hrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 42px 48px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #f1f3f5;
  text-decoration: none;
  color: inherit;
}
.ih-hrow:hover {
  background: #f8f9fa;
  color: inherit;
}
.ih-hrow-name {
  min-width: 0;
}
.ih-hrow-name .ih-arow-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ih-bar {
  height: 6px;
  border-radius: 3px;
  background: #f1f3f5;
  overflow: hidden;
}
.ih-bar-fill {
  height: 100%;
  background: #378add;
}
.ih-hrow-pct {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
}
.ih-hrow-delta {
  font-size: 0.75rem;
  text-align: right;
  white-space: nowrap;
}
.ih-momentum {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
}
.ih-mbar {
  flex: 1;
  background: #378add;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
}
.ih-pace {
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 10px;
}
.ih-load-failed {
  color: #dc3545;
}
