/* Admin cards, dialogs and lightbox, the sign-in flash guard and the layout refresh
   Moved out of styles.css on 2026-11-05 (one big file split by section; the rules are unchanged and in the same order).
   Every page links this file right after css/admin-cards.css. */

/* ═════════════════════════════════════════════════════════════
   ADMIN: Esports ID cards + dialogs + lightbox
   ═════════════════════════════════════════════════════════════ */
.idc-toolbar { padding: 14px 22px 0; }
.idc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 16px; padding: 18px 22px 22px; }
@media (max-width: 460px) { .idc-grid { grid-template-columns: 1fr; padding: 14px; } }

/* بطاقة الطلب: نفس هيكل بطاقات "الإضافة" (card + card-hdr + card-body مقسّم بـ fsec)، بدل الشكل المضغوط القديم */
.idc { display: flex; flex-direction: column; overflow: hidden; border-top: 3px solid var(--gold); }
.idc.is-verified { border-top-color: var(--green); }
.idc.is-blacklisted { border-top-color: var(--red); opacity: .92; }
.idc-top-row { display: flex; gap: 16px; align-items: flex-start; }
.idc-photo { width: 84px; height: 104px; border-radius: 10px; overflow: hidden; background: #0c0c10; border: 1px solid var(--b2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--t3); font-size: 32px; }
.idc-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.idc-muted { color: var(--t3); font-weight: 600; font-size: 12.5px; }
.idc-facts { flex: 1; min-width: 0; }
.idc-fact .idc-val { font-size: 13.5px; font-weight: 700; color: var(--t1); overflow-wrap: anywhere; }
.idc-wa { color: #25d366; }
.idc-decision { display: flex; flex-direction: column; gap: 8px; }
.idc-reg { padding: 8px 10px; border-radius: 8px; background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.25); font-size: 12px; color: var(--t2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.idc-reg i { color: var(--green); }
.idc-note { padding: 8px 10px; border-radius: 8px; background: rgba(239, 68, 68, 0.07); border: 1px solid rgba(239, 68, 68, 0.22); font-size: 12px; color: var(--t2); overflow-wrap: anywhere; }
.idc-audit { margin: 0; padding: 7px 10px; font-size: 12px; color: var(--t2); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--b1); border-radius: 9px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.idc-audit i { color: var(--gold); }
.idc-audit b { color: var(--t1); }
.idc-inspect { margin-top: 6px; padding: 10px; border: 1px dashed var(--b2); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; }
.idc-gl { display: block; font-size: 10.5px; color: var(--t3); font-weight: 700; margin-bottom: 4px; }
.idc-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.idc-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--b2); cursor: zoom-in; background: #000; }
.idc-thumb:hover, .idc-thumb:focus-visible { border-color: var(--gold); outline: none; }
.idc-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--b1); background: rgba(0,0,0,0.18); }
.idc-actions .btn { font-size: 11.5px; padding: 6px 10px; }
.idc-del { margin-inline-start: auto; }

/* Verified-only controls (status + التوثيق) sit as clickable pills right under the header, not buried among
   the other footer buttons: a single labelled click toggles/acts, instead of a plain on/off button pair */
.idc-toggle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 22px; border-bottom: 1px solid var(--b1); background: rgba(255, 255, 255, 0.02); }
.idc-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: filter .15s, transform .15s;
}
.idc-toggle:hover { filter: brightness(1.18); transform: translateY(-1px); }
.idc-toggle.is-on { background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.25); }
.idc-toggle.is-off { background: rgba(160, 160, 168, 0.12); color: var(--t2); border: 1px solid rgba(160, 160, 168, 0.25); }
.idc-toggle.is-verified-pill { background: rgba(212, 160, 23, 0.12); color: var(--gold); border: 1px solid rgba(212, 160, 23, 0.3); }
@media (max-width: 560px) { .idc-facts { grid-template-columns: 1fr; } .idc-top-row { flex-direction: column; align-items: center; } .idc-top-row .idc-facts { width: 100%; } }

