/* =====================================================================
   WMAC REPORTS – shared design
   Location: wp-content/themes/wmac/wmac-reports.css
   Used by: report-new-attendance.php (Live Check-in Report Attendance)
            Report-sales-live.php     (Sales Reports)
   Any new report page with the same design only needs:
     <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/wmac-reports.css">
     <body class="wl-page">  <main class="wl-wrap"> <div class="wl-card"> <div id="wmac-live"> ...
   ===================================================================== */

/* ---------- 1. Page layout (no theme header / footer) ---------- */
html{font-size:16px;-webkit-text-size-adjust:100%}
body.wl-page{margin:0;background:#f3f4f6;color:#2b2f36;font:14px/1.45 "Segoe UI",Ubuntu,Roboto,Arial,sans-serif}
body.wl-page button,body.wl-page input,body.wl-page select{font-family:inherit;font-size:14px}
.wl-backlink{text-align:right;margin-bottom:8px}
.wl-backlink a{color:#6b7280;font-size:13px;text-decoration:none}
.wl-backlink a:hover{color:#c8102e}
.wl-card{background:#fff;border:1px solid #e3e5e8;border-radius:6px;padding:20px}
.wl-wrap{max-width:1180px;margin:0 auto;padding:16px}
/* top bar: title + LIVE on the left, search controls on the right */
#wmac-live .wl-top{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end;justify-content:space-between;border-bottom:1px solid #e3e5e8;padding-bottom:16px}
#wmac-live .wl-left{display:flex;gap:14px;align-items:center;min-width:0;flex:1 1 auto}
#wmac-live .wl-left img{width:56px;height:56px;object-fit:contain;flex:0 0 56px}
#wmac-live .wl-h1{margin:0;font-size:22px;line-height:1.2;color:#2b2f36;font-weight:700}
#wmac-live .wl-sub{color:#6b7280;margin-top:4px}
#wmac-live .wl-sub strong{color:#2b2f36}
#wmac-live .wl-controls{display:flex;flex-wrap:nowrap;gap:10px;align-items:flex-end;flex:0 0 auto}
#wmac-live .commonreportrow{margin:0;padding:0}
#wmac-live form#tournament_entries{display:flex !important;flex-wrap:nowrap;gap:10px;align-items:flex-end;margin:0}
#wmac-live .commonreportrow .col-sm-4{padding:0 !important;width:auto;float:none;max-width:none}
#wmac-live .commonreportrow label{display:block;font-size:12px;color:#6b7280;margin:0 0 3px;font-weight:400}
#wmac-live .commonreportrow .form-group{margin:0;align-items:center}
#wmac-live .commonreportrow select{border:1px solid #e3e5e8;background:#f8f9fa;border-radius:3px;padding:7px 10px;font:inherit;color:#2b2f36;height:auto;max-width:100%;margin:0}
#wmac-live .commonreportrow #tournament_id{width:205px;min-width:0}
#wmac-live .commonreportrow #tournamenr_year{width:75px;min-width:0}
#wmac-live .commonreportrow .form-group b{white-space:nowrap}
#wmac-live input[type=submit]{border:1px solid #c8102e;border-radius:4px;padding:7px 16px;font:inherit;cursor:pointer;margin:0;line-height:1.45}
#wmac-live #tournament_entries input[type=submit]{background:#c8102e;color:#fff}
#wmac-live #tournament_entries input[type=submit]:hover{background:#fff;color:#c8102e}
#wmac-live .wl-excel{margin:0}
#wmac-live .wl-excel input[type=submit]{background:#c8102e;color:#fff}
#wmac-live .wl-excel input[type=submit]:hover{background:#9e0c24}
#wmac-live .wl-norecord{margin-top:16px;padding:16px;border:1px solid #e3e5e8;border-radius:6px;background:#fafafa}
@media (max-width:900px){#wmac-live .wl-top,#wmac-live .wl-controls,#wmac-live form#tournament_entries{flex-wrap:wrap}}
@media (max-width:700px){.wl-card{padding:14px}#wmac-live .wl-controls,#wmac-live form#tournament_entries,#wmac-live .commonreportrow .col-sm-4{width:100%}#wmac-live .commonreportrow #tournament_id{min-width:0;width:100%}#wmac-live .wl-h1{font-size:19px}}

/* ---------- 2. Dashboard: colours, cards, tables, panels, list ---------- */
#wmac-live{--red:#c8102e;--red-dark:#9e0c24;--red-soft:#fdecef;--green:#1e8e3e;--green-soft:#e6f4ea;--amber:#b26a00;--amber-soft:#fff4e0;--ink:#2b2f36;--muted:#6b7280;--line:#e3e5e8;--head:#3a3f4b;color:var(--ink);font-size:14px;line-height:1.45}
#wmac-live *{box-sizing:border-box}
#wmac-live .wl-live{display:inline-flex;align-items:center;gap:6px;background:var(--red);color:#fff;font-weight:700;font-size:11px;padding:2px 9px;border-radius:3px;letter-spacing:.5px;margin-left:8px;vertical-align:middle}
#wmac-live .wl-dot{width:7px;height:7px;border-radius:50%;background:#fff;animation:wlpulse 1.2s infinite}
@keyframes wlpulse{50%{opacity:.25}}
#wmac-live .wl-updated{font-size:12px;color:var(--muted);margin-top:4px}
#wmac-live .wl-paused{color:var(--amber);font-weight:600}
#wmac-live .wl-cards{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:16px 0}
#wmac-live .wl-cards.wl-cards-3{grid-template-columns:repeat(3,1fr)}
#wmac-live .wl-card{background:#fff;border:1px solid var(--line);border-top:4px solid var(--head);border-radius:6px;padding:14px;cursor:pointer;text-align:left;font:inherit;font-size:14px;line-height:1.45;color:inherit;transition:.15s;width:100%}
#wmac-live .wl-card:hover{transform:translateY(-1px)}
#wmac-live .wl-card:hover{box-shadow:0 4px 14px rgba(0,0,0,.08)}
#wmac-live .wl-card.active{outline:2px solid var(--ink);outline-offset:1px}
#wmac-live .wl-card .lbl{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;font-weight:600}
#wmac-live .wl-card .num{font-size:34px;font-weight:700;line-height:1.1;margin:6px 0 4px}
#wmac-live .wl-card .hint{font-size:12px;color:var(--muted)}
#wmac-live .wl-card.in{border-top-color:var(--green)} #wmac-live .wl-card.in .num{color:var(--green)}
#wmac-live .wl-card.out{border-top-color:var(--red)} #wmac-live .wl-card.out .num{color:var(--red)}
#wmac-live .wl-bar{height:6px;background:var(--line);border-radius:3px;overflow:hidden;margin-top:8px}
#wmac-live .wl-bar span{display:block;height:100%;background:var(--green);transition:width .4s}
#wmac-live .bump{animation:wlbump .6s}
@keyframes wlbump{30%{transform:scale(1.12)}}
#wmac-live .wl-main{display:grid;grid-template-columns:1fr 260px;gap:16px}
#wmac-live .wl-panel{border:1px solid var(--line);border-radius:6px;background:#fff;min-width:0}
#wmac-live .wl-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line);background:#fafafa}
#wmac-live .wl-head h2{margin:0;font-size:16px}
#wmac-live .wl-tabs{display:flex;gap:4px}
#wmac-live .wl-tab{border:1px solid var(--line);background:#fff;padding:6px 12px;border-radius:4px;cursor:pointer;font:inherit;font-size:13px;color:var(--ink)}
#wmac-live .wl-tab.on{background:var(--head);color:#fff;border-color:var(--head)}
#wmac-live .wl-filters{display:flex;flex-wrap:wrap;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line)}
#wmac-live .wl-filters input,#wmac-live .wl-filters select{border:1px solid var(--line);background:#f8f9fa;border-radius:3px;padding:7px 10px;font:inherit;color:var(--ink);height:auto;margin:0}
#wmac-live .wl-filters input{flex:1;min-width:180px}
#wmac-live .wl-scroll{overflow-x:auto}
#wmac-live table.wl-table{width:100%;border-collapse:collapse;border:0;margin:0}
#wmac-live .wl-table th{text-align:left;font-size:12px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.3px;padding:9px 12px;border:0;border-bottom:1px solid var(--line);white-space:nowrap;background:#fff}
#wmac-live .wl-table td{padding:10px 12px;border:0;border-bottom:1px solid var(--line);vertical-align:top;background:transparent}
#wmac-live .wl-table tbody tr:nth-child(even){background:#f7f7f8}
#wmac-live .wl-table tbody tr:hover{background:#eef2f7}
#wmac-live tr.flash,#wmac-live .flash{animation:wlflash 2s}
@keyframes wlflash{0%{background:#c9f0d3}100%{background:transparent}}
#wmac-live .name{font-weight:600}
#wmac-live .meta{font-size:12px;color:var(--muted)}
#wmac-live .pill{display:inline-block;padding:2px 9px;border-radius:12px;font-size:12px;font-weight:600;white-space:nowrap;margin:2px 4px 0 0}
#wmac-live .pill.in{background:var(--green-soft);color:var(--green)}
#wmac-live .pill.out{background:var(--red-soft);color:var(--red)}
#wmac-live .pill.role{background:var(--amber-soft);color:var(--amber)}
#wmac-live .chip{display:inline-block;background:#eef0f3;border:1px solid var(--line);border-radius:4px;padding:2px 8px;font-size:12px;font-weight:600;margin:0 4px 4px 0;white-space:nowrap}
#wmac-live .wl-btn{border:1px solid var(--red);color:var(--red);background:#fff;border-radius:4px;padding:4px 10px;font:inherit;font-size:12px;cursor:pointer}
#wmac-live .wl-btn:hover{background:var(--red);color:#fff}
#wmac-live a.wl-btn{display:block;text-align:center;text-decoration:none;line-height:1.45}
#wmac-live a.wl-btn.wl-profile{background:var(--red);color:#fff}
#wmac-live a.wl-btn.wl-profile:hover{background:#fff;color:var(--red)}
#wl-drawer .wl-profile-lg{display:inline-block;border:1px solid #c8102e;background:#c8102e;color:#fff;border-radius:4px;padding:6px 14px;text-decoration:none}
#wl-drawer .wl-profile-lg:hover{background:#fff;color:#c8102e}
#wmac-live .wl-acts{display:flex;flex-direction:column;gap:6px;align-items:stretch;white-space:nowrap}
#wmac-live .empty{padding:30px;text-align:center;color:var(--muted)}
#wmac-live .count-line{padding:10px 14px;font-size:12px;color:var(--muted)}
#wmac-live .feed{max-height:640px;overflow:auto}
#wmac-live .feed-item{display:flex;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line)}
#wmac-live .feed-item .ic{flex:0 0 30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:12px;color:#fff;background:var(--green)}
#wmac-live .feed-item .ic.t{background:var(--head)}
#wl-overlay{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;z-index:99998}
#wl-drawer{position:fixed;top:0;right:0;height:100%;width:min(460px,100%);background:#fff;z-index:99999;transform:translateX(100%);transition:.25s;box-shadow:-6px 0 20px rgba(0,0,0,.15);display:flex;flex-direction:column;font-size:14px;color:#2b2f36}
#wl-drawer.open{transform:none} #wl-overlay.open{display:block}
#wl-drawer .dh{background:#3a3f4b;color:#fff;padding:16px;display:flex;justify-content:space-between;align-items:flex-start}
#wl-drawer .dh h3{margin:0;font-size:18px;color:#fff}
#wl-drawer .db{padding:16px;overflow:auto}
#wl-drawer .x{background:none;border:0;color:#fff;font-size:24px;cursor:pointer;line-height:1}
#wl-drawer dl{display:grid;grid-template-columns:120px 1fr;gap:8px 12px;margin:0 0 12px}
#wl-drawer dt{color:#6b7280;font-size:12px;font-weight:400}
#wl-drawer dd{margin:0}
#wl-drawer h4{margin:18px 0 8px;font-size:13px;text-transform:uppercase;color:#6b7280;letter-spacing:.4px}
#wl-drawer table{width:100%;border-collapse:collapse;font-size:13px;border:0}
#wl-drawer th{text-align:left;padding:6px 8px;font-size:11px;background:#f7f7f8;color:#6b7280;text-transform:uppercase;border:0;border-bottom:1px solid #e3e5e8}
#wl-drawer td{padding:7px 8px;border:0;border-bottom:1px solid #e3e5e8;vertical-align:top}
#wl-drawer .meta{font-size:12px;color:#6b7280}
#wl-drawer .pill{display:inline-block;padding:2px 9px;border-radius:12px;font-size:12px;font-weight:600;white-space:nowrap}
#wl-drawer .pill.in{background:#e6f4ea;color:#1e8e3e}
#wl-drawer .pill.out{background:#fdecef;color:#c8102e}
#wl-drawer ul{margin:0;padding-left:18px}
#wl-drawer li{margin-bottom:4px}
#wl-drawer .owes{color:#c8102e;font-weight:600}
#wl-drawer .wl-sec{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:18px 0 8px}
#wl-drawer .wl-sec h4{margin:0}
#wl-drawer .wl-pdf{display:inline-block;border:1px solid #c8102e;background:#c8102e;color:#fff;border-radius:4px;padding:3px 10px;font-size:12px;font-weight:600;text-decoration:none;white-space:nowrap}
#wl-drawer .wl-pdf:hover{background:#fff;color:#c8102e}
@media (max-width:980px){#wmac-live .wl-cards{grid-template-columns:repeat(2,1fr)}#wmac-live .wl-cards .wl-card:first-child{grid-column:1/-1}#wmac-live .wl-main{grid-template-columns:1fr}#wmac-live .feed{max-height:300px}}
@media (max-width:560px){#wmac-live .wl-card .num{font-size:26px}#wmac-live .wl-table th:nth-child(3),#wmac-live .wl-table td:nth-child(3){display:none}}

/* ---------- 3. Report tabs, pager, summary / tally panel ---------- */
#wmac-live .wl-rtabs{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 0}
#wmac-live .wl-rtab{border:1px solid #e3e5e8;background:#fff;padding:7px 16px;border-radius:4px;cursor:pointer;font:inherit;font-size:14px;color:#2b2f36}
#wmac-live .wl-rtab:hover{border-color:#c8102e;color:#c8102e}
#wmac-live .wl-rtab.on{background:#c8102e;border-color:#c8102e;color:#fff}
#wmac-live .wl-cards.wl-cards-4{grid-template-columns:repeat(4,1fr)}
#wmac-live .wl-card.static{cursor:default}
#wmac-live .wl-card.static:hover{transform:none;box-shadow:none}
#wmac-live .wl-table th[data-sort]{cursor:pointer;user-select:none}
#wmac-live .wl-table th[data-sort]:hover{color:#2b2f36}
#wmac-live .wl-desc{display:inline-block;min-width:170px}
/* compact table (used on the Sales Reports page: <body class="wl-page wl-compact">) */
body.wl-compact #wmac-live .wl-table{font-size:13px}
body.wl-compact #wmac-live .wl-table th,body.wl-compact #wmac-live .wl-table td{padding-left:9px;padding-right:9px}
#wmac-live #wl-desc{max-width:240px}
#wmac-live #wl-per{width:auto}
#wmac-live .wl-idlink{color:#c8102e;font-weight:600;text-decoration:none}
#wmac-live .wl-idlink:hover{text-decoration:underline}
#wmac-live .wl-pager{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;align-items:center;padding:10px 14px;font-size:12px;color:#6b7280}
#wmac-live .wl-pager .wl-tab:disabled{opacity:.45;cursor:default}
#wmac-live .wl-sum{cursor:pointer}
#wmac-live .wl-sum:hover{background:#f7f7f8}
#wmac-live .wl-sum.on{background:#fdecef}
#wmac-live .wl-sum .ic{flex:0 0 auto;min-width:30px;width:auto;padding:0 6px;border-radius:15px;background:#3a3f4b}
#wmac-live .wl-sumtotal{padding:12px 14px;text-align:right;border-top:1px solid #e3e5e8}
#wmac-live .wl-tallyform{padding:12px 14px;border-top:1px solid #e3e5e8}
#wmac-live .wl-tallyform input[type=submit]{background:#fff;color:#c8102e;border:1px solid #c8102e;border-radius:4px;padding:7px 16px;cursor:pointer;font:inherit}
#wmac-live .wl-tallyform input[type=submit]:hover{background:#c8102e;color:#fff}
@media (max-width:980px){#wmac-live .wl-cards.wl-cards-4{grid-template-columns:repeat(2,1fr)}#wmac-live .wl-main{grid-template-columns:1fr}}