/**
 * Supervision Module Styles
 * Parent/Tutor/Professor supervision system
 *
 * Aligned with TalibHub design system (Tikrar, Allah Names style)
 */

/* =============================================================================
   1. Container & Layout
   ============================================================================= */

.supervision-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: calc(100vh - 80px);
}

.supervision-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 1rem;
  color: rgba(39, 76, 119, 0.7);
}

.supervision-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color, #a3cef1);
  border-top-color: var(--primary-color, #274c77);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* =============================================================================
   2. Header (Tikrar-aligned with centered icon)
   ============================================================================= */

.supervision-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1rem 0;
}

.supervision-header-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(39, 76, 119, 0.25);
}

.supervision-header-icon svg {
  width: 32px;
  height: 32px;
  stroke: white;
}

.supervision-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color, #274c77);
  margin: 0;
  letter-spacing: -0.02em;
}

.supervision-subtitle {
  margin: 0.75rem 0 0;
  font-size: 1.1rem;
  color: rgba(39, 76, 119, 0.7);
  font-weight: 400;
}

/* =============================================================================
   3. Tab Navigation
   ============================================================================= */

.supervision-tabs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary-color, #274c77);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
}

.tab-btn:hover:not(.active) {
  background: rgba(39, 76, 119, 0.08);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3);
}

.tab-btn svg {
  width: 18px;
  height: 18px;
}

/* =============================================================================
   4. Action Buttons
   ============================================================================= */

.supervisor-actions,
.child-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 76, 119, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color, #274c77);
  border: 2px solid var(--primary-color, #274c77);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--primary-color, #274c77);
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color, #274c77);
  border: 2px solid rgba(39, 76, 119, 0.3);
}

.btn-outline:hover {
  border-color: var(--primary-color, #274c77);
  background: rgba(39, 76, 119, 0.05);
}

.btn-sm {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

.btn-sm svg {
  width: 16px;
  height: 16px;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

/* =============================================================================
   5. Children Grid & Cards
   ============================================================================= */

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.child-card,
.supervisor-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.08);
}

.child-card:hover,
.supervisor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(39, 76, 119, 0.15);
  border-color: var(--secondary-color, #6096ba);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.child-avatar,
.supervisor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.2);
}

.child-avatar svg,
.supervisor-avatar svg {
  width: 26px;
  height: 26px;
  color: white;
  stroke: white;
}

.child-info,
.supervisor-info {
  flex: 1;
  min-width: 0;
}

.child-info h3,
.supervisor-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.375rem;
  color: var(--primary-color, #274c77);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.child-type,
.supervisor-type {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--secondary-color, #6096ba);
  background: rgba(96, 150, 186, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.child-label {
  display: block;
  font-size: 0.8125rem;
  color: rgba(39, 76, 119, 0.6);
  margin-top: 0.375rem;
}

.permissions-count {
  display: block;
  font-size: 0.75rem;
  color: rgba(39, 76, 119, 0.5);
  margin-top: 0.25rem;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(39, 76, 119, 0.08);
}

.card-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
}

/* View Statistics - Primary filled */
.card-actions .btn-primary {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, #1a3a5c 100%);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.25);
}

.card-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.35);
}

/* Permissions - Secondary filled (lighter) */
.card-actions .btn-secondary {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  color: var(--primary-color, #274c77);
  border: 1px solid rgba(39, 76, 119, 0.15);
  box-shadow: 0 1px 4px rgba(39, 76, 119, 0.1);
}

.card-actions .btn-secondary:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.15);
}

/* =============================================================================
   6. Supervisors List
   ============================================================================= */

.supervisors-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.supervisor-card {
  cursor: default;
}

/* =============================================================================
   7. Child Stats Panel (Slide-in)
   ============================================================================= */

.child-stats-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: -8px 0 40px rgba(39, 76, 119, 0.15);
  z-index: 100;
  overflow-y: auto;
  padding: 2rem;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.close-panel-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(39, 76, 119, 0.08);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--primary-color, #274c77);
}

.close-panel-btn:hover {
  background: rgba(39, 76, 119, 0.15);
  transform: scale(1.05);
}

.close-panel-btn svg {
  width: 20px;
  height: 20px;
}

#child-stats-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
  margin-bottom: 2rem;
  padding-right: 3rem;
}

/* Loading spinner for stats panel */
#child-stats-content .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(39, 76, 119, 0.1);
  border-top-color: var(--primary-color, #274c77);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 4rem auto;
}