.adm-dlg { text-align: right; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.adm-dlg label { font-size: 12px; font-weight: 700; color: var(--t2); }
.adm-dlg .swal2-select, .adm-dlg .swal2-input, .adm-dlg .swal2-textarea { margin: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
.adm-check { display: flex !important; align-items: center; gap: 8px; cursor: pointer; }
.adm-check input { width: 16px; height: 16px; accent-color: var(--gold); }
.adm-hint { font-size: 12px; color: var(--t3); line-height: 1.8; }

.id-pair.single { grid-template-columns: 1fr; }
.fsv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #fff; font-size: 16px; }
.fsv-nav:hover { background: rgba(255,255,255,0.28); }
.fsv-prev { right: 14px; }
.fsv-next { left: 14px; }
.fsv-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.6); padding: 3px 12px; border-radius: 20px; }
.fsv-count:empty { display: none; }

/* ═════════════════════════════════════════════════════════════
   AUTH FLASH: the header knows the sign-in state before the first paint (html[data-auth] from js/gate.js)
   ═════════════════════════════════════════════════════════════ */
html[data-auth="member"] .hdr-right .admin-link-btn,
html[data-auth="admin"] .hdr-right .admin-link-btn { display: none; }
html[data-auth="member"] .hdr-right:not(:has(.acct))::before,
html[data-auth="admin"] .hdr-right:not(:has(.acct))::before {
  content: '';
  width: 118px;
  height: 36px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--b1) 25%, var(--b2) 50%, var(--b1) 75%);
  background-size: 200% 100%;
  animation: skel 1.2s linear infinite;
}
@keyframes skel { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  html[data-auth] .hdr-right::before { animation: none !important; }
}

/* ═════════════════════════════════════════════════════════════
   LAYOUT REFRESH: header, three main boxes, phone search section, home gates, footer
   ═════════════════════════════════════════════════════════════ */

/* Header: logo + account only (the three sections live in their own row right below) */
.site-header { background: rgba(13, 13, 15, 0.92); box-shadow: 0 1px 0 rgba(212, 160, 23, 0.12), 0 8px 24px rgba(0, 0, 0, 0.25); }
.logo-icon { box-shadow: 0 6px 16px rgba(212, 160, 23, 0.25); }
.hdr-inner { height: 64px; }

/* Apply page: the three tracks as three separate boxes */
.track-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.track-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1.5px solid var(--b1);
  border-radius: 14px;
  color: var(--t2);
  text-align: right;
  min-width: 0;
  transition: border-color .18s, background .18s, transform .18s;
}
.track-card:hover { border-color: var(--b2); transform: translateY(-1px); }
.track-ico { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.track-ico.gold   { background: rgba(212, 160, 23, 0.12); color: var(--gold); }
.track-ico.blue   { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.track-ico.purple { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }
.track-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.track-txt b { font-size: 14.5px; font-weight: 800; color: var(--t1); }
.track-txt small { font-size: 11.5px; color: var(--t3); }
.track-check { position: absolute; top: 10px; inset-inline-start: 12px; color: var(--gold); font-size: 15px; opacity: 0; transform: scale(.6); transition: opacity .18s, transform .18s; }
.track-card.active { border-color: var(--gold); background: linear-gradient(180deg, rgba(212, 160, 23, 0.10), rgba(212, 160, 23, 0.02)); box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.10); }
.track-card.active .track-check { opacity: 1; transform: scale(1); }
.track-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 640px) {
  .track-picker { gap: 8px; }
  .track-card { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 4px; text-align: center; border-radius: 12px; }
  .track-ico { width: 36px; height: 36px; font-size: 15px; }
  .track-txt { align-items: center; }
  .track-txt b { font-size: 12px; }
  .track-txt small { display: none; }
  .track-check { top: 6px; font-size: 13px; }
}

/* Home: the four sections as boxes (the first follows the account: js/account.js paintApplyCard) */
.gate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gate-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px 18px;
  background: var(--card);
  border: 1px solid var(--b1);
  border-radius: 16px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.gate-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.gate-danger:hover { border-color: var(--red); }
.gate-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.gate-ico.gold  { background: rgba(212, 160, 23, 0.12); color: var(--gold); }
.gate-ico.green { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.gate-ico.red   { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.gate-ico.blue  { background: rgba(59, 130, 246, 0.12); color: var(--blue); }
.gate-card h3 { font-size: 17px; font-weight: 800; color: var(--t1); }
.gate-card p { font-size: 13px; color: var(--t2); line-height: 1.8; flex: 1; }
.gate-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--b1); font-size: 12.5px; color: var(--t2); font-weight: 700; }
.gate-foot b { font-size: 22px; font-weight: 900; color: var(--t1); font-variant-numeric: tabular-nums; margin-inline-end: 4px; }
.gate-foot > i { color: var(--gold); }
.gate-danger .gate-foot > i { color: var(--red); }
@media (min-width: 681px) and (max-width: 1000px) { .gate-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .gate-grid { grid-template-columns: 1fr; } }
/* the first card waits for js/account.js when this account already applied («طلبي» / «لوحتي»), so «تقديم طلب» never flashes */
html[data-apply-state] .gate-card[data-apply-card=""] { visibility: hidden; }
.hm-more { margin-top: 16px; font-size: 13.5px; }
.hm-more a { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 700; }
.hm-more a:hover { text-decoration: underline; }

