.profile-shell { max-width:620px; }
.profile-shell main { min-height:0; padding-bottom:40px; }
.header-actions { display:flex; align-items:center; gap:8px; }
.profile-card { background:var(--surface); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow); padding:22px; margin-bottom:16px; }
.profile-card h2 { margin-bottom:12px; }
.profile-card p + p { margin-top:8px; }
.profile-card small,.profile-note { color:var(--muted); }
.profile-identity { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.profile-identity > div { flex:1; min-width:150px; }
.profile-identity h2 { overflow-wrap:anywhere; }
.profile-identity .avatar { flex:none; }
.profile-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; }
.profile-actions .button { min-height:48px; }
.profile-form { display:grid; gap:12px; }
.profile-form label { display:block; }
.profile-form input,.profile-form select,.profile-card select,.admin-item select,.admin-item input,.admin-item textarea {
  display:block; width:100%; min-height:48px; margin-top:5px; padding:10px 12px;
  border:1px solid var(--line); border-radius:12px; background:var(--surface-soft);
  color:var(--text); font:inherit; min-width:0;
}
.profile-form input[aria-invalid="true"],.profile-form select[aria-invalid="true"] { border-color:var(--exam-text); }
.profile-form input[type="file"] { padding:10px; }
.profile-form input[type="checkbox"] { display:inline; width:auto; min-height:0; }
.profile-error { color:var(--exam-text); min-height:25px; }
.profile-good { color:var(--success-text); }
.profile-progress { width:100%; height:10px; margin:12px 0; accent-color:var(--brand); }
.profile-missing { padding-right:22px; margin:8px 0 14px; color:var(--muted); }
.profile-id { direction:ltr; unicode-bidi:isolate; user-select:all; font-variant-numeric:tabular-nums; }
.profile-private-note { padding:12px; border-radius:12px; background:var(--brand-soft); color:var(--brand); }
.profile-password-row { display:flex; align-items:center; gap:8px; }
.profile-password-row input { flex:1; }
.profile-danger { background:var(--exam-bg); color:var(--exam-text); border-color:var(--exam-line); }
.profile-photo-state { padding:12px; border-radius:12px; background:var(--surface-soft); margin:12px 0; }
.profile-photo-preview { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:14px 0; }
.profile-photo-preview figure { margin:0; min-width:0; }
.profile-photo-preview img { display:block; width:100%; height:180px; object-fit:contain; border:1px solid var(--line); border-radius:14px; background:var(--surface-soft); }
.profile-photo-preview img.crop { aspect-ratio:1; height:auto; object-fit:cover; }
.profile-photo-preview figcaption { color:var(--muted); font-size:12px; margin-top:6px; }
.profile-photo-current { display:flex; gap:12px; flex-wrap:wrap; margin:12px 0; }
.profile-photo-current img { width:96px; height:96px; border-radius:16px; object-fit:cover; }
.profile-links { display:grid; gap:10px; }
.profile-links a { justify-content:flex-start; }
.admin-tabs { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.admin-tabs button { flex:1 1 120px; }
.admin-tabs button[aria-selected="true"] { background:var(--brand); color:var(--on-brand); }
.admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.admin-item { min-width:0; padding:16px; border:1px solid var(--line); border-radius:18px; background:var(--surface); overflow-wrap:anywhere; }
.admin-item img { display:block; width:100%; aspect-ratio:1; object-fit:cover; border-radius:12px; margin-bottom:12px; }
.admin-item h2 { font-size:16px; }
.admin-item .profile-actions > * { flex:1 1 100px; }
.admin-item label { display:block; margin:10px 0; }
.admin-item ul { padding-right:20px; }
.admin-report { margin-bottom:12px; }
.admin-loading { color:var(--muted); }
.profile-admin-card { border:2px solid var(--brand); background:var(--brand-soft); }
.profile-admin-card .button { width:100%; justify-content:space-between; font-weight:800; }
.pending-badge { display:inline-flex; align-items:center; justify-content:center; min-width:28px; min-height:28px; padding:2px 8px; background:var(--surface); border-radius:999px; }
.profile-switch { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.profile-switch input[type="checkbox"] { width:22px; height:22px; min-height:22px; flex:none; margin:0; accent-color:var(--brand); }
.profile-switch:last-child { border-bottom:0; }
.quiet-pickers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.quiet-pickers label { display:grid; gap:6px; }
.quiet-pickers input { width:100%; min-height:48px; color:var(--text); background:var(--surface-soft); border:1px solid var(--line); border-radius:12px; padding:10px; font:inherit; direction:ltr; }
.report-row { padding:14px 0; border-bottom:1px solid var(--line); }
.report-row:last-child { border-bottom:0; }
.report-row header { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.report-status,.quarantine-badge { display:inline-block; padding:3px 9px; border-radius:999px; font-size:12px; background:var(--surface-soft); }
.report-status.confirmed { color:var(--success-text); background:var(--success-bg,var(--brand-soft)); }
.report-status.dismissed { color:var(--muted); }
.quarantine-badge { color:var(--exam-text); background:var(--exam-bg); }
.ops-skeleton { height:44px; margin:10px 0; border-radius:12px; background:var(--surface-soft); }
.admin-question { margin-bottom:16px; }
.admin-question .question-text,.admin-question .question-explanation { white-space:pre-wrap; margin:12px 0; overflow-wrap:anywhere; }
.admin-question img.question-image { width:100%; height:auto; aspect-ratio:auto; object-fit:contain; background:#fff; }
.admin-options { padding-right:22px; }
.admin-options li { white-space:pre-wrap; padding:10px; margin:6px 0; border:1px solid var(--line); border-radius:12px; }
.admin-options li.is-key { border-color:var(--success-text); background:var(--success-bg,var(--brand-soft)); }
.admin-note { white-space:pre-wrap; padding:10px; border-right:3px solid var(--line); background:var(--surface-soft); margin:6px 0; }
.admin-item textarea { resize:vertical; min-height:90px; }
.admin-item mjx-container { max-width:100%; overflow:auto; direction:ltr; }
.admin-data-card { margin-bottom:16px; }
.admin-table-wrap { max-width:100%; overflow:auto; margin:12px 0; }
.admin-table { width:100%; border-collapse:collapse; font-size:12px; }
.admin-table th,.admin-table td { padding:9px; border-bottom:1px solid var(--line); text-align:right; vertical-align:top; }
.admin-table th { color:var(--muted); }
.admin-table caption { text-align:right; font-weight:700; padding:8px 0; }
.admin-table time { white-space:nowrap; }
.analytics-stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0; }
.analytics-stat-grid > div { padding:12px 8px; border-radius:12px; background:var(--surface-soft); text-align:center; }
.analytics-stat-grid strong,.analytics-stat-grid small { display:block; }
.analytics-stat-grid strong { font-size:20px; }
.distribution-row { display:grid; grid-template-columns:70px minmax(0,1fr) 55px; gap:8px; align-items:center; margin:10px 0; }
.distribution-track { height:12px; border-radius:999px; background:var(--surface-soft); overflow:hidden; }
.distribution-track span { display:block; height:100%; background:var(--brand); border-radius:inherit; }
.hour-chart { display:block; width:100%; height:auto; color:var(--brand); margin:12px 0; direction:ltr; }
.hour-chart text { fill:var(--muted); font:11px Vazirmatn,sans-serif; }
.hour-chart .axis { stroke:var(--line); }
.pool-ready { color:var(--success-text); }
.release-preview { overflow-wrap:anywhere; }
.release-preview details { margin:12px 0; }
.question-lookup { display:flex; gap:8px; }
.question-lookup label { flex:1; min-width:0; margin:0; }
.question-lookup .button { align-self:end; }
@media(max-width:380px) {
  .profile-card { padding:16px; }
  .admin-grid { grid-template-columns:1fr; }
  .profile-identity { gap:12px; }
  .profile-photo-preview img { height:140px; }
  .analytics-stat-grid { grid-template-columns:1fr; }
  .question-lookup { flex-wrap:wrap; }
  .question-lookup .button { width:100%; }
}

.profile-avatar-grid{display:grid;grid-template-columns:repeat(5,minmax(56px,1fr));gap:8px;margin:8px 0 18px}
.profile-avatar-option{display:flex;align-items:center;justify-content:center;min-width:56px;min-height:64px;padding:2px;border:2px solid var(--line,#c4d2dc);border-radius:50%;background:var(--surface-soft,#eef3f6);cursor:pointer;aspect-ratio:1}
.profile-avatar-option .avatar{max-width:100%;pointer-events:none}
.profile-avatar-option[aria-pressed="true"]{border-color:var(--brand,#09678e);background:var(--brand-soft,#d7eef8);box-shadow:0 0 0 2px var(--brand,#09678e)}
.profile-avatar-option:focus-visible{outline:3px solid var(--brand,#09678e);outline-offset:4px}
.profile-avatar-option:disabled{opacity:.6;cursor:wait}
@media(max-width:399px){.profile-avatar-grid{grid-template-columns:repeat(3,minmax(56px,1fr))}}
.profile-avatar-option{aspect-ratio:1/1}
.profile-avatar-option .avatar{width:100%!important;height:100%!important;position:relative}
.profile-avatar-option .rh-preset img{inset:3%!important;width:94%!important;height:94%!important}
