/*
 * APEXSCHOOL frontend styles
 * Scoped to component templates to avoid conflicts.
 */

.student-profile,
.teacher-dashboard {
  --uf-primary: var(--apex-primary, var(--primary-color, #1e5aa5));
  --uf-accent: var(--apex-accent, #f5b301);
  --uf-surface: var(--apex-surface, #ffffff);
  --uf-text: var(--apex-text, #1f2937);
  --uf-muted: var(--apex-muted, #6b7280);
  --uf-border: var(--apex-border, rgba(15, 23, 42, 0.12));
  --uf-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  color: var(--uf-text);
}

.student-profile .page-header,
.teacher-dashboard .page-header {
  margin: 0 0 1.5rem 0;
}

.student-profile h1,
.teacher-dashboard h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 0;
}

/* Cards */
.student-profile .card {
  background: var(--uf-surface);
  border: 1px solid var(--uf-border);
  border-radius: 16px;
  box-shadow: var(--uf-shadow);
  overflow: hidden;
}

.student-profile .card-header,
.student-profile .card-header.bg-primary,
.student-profile .card-header.bg-info,
.student-profile .card-header.bg-success,
.student-profile .card-header.bg-warning,
.student-profile .card-header.bg-secondary {
  background: #ffb703 !important;
  color: #1f2937 !important;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.student-profile .card-body {
  padding: 0.9rem 1.1rem;
}

.student-profile strong {
  color: var(--uf-text);
}

.student-profile .profile-compact .col-md-6,
.student-profile .profile-compact .col-12 {
  margin-bottom: 0.35rem;
}

.student-profile .profile-row {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  line-height: 1.35;
}

.student-profile .profile-row-block {
  display: block;
}

.student-profile .profile-label {
  font-weight: 600;
  color: var(--uf-text);
}

.student-profile .profile-value {
  color: var(--uf-text);
}

.student-profile .text-muted {
  color: var(--uf-muted) !important;
}

/* Table */
.teacher-dashboard .table-responsive {
  border-radius: 16px;
  box-shadow: var(--uf-shadow);
  background: var(--uf-surface);
  border: 1px solid var(--uf-border);
  overflow: hidden;
}

.teacher-dashboard table.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.teacher-dashboard .table thead th {
  background: var(--uf-primary);
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.9rem 1rem;
}

.teacher-dashboard .table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--uf-border);
  vertical-align: top;
}

.teacher-dashboard .table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.02);
}

.teacher-dashboard .table tbody tr:hover {
  background: rgba(30, 90, 165, 0.06);
}

.teacher-dashboard .table-dark {
  background: none;
}

.teacher-dashboard .btn.btn-primary {
  background: var(--uf-primary);
  border: none;
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.teacher-dashboard .btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(30, 90, 165, 0.2);
}

/* Calendar modal */
.apexschool-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.apexschool-modal__content {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  width: min(520px, 92vw);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}

.apexschool-modal__title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.apexschool-modal__body p {
  margin: 0.35rem 0;
}

.apexschool-modal__actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.apexschool-modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* Lists */
.teacher-dashboard ul,
.student-profile ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* Alerts */
.student-profile .alert,
.teacher-dashboard .alert {
  border-radius: 14px;
  border: 1px solid var(--uf-border);
  background: rgba(30, 90, 165, 0.06);
  color: var(--uf-text);
}
