/* Academy Portal — layout & page extensions */

.main-content,
.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.main-content .page-content,
.app-content .main {
  flex: 1;
  max-width: none;
  padding: 1.5rem;
}

.topbar-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.admin-name {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 600;
}

.admin-email {
  font-size: 0.78rem;
  color: var(--muted);
}

.page-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-row .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 640px;
}

.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 140px) 1fr 72px;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.bar-label {
  font-size: 0.82rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #9b7dff);
  border-radius: 4px;
  min-width: 2px;
}

.bar-val {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
}

.insight-card h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.insight-card p,
.insight-card li {
  color: var(--text);
  font-size: 0.9rem;
}

.insight-card ul {
  padding-left: 1.2rem;
}

.avatar-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.avatar-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

.avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.drama-thumb {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.alert-success {
  background: rgba(61, 214, 140, 0.12);
  color: var(--success);
  border: 1px solid rgba(61, 214, 140, 0.25);
}

.alert-error {
  background: rgba(255, 107, 107, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.25);
}

.unread-row td {
  font-weight: 600;
}

.identity-doc {
  margin-top: 1rem;
}

.identity-img {
  max-width: 200px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.badge-suspended {
  background: rgba(255, 107, 107, 0.15);
  color: var(--danger);
}

.badge-processing {
  background: rgba(94, 179, 255, 0.15);
  color: var(--info);
}

.badge-pending-review,
.badge-pending_admin,
.badge-ai_reviewing {
  background: rgba(245, 197, 66, 0.15);
  color: var(--warning);
}

@media (max-width: 768px) {
  .main-content .page-content,
  .app-content .main {
    padding: 1rem;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .bar-val {
    text-align: left;
  }
}
