:root {
  --bg: #1a2e39;
  --bg-deep: #0f212e;
  --panel: #213743;
  --panel-2: #2f4553;
  --line: rgba(255, 255, 255, 0.05);
  --text: #ffffff;
  --muted: #b1bad3;
  --blue: #1475e1;
  --blue-hot: #1a8cff;
  --green: #00e701;
  --radius: 4px;
  --font: proxima-nova, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }

.topbar {
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: rgba(15, 33, 46, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
}
.top-center { justify-self: center; }
.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}
.brand-logo span { display: none; }
.menu-btn { color: var(--muted); }

/* Left drawer (hamburger) — Need Help only */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(300px, 88vw);
  height: 100vh;
  background: #0c1a24;
  border-right: 1px solid var(--line);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px 16px;
  transform: translateX(-105%);
  transition: transform .22s ease;
  box-shadow: 16px 0 40px rgba(0,0,0,.35);
}
.drawer.open {
  transform: translateX(0);
}
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 65;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 10px;
}
.drawer-nav { display: grid; gap: 2px; }
.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.drawer-link:hover {
  background: rgba(47, 69, 83, .55);
  color: #fff;
  transform: translateX(2px);
}
.drawer-link.active {
  background: var(--panel-2);
  color: #fff;
}

/* Bottom-right contact */
.help-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
  background: linear-gradient(180deg, #2f4553 0%, #1a2c38 100%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.help-fab:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  color: #fff;
}

/* Casino / Sports — Stake PNG normal + active + mini icons */
.nav-pills {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.nav-chip-bg {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  transition: filter .18s ease, transform .22s ease;
}
.nav-chip-casino .nav-chip-bg {
  background-image: url("/static/img/btn-casino-off.png");
}
.nav-chip-sports .nav-chip-bg {
  background-image: url("/static/img/btn-sports-off.png");
}
.nav-chip-casino.active .nav-chip-bg,
.nav-chip-casino:hover .nav-chip-bg {
  background-image: url("/static/img/btn-casino-on.png");
}
.nav-chip-sports.active .nav-chip-bg,
.nav-chip-sports:hover .nav-chip-bg {
  background-image: url("/static/img/btn-sports-on.png");
}
.nav-chip-casino.active {
  box-shadow: 0 0 0 1px rgba(0,231,1,.28), 0 8px 20px rgba(0,231,1,.18);
}
.nav-chip-sports.active {
  box-shadow: 0 0 0 1px rgba(255,122,24,.3), 0 8px 20px rgba(232,93,4,.2);
}
.nav-chip:hover { transform: translateY(-1px); filter: brightness(1.05); }
.nav-chip:hover .nav-chip-bg { transform: scale(1.03); }
.nav-chip:active { transform: translateY(0); filter: brightness(.98); }
.nav-chip-text { position: relative; z-index: 1; }

.wallet-wrap {
  display: flex;
  align-items: center;
  background: #0c1520;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.04);
}
.balance-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.usdt-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: block;
}
.currency-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #213743;
  color: #b1bad3;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.currency-switcher {
  display: grid;
  gap: 8px;
}
.currency-switcher-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.currency-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 6px;
}
.currency-pill {
  border: 1px solid rgba(255,255,255,.06);
  background: #0f212e;
  color: var(--muted);
  border-radius: 8px;
  padding: 9px 4px;
  font-weight: 800;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.currency-pill:hover {
  color: #fff;
  background: #213743;
  border-color: rgba(255,255,255,.1);
  transform: translateY(-1px);
}
.currency-pill.active {
  background: var(--blue);
  border-color: transparent;
  color: #fff;
}
.currency-pill:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.wallet-btn {
  border: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s ease, filter .15s ease;
}
.wallet-btn:hover { background: var(--blue-hot); filter: brightness(1.05); }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 0;
  background: var(--panel);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease, filter .15s ease;
}
.icon-btn:hover {
  background: var(--panel-2);
  color: #fff;
  transform: translateY(-1px);
}
/* Support CTA (drawer + menus) */
.support-cta {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(79, 195, 247, .9) 0%, rgba(2, 136, 209, .45) 40%, transparent 60%),
    linear-gradient(180deg, #29b6f6 0%, #0277bd 60%, #015079 100%);
  transition: transform .18s ease, filter .18s ease;
}
.support-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.search-btn:hover { filter: brightness(1.08); }

