/* ==========================================================================
   Linus LetterPro - Parental Gate & Dashboard CSS
   ========================================================================== */

/* Math Gate Modal */
.parental-gate-card {
  max-width: 440px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gate-header .gate-icon {
  font-size: 44px;
}

.gate-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 6px 0;
}

.gate-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.gate-math-problem {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 32px;
  font-weight: 900;
  color: #FBBF24;
  margin: 12px 0;
}

.gate-input {
  width: 90px;
  height: 54px;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  border-radius: 14px;
  border: 2px solid #3B82F6;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  outline: none;
}

.gate-input.shake {
  animation: shake 0.35s ease;
  border-color: #EF4444;
}

.gate-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ==========================================================================
   Parental Dashboard Dialog
   ========================================================================== */

.parental-dashboard-card {
  max-width: 860px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.dashboard-title-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-title-box .dash-icon {
  font-size: 34px;
}

.dashboard-title-box h2 {
  font-size: 20px;
  font-weight: 800;
}

.dashboard-title-box p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Tabs */
.dash-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  overflow-x: auto;
}

.dash-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.dash-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.dash-tab.active {
  background: #3B82F6;
  color: white;
}

.dash-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 4px;
}

.dash-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Analytics Stats Grid */
.analytics-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.overview-stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.overview-stat-card .stat-number {
  font-size: 26px;
  font-weight: 900;
  color: #38BDF8;
}

.overview-stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Bar Chart */
.chart-section h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
}

.progress-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #3B82F6);
  border-radius: 8px;
  transition: width 0.4s ease;
}

/* Strengths & Weaknesses */
.analytics-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .analytics-split-row {
    grid-template-columns: 1fr;
  }
}

.analysis-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
}

.analysis-box h4 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.pill-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pill-warning {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.empty-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* Category Toggle Cards */
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.toggle-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #3B82F6;
  cursor: pointer;
}

.toggle-label {
  font-size: 14px;
  font-weight: 700;
}

/* Setting Groups */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-group label {
  font-size: 15px;
  font-weight: 800;
}

.setting-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.track-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: #3B82F6;
}

.cert-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 14px;
  border-radius: 16px;
  margin-top: 8px;
}

.input-inline {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin-left: 8px;
}
