/* ═══════════════════════════════════════════════════════════════════
   restroom.css — متابعة نظافة دورات المياه
   (إنشاء + جدول + صفحة عرض/تعديل)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero (overview banner) ───────────────────────────────── */
.gg-hero {
  background: linear-gradient(135deg,#0ea5e9 0%,#0369a1 100%);
  color: #fff; padding: 1.2rem 1.5rem;
  border-radius: 16px; margin-bottom: 1.2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  box-shadow: 0 8px 24px rgba(3,105,161,.25);
}
.gg-hero h2 { margin: 0 0 .3rem; font-size: 1.3rem; font-weight: 800; }
.gg-hero p  { margin: 0; opacity: .92; font-size: .85rem; }
.gg-hero-btn {
  background: #fff; color: #0369a1; border: 0;
  padding: .65rem 1.3rem; border-radius: 10px;
  font-family: inherit; font-weight: 800; font-size: .9rem;
  cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: .4rem;
}
.gg-hero-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }

/* ── Pills ────────────────────────────────────────────────── */
.gg-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
}
.gg-pill--mina      { background: #FEE2E2; color: #166534; }
.gg-pill--muzdalifa { background: #ede9fe; color: #5b21b6; }
.gg-pill--arafat    { background: #fef3c7; color: #92400e; }

.gg-pill--clean  { background: #FEE2E2; color: #166534; }
.gg-pill--medium { background: #fef3c7; color: #92400e; }
.gg-pill--bad    { background: #fee2e2; color: #991b1b; }

/* ── Score badge (color by avg) ───────────────────────────── */
.gg-score {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .85rem; border-radius: 999px;
  font-weight: 800; font-size: .82rem;
}
.gg-score--excellent { background: #FEE2E2; color: #166534; }
.gg-score--good      { background: #fef3c7; color: #92400e; }
.gg-score--poog      { background: #fee2e2; color: #991b1b; }
.gg-score .num { font-size: .95rem; }

/* ── Modal ────────────────────────────────────────────────── */
.gg-modal {
  display: none; position: fixed; inset: 0; z-index: 9000;
  background: rgba(15,23,42,.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
.gg-modal.show { display: flex; }
.gg-modal-card {
  background: #fff; border-radius: 18px; width: 100%; max-width: 540px;
  max-height: 92vh; overflow-y: auto; padding: 1.6rem 1.7rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: ggSlide .3s ease;
}
@keyframes ggSlide { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform:none; } }

.gg-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.gg-modal-title { font-size: 1.15rem; font-weight: 800; color: #0369a1; }
.gg-modal-close {
  background: none; border: 0; font-size: 1.5rem; cursor: pointer;
  color: #64748b; line-height: 1;
}
.gg-modal-close:hover { color: #0f172a; }

.rr-camp-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem;
  margin-bottom: 1rem;
}
.rr-camp-card {
  border: 2px solid #e2e8f0; border-radius: 14px;
  padding: 1.1rem .8rem; text-align: center; cursor: pointer;
  background: #fff; transition: all .15s; user-select: none;
}
.rr-camp-card:hover { border-color: #0ea5e9; transform: translateY(-2px); }
.rr-camp-card.selected {
  border-color: #0369a1; background: #f0f9ff;
  box-shadow: 0 4px 12px rgba(3,105,161,.2);
}
.rr-camp-card .ico { font-size: 1.8rem; }
.rr-camp-card .lbl { font-weight: 800; margin-top: .35rem; color: #0f172a; font-size: .9rem; }

.gg-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: .8rem; }
@media (max-width: 480px) { .gg-form-row { grid-template-columns: 1fr; } }
.gg-form-group { display: flex; flex-direction: column; gap: .35rem; }
.gg-form-group label { font-size: .82rem; font-weight: 700; color: #334155; }
.gg-form-group input,
.gg-form-group select,
.gg-form-group textarea {
  padding: .6rem .8rem; border: 1px solid #e2e8f0; border-radius: 9px;
  font-family: inherit; font-size: .88rem; background: #fafbfc;
}
.gg-form-group input:focus,
.gg-form-group select:focus,
.gg-form-group textarea:focus {
  outline: none; border-color: #0369a1; background: #fff;
}

.gg-modal-footer {
  display: flex; justify-content: space-between; gap: .5rem;
  margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid #eef2f6;
}
.rr-btn {
  padding: .6rem 1.2rem; border-radius: 10px; border: 0;
  font-family: inherit; font-weight: 700; font-size: .85rem; cursor: pointer;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: .35rem;
}
.rr-btn--ghost   { background: #f1f5f9; color: #0f172a; }
.rr-btn--ghost:hover { background: #e2e8f0; }
.rr-btn--primary { background: linear-gradient(135deg,#0ea5e9,#0369a1); color: #fff; }
.rr-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(3,105,161,.3); }
.rr-btn--success { background: linear-gradient(135deg,#dc3838,#B91C1C); color: #fff; }
.rr-btn--success:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5,150,105,.3); }
.rr-btn--reject { background: linear-gradient(135deg,#f87171,#dc2626); color: #fff; }
.rr-btn--reject:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,38,38,.3); }
.rr-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ── Status banner (في صفحة التقرير) ───────────────────── */
.gg-status-banner {
  border-radius: 12px;
  padding: .85rem 1.1rem;
  margin: -.4rem 0 1.2rem;
  font-family: 'Cairo', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  border-right: 4px solid currentColor;
}
.gg-status-banner--pending  { background: #fffbeb; color: #92400e; border-color: #f59e0b; }
.gg-status-banner--approved { background: #FEF2F2; color: #7A1C1C; border-color: #dc3838; }
.gg-status-banner--rejected { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.gg-banner-head { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.gg-banner-icon { font-size: 1.2rem; }
.gg-banner-by   { color: inherit; opacity: .85; font-weight: 600; font-size: .82rem; }
.gg-banner-note { margin-top: .55rem; padding-top: .55rem; border-top: 1px dashed currentColor; font-weight: 500; font-size: .85rem; opacity: .9; }

/* ── Report (view/edit) ───────────────────────────────────── */
.gg-report { max-width: 1000px; margin: 0 auto; padding: 1.5rem 1.2rem 4rem; }

.gg-report-hero {
  background: linear-gradient(135deg,#0ea5e9 0%,#0c4a6e 130%);
  color: #fff; padding: 1.6rem; border-radius: 18px; margin-bottom: 1.2rem;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem;
  align-items: center;
}
@media (max-width: 720px) {
  .gg-report-hero { grid-template-columns: 1fr; text-align: center; }
}
.gg-report-hero-icon {
  width: 70px; height: 70px; border-radius: 16px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
}
.gg-report-hero h1 { margin: 0 0 .25rem; font-size: 1.4rem; font-weight: 800; }
.gg-report-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.gg-report-meta .chip {
  background: rgba(255,255,255,.18); padding: .35rem .8rem;
  border-radius: 999px; font-size: .78rem; font-weight: 700;
}
.gg-report-avg {
  text-align: center; padding: .8rem 1rem;
  background: rgba(255,255,255,.12); border-radius: 14px; min-width: 130px;
}
.gg-report-avg .num { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.gg-report-avg .lbl { font-size: .75rem; opacity: .9; margin-top: .35rem; font-weight: 700; }

/* ── Sections ─────────────────────────────────────────────── */
.gg-section {
  background: #fff; border: 1px solid #eef2f6; border-radius: 16px;
  padding: 1.2rem 1.4rem; margin-bottom: 1rem;
}
.gg-section-title {
  font-size: 1rem; font-weight: 800; color: #0f172a;
  display: flex; align-items: center; gap: .5rem;
  padding-bottom: .7rem; border-bottom: 2px solid #e0f2fe;
  margin-bottom: 1rem;
}

/* Ratings — 1..5 selector */
.gg-rating-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .8rem; align-items: center;
  padding: .7rem 0;
  border-bottom: 1px dashed #e2e8f0;
}
.gg-rating-row:last-child { border-bottom: 0; }
.gg-rating-label { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: #1e293b; font-size: .92rem; }
.gg-rating-label .ico { font-size: 1.1rem; }

.gg-stars { display: inline-flex; gap: .25rem; }
.gg-stag {
  width: 32px; height: 32px;
  border-radius: 8px; border: 1px solid #e2e8f0;
  background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem; color: #cbd5e1;
  transition: all .12s; user-select: none;
  font-family: inherit; font-weight: 800;
}
.gg-stag:hover { border-color: #0ea5e9; }
.gg-stag.active { background: linear-gradient(135deg,#facc15,#eab308); border-color: #ca8a04; color: #fff; box-shadow: 0 2px 6px rgba(202,138,4,.3); }
.gg-stag[disabled] { cursor: default; }
.gg-stag[disabled]:hover { border-color: #e2e8f0; }

/* Status before/after — pill toggle */
.gg-status-toggle { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
.gg-status-opt {
  padding: .45rem .9rem; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #fff; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: .82rem; color: #475569;
  transition: all .12s;
}
.gg-status-opt:hover { border-color: #0ea5e9; }
.gg-status-opt[data-status="clean"].active  { background: #FEE2E2; border-color: #dc2626; color: #166534; }
.gg-status-opt[data-status="medium"].active { background: #fef3c7; border-color: #d97706; color: #92400e; }
.gg-status-opt[data-status="bad"].active    { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.gg-status-opt[disabled] { cursor: default; opacity: .8; }

/* checkbox style for executionDone */
.gg-check-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1rem; background: #f8fafc; border-radius: 10px;
  cursor: pointer; user-select: none;
}
.gg-check-row.is-on { background: #FEF2F2; }
.gg-check-box {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid #cbd5e1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s;
}
.gg-check-row.is-on .gg-check-box {
  background: #dc3838; border-color: #dc3838; color: #fff; font-weight: 800;
}
.gg-check-row label { font-weight: 700; color: #1e293b; font-size: .92rem; cursor: pointer; }

textarea.gg-textarea {
  width: 100%; min-height: 80px;
  padding: .7rem .9rem; border: 1px solid #e2e8f0; border-radius: 10px;
  font-family: inherit; font-size: .9rem; resize: vertical; background: #fafbfc;
}
textarea.gg-textarea:focus { outline: none; border-color: #0369a1; background: #fff; }
textarea.gg-textarea[readonly] { background: #f8fafc; cursor: default; }

.rr-save-bar {
  position: sticky; bottom: 0; background: #fff;
  padding: .9rem 1rem; border-top: 1px solid #eef2f6;
  display: flex; justify-content: space-between; align-items: center;
  gap: .6rem; flex-wrap: wrap; z-index: 5;
  margin: 0 -1.4rem -1.2rem;
  border-radius: 0 0 16px 16px;
}

/* Toast (reuse cat-toast style if loaded; else fallback) */
.gg-toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: .4rem;
}
.gg-toast {
  background: #0f172a; color: #fff; padding: .75rem 1.2rem;
  border-radius: 10px; font-size: .88rem; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: ggToast .3s;
}
.gg-toast.ok  { background: #B91C1C; }
.gg-toast.err { background: #dc2626; }
@keyframes ggToast { from { opacity:0; transform: translateY(-10px); } to { opacity:1; transform: none; } }

@media (max-width: 480px) {
  .gg-report { padding: 1rem .8rem 5rem; }
  .gg-report-hero { padding: 1.2rem; border-radius: 14px; }
  .gg-section { padding: 1rem; border-radius: 14px; }
  .gg-modal-card { padding: 1.2rem; border-radius: 14px; }
  .gg-rating-row { grid-template-columns: 1fr; }
  .gg-stag { width: 38px; height: 38px; }
}

/* ═══════════════════════════════════════════════════════════════
   Stats Panel (KPI cards + camp comparison)
   ═══════════════════════════════════════════════════════════════ */
.gg-stats-panel { margin: 1rem 0 1.4rem; }

/* البطاقات (4) */
.gg-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.2rem;
}
@media (max-width: 1023px) { .gg-stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .gg-stats-grid { grid-template-columns: 1fr; } }

.gg-stat-card {
  background: #fff; border-radius: 14px; padding: 1.1rem 1.2rem;
  border: 1px solid #eef2f6;
  display: flex; align-items: center; gap: .9rem;
  box-shadow: 0 2px 6px rgba(15,23,42,.04);
  position: relative; overflow: hidden;
}
.gg-stat-card::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg,#0ea5e9,#0369a1);
}
.gg-stat-card--good::before      { background: linear-gradient(180deg,#dc3838,#B91C1C); }
.gg-stat-card--bad::before       { background: linear-gradient(180deg,#ef4444,#dc2626); }
.gg-stat-card--excellent::before { background: linear-gradient(180deg,#dc3838,#B91C1C); }
.gg-stat-card--poog::before      { background: linear-gradient(180deg,#ef4444,#dc2626); }

.gg-stat-ico {
  width: 50px; height: 50px; border-radius: 12px;
  background: #f0f9ff; color: #0369a1;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex-shrink: 0;
}
.gg-stat-card--good      .gg-stat-ico { background: #FEE2E2; color: #166534; }
.gg-stat-card--bad       .gg-stat-ico { background: #fee2e2; color: #991b1b; }
.gg-stat-card--excellent .gg-stat-ico { background: #FEE2E2; color: #166534; }
.gg-stat-card--poog      .gg-stat-ico { background: #fee2e2; color: #991b1b; }

.gg-stat-body { flex: 1; min-width: 0; }
.gg-stat-label { font-size: .76rem; color: #64748b; font-weight: 600; }
.gg-stat-value {
  font-size: 1.55rem; font-weight: 800; color: #0f172a;
  line-height: 1.15; margin: .15rem 0;
}
.gg-stat-of { font-size: .75rem; color: #94a3b8; font-weight: 600; }
.gg-stat-sub { font-size: .72rem; color: #94a3b8; }

/* Ring (donut) للمتوسط العام */
.gg-stat-ring {
  position: relative; width: 56px; height: 56px; flex-shrink: 0;
}
.gg-stat-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gg-ring-bg, .gg-ring-fill {
  fill: none; stroke-width: 3; stroke-linecap: round;
}
.gg-ring-bg { stroke: #e2e8f0; }
.gg-ring-fill { stroke: #0ea5e9; transition: stroke-dasharray .5s ease; }
.gg-stat-card--excellent .gg-ring-fill { stroke: #dc3838; }
.gg-stat-card--good      .gg-ring-fill { stroke: #f59e0b; }
.gg-stat-card--poog      .gg-ring-fill { stroke: #ef4444; }
.gg-ring-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 800; color: #0f172a;
}

/* Camp comparison */
.gg-camps-compare {
  background: #fff; border-radius: 14px; padding: 1.2rem 1.4rem;
  border: 1px solid #eef2f6; box-shadow: 0 2px 6px rgba(15,23,42,.04);
}
.gg-camps-title {
  font-size: .92rem; font-weight: 800; color: #0f172a;
  margin-bottom: .9rem; padding-bottom: .55rem;
  border-bottom: 2px solid #e0f2fe;
}
.rr-camp-row { padding: .55rem 0; }
.rr-camp-row + .rr-camp-row { border-top: 1px dashed #f1f5f9; }
.rr-camp-row-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .35rem; flex-wrap: wrap; gap: .5rem;
}
.rr-camp-row-name { font-weight: 700; color: #1e293b; font-size: .92rem; }
.rr-camp-row-meta { display: flex; align-items: center; gap: .6rem; }
.rr-camp-row-count { color: #94a3b8; font-size: .78rem; font-weight: 600; }
.rr-camp-row-score {
  padding: .2rem .65rem; border-radius: 999px;
  font-size: .78rem; font-weight: 800;
}
.rr-camp-row-score--excellent { background: #FEE2E2; color: #166534; }
.rr-camp-row-score--good      { background: #fef3c7; color: #92400e; }
.rr-camp-row-score--poog      { background: #fee2e2; color: #991b1b; }
.rr-camp-row-score--empty     { background: #f1f5f9; color: #94a3b8; }

.rr-camp-row-bar {
  width: 100%; height: 10px;
  background: #f1f5f9; border-radius: 999px; overflow: hidden;
}
.rr-camp-row-fill {
  height: 100%; border-radius: 999px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.rr-camp-row-fill--excellent { background: linear-gradient(90deg,#dc3838,#B91C1C); }
.rr-camp-row-fill--good      { background: linear-gradient(90deg,#fbbf24,#f59e0b); }
.rr-camp-row-fill--poog      { background: linear-gradient(90deg,#f87171,#ef4444); }
.rr-camp-row-fill--empty     { background: #cbd5e1; }

/* ═══════════════════════════════════════════════════════════════
   Action Buttons (View / Print / Delete)
   ═══════════════════════════════════════════════════════════════ */
.gg-actions { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
.gg-action {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .35rem .7rem; border-radius: 8px;
  font-family: inherit; font-size: .78rem; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: all .12s;
}
.gg-action--view   { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.gg-action--view:hover   { background: #e0f2fe; }
.gg-action--print  { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.gg-action--print:hover  { background: #fef3c7; }
.gg-action--delete { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.gg-action--delete:hover { background: #fee2e2; }
.gg-action--approve { background: #FEF2F2; color: #7A1C1C; border-color: #6ee7b7; }
.gg-action--approve:hover { background: #FEE2E2; }
.gg-action--reject  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.gg-action--reject:hover  { background: #fee2e2; }

/* ── Status pills (pending / approved / rejected) ──────── */
.gg-status-pill {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .25rem .65rem; border-radius: 999px;
  font-size: .74rem; font-weight: 800;
}
.gg-status-pill--pending  { background: #fef3c7; color: #92400e; }
.gg-status-pill--approved { background: #FEE2E2; color: #166534; }
.gg-status-pill--rejected { background: #fee2e2; color: #991b1b; }

/* ═══════════════════════════════════════════════════════════════
   Print styles for restroom-report page
   ═══════════════════════════════════════════════════════════════ */
@media print {
  body.gg-printing > header,
  .gg-report > header,
  .rr-save-bar,
  .gg-toast-wrap {
    display: none !important;
  }
  .gg-report { padding: 0 !important; max-width: 100% !important; }
  .gg-report-hero {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background: linear-gradient(135deg,#0ea5e9 0%,#0c4a6e 130%) !important;
    color: #fff !important;
    page-break-inside: avoid;
  }
  .gg-section { page-break-inside: avoid; box-shadow: none !important; }
  .gg-stag { border-color: #94a3b8 !important; }
  .gg-stag.active {
    background: #facc15 !important;
    color: #1a1a1a !important;
    border-color: #ca8a04 !important;
    -webkit-print-color-adjust: exact !important;
  }
  .gg-status-opt.active {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  textarea.gg-textarea { border: 1px solid #cbd5e1 !important; background: #fff !important; }
}

/* ═══════════════════════════════════════════════════════════════
   Mobile Polish — list view + report view
   ═══════════════════════════════════════════════════════════════ */

/* جدول التقارير: تمرير أفقي على الموبايل بدلاً من قطع المحتوى */
.gg-table-wrap {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eef2f6;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.gg-table-wrap .cat-table {
  min-width: 720px; /* لمنع التراص العشوائي على الجوال */
}

/* أزرار الإجراءات: تكدّس عمودياً على الجوال */
@media (max-width: 600px) {
  .gg-actions { flex-direction: column; align-items: stretch; gap: .3rem; min-width: 90px; }
  .gg-action  { justify-content: center; padding: .35rem .55rem; font-size: .74rem; }
}

/* لوحة الإحصائيات على الجوال — مدمجة */
@media (max-width: 600px) {
  .gg-stats-panel { margin: .8rem 0 1rem; }
  .gg-stats-grid  { gap: .7rem; }
  .gg-stat-card   { padding: .85rem .9rem; gap: .65rem; }
  .gg-stat-ico    { width: 42px; height: 42px; font-size: 1.35rem; border-radius: 10px; }
  .gg-stat-value  { font-size: 1.3rem; }
  .gg-stat-label  { font-size: .72rem; }
  .gg-stat-sub    { font-size: .68rem; }
  .gg-stat-ring   { width: 44px; height: 44px; }

  .gg-camps-compare { padding: 1rem 1rem; }
  .gg-camps-title   { font-size: .85rem; }
  .rr-camp-row-name { font-size: .85rem; }
  .rr-camp-row-meta { gap: .4rem; flex-wrap: wrap; }
  .rr-camp-row-count { font-size: .72rem; }
  .rr-camp-row-score { font-size: .72rem; padding: .15rem .55rem; }
  .rr-camp-row-bar   { height: 8px; }
}

/* Hero قسم النظافة: تخفيف الحشو + تكدّس على الموبايل */
@media (max-width: 600px) {
  .gg-hero {
    padding: 1rem 1.1rem;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: .8rem;
  }
  .gg-hero h2 { font-size: 1.1rem; }
  .gg-hero p  { font-size: .8rem; }
  .gg-hero-btn { width: 100%; justify-content: center; padding: .7rem 1rem; }
}

/* صفحة التقرير على الموبايل */
@media (max-width: 600px) {
  /* الـ topbar: التحكم في عرض الزر */
  .gg-report ~ header,
  body > header {
    padding: .7rem .9rem !important;
  }

  /* الـ Hero في صفحة التقرير */
  .gg-report-hero {
    padding: 1rem 1rem;
    grid-template-columns: 1fr !important;
    gap: .8rem;
    text-align: center;
    border-radius: 14px;
  }
  .gg-report-hero-icon {
    width: 56px; height: 56px;
    font-size: 1.7rem;
    margin: 0 auto;
  }
  .gg-report-hero h1 { font-size: 1.05rem; line-height: 1.4; }
  .gg-report-hero > div:nth-child(2) { font-size: .78rem !important; }
  .gg-report-meta { justify-content: center; gap: .3rem; }
  .gg-report-meta .chip {
    padding: .25rem .6rem;
    font-size: .7rem;
  }
  .gg-report-avg {
    margin: 0 auto;
    padding: .6rem .9rem;
    min-width: 100px;
  }
  .gg-report-avg .num { font-size: 1.7rem; }
  .gg-report-avg .lbl { font-size: .68rem; }

  /* الأقسام */
  .gg-section { padding: .9rem 1rem; border-radius: 12px; margin-bottom: .8rem; }
  .gg-section-title { font-size: .92rem; padding-bottom: .55rem; margin-bottom: .8rem; }

  /* صف التقييم: العنوان فوق والنجوم تحت */
  .gg-rating-row {
    grid-template-columns: 1fr;
    gap: .45rem;
    padding: .6rem 0;
  }
  .gg-rating-label { font-size: .85rem; }
  .gg-stars { justify-content: flex-start; gap: .3rem; }
  .gg-stag  { width: 40px; height: 40px; font-size: 1rem; }

  /* أزرار الحالة */
  .gg-status-toggle { gap: .3rem; }
  .gg-status-opt { padding: .4rem .75rem; font-size: .76rem; }

  /* صف النموذج */
  .gg-form-row { grid-template-columns: 1fr; gap: .65rem; margin-bottom: .65rem; }
  .gg-form-group label { font-size: .78rem; }
  .gg-form-group input,
  .gg-form-group select,
  .gg-form-group textarea { padding: .55rem .7rem; font-size: .85rem; }

  /* checkbox row */
  .gg-check-row { padding: .65rem .85rem; }
  .gg-check-row label { font-size: .85rem; }

  textarea.gg-textarea { min-height: 70px; padding: .6rem .8rem; font-size: .85rem; }

  /* شريط الحفظ السفلي */
  .rr-save-bar {
    padding: .75rem .85rem;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: .55rem;
    margin: 0 -1rem -.9rem;
    border-radius: 0 0 12px 12px;
  }
  .rr-save-bar > div { display: flex; gap: .45rem; }
  .rr-save-bar > div .rr-btn { flex: 1; justify-content: center; }
  .rr-save-bar #rrSaveStatus { text-align: center; font-size: .75rem; }
}

/* شاشات صغيرة جداً */
@media (max-width: 380px) {
  .gg-stag  { width: 36px; height: 36px; font-size: .92rem; }
  .gg-stat-ring { display: none; } /* الحلقة قد تضيق المساحة */
  .rr-camp-row-meta { flex-direction: column; align-items: flex-start; gap: .25rem; }
}
