@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; max-width: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; background: #f8f7f4; color: #222; overflow-x: hidden; max-width: 100%; scrollbar-width: none; }
body::-webkit-scrollbar { display: none; }
.pdf-export .no-print,
.pdf-export .page-header,
.pdf-export .report-filter-card,
.pdf-export .filter-card { display:none !important; }
.pdf-export .print-header { display:block !important; }
.pdf-export .admin-main { margin:0 !important;padding:8px !important;background:#fff !important;width:100% !important;flex:0 0 auto !important;box-sizing:border-box !important; }
.pdf-export .table-card { box-shadow:none !important;border:0 !important; }
.pdf-export .admin-main > :not(.report-document-header),
.pdf-export .admin-main > :not(.report-document-header) * { font-family:Verdana, Geneva, sans-serif !important;font-size:8pt !important;line-height:1.2 !important; }
.pdf-export .admin-main table { width:max-content !important;min-width:100% !important;border-collapse:collapse !important;table-layout:auto !important; }
.pdf-export .admin-main table th,
.pdf-export .admin-main table td { padding:4px 6px !important;vertical-align:middle !important;white-space:nowrap !important;word-break:normal !important;overflow-wrap:normal !important;font-family:Verdana, Geneva, sans-serif !important;font-size:8pt !important; }
.pdf-export .admin-main table .report-name-column { white-space:normal !important;overflow-wrap:anywhere !important;min-width:90px;max-width:180px; }
.report-filter-title { font-size:.9rem;font-weight:750;color:#374151;margin-bottom:1rem;padding-bottom:.65rem;border-bottom:1px solid #e5e7eb; }
.report-view-actions { display:flex;justify-content:flex-end;align-items:center;gap:.6rem;margin-bottom:.75rem; }
.report-filter-card .filter-grid { grid-template-columns:repeat(auto-fit,minmax(195px,1fr)) !important;gap:1rem !important;align-items:end !important; }
.report-filter-card .filter-label { min-height:18px;font-size:.78rem !important;font-weight:650 !important;color:#4b5563 !important;margin-bottom:.35rem !important; }
.report-filter-card .form-input,.report-filter-card .form-select,.report-filter-card .ms-btn { width:100%;height:38px !important;min-height:38px;box-sizing:border-box;border:1px solid #d1d5db !important;border-radius:7px !important;background:#fff;font-size:.82rem !important; }
.report-filter-card .form-input,.report-filter-card .form-select { padding:.45rem .7rem !important; }
.report-filter-card .ms-btn { padding:.45rem .7rem !important;display:flex;align-items:center; }
.report-filter-card .btn { height:38px !important;display:inline-flex;align-items:center;justify-content:center;border-radius:7px !important;font-size:.82rem !important; }
.report-fields-section { margin-top:.25rem;padding:.85rem 1rem;border:1px solid #dfe3e8;border-radius:9px;background:#fafaf9; }
.report-fields-head { display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.65rem; }
.report-fields-title { font-size:.8rem;font-weight:750;color:#374151; }
.report-fields-action { border:0;background:transparent;color:#7c1a1a;font-size:.74rem;font-weight:650;cursor:pointer;padding:.2rem .35rem; }
.report-fields-action:hover { text-decoration:underline; }
.report-fields-options { display:flex;flex-wrap:wrap;gap:.45rem 1rem; }
.report-field-option { display:flex;align-items:center;gap:.35rem;font-size:.79rem;color:#374151;cursor:pointer;min-width:105px; }
.report-field-option input { width:14px;height:14px;accent-color:#7c1a1a; }

/* ── PUBLIC PAGES ── */
.public-nav { background: linear-gradient(90deg,#6b1111 0%,#7c1a1a 60%,#8b2020 100%); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 2.5rem; height: 82px; box-shadow: 0 3px 18px rgba(90,10,10,.35); position: sticky; top: 0; z-index: 100; }
.public-nav .brand { display: flex; align-items: center; gap: 1rem; font-size: 1.15rem; font-weight: 800; letter-spacing: .01em; }
.public-nav .brand-name { line-height: 1.2; }
.public-nav .brand-name .sub { font-size: .72rem; font-weight: 400; opacity: .8; letter-spacing: .04em; display: block; }
.public-nav .logo-circle { width: 72px; height: 72px; border-radius: 50%; background: #fff; color: #7c1a1a; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: bold; box-shadow: 0 2px 10px rgba(0,0,0,.25); flex-shrink: 0; }
.public-nav .nav-links { display: flex; gap: 2rem; }
.public-nav .nav-links a { color: rgba(255,255,220,.9); text-decoration: none; font-size: .95rem; font-weight: 500; position: relative; padding-bottom: 3px; transition: color .2s; }
.public-nav .nav-links a::after { content:''; position:absolute; bottom:0; left:0; width:0; height:2px; background:#ffa500; transition:width .25s; }
.public-nav .nav-links a:hover { color: #ffa500; }
.public-nav .nav-links a:hover::after { width: 100%; }
.btn-login { background: linear-gradient(135deg,#ffa500,#e69400); color: #fff; border: none; padding: .55rem 1.5rem; border-radius: 25px; font-weight: 700; cursor: pointer; font-size: .9rem; text-decoration: none; box-shadow: 0 2px 8px rgba(255,165,0,.4); transition: all .2s; letter-spacing: .03em; }
.btn-login:hover { background: linear-gradient(135deg,#e69400,#cc8400); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,165,0,.5); }

/* Hamburger button */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: .4rem; z-index: 200; }
.hamburger span { display: block; width: 25px; height: 2.5px; background: #fff; border-radius: 3px; transition: transform .3s, opacity .3s; }
.hamburger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }


.hero { background: linear-gradient(rgba(60,5,5,.72),rgba(90,10,10,.65)), url('https://images.unsplash.com/photo-1532375810709-75b1da00537c?w=1400') center/cover; color: #fff; text-align: center; padding: 11rem 2rem 10rem; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.hero h1 { font-size: 4rem; font-weight: 900; font-family: Georgia, 'Times New Roman', serif; text-shadow: 0 2px 16px rgba(0,0,0,.5); line-height: 1.1; }
.hero .accent { color: #ffa500; font-size: 4.5rem; text-shadow: 0 2px 20px rgba(255,165,0,.4); }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 1.25rem auto; color: #ffd580; opacity: .92; line-height: 1.7; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.hero-badge { display: inline-block; background: rgba(255,165,0,.2); border: 1px solid rgba(255,165,0,.5); color: #ffd580; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .35rem 1rem; border-radius: 20px; margin-bottom: 1.5rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-wave { position: absolute; bottom: 0; left: 0; right: 0; line-height: 0; pointer-events: none; }
.hero-wave svg { display: block; width: 100%; height: 90px; }
.btn-primary { background: linear-gradient(135deg,#ffa500,#e69400); color: #fff; border: none; padding: .85rem 2.5rem; border-radius: 30px; font-weight: 700; cursor: pointer; font-size: 1rem; text-decoration: none; box-shadow: 0 4px 20px rgba(255,165,0,.45); transition: all .2s; letter-spacing: .03em; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.75); padding: .85rem 2.5rem; border-radius: 30px; font-weight: 700; cursor: pointer; font-size: 1rem; text-decoration: none; transition: all .2s; letter-spacing: .03em; }
.btn-primary:hover { background: linear-gradient(135deg,#e69400,#cc8400); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255,165,0,.55); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-2px); }

.section { padding: 4rem 2rem; max-width: 1100px; margin: 0 auto; }
.section-title { text-align: center; font-size: 1.9rem; font-weight: 800; color: #7c1a1a; margin-bottom: .5rem; font-family: Georgia, 'Times New Roman', serif; }
.section-subtitle { text-align: center; color: #999; font-size: .95rem; margin-bottom: 2.5rem; }
.section-divider { width: 60px; height: 3px; background: linear-gradient(90deg,#ffa500,#e69400); border-radius: 3px; margin: .75rem auto 2.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.stat-card { background: #fff; border: 2px solid #f5e9c8; border-radius: 16px; padding: 2.25rem 2rem; text-align: center; box-shadow: 0 4px 20px rgba(124,26,26,.07); transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(124,26,26,.13); border-color: #ffa500; }
.stat-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.stat-value { font-size: 2.5rem; font-weight: 900; color: #ffa500; font-family: Georgia, serif; }
.stat-label { font-size: .9rem; color: #888; margin-top: .25rem; font-weight: 500; }

/* ── PUBLIC PAGES — MOBILE (must come after desktop rules to win) ── */
@media (max-width: 768px) {
    /* Public nav — wraps so dropdown pushes hero down instead of overlaying it */
    .public-nav { padding: 0 1rem; min-height: 64px; height: auto; max-width: 100vw; width: 100%; flex-wrap: wrap; align-items: center; }
    .public-nav .brand { flex: 1; min-width: 0; }
    .public-nav .logo-circle { width: 52px; height: 52px; font-size: 1.4rem; }
    .public-nav .brand { gap: .6rem; }
    .public-nav .brand-name { font-size: .95rem; }
    .public-nav .brand-name .sub { display: none; }
    .btn-login { padding: .45rem 1rem; font-size: .82rem; }
    .hamburger { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: .5rem 0 .85rem;
        border-top: 1px solid rgba(255,255,255,.12);
        background: transparent;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: .85rem 1.75rem; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); color: #ffe !important; width: 100%; }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links a::after { display: none; }

    /* Hero */
    .hero { padding: 3.5rem 1.25rem 5rem; min-height: 60vh; width: 100%; box-sizing: border-box; overflow: hidden; background-size: cover !important; background-position: center top !important; background-attachment: scroll !important; }
    .hero h1 { font-size: 1.75rem; word-break: break-word; color: #fff; line-height: 1.2; }
    .hero .accent { font-size: 2rem; word-break: break-word; color: #ffa500; }
    .hero p { font-size: .9rem; margin: .85rem auto; max-width: 100%; color: #ffd580; line-height: 1.6; }
    .hero-badge { font-size: .65rem; padding: .25rem .65rem; letter-spacing: .06em; max-width: 90vw; white-space: normal; text-align: center; }
    .hero-btns { margin-top: 1.25rem; gap: .65rem; }
    .btn-primary, .btn-outline { padding: .65rem 1.5rem; font-size: .88rem; }
    .hero-wave svg { height: 50px; }

    /* Community Strength & Contact cards */
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .stat-card { padding: 1.5rem 1.25rem; }

    /* Section spacing */
    .section { padding: 2.25rem 1.1rem; width: 100%; max-width: 100%; box-sizing: border-box; }

    /* Auth pages */
    .auth-page { padding: 1rem; align-items: flex-start; padding-top: 2rem; }
    .auth-card { padding: 1.75rem 1.25rem; border-radius: 12px; width: 100%; max-width: 100%; }
    .auth-logo h2 { font-size: 1.2rem; }
}

/* ── ABOUT SECTION INNER ── */
.about-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 768px) {
    .about-section { padding: 2.25rem 0 !important; }
    .about-inner { padding: 0 1.1rem; }
}

/* ── AUTH ── */
.auth-body { overflow-x: hidden; }
.auth-page { min-height: 100vh; background: linear-gradient(135deg,#7c1a1a 0%,#4a0e0e 60%,#2d0606 100%); display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem 90px; }
.auth-card { background: #fff; border-radius: 20px; padding: 2.5rem 2.25rem; width: 100%; max-width: 400px; box-shadow: 0 32px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06); }
.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo .logo-circle { width: 88px; height: 88px; border-radius: 50%; background: linear-gradient(135deg,#7c1a1a,#4a0e0e); color: #fff; font-size: 2.4rem; display: flex; align-items: center; justify-content: center; margin: 0 auto .9rem; }
.auth-logo .auth-logo-ring { box-shadow: 0 0 0 5px rgba(124,26,26,.2), 0 0 0 10px rgba(124,26,26,.08), 0 8px 24px rgba(124,26,26,.35); }
.auth-logo h2 { font-size: 1.45rem; color: #1a1a1a; font-weight: 800; letter-spacing: -.02em; margin-bottom: .2rem; }
.auth-logo p { color: #6b7280; font-size: .88rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .875rem; color: #374151; }
.form-control { width: 100%; padding: .7rem .9rem; border: 1.5px solid #e5e7eb; border-radius: 10px; font-size: .97rem; transition: border-color .2s, box-shadow .2s; box-sizing: border-box; background: #fafafa; }
.form-control:focus { outline: none; border-color: #7c1a1a; background: #fff; box-shadow: 0 0 0 3px rgba(124,26,26,.1); }
.form-control.with-icon { padding-left: 2.5rem; }
.auth-input-wrap { position: relative; }
.auth-input-icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; display: flex; align-items: center; }
.auth-input-toggle { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #9ca3af; padding: .25rem; display: flex; align-items: center; line-height: 1; }
.auth-input-toggle:hover { color: #6b7280; }
.btn-submit { width: 100%; background: linear-gradient(135deg,#7c1a1a,#5c1212); color: #fff; border: none; padding: .9rem; border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer; margin-top: .75rem; letter-spacing: .01em; box-shadow: 0 4px 16px rgba(124,26,26,.4); transition: all .2s; }
.btn-submit:hover { background: linear-gradient(135deg,#8d1e1e,#6a1515); box-shadow: 0 6px 22px rgba(124,26,26,.5); transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(124,26,26,.35); }
.auth-error { background: #fef2f2; color: #c0392b; border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1.1rem; font-size: .88rem; display: flex; align-items: center; gap: .5rem; border: 1px solid #fecaca; }
.auth-divider { border-top: 1px solid #f3f4f6; margin: 1.4rem 0 1rem; }
.auth-otp-link { color: #7c3aed; font-size: .88rem; text-decoration: none; font-weight: 600; }
.auth-otp-link:hover { color: #6d28d9; text-decoration: underline; }
.auth-back-link { color: #9ca3af; font-size: .82rem; text-decoration: none; }
.auth-back-link:hover { color: #6b7280; }
/* Fixed footer for auth pages */
.auth-footer-fixed { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; }
.auth-footer-fixed .site-footer { background: linear-gradient(180deg,#4a0e0e 0%,#2d0909 100%); border-top-color: rgba(255,255,255,.1); }

/* ── UNIFIED SITE FOOTER ── */
.site-footer {
  background: linear-gradient(180deg,#4a0e0e 0%,#2d0909 100%);
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,220,.85);
  padding: .9rem 2.5rem;
}
.site-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}
/* LEFT: logo + "Company © year" */
.footer-left-group {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.footer-logo-wrap {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,200,100,.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.footer-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.footer-logo-placeholder { font-size: .95rem; color: rgba(255,200,100,.9); line-height: 1; }
.footer-company-name {
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
  white-space: nowrap;
}
/* RIGHT: devby block — label top, company+phone bottom-justified */
.footer-devby-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .12rem;
}
.footer-devby-label {
  color: rgba(255,255,220,.35);
  letter-spacing: .04em;
  font-size: .68rem;
}
.footer-devby-bottom {
  display: flex;
  align-items: flex-end;
  gap: .45rem;
}
.footer-devby-link {
  display: inline-flex; align-items: flex-end; gap: .28rem;
  color: rgba(255,255,220,.75);
  font-weight: 600;
  font-size: .78rem;
  text-decoration: none;
  transition: color .15s;
}
.footer-devby-link:hover { color: #fff; }
.footer-devby-logo { height: 13px; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .6; }
.footer-phone-link {
  display: inline-flex; align-items: flex-end; gap: .28rem;
  color: rgba(255,200,100,.85);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  transition: color .15s;
  white-space: nowrap;
}
.footer-phone-link:hover { color: #ffd700; }
@media (max-width: 700px) {
  .site-footer { padding: .8rem 1rem; }
  .site-footer-bar { flex-direction: column; align-items: center; gap: .5rem; width: 100%; text-align: center; }
  .footer-left-group { width: 100%; flex-wrap: wrap; justify-content: center; }
  .footer-company-name { white-space: normal; word-break: break-word; font-size: .82rem; }
  .footer-devby-block { width: 100%; align-items: center; }
  .footer-devby-bottom { flex-wrap: wrap; gap: .35rem; justify-content: center; }
  .footer-devby-link { font-size: .75rem; }
  .footer-phone-link { font-size: .75rem; }
  .footer-devby-label { font-size: .65rem; text-align: center; }
}

/* ── ADMIN / MEMBER LAYOUT ── */
.admin-body { background: #f0ede8; overflow: hidden; }
.admin-body > .site-footer { display: block; position: fixed; left: 240px; right: 0; bottom: 0; z-index: 20; }
.admin-wrapper { display: flex; height: 100vh; min-height: 0; overflow: hidden; }
.sidebar { width: 240px; height: 100vh; background: linear-gradient(180deg,#4a0e0e 0%,#2d0909 100%); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; }
.sidebar-header { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.logo-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.logo-title { font-weight: 700; font-size: 1rem; }
.logo-sub { font-size: .75rem; opacity: .7; }
.sidebar-nav { flex: 1 1 auto; min-height: 0; padding: 1rem 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.sidebar-nav { scrollbar-color: rgba(255,165,0,.7) rgba(255,255,255,.08); }
.sidebar-nav::-webkit-scrollbar, .table-card::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar-nav::-webkit-scrollbar-track { background: rgba(255,255,255,.08); border-radius: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,165,0,.75); border-radius: 8px; border: 2px solid rgba(74,14,14,.7); }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: #ffa500; }
.table-card { scrollbar-color: #9b5b5b #f1e9e5; }
.table-card::-webkit-scrollbar-track { background: #f1e9e5; border-radius: 8px; }
.table-card::-webkit-scrollbar-thumb { background: #9b5b5b; border-radius: 8px; border: 2px solid #f1e9e5; }
.table-card::-webkit-scrollbar-thumb:hover { background: #7c1a1a; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.25rem; color: rgba(255,255,255,.8); text-decoration: none; font-size: .9rem; transition: background .15s; }
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: rgba(255,165,0,.2); color: #ffa500; border-right: 3px solid #ffa500; }
.nav-item.nav-sub { padding: .5rem 1.25rem .5rem 2rem; font-size: .83rem; opacity: .9; }
.nav-item-wa, .nav-item-wa:hover, .nav-item-wa.active { background: #25d366 !important; color: #fff !important; border-right: none !important; font-weight: 600; }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-footer { flex-shrink: 0; padding: 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.logout-btn { width: 100%; background: rgba(255,255,255,.1); color: #fff; border: none; padding: .6rem; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.logout-btn:hover { background: rgba(255,255,255,.2); }

.admin-main { flex: 1; min-width: 0; min-height: 0; height: 100vh; padding: 1.5rem 2rem; overflow-x: auto; overflow-y: auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-title { font-size: 1.75rem; font-weight: 700; color: #8b0032; font-family: Georgia, 'Times New Roman', serif; }
.page-subtitle { font-size: .9rem; color: #777; }
.print-header { display: none; }

/* ── CARDS & STATS ── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box { background: #fff; border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-box .s-label { font-size: .8rem; color: #888; margin-bottom: .25rem; }
.stat-box .s-val { font-size: 2rem; font-weight: 800; color: #7c1a1a; }
.stat-box .s-sub { font-size: .75rem; color: #aaa; margin-top: .25rem; }

/* ── TABLE ── */
.table-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); max-height: calc(100vh - 180px); overflow: auto; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #f0ede8; }
.table-title { font-weight: 600; font-size: 1rem; }
.search-box { padding: .45rem .9rem; border: 1.5px solid #ddd; border-radius: 8px; font-size: .9rem; width: 220px; }
table { width: 100%; border-collapse: collapse; }
th { background: #fafaf8; font-size: .8rem; font-weight: 600; color: #888; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #eee; }
td { padding: .75rem 1rem; font-size: .9rem; border-bottom: 1px solid #f5f5f5; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafaf8; }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.badge-yellow { background: #fef9c3; color: #ca8a04; }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 8px; font-size: .85rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }
.btn-dark { background: #2d0909; color: #fff; }
.btn-dark:hover { background: #4a0e0e; }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }
.btn-edit { background: #dbeafe; color: #1d4ed8; }
.btn-edit:hover { background: #bfdbfe; }
.btn-success { background: #dcfce7; color: #16a34a; }
.btn-success:hover { background: #bbf7d0; }
.btn-orange { background: #ffa500; color: #fff; }
.btn-orange:hover { background: #e69400; }

/* ── FORMS ── */
.form-card { background: #fff; border-radius: 12px; padding: 2rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); max-width: 700px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-full { grid-column: 1/-1; }
.form-row { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.form-input, .form-select, .form-textarea { width: 100%; padding: .6rem .85rem; border: 1.5px solid #ddd; border-radius: 8px; font-size: .95rem; font-family: inherit; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: #7c1a1a; }

/* Keep every admin selection control aligned with the maroon product theme. */
.admin-body select.form-select {
    color: #111827;
    background-color: #fff;
    accent-color: #7c1a1a;
}
.admin-body select.form-select:focus {
    border-color: #7c1a1a;
    box-shadow: 0 0 0 3px rgba(124, 26, 26, .12);
}
.admin-body select.form-select option {
    color: #111827;
    background: #fff;
    padding: .5rem .7rem;
}
.admin-body select.form-select option:checked {
    color: #641818;
    background: linear-gradient(#f7eaea, #f7eaea);
    font-weight: 700;
}
.admin-body input[type="checkbox"],
.admin-body input[type="radio"] {
    accent-color: #7c1a1a;
}
.admin-body .ms-opt:has(input:checked),
.admin-body .rb-opt:has(input:checked) {
    color: #7c1a1a;
    background: #fdf4f4;
    font-weight: 700;
}
.themed-select-picker { position: relative; width: 100%; }
.themed-select-native { position: absolute !important; opacity: 0 !important; width: 1px !important; height: 1px !important; pointer-events: none !important; }
.themed-select-trigger { width: 100%; text-align: left; background: #fff; color: #111827; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.themed-select-trigger::after { content: "▾"; color: #7c1a1a; font-size: .72rem; flex-shrink: 0; }
.themed-select-picker.open .themed-select-trigger { border-color: #7c1a1a; box-shadow: 0 0 0 3px rgba(124,26,26,.12); }
.themed-select-panel { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 1060; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.16); overflow: hidden; }
.themed-select-picker.open .themed-select-panel { display: block; }
.themed-select-search-wrap { padding: .5rem; background: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.themed-select-search { width: 100%; height: 34px; padding: .4rem .65rem; font-size: .84rem; background: #fff; }
.themed-select-list { max-height: 220px; overflow-y: auto; }
.themed-select-option { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .58rem .72rem; border: 0; border-bottom: 1px solid #f3f4f6; background: #fff; color: #111827; text-align: left; font-size: .88rem; cursor: pointer; }
.themed-select-option:hover, .themed-select-option:focus { background: #fbf5f5; color: #641818; outline: none; }
.themed-select-option.selected { background: #f7eaea; color: #641818; font-weight: 700; box-shadow: inset 3px 0 0 #7c1a1a; }
.themed-select-option.selected:hover, .themed-select-option.selected:focus { background: #f2dddd; color: #571313; }
.themed-select-option-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.themed-select-empty { padding: .7rem; color: #6b7280; font-size: .82rem; }
/* Master pickers always retain their create/delete action footer. */
.master-picker-panel { overflow: hidden !important; }
.master-picker-list { min-height: 42px; }
.master-inline-actions {
    display: flex !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    min-height: 44px;
    border-top: 1px solid #e5e7eb !important;
    background: #f8fafc !important;
}
.master-inline-actions > .btn { display: inline-flex !important; visibility: visible !important; }
.master-inline-actions > .btn:disabled { display: inline-flex !important; opacity: .5; cursor: not-allowed; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }
.val-error { color: #dc2626; font-size: .82rem; margin-top: .25rem; }

/* ── RECEIPT PRINT ── */
.receipt { position:relative; max-width: 600px; margin: 2rem auto; background: #fff; border-radius: 12px; padding: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,.1); border: 1px solid #f0e6d8; }
.receipt .document-developer-watermark { position:absolute;left:10px;right:10px;bottom:5px;z-index:3;pointer-events:none;line-height:0;opacity:.08;border-top:1px solid #9ca3af;padding-top:3px;display:flex;justify-content:flex-end;align-items:center; }
.receipt .document-developer-watermark img { display:block;width:auto;height:20px;max-width:40px;object-fit:contain;filter:grayscale(1) saturate(0) brightness(.65) contrast(.8); }
.receipt-header { display: flex; align-items: center; gap: 1rem; border-bottom: 3px solid #7c1a1a; margin: -2rem -2rem 1.5rem; padding: 1.5rem 2rem 1.25rem; border-radius: 12px 12px 0 0; background: linear-gradient(180deg,#fff7ec 0%,#fff 100%); }
.receipt-header-text { flex: 1; text-align: center; }
.receipt-logo { width: 80px !important; height: 80px !important; max-width: 80px !important; max-height: 80px !important; border-radius: 50%; object-fit: contain; object-position: center; background: #fff; border: 3px solid #ffa500; box-shadow: 0 2px 10px rgba(124,26,26,.2); flex-shrink: 0; }
.receipt-logo-placeholder { font-size: 3rem; flex-shrink: 0; line-height: 1; }
.receipt-header h2 { color: #7c1a1a; font-size: 1.4rem; font-family: Georgia, 'Times New Roman', serif; }
.receipt-header-text > div { color: #6b1111; }
.receipt-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px dashed #eee; font-size: .95rem; }
.receipt-row .label { color: #666; }
.receipt-total { display: flex; justify-content: space-between; padding: 1rem 0; margin: .5rem -2rem -2rem; padding: 1rem 2rem; font-size: 1.15rem; font-weight: 800; color: #fff; background: linear-gradient(135deg,#7c1a1a,#5a0e0e); border-radius: 0 0 12px 12px; }
@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
    .no-print, .sidebar, .sidebar-footer, .site-footer, .alert, .mobile-topbar, .report-mob-menu, .admin-topbar, .page-header { display: none !important; }
    .admin-wrapper { display: block !important; }
    .admin-main { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; }
    body { background: #fff !important; }
    .receipt { box-shadow: none !important; border: 1px solid #ccc !important; margin: 0 !important; max-width: 100% !important; border-radius: 8px !important; }
    .receipt + div { max-width: 100% !important; margin: 1rem 0 0 !important; }
}

/* ── HALL BOOKING PAGE ── */
.hall-hero-strip {
    background: linear-gradient(135deg,#7c1a1a,#4a0e0e);
    color: #fff;
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    box-sizing: border-box;
    width: 100%;
}
.hall-hero-title { font-size: 2.2rem; font-weight: 800; font-family: Georgia,serif; margin-bottom: .5rem; }
.hall-hero-sub { font-size: 1rem; opacity: .85; margin-bottom: 1.5rem; }
.hall-contact-box {
    display: inline-flex; align-items: center; gap: 1rem;
    background: rgba(255,255,255,.12); border: 2px solid rgba(255,165,0,.6);
    border-radius: 14px; padding: 1rem 2rem;
    max-width: 100%; box-sizing: border-box; text-align: left;
}
.hall-main-wrap { max-width: 1160px; margin: 0 auto; padding: 2.5rem 1.5rem; box-sizing: border-box; width: 100%; }
.hall-cal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.hall-cal-cell { padding: 1.5rem; }
.hall-cal-left { border-right: 1px solid #f0ede8; }
.hall-rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .75rem; }

/* Hall header */
.hall-header { background: linear-gradient(135deg,#4a0e0e,#7c1a1a); color: #fff; padding: 1.25rem 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hall-header-info { flex: 1; min-width: 0; }
.hall-header-name { font-size: 1.25rem; font-weight: 800; font-family: Georgia,serif; }
.hall-header-desc { font-size: .85rem; opacity: .8; margin-top: .3rem; }
.hall-header-stats { display: flex; gap: 1.5rem; flex-shrink: 0; }
.hall-stat { text-align: center; }
.hall-stat-label { font-size: .7rem; opacity: .7; text-transform: uppercase; }
.hall-stat-val { font-size: 1.3rem; font-weight: 800; }
.hall-stat-val.orange { color: #ffa500; }
.hall-stat-val.green { color: #6ee7b7; }
.hall-stat-sub { font-size: .7rem; opacity: .7; }

@media (max-width: 768px) {

    .admin-body > .site-footer { left: 0; }
    .hall-hero-strip { padding: 2rem 1rem 1.5rem; }
    .hall-hero-title { font-size: 1.5rem; }
    .hall-hero-sub { font-size: .9rem; margin-bottom: 1rem; }
    .hall-contact-box { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1rem; gap: .6rem; width: 100%; border-radius: 12px; }
    .hall-main-wrap { padding: 1.25rem .85rem; }
    .hall-cal-grid { grid-template-columns: 1fr; }
    .hall-cal-left { border-right: none; border-bottom: 1px solid #f0ede8; }
    .hall-cal-cell { padding: 1rem; }
    .hall-rules-grid { grid-template-columns: 1fr; }

    /* Hall header: name full-width on top, stats in one compact row below */
    .hall-header { flex-direction: column; align-items: stretch; padding: 1rem; gap: .75rem; }
    .hall-header-stats { width: 100%; justify-content: space-between; gap: .5rem; }
    .hall-stat { flex: 1; }
    .hall-stat-val { font-size: 1.1rem; }
    .hall-stat-label { font-size: .65rem; }
    .hall-stat-sub { font-size: .65rem; }
}

/* ── SCROLL TO TOP ── */
#scrollTopBtn { position: fixed; bottom: 2rem; right: 2rem; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg,#7c1a1a,#5a0e0e); color: #fff; border: none; font-size: 1.3rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(90,10,10,.4); opacity: 0; transform: translateY(20px); transition: opacity .3s, transform .3s; pointer-events: none; z-index: 999; line-height: 1; display: flex; align-items: center; justify-content: center; }
#scrollTopBtn.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#scrollTopBtn:hover { background: linear-gradient(135deg,#ffa500,#e69400); box-shadow: 0 6px 20px rgba(255,165,0,.45); transform: translateY(-3px); }

/* ── ALERTS ── */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ── STAT ROW (3-up) ── */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* ── MODALS ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; align-items: flex-start; justify-content: center; padding: 3rem 1rem; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 480px; padding: 1.5rem; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; font-size: 1.15rem; font-weight: 700; color: #2d0909; margin-bottom: 1.25rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: #999; }
.modal-close:hover { color: #333; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.25rem; }
.mp-summary { background: #fafaf8; border: 1px solid #f0ede8; border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ── MISC ── */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #7c1a1a; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.action-btns { display: flex; gap: .4rem; }
.empty-state { text-align: center; padding: 3rem; color: #aaa; }
.card { background: #fff; border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.text-muted { color: #888; font-size: .85rem; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.member-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1rem; }
.member-card { background: #fff; border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.member-card h3 { font-size: 1rem; font-weight: 700; }
.tab-bar { display: flex; gap: .5rem; margin-bottom: 1.25rem; border-bottom: 2px solid #eee; }
.tab-btn { padding: .6rem 1.2rem; background: none; border: none; border-bottom: 3px solid transparent; font-size: .95rem; cursor: pointer; font-weight: 600; color: #888; margin-bottom: -2px; }
.tab-btn.active { border-bottom-color: #7c1a1a; color: #7c1a1a; }
.tab-content { display: none; } .tab-content.show { display: block; }
.report-section { background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 1.5rem; }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th { background: #f8f7f4; padding: .6rem .9rem; text-align: left; font-size: .85rem; color: #666; }
.report-table td { padding: .6rem .9rem; border-bottom: 1px solid #f0ede8; font-size: .9rem; }
.content-field { margin-bottom: 1.25rem; padding: 1rem; background: #fafaf8; border-radius: 10px; }
.content-field label { font-weight: 600; font-size: .85rem; display: block; margin-bottom: .4rem; }
.content-field input, .content-field textarea { width: 100%; padding: .6rem .85rem; border: 1.5px solid #ddd; border-radius: 8px; font-size: .9rem; }
.content-field .save-row { display: flex; gap: .5rem; margin-top: .5rem; align-items: center; }

/* ── QV GRID & ROOMS FORM GRIDS ── */
.qv-grid { gap: .6rem 1.5rem; }
.rooms-form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 1rem; }
.rooms-form-grid-5 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }

/* Dashboard & reports charts */
.stats-row-3 { grid-template-columns: repeat(3, 1fr); }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 1rem; }
.report-hero-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; margin-bottom: 1rem; }
.hero-card { border-radius: 12px; padding: 2rem; color: #fff; display: flex; flex-direction: column; justify-content: center; }
.hero-primary { background: linear-gradient(135deg,#7c1a1a,#5a0e0e); }
.hero-rose { background: linear-gradient(135deg,#ca8a04,#a16207); }
.hero-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; margin-bottom: .5rem; }
.hero-val { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.hero-sub { font-size: .85rem; opacity: .8; margin-top: .5rem; }
.chart-legend-row { display: flex; gap: 1.5rem; align-items: center; padding: 1rem; flex-wrap: wrap; }
.chart-box { width: 180px; height: 180px; flex-shrink: 0; }
.legend-list { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: .6rem; }
.legend-item { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid #f0ede8; padding-bottom: .5rem; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.legend-label { font-weight: 600; font-size: .9rem; }
.legend-amt { margin-left: auto; font-weight: 700; font-size: .9rem; }
.legend-amt small { color: #999; font-weight: 500; }
@media (max-width: 900px) { .dash-grid, .report-hero-grid { grid-template-columns: 1fr; } .stats-row-3 { grid-template-columns: repeat(2, 1fr); } }
@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
    .sidebar, .sidebar-footer, .site-footer, .no-print, canvas, .alert, .page-header, .filter-card, .report-filter-card, .group-divider, .mobile-topbar, .report-mob-menu, .admin-topbar { display: none !important; }
    .admin-wrapper { display: block !important; }
    .admin-main { margin: 0 !important; padding: 4mm 0 0 !important; width: 100% !important; max-width: 100% !important; }
    body { background: #fff !important; }
    .print-header { display: block !important; }
    .table-card { border: none !important; box-shadow: none !important; padding: 0 !important; }
    table { font-size: .75rem !important; width: 100% !important; table-layout: auto !important; }
    th, td { padding: .3rem .5rem !important; word-break: break-word; }
    @page { margin: 12mm 10mm; size: A4 portrait; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Admin & Member Portal
   ═══════════════════════════════════════════════════════════ */

/* Mobile top bar (hidden on desktop) */
.mobile-topbar {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 500;
    height: 56px;
    background: linear-gradient(90deg,#4a0e0e,#2d0909);
    align-items: center; justify-content: space-between;
    padding: 0 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

/* Hamburger button */
.mob-hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    background: none; border: none; cursor: pointer; padding: .4rem;
    width: 40px; height: 40px;
}
.mob-hamburger span {
    display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.mob-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mob-hamburger.active span:nth-child(2) { opacity: 0; }
.mob-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Report page: floating hamburger (no colored topbar) ── */
.report-mob-menu {
    display: none;
    position: fixed; top: 10px; left: 10px; z-index: 500;
    background: rgba(255,255,255,.95); border: 1px solid #e5e7eb;
    border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.report-mob-menu span { background: #7c1a1a; }

/* Sidebar close button (visible only on mobile) */
.sidebar-close-btn {
    display: none;
    background: rgba(255,255,255,.15); border: none; color: #fff;
    width: 28px; height: 28px; border-radius: 50%; font-size: .9rem;
    cursor: pointer; flex-shrink: 0; align-items: center; justify-content: center;
}

/* Sidebar overlay / backdrop */
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 490;
}
.sidebar-overlay.open { display: block; }

/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {

    /* Show mobile topbar */
    .mobile-topbar { display: flex; }

    /* Push main content below topbar */
    .admin-wrapper { padding-top: 56px; display: block; height: 100vh; overflow: hidden; max-width: 100vw; }
    /* Report pages: no topbar, so no offset needed */
    body.no-mob-topbar .admin-wrapper { padding-top: 0; }
    /* Show floating hamburger on report pages */
    .report-mob-menu { display: flex; }

    /* Sidebar: slide in from left */
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: 260px; z-index: 495;
        transform: translateX(-100%);
        transition: transform .28s ease;
        overflow-y: auto; overflow-x: hidden;
        padding-top: 0;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close-btn { display: inline-flex; }

    /* Main content: full width, no overflow */
    .admin-main { height: 100%; padding: 1rem; width: 100%; max-width: 100vw; overflow-x: hidden; overflow-y: auto; }

    /* Prevent any child from leaking outside */
    .admin-main > * { max-width: 100%; }
    /* Keep table-card scrollable; other cards just clamp width */
    .card, .form-card, .report-filter-card, .report-section { max-width: 100%; }
    /* Force all grids to single column on mobile — overrides inline styles */
    .dash-grid   { grid-template-columns: 1fr !important; }
    .stats-row   { grid-template-columns: 1fr 1fr !important; }
    .stats-row-3 { grid-template-columns: 1fr 1fr !important; }

    /* Page header: stack vertically */
    .page-header {
        flex-direction: column; align-items: flex-start;
        gap: .75rem; margin-bottom: 1rem;
    }
    .page-header > div:last-child { display: flex; flex-wrap: wrap; gap: .4rem; width: 100%; }
    .page-title { font-size: 1.35rem; }

    /* Stats rows: 1-column on phone */
    .stats-row  { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .stat-row   { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .stats-row-3 { grid-template-columns: 1fr 1fr; }

    /* Forms: single column */
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 1.25rem; }
    .form-actions { flex-wrap: wrap; }

    /* Grids */
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }

    /* Tables: horizontal scroll — scoped inside card only */
    .table-card { max-height: calc(100vh - 150px); overflow: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
    .table-card table { min-width: 500px; }
    .table-toolbar {
        flex-direction: column; align-items: flex-start;
        gap: .5rem; padding: .75rem 1rem;
    }
    .search-box { width: 100%; }

    /* Buttons: wrap */
    .action-btns { flex-wrap: wrap; }

    /* Alerts */
    .alert { font-size: .85rem; }

    /* Modal */
    .modal-overlay { padding: 1rem .75rem; align-items: flex-end; }
    .modal-box { max-width: 100%; border-radius: 14px 14px 0 0; }

    /* Receipt */
    .receipt { margin: .5rem; padding: 1.25rem; }
    .receipt-header { margin: -1.25rem -1.25rem 1rem; padding: 1rem 1.25rem; flex-direction: column; text-align: center; gap: .5rem; }

    /* Filter grids (reports) */
    .filter-grid { grid-template-columns: 1fr !important; }

    /* Tab bar scroll */
    .tab-bar { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; padding-bottom: 2px; }
    .tab-btn { flex-shrink: 0; }

    /* Member cards */
    .member-cards { grid-template-columns: 1fr; }

    /* Sidebar nav in mobile has bigger tap targets */
    .nav-item { padding: .85rem 1.25rem; font-size: .95rem; }
    .nav-item.nav-sub { padding: .7rem 1.25rem .7rem 2rem; }

    /* Legend chart */
    .chart-legend-row { flex-direction: column; }
    .chart-box { width: 140px; height: 140px; margin: 0 auto; }

    /* Scroll top btn */
    #scrollTopBtn { bottom: 1rem; right: 1rem; width: 40px; height: 40px; font-size: 1.1rem; }

    /* Rooms form grids */
    .rooms-form-grid, .rooms-form-grid-5 { grid-template-columns: 1fr 1fr; }

    /* Checkout/details sidebar layout */
    .checkout-layout, [style*="display:flex"][style*="gap:1.5rem"] { flex-direction: column !important; }

    /* Page-level full-width override */
    .form-card { max-width: 100%; }
    .report-filter-card { padding: .9rem; }
}

/* ── Small phones (≤ 480px) ── */
@media (max-width: 480px) {
    .stats-row  { grid-template-columns: 1fr; }
    .stat-row   { grid-template-columns: 1fr; }
    .stats-row-3 { grid-template-columns: 1fr; }
    .admin-main { padding: .75rem; }
    .page-title { font-size: 1.2rem; }
}