#child-stats-content .spinner::after {
  content: "Loading stats...";
  display: block;
  text-align: center;
  margin-top: 60px;
  font-size: 0.875rem;
  color: rgba(39, 76, 119, 0.6);
  white-space: nowrap;
}

/* =============================================================================
   8. Stats Grid (Module Cards) - Full Width Horizontal Layout
   ============================================================================= */

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Stats Card - Horizontal Full Width Layout */
.stats-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(39, 76, 119, 0.1);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.06);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

/* Module title - spans full width */
.stats-card h4 {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(39, 76, 119, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-card h4 svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* Left column - main value */
.stat-main {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color, #274c77);
  line-height: 1;
  white-space: nowrap;
}

.stat-label {
  font-size: 0.625rem;
  color: rgba(39, 76, 119, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

/* Right column - details info */
.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: rgba(39, 76, 119, 0.65);
}

.stat-details span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-details svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.stat-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.5625rem;
}

.stat-breakdown span {
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-weight: 600;
}

.stats-actions {
  display: flex;
  gap: 0.75rem;
}

/* =============================================================================
   8.1. Stats Sections
   ============================================================================= */

.stats-section {
  margin-bottom: 2rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(39, 76, 119, 0.1);
}

.section-title svg {
  width: 18px;
  height: 18px;
}

.stats-card h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(39, 76, 119, 0.7);
  margin: 0 0 0.75rem 0;
}

.stats-card h4 svg {
  width: 16px;
  height: 16px;
}

.stat-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(39, 76, 119, 0.08);
  font-size: 0.75rem;
  color: rgba(39, 76, 119, 0.6);
}

.stat-details span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-details svg {
  width: 12px;
  height: 12px;
}

.stat-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
}

.stat-breakdown span {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 500;
}

