/* =========================================================
   Progress photos · Reviews · Corrective
   Brand: black + yellow · light · mobile-first
   ========================================================= */

/* —— Shared empty / filter / actions —— */
.fx-empty {
  text-align: center;
  padding: 2.25rem 1.25rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px dashed rgba(18, 18, 26, 0.14);
}
.fx-empty strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.fx-empty p {
  margin: 0;
  color: #6b6c7c;
  font-size: 0.9rem;
  line-height: 1.65;
}
.fx-empty .btn { margin-top: 1rem; }

.fx-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(18, 18, 26, 0.08);
  box-shadow: 0 8px 24px rgba(18, 18, 26, 0.04);
}
.fx-filter-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #6b6c7c;
  margin-inline-end: 0.25rem;
}
.fx-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  color: #2a2a34;
  background: #f0f0f3;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.fx-chip:hover { background: #e8e8ee; color: #12121a; }
.fx-chip.is-on {
  background: #12121a;
  color: #ffdd08;
  border-color: #12121a;
}
.fx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.fx-actions .btn { white-space: nowrap; }

@media (max-width: 640px) {
  .page-head.fx-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-head.fx-head .fx-actions {
    width: 100%;
  }
  .page-head.fx-head .fx-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    justify-content: center;
  }
  .page-head.fx-head .fx-actions .btn-primary {
    flex: 1 1 100%;
  }
}

/* —— Gallery cards —— */
.photo-gallery-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.photo-gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(18, 18, 26, 0.1);
}
.photo-gallery-body { padding: 0.9rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.photo-gallery-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.photo-gallery-meta strong {
  font-size: 0.98rem;
  line-height: 1.35;
}
.photo-gallery-sub {
  font-size: 0.78rem;
  color: #6b6c7c;
  margin-bottom: 0.75rem;
  line-height: 1.55;
  word-break: break-word;
}
.photo-gallery-badge {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #fff8d6;
  color: #6b5a00;
  border: 1px solid rgba(255, 221, 8, 0.5);
  white-space: nowrap;
}
.photo-gallery-badge--corr {
  background: #ffe8e0;
  color: #8a3a1a;
  border-color: rgba(200, 80, 40, 0.35);
}
.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.photo-pair-cell,
.photo-single {
  display: block;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #ececf0;
  aspect-ratio: 3 / 4;
}
.photo-pair-cell img,
.photo-single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.photo-pair-cell:hover img,
.photo-single:hover img { transform: scale(1.03); }
.photo-pair-cell em {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(18, 18, 26, 0.78);
  color: #ffdd08;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
}
.photo-note {
  margin-top: 0.7rem;
  font-size: 0.86rem;
  line-height: 1.65;
  max-height: 5.2em;
  overflow: hidden;
  color: #4a4b58;
}
.photo-note p { margin: 0 0 0.3rem; }
.photo-gallery-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
}
.photo-gallery-footer .btn {
  border-radius: 10px;
  font-weight: 700;
}

@media (max-width: 420px) {
  .photo-gallery-footer .btn { flex: 1 1 auto; font-size: 0.8rem; }
}

/* —— Story create / detail —— */
.story-form-card {
  max-width: 820px;
  padding: 1.15rem 1.15rem 1.35rem;
}
.story-upload {
  position: relative;
  display: block;
  border-radius: 16px;
  border: 1.5px dashed rgba(18, 18, 26, 0.18);
  background: #fafafb;
  min-height: 160px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.story-upload:hover,
.story-upload:focus-within {
  border-color: #12121a;
  background: #fffef5;
}
.story-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.story-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 160px;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
}
.story-upload-inner strong { font-size: 0.95rem; }
.story-upload-inner span { font-size: 0.78rem; color: #6b6c7c; }
.story-upload-preview {
  display: none;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.story-upload.has-preview .story-upload-inner { display: none; }
.story-upload.has-preview .story-upload-preview { display: block; }
.story-upload-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(18, 18, 26, 0.82);
  color: #ffdd08;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
}
.story-quill {
  min-height: 200px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(18, 18, 26, 0.12);
  overflow: hidden;
}
.story-quill .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid rgba(18, 18, 26, 0.08);
  background: #fafafb;
  flex-wrap: wrap;
}
.story-quill .ql-container.ql-snow {
  border: 0;
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 1rem;
  min-height: 160px;
}
.story-quill .ql-editor {
  min-height: 160px;
  direction: rtl;
  text-align: right;
}
.story-form-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  position: sticky;
  bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  padding: 0.65rem;
  margin-inline: -0.35rem;
  border-radius: 14px;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(18, 18, 26, 0.06);
}
.story-form-foot .btn { flex: 1 1 auto; min-width: 120px; }

.story-detail-card { padding: 1.1rem; max-width: 900px; }
.story-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.story-detail-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #f0f0f3;
  color: #3a3a46;
}
.story-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.story-shot {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #ececf0;
}
.story-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story-shot span {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(18, 18, 26, 0.8);
  color: #ffdd08;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
}
.story-body {
  line-height: 1.8;
  font-size: 1.02rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #fafafb;
  border: 1px solid rgba(18, 18, 26, 0.06);
}
.story-body h1, .story-body h2, .story-body h3 {
  font-weight: 900;
  margin: 0.6rem 0 0.35rem;
}

@media (max-width: 520px) {
  .story-shots { gap: 0.4rem; }
  .story-shot { border-radius: 12px; }
}