.main {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 12px;
}
.section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.sec-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
}
.sec-icon img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}
.sec-icon.trending { background: #1475e1; }
.sec-icon.live {
  background: transparent;
}
.live-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px #ff2d55;
  animation: live-glow 1.4s ease-in-out infinite;
}
@keyframes live-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,45,85,.95), 0 0 10px rgba(255,45,85,.55); }
  50% { box-shadow: 0 0 0 5px rgba(255,45,85,.55), 0 0 16px rgba(255,45,85,.35); }
}
.sec-icon.pragmaticlive { background: linear-gradient(135deg, #ff2d55, #c9184a); }
.sec-icon.nolimit { background: linear-gradient(135deg, #7c3aed, #4c1d95); }
.sec-icon.hacksaw { background: linear-gradient(135deg, #f59e0b, #b45309); }
.sec-icon.exclusive { background: #1475e1; }
.sec-icon.pragmatic { background: linear-gradient(135deg, #22c55e, #15803d); }
.sec-icon.evolution { background: linear-gradient(135deg, #f97316, #c2410c); }
.sec-icon.provider { background: #2f4553; }
.sec-icon.slots { background: #0ea5e9; }
.sec-icon.new { background: #8b5cf6; }
.sec-icon.only { background: #1475e1; }
.section-head span,
.linkish {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.linkish:hover { color: #fff; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.tab {
  border: 0;
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s ease, color .15s ease, transform .15s ease, filter .15s ease;
}
.tab.active, .tab:hover {
  background: var(--panel-2);
  color: #fff;
}
.tab:hover { transform: translateY(-1px); filter: brightness(1.06); }

.prov-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.prov-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.prov-rail::-webkit-scrollbar { display: none; }
.prov-pill {
  border: 1px solid rgba(255,255,255,.06);
  background: #1a2c38;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.prov-pill:hover {
  color: #fff;
  background: #213743;
  border-color: rgba(255,255,255,.1);
  transform: translateY(-1px);
}
.prov-pill.active {
  background: var(--panel-2);
  color: #fff;
  border-color: transparent;
}
.prov-pill .prov-count {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: .55;
}
.prov-pill.active .prov-count {
  opacity: .75;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.cat-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.cat-rail::-webkit-scrollbar { display: none; }
.cat-search {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #213743;
  color: #b1bad3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
}
.cat-search:hover {
  background: #2f4553;
  color: #fff;
}
.cat-pill {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
/* no icons inside category tabs */
.cat-pill svg,
.cat-pill img,
.cat-pill .cat-s,
.cat-pill .cat-live-dot {
  display: none !important;
}
.cat-pill:hover {
  color: #fff;
  background: rgba(47, 69, 83, .45);
  transform: translateY(-1px);
}
.cat-pill.active {
  background: var(--panel-2);
  color: #fff;
}
.icon-tab {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.search-modal {
  width: min(720px, calc(100% - 24px));
  max-height: min(860px, calc(100vh - 48px));
  background: #0f212e;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.search-modal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 14px 0;
  background: #1a2c38;
  border-radius: 8px;
  padding: 0 12px;
  height: 48px;
  color: var(--muted);
}
.search-modal-bar input {
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  width: 100%;
  font-size: 0.95rem;
}
.search-clear {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
}
.search-clear:hover { color: #fff; }
.search-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
}
.search-tab {
  border: 0;
  background: #1a2c38;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  cursor: pointer;
}
.search-tab.active,
.search-tab:hover {
  background: #2f4553;
  color: #fff;
}
.search-results {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}
.search-sports {
  display: grid;
  gap: 12px;
  place-items: start;
  padding: 18px 4px;
}

.rail-section { margin-bottom: 22px; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 148px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-2) transparent;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.game {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  content-visibility: auto;
  contain-intrinsic-size: 148px 200px;
}
.thumb {
  position: relative;
  aspect-ratio: 180 / 236;
  border-radius: 4px;
  overflow: hidden;
  background: var(--panel);
  transition: transform .15s ease;
}
.game:hover .thumb { transform: translateY(-2px); }
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 10px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.88));
}
.overlay .title {
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.overlay .provider-on {
  margin-top: 4px;
  color: rgba(255,255,255,.72);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sports-page {
  width: 100%;
  padding: 0;
}
.sports-frame {
  height: calc(100vh - 60px);
  width: 100%;
  background: #000;
  overflow: hidden;
  position: relative;
}
.sports-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b1620;
}
.sports-status {
  padding: 24px;
  color: var(--muted);
}
.sports-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(600px 300px at 50% 30%, rgba(20,117,225,.18), transparent 60%),
    #0b1620;
  z-index: 2;
}
.sports-loader-card {
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.sports-loader-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.sports-loader-card p {
  margin: 4px 0 0;
  font-weight: 700;
}
.sports-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--blue);
  animation: spin .7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.lobby-skel {
  height: 220px;
  border-radius: 8px;
  background: linear-gradient(90deg, #1a2c38, #243847, #1a2c38);
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite linear;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7,17,26,.72);
  display: none;
  place-items: start center;
  z-index: 50;
  padding: 48px 16px 16px;
  overflow-y: auto;
}
.modal-backdrop.open { display: grid; }
#walletModal.open {
  place-items: center;
  padding: 16px;
}
.modal {
  width: min(440px, 100%);
  background: #1a2c38;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 1rem; }
.modal-body { padding: 16px; }
.wallet-modal { width: min(420px, 100%); }
.wallet-body { display: grid; gap: 14px; }
.wallet-balance-card {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(20,117,225,.22), transparent 55%),
    #0f212e;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 16px;
}
.wallet-balance-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.wallet-currency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.85rem;
}
.wallet-balance-card strong {
  display: block;
  font-size: 1.85rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.wallet-balance-sub { font-size: 0.8rem; }
.wallet-refresh {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .3s ease;
}
.wallet-refresh:hover { background: var(--panel-2); color: #fff; }
.wallet-refresh.spinning { animation: wallet-spin .5s linear; color: #fff; }
@keyframes wallet-spin { to { transform: rotate(360deg); } }

.wallet-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  transition: background .15s ease, transform .15s ease;
}
.wallet-help:hover {
  background: var(--panel-2);
  transform: translateY(-1px);
}

.btn {
  border: 0;
  border-radius: 4px;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--blue-hot); }
.btn-ghost { background: var(--panel-2); color: #fff; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(800px 400px at 50% 0%, rgba(20,117,225,.18), transparent), var(--bg-deep);
  padding: 20px;
}
.auth-card {
  width: min(400px, 100%);
  background: var(--panel);
  border-radius: 8px;
  padding: 24px;
  border: 1px solid var(--line);
}
.auth-card h1 { margin: 8px 0 4px; font-size: 1.4rem; }
.muted { color: var(--muted); }
.field { display: grid; gap: 6px; margin-top: 12px; }
.field label { color: var(--muted); font-size: .85rem; }
.field input {
  background: #0f212e;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #fff;
  padding: 12px;
  outline: 0;
}
.field input:focus { border-color: var(--blue); }
.error {
  margin-top: 12px;
  background: rgba(237,65,99,.12);
  color: #ff8aa3;
  border: 1px solid rgba(237,65,99,.25);
  border-radius: 4px;
  padding: 10px 12px;
}

.play-wrap { height: calc(100vh - 60px); background: #000; }
.play-wrap iframe { width: 100%; height: 100%; border: 0; }

.admin-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
}
.side-nav {
  background: var(--panel);
  border-radius: 8px;
  padding: 8px;
  height: fit-content;
}
.side-nav button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.side-nav button.active, .side-nav button:hover {
  background: var(--panel-2);
  color: #fff;
}
.panel {
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  background: #0f212e;
  border-radius: 8px;
  padding: 12px;
}
.stat .label { color: var(--muted); font-size: .8rem; }
.stat .value { font-size: 1.3rem; font-weight: 700; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
th { color: var(--muted); font-weight: 600; }
.form-inline {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}
.form-inline input {
  background: #0f212e;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #fff;
  padding: 10px;
}


/* ---------- Provider search ---------- */

.prov-browse {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.08);
  background: #213743;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.prov-browse:hover {
  background: #2f4553;
  color: #fff;
  border-color: rgba(255,255,255,.14);
}
.prov-browse svg { flex: 0 0 auto; }
.prov-browse-count {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: .55;
}
.prov-browse-count:empty { display: none; }

#providerModal.open { place-items: center; padding: 16px; }

.provider-modal {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 32px));
  background: #0f212e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.provider-search-bar { margin: 14px 16px 0; }

.provider-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 0;
  min-height: 20px;
}
.provider-meta {
  font-size: 0.78rem;
  line-height: 1.3;
}

.provider-results {
  padding: 10px 16px 16px;
  overflow-y: auto;
  flex: 1;
  display: grid;
  gap: 4px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-2) transparent;
}
.provider-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 11px 12px;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background .12s ease, color .12s ease;
}
.provider-item:hover,
.provider-item.active {
  background: #1a2c38;
  color: #fff;
}
.provider-item.selected {
  background: var(--panel-2);
  color: #fff;
}
.provider-item.selected .provider-item-name::after {
  content: "Selected";
  margin-left: 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .85;
}
.provider-item-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.provider-item-name mark {
  background: rgba(20,117,225,.32);
  color: #fff;
  border-radius: 3px;
  padding: 0 1px;
}
.provider-item-count {
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: .55;
}
.provider-empty {
  padding: 18px 12px;
  font-size: 0.88rem;
}

/* Provider matches inside the global search modal */
.prov-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prov-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.06);
  background: #1a2c38;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.prov-chip:hover {
  background: #2f4553;
  color: #fff;
  transform: translateY(-1px);
}
.prov-chip mark {
  background: rgba(20,117,225,.32);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.prov-chip:hover mark { color: #fff; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr; height: auto; padding: 10px 12px; gap: 10px; }
  .top-left, .top-center, .top-right { justify-self: stretch; }
  .top-right { justify-content: flex-end; }
  .brand span { display: none; }
  .stats, .admin-layout, .form-inline { grid-template-columns: 1fr; }
  .prov-browse-text { display: none; }
  .prov-browse { padding: 8px 11px; }
  .provider-modal { max-height: calc(100vh - 32px); }
}
