/* /manage/ (the trustee area): on top of landing.css, app.css and console.css (the masjid editor's styles). Tokens only;
   logical properties so Urdu and Arabic (RTL) work. */

.mg { max-width: 960px; }
.mg-who { margin-bottom: 14px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.mg-who b { color: var(--heading); font-weight: 600; }
.mg .adm-auth { display: grid; gap: 10px; margin-top: 12px; }
.mg .adm-auth .find-sub { margin: 0; }
.mg .adm-auth .btn-solid { justify-content: center; text-align: center; }
.mg-scam { padding: 8px 12px; border-radius: 8px; background: var(--tint); }
.mg-empty { display: grid; gap: 6px; }
.mg-flag { color: var(--gold-text); font-weight: 500; }

/* A masjid's page: its status line, the tabs, notes */
.mg-head { margin-bottom: 14px; }
.mg-role { padding: 3px 9px; border-radius: 20px; border: 1px solid var(--line); background: var(--tint); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.mg-status { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--gold-pale); color: var(--text); font-size: 14px; line-height: 1.55; }
.mg-status[data-status="approved"] { background: var(--tint); }
.mg-status[data-status="rejected"], .mg-status[data-status="closed"] { background: var(--danger-bg); color: var(--danger); }
.mg-status a { color: var(--gold-text); font-weight: 600; }
.mg-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 10px; background: var(--gold-pale); }
.mg-tabs .seg-btn { flex: 1 1 auto; text-align: center; white-space: nowrap; }
.mg-note { margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; background: var(--tint); color: var(--text); font-size: 14px; line-height: 1.6; }
.mg-note[data-tone="wait"] { background: var(--gold-pale); }
.mg-note[data-tone="ok"] { border: 1px solid var(--brand); }
.mg-note[data-tone="no"] { background: var(--danger-bg); }
.mg-note .act { margin-top: 8px; }
.mg-lines { margin: 6px 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }

/* Managers and requests */
.mg-card { display: grid; gap: 10px; }
.mg-people { list-style: none; display: grid; gap: 8px; }
.mg-person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow-wrap: anywhere; }
.mg-person .adm-hint { margin: 0; }
.mg-invite, .mg-leave { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.mg-invite .form-group { margin-bottom: 0; }
.mg-link { font-size: 13px; }
.mg-req { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow-wrap: anywhere; }
.mg-req p { margin: 0; }
.mg-object summary { cursor: pointer; color: var(--gold-text); font-weight: 500; font-size: 14px; }
.mg-object form { display: grid; gap: 8px; margin-top: 8px; }
.mg-kinds { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }

/* Checkboxes and choices with their words (the declarations, the kind of request) */
.mg-declare { display: grid; gap: 4px; margin-top: 8px; }
.mg-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-size: 14px; line-height: 1.5; color: var(--text); cursor: pointer; }
.mg-check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); }
.mg-check input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }

@media (max-width: 640px) {
  .mg-tabs .seg-btn { padding: 8px 10px; }
  .mg-person .adm-actions { width: 100%; }
}

/* 0017: the weekly "Are this week's times still right?" and the drift warnings (times tab); the Photos tab */
.mg-weekly, .mg-drift { display: grid; gap: 8px; }
.mg-weekly .adm-h3, .mg-drift .adm-h3 { margin: 0; }
.mg-weekly p { margin: 0; }
.mg-weekly .adm-h3:focus, .mg-checked:focus { outline: none; }
.mg-checked { margin: 0 0 12px; }
.mg-photos { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; margin: 4px 0; padding: 0; }
.mg-photo { display: grid; gap: 8px; align-content: start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.mg-photo-img { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--tint); font-size: 12px; color: var(--muted); text-align: center; }
.mg-photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: no-preference) { .mg-photo-img:empty { animation: skel-pulse 1.6s ease-in-out infinite; } }   /* 0028: a photo on its way */
.mg-photo-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; color: var(--heading); overflow-wrap: anywhere; }
.mg-photo-text .act { margin-inline-start: auto; }
.mg-photo-text .adm-hint { flex-basis: 100%; margin: 0; }
#reg-photos .mg-photos { margin-bottom: 8px; }
#reg-photos .mg-photos:empty { display: none; }

/* 0025: "How setting times works" (#/help; the guide in manage/index.html): short sections, example rows as small tables. */
.mg-guide { line-height: 1.65; }
.mg-guide h1:focus { outline: none; }
.mg-guide .adm-h2 { margin: 22px 0 6px; }
.mg-guide .adm-h3 { margin: 14px 0 4px; }
.mg-guide p { margin: 0 0 8px; }
.gd-wrap { overflow-x: auto; margin: 6px 0 12px; }
.gd-rows { border-collapse: collapse; font-size: 14px; }
.gd-rows caption { padding-bottom: 4px; caption-side: top; text-align: start; font-size: 13px; color: var(--muted); }
.gd-rows :is(th, td) { padding: 5px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.gd-rows th { font-size: 12px; font-weight: 600; color: var(--muted); }
.gd-rows bdi, .gd-sum { white-space: nowrap; }   /* a time, and the guide's sum (7:12 + 15 = 7:27), in one piece: left to right in Urdu and Arabic too */
.gd-rows .gd-change td { background: var(--gold-pale); color: var(--gold-text); font-weight: 600; }
.gd-tips { margin: 0; padding-inline-start: 20px; }
.gd-tips li { margin-bottom: 6px; }