@media (min-width: 681px) and (max-width: 900px) { .gate-card { padding: 18px 14px 14px; } .gate-card p { font-size: 12.5px; } }

.hm-gates-sec { margin-top: 44px; }

/* «البطولة الجاية» (js/home-next.js): banner on one side, name + prize + organizer + countdown on the other */
.hnx-sec { margin-top: 36px; }
.hnx-card { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); background: var(--card); border: 1px solid var(--b1); border-radius: 16px; overflow: hidden; }
.hnx-card.no-banner { grid-template-columns: 1fr; }
/* the banner fills its whole side, whatever the height of the details next to it (cropped, never stretched) */
.hnx-banner { display: block; position: relative; min-height: 200px; background: #000; }
.hnx-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hnx-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 16px; min-width: 0; }
.hnx-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hnx-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--gold); }
.hnx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hnx-name { font-size: 23px; font-weight: 900; line-height: 1.15; color: var(--t1); overflow-wrap: anywhere; min-width: 0; }
.hnx-prize { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 12px; border: 1px solid var(--b2); border-radius: 10px; background: var(--s); }
.hnx-prize small { font-size: 10.5px; font-weight: 700; color: var(--t3); }
.hnx-prize b { font-size: 18px; font-weight: 900; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hnx-org { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 13px; color: var(--t2); }
.hnx-org b { color: var(--t1); font-weight: 800; }
.hnx-org:hover b { text-decoration: underline; }
.hnx-org-logo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--b2); flex-shrink: 0; }
.hnx-org-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--s); color: var(--t3); font-size: 12px; }
.hnx-count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hnx-unit { display: flex; flex-direction: column; align-items: center; padding: 7px 4px 6px; background: var(--s); border: 1px solid var(--b2); border-radius: 10px; }
.hnx-unit b { font-size: 23px; font-weight: 900; line-height: 1.1; color: var(--t1); font-variant-numeric: tabular-nums; }
.hnx-unit small { font-size: 11px; font-weight: 700; color: var(--t3); }
.hnx-started { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 16px; font-weight: 900; color: var(--gold); }
.hnx-when { display: flex; flex-direction: column; gap: 5px; }
.hnx-date { font-size: 12.5px; font-weight: 700; color: var(--t2); }
.hnx-when .scrim-times { margin: 0; gap: 6px; }
.hnx-when .scrim-time { min-width: 62px; padding: 4px 8px; }
.hnx-when .scrim-time b { font-size: 13.5px; }
.hnx-when .scrim-time small { font-size: 10px; }
.hnx-go { align-self: flex-start; padding: 8px 16px; font-size: 12.5px; }
@media (max-width: 760px) {
  .hnx-card { grid-template-columns: 1fr; }
  .hnx-banner { min-height: 0; height: 190px; }
  .hnx-body { padding: 14px 14px 16px; }
  .hnx-name { font-size: 20px; }
  .hnx-unit b { font-size: 20px; }
  .hnx-go { align-self: stretch; }
}

/* Page titles */
.page-hdr h1, .page-hdr-row h1 { font-size: 26px; font-weight: 900; padding-inline-start: 14px; border-inline-start: 4px solid var(--gold); line-height: 1.35; }
.page-hdr p, .page-hdr-row p { padding-inline-start: 18px; }
@media (max-width: 540px) { .page-hdr h1, .page-hdr-row h1 { font-size: 21px; } }

/* Footer */
.site-footer { text-align: right; padding: 0; margin-top: 0; }

/* Identity rules: collapsed by default so the form is what the visitor sees first */
details.verify-rules-card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
details.verify-rules-card > summary::-webkit-details-marker { display: none; }
details.verify-rules-card .vr-caret { margin-inline-start: auto; font-size: 12px; transition: transform .2s; }
details.verify-rules-card[open] .vr-caret { transform: rotate(180deg); }
details.verify-rules-card[open] > summary { margin-bottom: 12px; }
