:root{
  --bg:#0b1020;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#dbe2ef;
  --primary:#1e3a8a;
  --primary-2:#2563eb;
  --success:#1e7e34;
  --danger:#a71d2a;
  --female:#AA336A;
  --male:#1f4ea3;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,Arial,sans-serif;
  color:var(--text);
  background:linear-gradient(145deg,#f5f7ff,#eef3ff);
  overflow-x:hidden;
}
.site-footer{
  max-width:min(78vw,1700px);
  margin:20px auto 0;
  padding:10px 10px 10px;
  text-align:center;
  font-size:.82rem;
  color:var(--muted);
  border-top:1px solid var(--border);
  background:rgba(255,255,255,.5);
  box-sizing:border-box;
}
.site-footer-inner{margin:0;line-height:1.55}
.site-footer a{color:#1d4ed8;font-weight:600;text-decoration:none}
.site-footer a:hover{text-decoration:underline}
.container > .site-footer{
  max-width:none;
  width:100%;
  margin-left:0;
  margin-right:0;
}
.container{width:min(98vw,1700px);max-width:none;margin:0 auto;padding:18px}
.floating-whatsapp{
  position:fixed !important;
  right:18px !important;
  bottom:18px !important;
  width:46px;
  height:46px;
  border-radius:999px;
  background:#25d366;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:.9rem;
  letter-spacing:.02em;
  text-decoration:none;
  box-shadow:0 10px 24px rgba(15,23,42,.28);
  z-index:9999;
}
.floating-whatsapp:hover{
  text-decoration:none;
  filter:brightness(.95);
}
.floating-whatsapp-icon{
  width:24px;
  height:24px;
  display:block;
}
.layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;align-items:start}
.sidebar{
  background:#0f1a3d;
  color:#e5edff;
  border-radius:16px;
  padding:14px;
  position:sticky;
  top:12px;
}
.sidebar-head{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}
.sidebar-head-branding{
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
}
.sidebar-brand{
  display:flex;
  justify-content:center;
  margin-bottom:0;
}
.sidebar-brand img{
  max-height:56px;
  width:auto;
  max-width:100%;
  object-fit:contain;
}
.sidebar-assoc-name{
  display:none;
  font-size:.78rem;
  font-weight:700;
  line-height:1.3;
  color:#e5edff;
  text-align:center;
}
.admin-sidebar .sidebar-assoc-name{color:#fff7ed}
.sidebar-toggle{
  display:none;
  width:44px;
  height:36px;
  border:1px solid rgba(255,255,255,.35);
  border-radius:10px;
  background:rgba(255,255,255,.08);
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  cursor:pointer;
  margin-bottom:0;
  flex-shrink:0;
}
.sidebar-toggle span{
  display:block;
  width:18px;
  height:2px;
  background:#fff;
  border-radius:2px;
}
.sidebar-nav{display:flex;flex-direction:column;gap:7px}
.sidebar-link{
  color:#dbeafe;text-decoration:none;padding:9px 10px;border-radius:10px;
  border:1px solid transparent;background:rgba(255,255,255,.04)
}
.sidebar-link:hover{background:rgba(255,255,255,.12);text-decoration:none}
.sidebar-link.active{background:#e0e7ff;color:#1e3a8a;border-color:#bfdbfe}
.admin-sidebar{
  background:linear-gradient(180deg,#7c2d12,#c2410c);
  color:#fff7ed;
  border:1px solid #fdba74;
  box-shadow:0 12px 28px rgba(124,45,18,.28);
}
.admin-sidebar .sidebar-title{color:#ffedd5}
.admin-sidebar .sidebar-link{
  color:#fff7ed;
  background:rgba(255,255,255,.10);
  border-color:rgba(255,237,213,.28);
}
.admin-sidebar .sidebar-link:hover{
  background:rgba(255,255,255,.20);
}
.admin-sidebar .sidebar-link.active{
  background:#ffedd5;
  color:#7c2d12;
  border-color:#fed7aa;
}
.admin-sidebar .sidebar-toggle{
  border-color:rgba(255,237,213,.45);
  background:rgba(255,255,255,.14);
}
.panel{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 10px 30px rgba(30,58,138,.08);
  padding:22px;
}
.panel.colorful{
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border-color:#c7d2fe;
}
.panel.colorful .title{color:#1e3a8a}
.panel.colorful .subtle{color:#475569}
.form-accent{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  background:linear-gradient(135deg,#dbeafe,#ede9fe);
  border:1px solid #bfdbfe;
  color:#1e3a8a;
  font-size:.82rem;
  font-weight:700;
}
.title{margin:0 0 6px 0;font-size:clamp(1.2rem,2.5vw,1.8rem)}
.subtle{color:var(--muted);font-size:.94rem}
.top-links{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 14px}
.chip{
  display:inline-flex;align-items:center;gap:6px;
  border-radius:999px;padding:6px 12px;
  border:1px solid #c7d2fe;background:#eef2ff;color:#1e3a8a;font-size:.82rem
}
.chip::before{font-size:.9em}
.chip.download::before{content:"\21E9"}
.chip.renew::before{content:"\21BB"}
.chip.whatsapp::before{content:"\25CF";color:#16a34a}
.chip.email::before{content:"\2709"}
.chip.register::before{content:"\2714"}
.chip.brochure::before{content:"\1F4C4"}
.chip.certificate::before{content:"\1F3C5"}
a{color:#1d4ed8;text-decoration:none}
a:hover{text-decoration:underline}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.full{grid-column:1/-1}
label{display:block;font-size:.82rem;font-weight:700;margin-bottom:6px;color:#334155}
.req{color:#dc2626;font-weight:800}
input,select,textarea,button{
  width:100%;font:inherit;border-radius:10px
}
input,select,textarea{
  border:1px solid #cbd5e1;background:#fff;padding:11px 12px;
}
input:focus,select:focus,textarea:focus{
  outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)
}
textarea{min-height:90px;resize:vertical}
.btn{
  border:0;background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff;padding:11px 14px;font-weight:700;cursor:pointer
}
.btn.secondary{
  background:#fff;color:#1e3a8a;border:1px solid #bfdbfe
}
.btn.success{background:linear-gradient(135deg,#15803d,#22c55e)}
.btn.danger{background:linear-gradient(135deg,#991b1b,#ef4444)}
.action-cell{
  white-space:nowrap;
  display:flex;
  gap:6px;
  align-items:center;
}
.btn.approve-btn,.btn.reject-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  min-width:34px;
  padding:0;
  border-radius:999px;
  font-size:1rem;
  line-height:1;
  box-shadow:0 2px 8px rgba(15,23,42,.14);
}
.toolbar{display:flex;gap:8px;flex-wrap:wrap}
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:12px;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:collapse;min-width:760px}
th,td{padding:10px;border-bottom:1px solid #e5e7eb;text-align:left;font-size:.9rem}
th{background:#eff3ff;color:#1e3a8a;position:sticky;top:0;z-index:1}
.male{color:var(--male);font-weight:700}
.female{color:var(--female);font-weight:700}
.male::before{content:"\2642\00A0"}
.female::before{content:"\2640\00A0"}
.active{color:var(--success);font-weight:700}
.inactive{color:var(--danger);font-weight:700}
.pending{color:#92400e;font-weight:700}
.stack{display:flex;flex-direction:column;gap:12px}
.card-sm{border:1px solid var(--border);border-radius:12px;padding:12px;background:#fcfdff}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.inline-form{display:grid;grid-template-columns:minmax(260px,1fr) 180px 180px 140px;gap:8px}
.view-filter-grid{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) 190px 170px 140px;gap:8px}
.members-filter-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
.dashboard-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:12px;
  margin-bottom:18px;
}
.stat-card{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:16px 18px;
  border-radius:14px;
  text-decoration:none;
  color:inherit;
  border:1px solid var(--border);
  box-shadow:0 6px 16px rgba(15,23,42,.06);
  transition:transform .12s ease,box-shadow .12s ease;
}
.stat-card:hover{
  text-decoration:none;
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(15,23,42,.1);
}
.stat-label{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;opacity:.88}
.stat-value{font-size:1.85rem;font-weight:800;line-height:1.1}
.stat-pending{background:linear-gradient(135deg,#fff7ed,#ffedd5);border-color:#fed7aa;color:#9a3412}
.stat-players{background:linear-gradient(135deg,#eff6ff,#dbeafe);border-color:#bfdbfe;color:#1e3a8a}
.stat-life{background:linear-gradient(135deg,#f0fdf4,#dcfce7);border-color:#86efac;color:#166534}
.stat-academy{background:linear-gradient(135deg,#faf5ff,#f3e8ff);border-color:#d8b4fe;color:#6b21a8}
.stat-arbiter{background:linear-gradient(135deg,#fffbeb,#fef3c7);border-color:#fcd34d;color:#92400e}
.stat-lt-arb{background:linear-gradient(135deg,#fef2f2,#fecaca);border-color:#fca5a5;color:#991b1b}
.stat-events{background:linear-gradient(135deg,#ecfeff,#cffafe);border-color:#67e8f9;color:#0e7490}
.stat-inactive-reminders{
  background:linear-gradient(135deg,#f8fafc,#f1f5f9);
  border-color:#cbd5e1;
  color:#475569;
}
.stat-inactive-counts{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:4px;
}
.stat-inactive-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:.9rem;
}
.stat-inactive-year{font-weight:700;opacity:.85}
.stat-inactive-num{font-size:1.35rem;font-weight:800;color:#334155}
.qr-box img{max-width:100%;height:auto;border:1px solid #e2e8f0;border-radius:10px;padding:4px;background:#fff}
.payment-qr-download{margin-top:4px}
.inline-download-link{
  font-size:.82rem;
  font-weight:600;
  margin-left:4px;
}
.qr-download-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:auto;
  padding:8px 14px;
  border:1px solid #c7d2fe;
  border-radius:10px;
  background:#fff;
  color:#1e3a8a;
  font-weight:700;
  text-decoration:none;
  box-shadow:0 2px 8px rgba(30,58,138,.08);
}
.qr-download-btn:hover{text-decoration:none;background:#f8fafc}
.qr-download-icon{flex-shrink:0}
.upi-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
  flex-wrap:wrap;
}
.upi-text{font-size:.9rem;color:#334155}
.upi-copy-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:auto;
  padding:6px 10px;
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:#eef2ff;
  color:#1e3a8a;
  font-weight:700;
  cursor:pointer;
}
.upi-copy-icon{flex-shrink:0}
.status-pill{
  display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:3px 9px;font-size:.75rem;font-weight:700
}
.status-pill::before{content:"\25CF";font-size:.8em}
.status-pill.active{background:#e8f7e8}
.status-pill.inactive{background:#fdeaea}
.status-pill.pending{background:#fff7ed}
.status-pill.upcoming{background:#e0f2fe;color:#075985}
.status-pill.completed{background:#e8f7e8;color:#166534}
.status-pill.cancelled{background:#fee2e2;color:#991b1b}
.status-pill.rescheduled{background:#fef3c7;color:#92400e}
.other-payment-success .submission-ref-display{
  margin:0;
  padding:12px 14px;
  border-radius:12px;
  background:linear-gradient(135deg,#f0fdf4,#dcfce7);
  border:1px solid #86efac;
  line-height:1.45;
}
.other-payment-success .submission-ref-display strong{
  font-size:clamp(1.05rem,2.5vw,1.25rem);
  letter-spacing:.04em;
  color:#14532d;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Public downloads — one card per row + search */
.public-dl-toolbar{
  margin:16px 0 12px;
}
.public-dl-search{
  max-width:min(100%,440px);
}
.public-dl-no-results{
  margin:8px 0 12px;
}
.public-dl-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.public-dl-item{margin:0}
.public-dl-card .public-dl-link{
  border-width:1px;
}
.public-dl-link{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#f8fafc);
  text-decoration:none;
  color:inherit;
  box-shadow:0 4px 14px rgba(15,23,42,.06);
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
  max-width:100%;
  box-sizing:border-box;
}
.public-dl-link:hover{
  text-decoration:none;
  transform:translateY(-2px);
  box-shadow:0 8px 22px rgba(30,58,138,.12);
  border-color:#bfdbfe;
}
.public-dl-icon-wrap{
  flex:0 0 48px;
  width:48px;
  height:48px;
  min-width:48px;
  min-height:48px;
  max-width:48px;
  max-height:48px;
  overflow:hidden;
  border-radius:12px;
  background:var(--dl-icon-bg,#64748b);
  color:#fff;
  display:grid;
  place-items:center;
  box-shadow:0 2px 8px rgba(15,23,42,.12);
  box-sizing:border-box;
}
.public-dl-link .public-dl-svg,
.public-dl-icon-wrap .public-dl-svg{
  width:24px;
  height:24px;
  min-width:24px;
  min-height:24px;
  max-width:24px;
  max-height:24px;
  display:block;
  flex-shrink:0;
  box-sizing:border-box;
  overflow:visible;
}
.public-dl-body{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.public-dl-title{font-weight:700;font-size:1rem;color:#0f172a}
.public-dl-meta{font-size:.82rem;color:#64748b;font-weight:600}
.public-dl-arrow{
  flex-shrink:0;
  font-size:1.25rem;
  font-weight:800;
  color:#2563eb;
  opacity:.85;
}

.login-wrap{min-height:100dvh;display:grid;place-items:center;padding:14px}
.login-card{width:min(440px,100%)}
.login-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 16px;
  max-width:200px;
  min-height:88px;
  padding:12px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#f8fafc;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.login-logo img{max-height:64px;width:auto;max-width:100%;object-fit:contain;display:block}
.error{padding:10px;border-radius:8px;background:#fdecec;color:#9f1239;font-weight:600}
.event-cards{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:14px;
}
.event-card{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  background:#fff;
  box-shadow:0 6px 14px rgba(2,6,23,.05);
}
.event-card h3{margin:0 0 6px 0;font-size:1rem;color:#1e3a8a}
.event-card p{margin:0;color:#334155;font-size:.88rem}
.event-row{
  display:flex;
  align-items:flex-start;
  gap:6px;
  padding:7px 10px;
  border-radius:9px;
  border:0;
  margin-top:6px;
  line-height:1.35;
  word-break:break-word;
  background:#fff;
  color:#334155;
}
.event-icon{width:16px;flex-shrink:0}
.event-meta-sep{opacity:.55;font-weight:600;padding:0 2px}
.event-map-btn::before{content:"\1F5FA\00A0";font-size:.95em}

/* Achievements (public) */
.achievement-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:16px;
  margin-top:18px;
}
.achievement-card{
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(180deg,#fff,#f8fafc);
  box-shadow:0 10px 28px rgba(15,23,42,.08);
  display:flex;
  flex-direction:column;
  min-height:100%;
}
.achievement-photo-wrap{
  aspect-ratio:4/3;
  background:#0f172a;
  overflow:hidden;
}
.achievement-photo-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.achievement-photo-placeholder{
  aspect-ratio:4/3;
  display:grid;
  place-items:center;
  font-size:3rem;
  background:linear-gradient(135deg,#1e3a8a,#6366f1);
  color:#e0e7ff;
}
.achievement-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px}
.achievement-winner{margin:0;font-size:1.05rem;color:#0f172a}
.achievement-tournament{margin:0;font-size:.92rem;font-weight:700;color:#1e3a8a}
.achievement-type{margin:0;font-size:.85rem;color:#64748b}
.achievement-dates{
  margin:0 0 4px 0;
  font-size:.85rem;
  color:#475569;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:6px;
}
.achievement-filter-grid{
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  align-items:end;
}
.prize-badge{
  align-self:flex-start;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid transparent;
}
.prize-gold{
  background:linear-gradient(135deg,#fef9c3,#fde047);
  border-color:#eab308;
  color:#713f12;
}
.prize-silver{
  background:linear-gradient(135deg,#f1f5f9,#e2e8f0);
  border-color:#94a3b8;
  color:#334155;
}
.prize-bronze{
  background:linear-gradient(135deg,#ffedd5,#fdba74);
  border-color:#ea580c;
  color:#7c2d12;
}

/* Office bearers (public) — one person per row, horizontal card */
.office-bearer-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:18px;
}
.office-bearer-card{
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(180deg,#fff,#f8fafc);
  box-shadow:0 8px 22px rgba(15,23,42,.07);
  display:flex;
  flex-direction:row;
  align-items:stretch;
  min-width:0;
  width:100%;
}
/* Square frame: padding-bottom trick works reliably on mobile Safari (aspect-ratio + abs img can collapse). */
.office-bearer-photo-wrap,
.office-bearer-photo-placeholder{
  position:relative;
  width:150px;
  max-width:100%;
  flex-shrink:0;
  align-self:center;
  box-sizing:border-box;
  overflow:hidden;
}
.office-bearer-photo-wrap::before,
.office-bearer-photo-placeholder::before{
  content:"";
  display:block;
  padding-bottom:100%;
}
.office-bearer-photo-wrap{
  background:#0f172a;
}
.office-bearer-photo-wrap img{
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}
.office-bearer-photo-placeholder{
  background:linear-gradient(145deg,#1e3a8a,#334155);
  color:#e2e8f0;
}
.office-bearer-photo-placeholder .office-bearer-user-icon{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(56px,14vw);
  height:min(56px,14vw);
  opacity:.92;
}
.office-bearer-user-icon{
  display:block;
}
.office-bearer-body{
  padding:14px 18px 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1;
  min-width:0;
  justify-content:center;
}
.office-bearer-name{
  margin:0;
  font-size:1.08rem;
  color:#0f172a;
  line-height:1.3;
}
.office-bearer-role{
  margin:0;
  font-size:.95rem;
  font-weight:700;
  color:#1e3a8a;
}
.office-bearer-inline-contacts{
  margin:2px 0 0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px 10px;
  font-size:.88rem;
  line-height:1.45;
}
.office-bearer-inline-sep{
  color:#94a3b8;
  font-weight:700;
  user-select:none;
}
.office-bearer-icon-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:#1d4ed8;
  text-decoration:none;
  word-break:break-word;
  max-width:100%;
}
.office-bearer-icon-link:hover{text-decoration:underline}
.office-bearer-icon-link span{min-width:0}
.office-bearer-ico{
  width:18px;
  height:18px;
  flex-shrink:0;
  color:#475569;
}
.office-bearer-icon-link .office-bearer-ico{color:#2563eb}
.office-bearer-address-row{
  margin:6px 0 0;
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:.86rem;
  color:#475569;
  line-height:1.5;
}
.office-bearer-ico-pin{
  margin-top:3px;
  color:#64748b;
}
.office-bearer-address-text{min-width:0}
@media (max-width:540px){
  .office-bearer-card{
    flex-direction:column;
    align-items:stretch;
  }
  .office-bearer-photo-wrap,
  .office-bearer-photo-placeholder{
    width:100%;
    max-width:min(150px,100%);
    margin-left:auto;
    margin-right:auto;
    min-width:0;
  }
  .office-bearer-body{
    padding:14px 16px 16px;
    min-width:0;
  }
}

/* Public gallery */
.gallery-page .gallery-block{margin-top:28px}
.gallery-block:first-of-type{margin-top:18px}
.gallery-block-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.gallery-block-dates{
  margin:6px 0 0 0;
  font-size:.85rem;
  color:#64748b;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:6px;
}
.gallery-public-filter{
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  align-items:end;
}
.gallery-block-title{
  margin:0;
  font-size:clamp(1.05rem,2vw,1.35rem);
  color:#1e3a8a;
  position:relative;
  padding-bottom:6px;
}
.gallery-block-title::after{
  content:"";
  position:absolute;
  left:0;bottom:0;
  width:48px;height:3px;border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#a855f7);
}
.gallery-count{font-size:.8rem;font-weight:700;color:#64748b}
.gallery-mosaic{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:10px;
}
@media (min-width:640px){
  .gallery-mosaic{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
}
.gallery-tile{
  position:relative;
  border:0;
  padding:0;
  border-radius:14px;
  overflow:hidden;
  cursor:pointer;
  background:#0f172a;
  box-shadow:0 8px 22px rgba(15,23,42,.12);
  transition:transform .18s ease,box-shadow .18s ease;
}
.gallery-tile:focus-visible{
  outline:3px solid #2563eb;
  outline-offset:2px;
}
.gallery-tile:hover{
  transform:translateY(-3px) scale(1.02);
  box-shadow:0 14px 32px rgba(30,58,138,.2);
}
.gallery-tile img{
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
  display:block;
  vertical-align:middle;
}

.gallery-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  grid-template-columns:48px 1fr 48px;
  grid-template-rows:auto 1fr auto;
  align-items:center;
  justify-items:center;
  padding:12px;
  box-sizing:border-box;
}
.gallery-lightbox[hidden]{display:none !important}
.gallery-lb-backdrop{
  position:absolute;
  inset:0;
  background:rgba(2,6,23,.88);
  backdrop-filter:blur(6px);
}
.gallery-lb-close{
  position:absolute;
  top:12px;right:12px;
  z-index:3;
  width:44px;height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(15,23,42,.5);
  color:#f8fafc;
  font-size:1.6rem;
  line-height:1;
  cursor:pointer;
}
.gallery-lb-nav{
  z-index:2;
  width:44px;height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.3);
  background:rgba(15,23,42,.45);
  color:#fff;
  font-size:1.8rem;
  line-height:1;
  cursor:pointer;
  display:grid;
  place-items:center;
}
.gallery-lb-prev{grid-column:1;grid-row:2}
.gallery-lb-next{grid-column:3;grid-row:2}
.gallery-lb-stage{
  grid-column:2;
  grid-row:1/4;
  position:relative;
  z-index:2;
  max-width:min(96vw,1100px);
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  pointer-events:none;
}
.gallery-lb-img{
  max-height:min(78vh,820px);
  max-width:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 20px 50px rgba(0,0,0,.45);
  pointer-events:auto;
}
.gallery-lb-heading{
  margin:0;
  color:#e2e8f0;
  font-weight:700;
  font-size:.95rem;
  text-align:center;
  max-width:100%;
}
.gallery-lb-dates{
  margin:0;
  color:#94a3b8;
  font-size:.86rem;
  text-align:center;
  max-width:100%;
}
.gallery-lb-counter{
  margin:0;
  color:#94a3b8;
  font-size:.82rem;
}
@media (max-width:600px){
  .gallery-lightbox{
    grid-template-columns:36px 1fr 36px;
    padding:8px;
  }
  .gallery-lb-nav{
    width:40px;
    height:40px;
    font-size:1.5rem;
  }
  .gallery-lb-close{top:8px;right:8px}
}

/* Admin gallery thumbnails */
.gallery-admin-thumbs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.gallery-admin-thumb{
  position:relative;
  width:100px;
  height:100px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#0f172a;
}
.gallery-admin-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.gallery-admin-del{
  position:absolute;
  top:4px;right:4px;
  width:26px;height:26px;
  border-radius:999px;
  background:rgba(127,29,29,.92);
  color:#fff;
  font-weight:800;
  line-height:26px;
  text-align:center;
  text-decoration:none;
  font-size:1rem;
}
.gallery-admin-del:hover{text-decoration:none;opacity:.92}

@media (max-width:900px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:static}
  .sidebar-head{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:8px;
  }
  .sidebar-head-branding{
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    gap:10px;
    flex:1;
    min-width:0;
    width:auto;
  }
  .sidebar-brand{
    margin:0;
    flex-shrink:0;
  }
  .sidebar-brand img{max-height:34px}
  .sidebar-assoc-name{
    display:block;
    text-align:left;
    flex:1;
    min-width:0;
  }
  .sidebar-toggle{display:flex}
  .sidebar-nav{display:none;flex-direction:column}
  .sidebar-nav.open{display:flex}
  .sidebar-link{font-size:.86rem}
  .grid{grid-template-columns:1fr}
  .inline-form{grid-template-columns:1fr}
  .view-filter-grid{grid-template-columns:1fr}
  .panel{padding:14px}
  .container{padding:12px}
  .table-mobile-cards table{min-width:100%;border-collapse:separate;border-spacing:0}
  .table-mobile-cards thead{display:none}
  .table-mobile-cards tbody{display:block}
  .table-mobile-cards tr{
    display:block;
    border:1px solid var(--border);
    border-radius:12px;
    margin:10px;
    padding:8px;
    background:#fff;
  }
  .table-mobile-cards td{
    display:grid;
    grid-template-columns:120px 1fr;
    gap:8px;
    border:0;
    padding:6px 4px;
    text-align:left;
  }
  .table-mobile-cards td::before{
    content:attr(data-label);
    font-weight:700;
    color:#475569;
  }
  .table-mobile-cards td.action-cell{
    display:flex !important;
    align-items:center;
    gap:6px;
    white-space:nowrap;
  }
  .table-mobile-cards td.action-cell::before{
    content:none;
  }
}
@media (max-width:420px){
  .table-mobile-cards td{
    grid-template-columns:1fr;
  }
  .table-mobile-cards td::before{
    margin-bottom:2px;
  }
}
@media (max-width:640px){
  .floating-whatsapp{
    width:42px;
    height:42px;
    right:12px !important;
    bottom:12px !important;
  }
  .container{width:100vw;padding:10px}
  .panel{padding:12px;border-radius:12px}
  th,td{padding:8px;font-size:.84rem}
  .btn{padding:10px 12px}
  .chip{padding:6px 10px;font-size:.78rem}
}
