/* ============================================
   Components CSS
   ============================================ */

/* ---- BUTTONS ---- */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--grad-gold-btn);
  color: #fff;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-gold);
  transition: all 0.2s ease;
}
.btn-gold:hover {
  opacity: 0.92;
  box-shadow: var(--shadow-gold-hover);
  transform: translateY(-1px);
}
.btn-gold.full-width { width: 100%; justify-content: center; }

.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  min-height: 44px;
  background: #fff;
  border: 2px solid var(--gold-400);
  color: var(--navy-600);
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-outline-gold svg { color: var(--gold-400); }
.btn-outline-gold:hover { background: #FEF9E7; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #fff;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-ghost:hover { background: var(--gray-50); border-color: var(--gray-300); }

.btn-view-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  min-height: 44px;
  border: 2px solid var(--gold-400);
  color: var(--gold-400);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-view-details:hover { background: #FEF9E7; }

.link-gold {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-400);
  cursor: pointer;
  transition: opacity 0.2s;
}
.link-gold:hover { opacity: 0.8; text-decoration: underline; }

.add-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-400);
  transition: color 0.2s;
}
.add-btn:hover { color: var(--gold-500); }

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.stat-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(169,129,48,0.4);
  transform: translateY(-4px);
}

.stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  transition: transform 0.3s;
}
.stat-card:hover .stat-icon-wrap { transform: scale(1.1); }

.stat-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.stat-badge.green  { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-badge.blue   { background: rgba(59,130,246,0.1);  color: var(--info); }
.stat-badge.purple { background: rgba(168,85,247,0.1);  color: #9333EA; }

.stat-number {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 14px; color: var(--gray-500); }

/* ---- ACTION ROW ---- */
.action-row {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

/* ---- CONTENT GRID ---- */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.content-left {}
.content-right { display: flex; flex-direction: column; gap: 24px; }

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy-600);
}
.section-underline {
  width: 48px; height: 3px;
  background: #D4AF37;
  margin-top: 8px;
  border-radius: 2px;
}

/* ---- CHILD CARD ---- */
.child-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}
.child-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(169,129,48,0.3);
}

.child-header {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .child-header {
    flex-direction: column;
    align-items: stretch;
  }

  .child-header .btn-view-details {
    align-self: flex-start;
  }
}

.child-left { display: flex; align-items: flex-start; gap: 16px; }

.child-avatar {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-500));
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--gold-400);
  flex-shrink: 0;
}

.child-name { font-size: 20px; font-weight: 600; color: var(--gray-800); margin-bottom: 8px; }

.child-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.grade-badge {
  padding: 6px 12px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.child-stat { font-size: 14px; color: var(--gray-500); }

/* Progress boxes */
.child-progress-grid {
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.progress-box {
  border-radius: 16px;
  padding: 20px;
}
.progress-box.bg-light { background: var(--gray-50); }
.progress-box.bg-navy-tint {
  background: rgba(30,58,95,0.03);
  border: 1px solid rgba(30,58,95,0.08);
}

.progress-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 16px;
}
.progress-box.bg-navy-tint .progress-box-title { color: var(--navy-600); }

.ml-auto { margin-left: auto; }

.subject-list { display: flex; flex-direction: column; gap: 12px; }

.subject-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}
.subject-left { display: flex; align-items: center; gap: 10px; }
.subject-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.subject-pct { font-size: 18px; font-weight: 700; }
.subject-pct.blue  { color: var(--info); }
.subject-pct.green { color: var(--success); }

.progress-bar-wrap {
  height: 8px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  margin-top: -4px;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease-out;
}
.progress-bar.blue  { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.progress-bar.green { background: linear-gradient(90deg, #10B981, #34D399); }

/* Teacher class items */
.class-list { display: flex; flex-direction: column; gap: 12px; }
.class-item {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.class-item-left { display: flex; align-items: center; gap: 12px; }
.class-name { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.class-teacher { font-size: 12px; color: var(--gray-500); }
.class-pct { font-size: 20px; font-weight: 700; color: var(--gold-400); }

/* ---- WIDGET CARDS ---- */
.widget-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: 24px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.widget-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy-600);
}

/* Activity */
.activity-list { display: flex; flex-direction: column; gap: 16px; }
.activity-item { display: flex; gap: 12px; align-items: flex-start; }
.activity-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.activity-text { font-size: 14px; color: var(--gray-700); line-height: 1.4; }
.activity-meta { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* Assignments */
.badge-red {
  padding: 4px 10px;
  background: #FEE2E2;
  color: #DC2626;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.assignment-list { display: flex; flex-direction: column; gap: 12px; }
.assignment-item {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid;
}
.assign-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.assign-name { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.assign-due  { font-size: 12px; font-weight: 500; }
.assign-meta { font-size: 12px; color: var(--gray-500); }

/* Quick Links */
.quick-links-card {
  border-radius: var(--r-xl);
  padding: 24px;
  background: linear-gradient(135deg, var(--navy-600) 0%, var(--navy-700) 100%);
}
.quick-links-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}
.quick-links-list { display: flex; flex-direction: column; gap: 12px; }
.quick-link-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  transition: background 0.2s;
}
.quick-link-btn:hover { background: rgba(255,255,255,0.15); }

/* ---- MODALS ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: modalIn 0.25s ease;
}

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

.modal-header {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--gray-100);
}
.modal-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.modal-title { font-size: 20px; font-weight: 700; color: var(--navy-600); font-family: var(--font-heading); }
.modal-subtitle { font-size: 14px; color: var(--gray-500); margin-top: 4px; }
.modal-close {
  margin-left: auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--gray-400);
  transition: all 0.2s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }

.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-desc { font-size: 14px; color: var(--gray-600); line-height: 1.6; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.form-label.mt { margin-top: 4px; }

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--gray-700);
  background: var(--gray-50);
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
}
.form-input:focus { border-color: var(--gold-400); box-shadow: 0 0 0 3px rgba(169,129,48,0.1); background: #fff; }

.demo-codes { font-size: 13px; color: var(--gray-500); }
.code-chips { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.code-chip {
  padding: 4px 12px;
  background: var(--gray-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--navy-600);
  cursor: pointer;
  transition: background 0.2s;
}
.code-chip:hover { background: var(--gray-200); }

.info-box {
  padding: 14px 16px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--info);
  line-height: 1.5;
}