.stat-breakdown .strong {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.stat-breakdown .good {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.stat-breakdown .moderate {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.stat-breakdown .weak {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

/* Tikrar breakdown colors */
.tikrar-breakdown .hifdh {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

.tikrar-breakdown .liaison {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.tikrar-breakdown .revision {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.tikrar-breakdown .mastered {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

/* Inline revision stats (due today, due soon, never reviewed) */
.stat-revision-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.5625rem;
}

.stat-revision-inline span {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-weight: 600;
}

.stat-revision-inline svg {
  width: 9px;
  height: 9px;
}

.stat-revision-inline .due-today {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.stat-revision-inline .due-soon {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.stat-revision-inline .never-reviewed {
  background: rgba(107, 114, 128, 0.12);
  color: #4b5563;
}

/* =============================================================================
   8.2. Revision Cards (Legacy - can be removed if unused)
   ============================================================================= */

.revision-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.revision-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid rgba(39, 76, 119, 0.08);
}

.revision-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
  margin: 0 0 1rem 0;
}

.revision-stats {
  display: flex;
  gap: 1rem;
}

.revision-item {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(39, 76, 119, 0.04);
}

.revision-item.due-today {
  background: rgba(239, 68, 68, 0.1);
}

.revision-item.due-soon {
  background: rgba(245, 158, 11, 0.1);
}

.revision-item.never-reviewed {
  background: rgba(107, 114, 128, 0.1);
}

.rev-count {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
}

.revision-item.due-today .rev-count {
  color: #dc2626;
}

.revision-item.due-soon .rev-count {
  color: #d97706;
}

.rev-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(39, 76, 119, 0.6);
  margin-top: 0.25rem;
}

/* =============================================================================
   8.3. Tasks List
   ============================================================================= */

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(39, 76, 119, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.task-item:hover {
  background: white;
  border-color: rgba(39, 76, 119, 0.15);
}

.task-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.task-item.pending svg {
  color: rgba(39, 76, 119, 0.4);
}

.task-item.completed svg {
  color: #10b981;
}

.task-item.completed .task-name {
  text-decoration: line-through;
  color: rgba(39, 76, 119, 0.5);
}

.task-name {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--primary-color, #274c77);
}

.task-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.task-priority.high {
  background: #ef4444;
}

.task-priority.medium {
  background: #f59e0b;
}

.task-priority.low {
  background: #10b981;
}

/* =============================================================================
   9. Empty State
   ============================================================================= */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(39, 76, 119, 0.1);
  margin-top: 2rem;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: rgba(39, 76, 119, 0.3);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
  margin-bottom: 0.75rem;
}

.empty-state p {
  color: rgba(39, 76, 119, 0.6);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =============================================================================
   10. Modal
   ============================================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(39, 76, 119, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(39, 76, 119, 0.25);
  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(39, 76, 119, 0.1);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--primary-color, #274c77);
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(39, 76, 119, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s ease;
  color: var(--primary-color, #274c77);
}

.modal-close:hover {
  background: rgba(39, 76, 119, 0.15);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 1.5rem;
}

.modal-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modal-tab {
  flex: 1;
  padding: 0.875rem;
  border: 2px solid rgba(39, 76, 119, 0.15);
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-color, #274c77);
  transition: all 0.2s ease;
}

.modal-tab:hover:not(.active) {
  border-color: var(--secondary-color, #6096ba);
  background: rgba(96, 150, 186, 0.05);
}

.modal-tab.active {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: white;
  border-color: transparent;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
}

/* =============================================================================
   11. Forms
   ============================================================================= */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color, #274c77);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(39, 76, 119, 0.15);
  border-radius: 12px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-color, #274c77);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color, #6096ba);
  background: white;
  box-shadow: 0 0 0 4px rgba(96, 150, 186, 0.15);
}

.form-group input::placeholder {
  color: rgba(39, 76, 119, 0.4);
}

.form-group small {
  display: block;
  font-size: 0.75rem;
  color: rgba(39, 76, 119, 0.5);
  margin-top: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-error {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* =============================================================================
   12. Invitation Result
   ============================================================================= */

.invitation-code-container,
.invitation-link-container {
  margin-bottom: 1.5rem;
}

.invitation-code-container p,
.invitation-link-container p {
  font-size: 0.875rem;
  color: rgba(39, 76, 119, 0.7);
  margin-bottom: 0.75rem;
}

.invitation-code-container code {
  display: block;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.05) 0%, rgba(96, 150, 186, 0.1) 100%);
  padding: 1.25rem;
  border-radius: 12px;
  font-size: 1.375rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  text-align: center;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  user-select: all;
  color: var(--primary-color, #274c77);
  font-weight: 600;
  border: 2px dashed rgba(39, 76, 119, 0.2);
}

.invitation-link-container input {
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

/* =============================================================================
   13. Permissions
   ============================================================================= */

.permissions-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.permission-toggle {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(39, 76, 119, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.permission-toggle:hover {
  background: rgba(96, 150, 186, 0.08);
  border-color: var(--secondary-color, #6096ba);
}

.permission-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color, #274c77);
}

.permission-toggle span {
  font-size: 0.9375rem;
  color: var(--primary-color, #274c77);
}

/* =============================================================================
   14. Audit Log
   ============================================================================= */

.audit-log-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.audit-log-table th,
.audit-log-table td {
  padding: 1rem;
  text-align: left;
}

.audit-log-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(39, 76, 119, 0.5);
  font-weight: 600;
  border-bottom: 2px solid rgba(39, 76, 119, 0.1);
}

.audit-log-table td {
  font-size: 0.875rem;
  color: var(--primary-color, #274c77);
  border-bottom: 1px solid rgba(39, 76, 119, 0.08);
}

.audit-log-table tr:hover td {
  background: rgba(96, 150, 186, 0.05);
}

.audit-log-content .empty-message {
  text-align: center;
  color: rgba(39, 76, 119, 0.5);
  padding: 3rem;
}

/* =============================================================================
   15. Invitation Details
   ============================================================================= */

.invitation-details {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(163, 206, 241, 0.2) 100%);
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(39, 76, 119, 0.1);
}

.invitation-details p {
  margin: 0.625rem 0;
  color: var(--primary-color, #274c77);
}

.invitation-details strong {
  color: var(--primary-color, #274c77);
}

/* =============================================================================
   16. Animations
   ============================================================================= */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =============================================================================
   17. Responsive
   ============================================================================= */

@media (max-width: 768px) {
  .supervision-page {
    padding: 1rem;
  }

  .supervision-header h1 {
    font-size: 1.5rem;
  }

  .supervision-tabs {
    flex-direction: column;
    max-width: 100%;
  }

  .tab-btn {
    justify-content: center;
  }

  .supervisor-actions,
  .child-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .children-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .child-stats-panel {
    max-width: 100%;
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .supervision-header-icon {
    width: 56px;
    height: 56px;
  }

  .supervision-header-icon svg {
    width: 28px;
    height: 28px;
  }

  .supervision-header h1 {
    font-size: 1.375rem;
  }

  .child-avatar,
  .supervisor-avatar {
    width: 44px;
    height: 44px;
  }

  .child-avatar svg,
  .supervisor-avatar svg {
    width: 22px;
    height: 22px;
  }
}
