/* Specka customer directory. Only visible inside authenticated admin. */
#tab-customers{max-width:100%;min-width:0}
.customer-leaderboard-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px}
.customer-leaderboard-head h2{font-size:clamp(24px,2.3vw,29px);margin:0 0 3px}
.customer-leaderboard-head p{font-size:13px;color:var(--muted);margin:0}
.customer-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}
.customer-metric{padding:16px 17px;background:#fff;border:1px solid var(--line);border-radius:14px;min-width:0}
.customer-metric .label{font-size:12px;color:var(--muted);font-weight:700}
.customer-metric strong{display:block;font-size:clamp(21px,2vw,27px);letter-spacing:-.025em;line-height:1.4;margin-top:4px}
.customer-metric small{display:block;font-size:11px;color:var(--muted)}
.customer-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:13px 16px;border-bottom:1px solid var(--line)}
.customer-toolbar input{min-width:min(100%,300px);width:min(100%,430px);max-width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:10px;background:#fff;font:inherit;font-size:14px}
.customer-toolbar-note{font-size:12px;color:var(--muted);line-height:1.45;max-width:420px}
.customer-table-wrap{overflow-x:auto;max-width:100%;scrollbar-gutter:auto}
.customer-table{border-collapse:collapse;width:100%;min-width:1020px;text-align:left;font-size:13px}
.customer-table th{background:#f9f7fa;color:#63586b;padding:12px 13px;font-size:11px;text-transform:uppercase;letter-spacing:.035em;white-space:nowrap}
.customer-table td{border-top:1px solid #f0ebf0;padding:13px;vertical-align:middle}
.customer-table tr:hover td{background:#fbf9fc}
.customer-rank{color:#816792;font-weight:900;font-size:16px}
.customer-person strong{display:block;line-height:1.4}
.customer-person small{display:block;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.customer-spend strong{display:block;font-size:17px;white-space:nowrap}
.customer-spend small{display:block;color:var(--muted);font-size:11px;line-height:1.5;white-space:nowrap}
.customer-last-items{font-size:12px;color:#59616b;max-width:190px;line-height:1.4}
.customer-count{font-weight:900;font-size:17px}
.customer-repeat{display:inline-block;border-radius:100px;background:#efe8f5;color:#6f5384;font-size:11px;font-weight:800;padding:3px 8px;margin-top:4px}
.customer-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;border-top:1px solid var(--line);padding:14px 16px}
.customer-pagination span{font-size:12px;color:var(--muted)}
.customer-pagination-buttons{display:flex;gap:8px}
.customer-pagination-buttons button:disabled{opacity:.45;cursor:not-allowed}
.customer-blank{padding:28px 16px;text-align:center;color:var(--muted);font-size:14px}
.customer-detail-heading{display:flex;gap:12px;justify-content:space-between;align-items:start;flex-wrap:wrap;margin:0 0 17px}
.customer-detail-heading h2{font-size:clamp(22px,2.4vw,30px);margin:0}
.customer-detail-heading p{color:var(--muted);font-size:13px;margin:3px 0 0;overflow-wrap:anywhere}
.customer-order-card{padding:17px 20px;border:1px solid var(--line);border-radius:14px;background:#fff;margin:11px 0}
.customer-order-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.customer-order-title{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.customer-order-title button{border:0;padding:0;color:var(--accent);background:transparent;font-size:16px;font-weight:900;text-decoration:underline;cursor:pointer}
.customer-order-title small{color:var(--muted);font-size:12px}
.customer-order-value{font-size:18px;font-weight:900;white-space:nowrap}
.customer-order-meta{color:var(--muted);font-size:12px;margin:5px 0 13px}
.customer-order-items{display:grid;gap:7px}
.customer-order-item{display:flex;justify-content:space-between;gap:10px;align-items:start;border-top:1px solid #f2eef2;padding-top:7px;font-size:13px}
.customer-order-item span{overflow-wrap:anywhere}
.customer-order-item strong{white-space:nowrap}
.customer-privacy-note{font-size:12px;color:var(--muted);padding:9px 1px;line-height:1.5}
@media(max-width:1180px){.customer-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.customer-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.customer-metric{padding:12px}.customer-metric strong{font-size:19px}.customer-toolbar{padding:12px}.customer-order-card{padding:13px}.customer-order-head{align-items:start}}

/* Customer leaderboard sort input: clear, accessible, responsive. */
.customer-sort-control{display:flex;flex-direction:column;gap:5px;min-width:215px;max-width:100%;font-size:12px;font-weight:800;color:#5d5364}
.customer-sort-control span{line-height:1.2}
.customer-sort-control select{
  width:100%;
  min-height:42px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 12px;
  font:700 13px/1.3 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:#fff;
}
.customer-sort-control select:focus-visible{outline:3px solid #d7c2e7;outline-offset:2px}
@media(max-width:740px){
  .customer-toolbar{align-items:stretch}
  .customer-toolbar input,.customer-sort-control,.customer-toolbar-note{width:100%;max-width:100%;min-width:0}
}