/* —— Reviews —— */
.review-coach-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}
.review-coach-card {
  padding: 0.95rem 0.75rem;
  text-align: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(18, 18, 26, 0.07);
  box-shadow: 0 8px 22px rgba(18, 18, 26, 0.04);
}
.review-coach-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}
.review-stars {
  color: #d0d0d8;
  letter-spacing: 1px;
  font-size: 1.1rem;
  line-height: 1;
}
.review-stars .on { color: #e6b800; }
.review-stars--sm { font-size: 0.95rem; }
.review-coach-card .muted { font-size: 0.76rem; margin-top: 0.35rem; }

.review-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .review-list { grid-template-columns: 1fr 1fr; }
}
.review-card {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.review-card--hidden {
  opacity: 0.55;
  border-style: dashed;
}
.review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.review-card-body {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
  flex: 1;
  color: #2e2f3a;
  font-size: 0.94rem;
}
.review-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(18, 18, 26, 0.06);
}

.review-form-card {
  max-width: 640px;
  padding: 1.2rem;
}
.review-rate {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.review-rate label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 0.45rem 0.25rem;
  border-radius: 14px;
  border: 1.5px solid rgba(18, 18, 26, 0.1);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.review-rate label:has(input:checked) {
  border-color: #12121a;
  background: linear-gradient(160deg, #fffef5, #ffdd08);
  transform: translateY(-1px);
}
.review-rate input { position: absolute; opacity: 0; pointer-events: none; }
.review-rate .star { color: #e6b800; font-size: 1.15rem; line-height: 1; }

@media (max-width: 420px) {
  .review-rate { gap: 0.3rem; }
  .review-rate label { min-height: 56px; font-size: 0.82rem; border-radius: 12px; }
}

/* —— Corrective block on member details —— */
.corr-panel {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: linear-gradient(160deg, #fff9f6, #fff);
  border: 1px solid rgba(200, 90, 50, 0.18);
  box-shadow: 0 8px 22px rgba(18, 18, 26, 0.04);
}
.corr-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 800;
}
.corr-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.corr-stat {
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(18, 18, 26, 0.06);
}
.corr-stat em {
  display: block;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
  color: #8a6a5a;
  margin-bottom: 0.15rem;
}
.corr-stat b { font-size: 1.05rem; }
.corr-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #ffe8e0;
  color: #8a3a1a;
  margin-bottom: 0.5rem;
}
.corr-form .form-label { font-size: 0.8rem; font-weight: 750; }
.corr-form .btn { width: 100%; margin-top: 0.35rem; }

@media (min-width: 576px) {
  .corr-form .btn { width: auto; }
}

.member-track-actions .btn {
  border-radius: 12px;
  font-weight: 750;
}
@media (max-width: 640px) {
  .member-track-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
    font-size: 0.84rem;
    padding-inline: 0.65rem;
  }
}

/* —— Programs (برنامه شاگرد) —— */
.prog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.prog-stat {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(18, 18, 26, 0.07);
  text-align: center;
}
.prog-stat em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  color: #6b6c7c;
  margin-bottom: 0.15rem;
}
.prog-stat b { font-size: 1.25rem; }
.prog-stat--pending { background: #fff8e8; }
.prog-stat--done { background: #eefaf0; }

.prog-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.prog-card {
  display: block;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(18, 18, 26, 0.08);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 22px rgba(18, 18, 26, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.prog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(18, 18, 26, 0.08);
  color: inherit;
}
.prog-card.is-done { border-color: rgba(40, 160, 80, 0.25); }
.prog-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.35rem;
}
.prog-type {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f0f0f3;
  color: #3a3a46;
}
.prog-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fff3d0;
  color: #7a5a00;
}
.prog-status.on {
  background: #d9f5e0;
  color: #1a6b34;
}
.prog-title {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}
.prog-preview {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  color: #5b5c6e;
  line-height: 1.6;
}
.prog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.76rem;
  color: #8a8a98;
  font-weight: 650;
}

.prog-private {
  border: 1.5px dashed rgba(18, 18, 26, 0.18) !important;
  background: linear-gradient(165deg, #fafafb, #fff) !important;
}
.prog-private-badge {
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #12121a;
  color: #ffdd08;
  margin-bottom: 0.55rem;
}
.prog-notes { display: flex; flex-direction: column; gap: 0.55rem; }
.prog-note {
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(18, 18, 26, 0.06);
}
.prog-note-body {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0.35rem;
}

.prog-detail { max-width: 720px; }
.prog-detail-status {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  margin-bottom: 0.85rem;
}
.prog-detail-status.is-pending { background: #fff8e8; }
.prog-detail-status.is-done { background: #eefaf0; }
.prog-detail-status strong { font-size: 1rem; }
.prog-detail-status span { font-size: 0.84rem; color: #5b5c6e; }
.prog-detail-body { padding: 1.15rem; }
.prog-body-text {
  white-space: pre-wrap;
  line-height: 1.85;
  font-size: 1.02rem;
}
.prog-done-bar {
  position: sticky;
  bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(245, 245, 247, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(18, 18, 26, 0.06);
  z-index: 5;
}
.prog-coach-hint {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #f5f5f7;
  font-size: 0.88rem;
  font-weight: 650;
  color: #5b5c6e;
}

@media (max-width: 520px) {
  .prog-stats { gap: 0.4rem; }
  .prog-stat { padding: 0.6rem 0.45rem; }
  .prog-stat b { font-size: 1.1rem; }
}

/* Leaderboard corrective polish */
.lb-corrective {
  margin: 0.75rem 0.65rem 1rem;
}
@media (max-width: 640px) {
  .lb-corrective {
    margin-inline: 0.4rem;
    padding: 0.85rem 0.75rem;
    border-radius: 16px;
  }
  .lb-corrective-grid {
    grid-template-columns: 1fr;
  }
  .lb-corrective-card .lb-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
