/* op.makslloto.com operator console — slice 2.2 design refresh.
 * Operator-gold palette + KPI strip + status banner + animations. */

/* ─── Tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:           #0a0d13;
  --bg-elev:     #11161e;
  --bg-elev-2:   #161c26;
  --bg-input:    #1a2030;
  --border:      #1d2330;
  --border-lt:   #2a3142;
  --text:        #e6ebf3;
  --text-sub:    #a6b0c3;
  --text-mute:   #737f95;
  --brand:       #fbbf24;          /* operator gold */
  --brand-glow:  rgba(251,191,36,.22);
  --brand-soft:  rgba(251,191,36,.10);
  --ok:          #5ee38d;
  --warn:        #fbbf24;
  --err:         #ef4444;
  --info:        #7bb7ff;
  --live:        #34d399;
  --live-glow:   rgba(52,211,153,.4);
  --shadow-md:   0 4px 14px rgba(0,0,0,.32);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.5);
  --radius:      8px;
  --radius-lg:   10px;
  --speed:       .2s;
  --ease:        cubic-bezier(.4,.0,.2,1);
}

/* ─── Reset / base ────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 1, "ss01" 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
}
body {
  overflow: hidden;
  overscroll-behavior-y: none;
}
.hidden { display: none !important; }

::selection { background: var(--brand-glow); color: var(--text); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-lt); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a4256; }

/* ─── Login screen ────────────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.login-screen::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(251,191,36,.06) 0%, transparent 45%),
    radial-gradient(circle at 75% 80%, rgba(96,165,250,.04) 0%, transparent 50%),
    linear-gradient(135deg, #0a0d13 0%, #0e1320 50%, #0a0d13 100%);
  z-index: 0;
}
.login-screen::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 1;
}
.login-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 380px;
  background: linear-gradient(180deg, #11161e 0%, #0e131b 100%);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-lg);
  padding: 44px 36px 30px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(251,191,36,.04);
  overflow: hidden;
}
/* Iter 22: thin gold gleam sweep across the top edge of the card */
.login-card-gleam {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    transparent 25%,
    rgba(251,191,36,0) 35%,
    rgba(251,191,36,0.85) 50%,
    rgba(251,191,36,0) 65%,
    transparent 75%,
    transparent 100%);
  background-size: 200% 100%;
  background-position: -100% 0;
  animation: login-gleam 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes login-gleam {
  0%, 100% { background-position: -100% 0; opacity: 0.4; }
  50%      { background-position: 100% 0;  opacity: 1; }
}
.login-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 700; letter-spacing: -.4px;
  color: var(--text);
}
.login-brand .brand-text-accent { color: var(--brand); }
.brand-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 16px var(--brand-glow), 0 0 4px var(--brand);
  flex-shrink: 0;
  animation: brandPulse 3s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 16px var(--brand-glow), 0 0 4px var(--brand); }
  50%       { box-shadow: 0 0 22px var(--brand-glow), 0 0 6px var(--brand); }
}
.login-sub {
  color: var(--text-sub); font-size: 13px;
  margin: 6px 0 28px;
  letter-spacing: .2px;
}
#login-form label {
  display: block; margin-bottom: 16px;
  color: var(--text-sub); font-size: 11px;
  text-transform: uppercase; letter-spacing: .8px;
  font-weight: 500;
}
/* Iter 22: input wrap with leading icon glyph */
.login-input-wrap {
  position: relative;
  display: block;
  margin-top: 6px;
}
.login-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  font-size: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  pointer-events: none;
  transition: color var(--speed);
}
#login-form input {
  display: block; width: 100%;
  padding: 11px 13px 11px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-lt);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px; font-family: inherit;
  text-transform: none; letter-spacing: 0;
  transition: border-color var(--speed), background var(--speed), box-shadow var(--speed);
}
#login-form input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
#login-form input:focus + .login-input-icon,
.login-input-wrap:focus-within .login-input-icon {
  color: var(--brand);
}
/* Caps-lock warning */
.caps-warn {
  display: block;
  height: 14px;
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: .4px;
  color: #f59e0b;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0;
  transition: opacity 150ms ease;
}
.caps-warn.show { opacity: 1; }
#login-btn {
  position: relative;
  width: 100%; padding: 12px;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1308;
  font-weight: 700; letter-spacing: .3px;
  border: 0; border-radius: 6px;
  cursor: pointer; margin-top: 10px;
  font-size: 14px; font-family: inherit;
  transition: transform var(--speed), box-shadow var(--speed), filter var(--speed);
  box-shadow: 0 4px 12px rgba(251,191,36,.25);
}
#login-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(251,191,36,.35);
}
#login-btn:active:not(:disabled) { transform: translateY(0); }
#login-btn:disabled { opacity: .85; cursor: wait; transform: none; }
.login-btn-spinner {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(26, 19, 8, 0.25);
  border-top-color: #1a1308;
  border-radius: 50%;
  animation: login-spin 700ms linear infinite;
}
#login-btn.is-loading .login-btn-label { visibility: hidden; }
#login-btn.is-loading .login-btn-spinner { display: inline-block; }
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-error {
  margin-top: 14px; min-height: 18px;
  color: var(--err); font-size: 12px;
  font-weight: 500;
}
.login-foot {
  margin-top: 28px; text-align: center;
  color: var(--text-mute); font-size: 11px;
  letter-spacing: .3px;
}

/* ─── Main shell ──────────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  grid-template-columns: 220px 1fr;
  grid-template-areas: "topbar topbar" "sidebar content";
  height: 100vh;
  height: 100svh;
  height: 100dvh; /* iOS Safari: measure visible viewport, not URL-bar-inclusive */
  min-height: 0;
  overflow: hidden;
}
.topbar {
  grid-area: topbar;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  min-height: 52px;
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}
.topbar-brand .brand-text-accent { color: var(--brand); }
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
#me-username { font-weight: 600; }
/* Iter 30: operator avatar chip */
.me-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #fbbf24;
  background: linear-gradient(135deg, #1b1f2a 0%, #11151c 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4), 0 0 8px rgba(251, 191, 36, 0.06);
  flex-shrink: 0;
  transition: border-color var(--speed), box-shadow var(--speed);
}
.me-avatar:hover {
  border-color: rgba(251, 191, 36, 0.85);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4), 0 0 12px rgba(251, 191, 36, 0.18);
}
/* Iter 74: pulse when peer activity arrives */
.me-avatar.me-avatar-pulse {
  animation: me-avatar-glow 2.2s ease-out;
}
@keyframes me-avatar-glow {
  0%   { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4), 0 0 0 0 rgba(251, 191, 36, 0.7); }
  35%  { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4), 0 0 18px 4px rgba(251, 191, 36, 0.55); border-color: rgba(251, 191, 36, 1); }
  100% { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4), 0 0 0 0 rgba(251, 191, 36, 0); }
}
.me-meta {
  color: var(--text-sub); font-size: 11px;
  background: var(--bg-elev-2); padding: 3px 8px; border-radius: 12px;
  border: 1px solid var(--border);
}
.icon-btn {
  background: transparent;
  border: 1px solid var(--border-lt);
  color: var(--text-sub);
  cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 6px;
  font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--speed);
}
.icon-btn:hover {
  background: var(--bg-elev-2);
  color: var(--err);
  border-color: #3a4256;
}

/* Iter 27: notification sound toggle button */
.sound-btn .sound-glyph { font-size: 15px; line-height: 1; }
.sound-btn.is-on {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.07);
}
.sound-btn.is-on:hover { color: #fcd34d; border-color: rgba(251, 191, 36, 0.75); }
.sound-btn.is-off { color: var(--text-mute); }
.sound-btn.is-off .sound-glyph { opacity: 0.55; text-decoration: line-through; }
.sound-btn:hover { color: inherit; }   /* override the .icon-btn:hover error tint */

/* ─── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 14px 0;
}
.sidebar nav { flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px; min-height: 44px;
  color: var(--text-sub); text-decoration: none;
  font-size: 13px; font-weight: 500;
  border-left: 2px solid transparent;
  transition: all var(--speed);
  position: relative;
}
.nav-item:hover:not(.disabled) {
  background: var(--bg-elev-2);
  color: var(--text);
}
.nav-item.active {
  background: linear-gradient(90deg, var(--brand-soft) 0%, transparent 100%);
  color: var(--brand);
  border-left-color: var(--brand);
}
.nav-item.disabled { color: var(--text-mute); cursor: not-allowed; }
/* Iter 38: logout confirmation modal */
.logout-confirm {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  width: 92%;
  max-width: 380px;
  background: linear-gradient(180deg, #11161e 0%, #0e131b 100%);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,0.55));
}
.logout-confirm-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.logout-confirm-sub {
  margin: 0 0 18px;
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.5;
}
.logout-confirm-sub strong { color: #fbbf24; font-weight: 600; }
.logout-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.btn-ghost, .btn-danger {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--speed);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-lt);
  color: var(--text-sub);
}
.btn-ghost:hover {
  background: var(--bg-elev-2);
  color: var(--text);
}
.btn-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  border: 0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45);
}
.btn-danger:active { transform: translateY(1px); }
/* Iter 93: warn variant for 'Mark lost' */
.btn-warn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  border: 0;
  color: #1a1308;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  transition: all var(--speed);
}
.btn-warn:hover { filter: brightness(1.06); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45); }
.btn-warn:active { transform: translateY(1px); }
@media (max-width: 600px) {
  .logout-confirm { padding: 18px 16px 14px; }
  .logout-confirm-title { font-size: 14px; }
  .logout-confirm-sub  { font-size: 12px; }
}

/* Iter 37: scroll-to-top FAB */
.scroll-top-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, #11161e 0%, #0e131b 100%);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0,0,0,0.4);
  font-size: 18px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, border-color var(--speed);
  -webkit-tap-highlight-color: transparent;
}
.scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top-btn:hover {
  border-color: rgba(251, 191, 36, 0.85);
  color: #fcd34d;
}
.scroll-top-btn:active { transform: translateY(0) scale(0.95); }
@media (max-width: 600px) {
  /* On phones, sit just above the toast stack which is at bottom */
  .scroll-top-btn { bottom: 90px; right: 16px; width: 38px; height: 38px; font-size: 16px; }
}

/* Iter 35: minimal SVG sparkline (used by money card etc.) */
.sparkline {
  display: block;
  width: 100%;
  height: 52px;
  margin: 6px 0 12px;
}
.sparkline-baseline {
  stroke: rgba(255,255,255,0.08);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.sparkline-stroke {
  fill: none;
  stroke: #fbbf24;
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.sparkline-fill {
  fill: rgba(251, 191, 36, 0.10);
  stroke: none;
}
.sparkline-dot {
  fill: #fcd34d;
  stroke: #1a1308;
  stroke-width: 1;
}

/* Iter 33: gold alert badge on nav items (e.g. Fraud Watch count) */
.nav-item[data-badge]::after {
  content: attr(data-badge);
  margin-left: auto;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1308;
  font-size: 10px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .2px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.35);
}
@media (max-width: 900px) and (min-width: 601px) {
  /* Icon-only sidebar — show badge as a tiny dot in the corner */
  .sidebar:not(.open) .nav-item[data-badge]::after {
    content: "";
    position: absolute;
    top: 8px; right: 8px;
    margin: 0;
    padding: 0;
    width: 8px; height: 8px;
    min-width: 0;
  }
}
.nav-icon {
  width: 18px; text-align: center;
  font-size: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
}
.nav-tag {
  margin-left: auto;
  background: var(--bg-elev-2);
  color: var(--text-mute);
  font-size: 9px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase; letter-spacing: .6px;
}
.sidebar-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 11px;
  letter-spacing: .3px;
}

.content {
  grid-area: content;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 24px 32px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(251,191,36,.025) 0%, transparent 60%),
    var(--bg);
}

/* ─── System status banner ────────────────────────────────────────── */
.system-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius);
  font-size: 13px;
  transition: border-color var(--speed);
}
.system-banner.banner-ok    { border-left-color: var(--ok); }
.system-banner.banner-warn  { border-left-color: var(--warn); }
.system-banner.banner-err   { border-left-color: var(--err); }
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: pulse 2s infinite;
}
.banner-warn .banner-dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.banner-err  .banner-dot { background: var(--err);  box-shadow: 0 0 10px var(--err); }
.banner-msg { font-weight: 600; color: var(--text); flex: 1; }
.banner-meta { color: var(--text-sub); font-size: 12px; }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.85); }
}

/* ─── Page header ─────────────────────────────────────────────────── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px;
  gap: 14px;
}
.page-title {
  font-size: 22px; font-weight: 700;
  letter-spacing: -.5px;
  margin: 0;
  color: var(--text);
}
.page-sub {
  color: var(--text-sub); font-size: 13px;
  margin: 4px 0 0;
}
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.refresh-indicator {
  font-size: 12px; color: var(--text-sub);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-variant-numeric: tabular-nums;
}
.refresh-indicator .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live-glow);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

/* ─── KPI strip (4 stat tiles up top) ─────────────────────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.kpi-tile {
  background: linear-gradient(180deg, var(--bg-elev) 0%, #0e131b 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative; overflow: hidden;
  transition: transform var(--speed), border-color var(--speed);
}
.kpi-tile:hover { border-color: var(--border-lt); transform: translateY(-1px); }
.kpi-tile::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border-lt);
  opacity: .6;
}
.kpi-tile.kpi-ok::before    { background: linear-gradient(90deg, transparent, var(--ok), transparent); opacity: 1; }
.kpi-tile.kpi-warn::before  { background: linear-gradient(90deg, transparent, var(--warn), transparent); opacity: 1; }
.kpi-tile.kpi-err::before   { background: linear-gradient(90deg, transparent, var(--err), transparent); opacity: 1; }
.kpi-label {
  font-size: 10px; font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 6px;
}
.kpi-value {
  font-size: 26px; font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
  line-height: 1.1;
}
.kpi-sub {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kpi-value-ok    { color: var(--ok); }
.kpi-value-warn  { color: var(--warn); }
.kpi-value-err   { color: var(--err); }

/* ─── Cards grid ──────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  grid-auto-flow: dense;
}
.card-wide { grid-column: 1 / -1; }

.card {
  background: linear-gradient(180deg, var(--bg-elev) 0%, #0e131b 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  animation: cardIn .35s var(--ease) both;
  transition: border-color var(--speed);
}
.card:hover { border-color: var(--border-lt); }
.card-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase; letter-spacing: .8px;
  margin: 0 0 12px;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Stagger card animations on first paint */
.cards-grid > .card:nth-child(1) { animation-delay: 0ms; }
.cards-grid > .card:nth-child(2) { animation-delay: 40ms; }
.cards-grid > .card:nth-child(3) { animation-delay: 80ms; }
.cards-grid > .card:nth-child(4) { animation-delay: 120ms; }
.cards-grid > .card:nth-child(5) { animation-delay: 160ms; }
.cards-grid > .card:nth-child(6) { animation-delay: 200ms; }
.kpi-strip > .kpi-tile { animation: cardIn .35s var(--ease) both; }
.kpi-strip > .kpi-tile:nth-child(1) { animation-delay: 0ms; }
.kpi-strip > .kpi-tile:nth-child(2) { animation-delay: 30ms; }
.kpi-strip > .kpi-tile:nth-child(3) { animation-delay: 60ms; }
.kpi-strip > .kpi-tile:nth-child(4) { animation-delay: 90ms; }

/* Status pills */
.status-pill {
  font-size: 9px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase; letter-spacing: .8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.status-ok    { background: rgba(74,222,128,.14);  color: var(--ok);   }
.status-warn  { background: rgba(251,191,36,.14);  color: var(--warn); }
.status-err   { background: rgba(239,68,68,.14);   color: var(--err);  }
.status-info  { background: rgba(96,165,250,.14);  color: var(--info); }
.status-soon  { background: var(--bg-elev-2);      color: var(--text-sub); }

.kv-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
  gap: 8px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-key { color: var(--text-sub); flex-shrink: 0; }
.kv-val {
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  word-break: break-word;
}
/* Iter 17: clickable refs inside detail panels */
.deeplink {
  color: #fbbf24;
  text-decoration: none;
  border-bottom: 1px dashed rgba(251, 191, 36, 0.35);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.deeplink:hover, .deeplink:focus {
  color: #fcd34d;
  border-bottom-color: rgba(251, 191, 36, 0.85);
  outline: none;
}
.deeplink:active { color: #f59e0b; }

/* Iter 40: empty-state polish — designed placeholder rather than plain text */
.empty-state {
  position: relative;
  text-align: center;
  padding: 30px 18px 22px;
  color: var(--text-mute);
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.55;
  letter-spacing: .15px;
}
.empty-state::before {
  content: "·";
  display: block;
  margin: 0 auto 10px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px dashed rgba(251, 191, 36, 0.3);
  background: radial-gradient(circle at center, rgba(251,191,36,0.06) 0%, transparent 70%);
  color: rgba(251, 191, 36, 0.55);
  font-style: normal;
  font-size: 22px;
  font-weight: 700;
  line-height: 32px;
  text-align: center;
  letter-spacing: 0;
}
@media (max-width: 600px) {
  .empty-state { padding: 24px 14px 18px; font-size: 11.5px; }
  .empty-state::before { width: 32px; height: 32px; line-height: 28px; font-size: 19px; margin-bottom: 8px; }
}

/* ─── Mini tables ─────────────────────────────────────────────────── */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.mini-table thead th {
  text-align: left;
  color: var(--text-mute); font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px;
  font-size: 10px;
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--border);
}
.mini-table thead th.num { text-align: right; }
.mini-table tbody td {
  padding: 9px 8px 9px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text);
  font-size: 12px;
}
.mini-table tbody td.num {
  text-align: right;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.mini-table tbody tr:last-child td { border-bottom: 0; }
.mini-table tbody tr {
  transition: background var(--speed);
}
.mini-table tbody tr:hover { background: rgba(251,191,36,.03); }
.mini-table tbody tr.row-new { animation: rowIn .4s var(--ease); }
@keyframes rowIn {
  from { background: rgba(74,222,128,.12); transform: translateX(-4px); }
  to   { background: transparent; transform: translateX(0); }
}

/* ─── Hamburger ───────────────────────────────────────────────────── */
.hamburger { display: none; padding: 0; }
.hamburger-bars,
.hamburger-bars::before,
.hamburger-bars::after {
  display: block; position: relative;
  width: 18px; height: 2px;
  background: var(--text-sub);
  margin: auto;
  transition: background var(--speed);
}
.hamburger-bars::before, .hamburger-bars::after {
  content: ""; position: absolute; left: 0;
}
.hamburger-bars::before { top: -6px; }
.hamburger-bars::after  { top:  6px; }
.hamburger:hover .hamburger-bars,
.hamburger:hover .hamburger-bars::before,
.hamburger:hover .hamburger-bars::after { background: var(--brand); }

/* ─── Sidebar backdrop ────────────────────────────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 52px 0 0 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 99;
  animation: fadeIn .15s var(--ease);
}
.sidebar-backdrop.show { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── Tablet (601–900px) ─────────────────────────────────────────── */
@media (max-width: 900px) and (min-width: 601px) {
  .app-shell { grid-template-columns: 60px 1fr; }
  .nav-label, .nav-tag, .sidebar-foot { display: none; }
  .sidebar nav .nav-item { justify-content: center; padding: 14px; }
  .content { padding: 18px 16px 28px; }
  .me-meta { display: none; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Phone (<600px) ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar { padding: 0 10px; gap: 8px; height: 52px; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; }
  .topbar-brand { font-size: 14px; }
  .me-meta { display: none; }
  #me-username { font-size: 12px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .icon-btn { width: 40px; height: 40px; }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 52px minmax(0, 1fr);
    grid-template-areas: "topbar" "content";
  }
  .sidebar {
    position: fixed;
    top: 52px; left: 0;
    height: calc(100vh - 52px);
    height: calc(100svh - 52px);
    height: calc(100dvh - 52px);
    max-height: calc(100dvh - 52px);
    width: 240px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .25s var(--ease);
    box-shadow: 0 0 30px rgba(0,0,0,.6);
  }
  .sidebar.open { transform: translateX(0); }
  /* Iter 25: while swiping, disable transition so transform tracks finger 1:1 */
  .sidebar.swiping { transition: none; touch-action: pan-y; }
  .nav-label, .nav-tag, .sidebar-foot { display: revert; }
  .sidebar nav .nav-item { padding: 14px 18px; justify-content: flex-start; min-height: 48px; }

  /* Mobile: zero top padding on .content so sticky tabs/filters pin flush with topbar.
     Page-header gets equivalent margin-top to keep visual breathing on first paint. */
  .content { padding: 0 12px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .page-title { font-size: 19px; }
  .page-sub { font-size: 12px; }
  .page-header { flex-wrap: wrap; gap: 10px; margin: 14px 0 14px; }

  .system-banner { padding: 10px 12px; font-size: 12px; gap: 10px; }
  .banner-meta { display: none; }

  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
  .kpi-strip .kpi-tile:first-child { grid-column: 1 / -1; }
  .kpi-tile { padding: 12px 14px; }
  .kpi-value { font-size: 22px; }

  .cards-grid { gap: 12px; grid-template-columns: 1fr; }
  .card { padding: 14px; }
  .card-title { font-size: 10px; }
  .kv-row { font-size: 12px; }
  .kv-val { font-size: 11px; }

  .card .mini-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mini-table thead, .mini-table tbody, .mini-table tr { display: table; width: 100%; table-layout: fixed; }
  .mini-table { min-width: 100%; }
  .mini-table thead th, .mini-table tbody td { font-size: 11px; padding: 7px 6px 7px 0; }

  .refresh-indicator { font-size: 11px; padding: 5px 10px; }

  .login-card { padding: 32px 22px 24px; max-width: 100%; }
  .login-brand { font-size: 19px; }
}

@media (max-width: 360px) {
  .topbar-brand .brand-text-wrap { display: none; }
  #me-username { max-width: 70px; }
  .content { padding: 10px 10px 20px; }
  .kpi-strip { grid-template-columns: 1fr; }
  .kpi-strip .kpi-tile:first-child { grid-column: auto; }
}

/* ─── Tickets page additions (slice 3) ─────────────────────────────── */
.toolbar {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
/* Iter 21: stacked toolbar variant for pages with multiple chip rows */
.toolbar-stack { flex-direction: column; align-items: stretch; }
.toolbar-stack .search-wrap { width: 100%; }
.toolbar-stack .chips-row { width: 100%; }
.chips-row-tight .filter-chip { padding: 5px 11px; font-size: 11px; }
.search-wrap { flex: 1; min-width: 260px; }
.search-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border-lt);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px; font-family: inherit;
  transition: border-color var(--speed), box-shadow var(--speed);
}
.search-input::placeholder { color: var(--text-mute); }
.search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.chips-row {
  display: flex; gap: 6px;
  flex-shrink: 0;
}
.filter-chip {
  background: var(--bg-elev);
  border: 1px solid var(--border-lt);
  color: var(--text-sub);
  padding: 7px 14px;
  font-size: 12px; font-weight: 500;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--speed);
  font-family: inherit;
  min-height: 32px;
}
.filter-chip:hover {
  background: var(--bg-elev-2);
  color: var(--text);
}
.filter-chip.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}
.tickets-table tbody tr.ticket-row {
  cursor: pointer;
}
.tickets-table tbody tr.ticket-row:hover {
  background: var(--brand-soft);
}
.line-count {
  display: inline-block;
  margin-left: 6px;
  background: var(--bg-input);
  color: var(--text-sub);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ─── Detail panel (slide-in from right) ──────────────────────────── */
.panel-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.panel-backdrop.show { opacity: 1; }

.detail-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  /* User-panel + audit-panel keep the right-slide drawer pattern (list-of-rows
     use case fits a narrow drawer). 2026-05-11 polish bumped max to 820px so
     4 columns + leg detail breathe; capped at 92vw so it never blows past the
     screen. Mobile keeps 100vw via the @media block below.
     #ticket-panel OVERRIDES this with a centered-modal pattern (rule below). */
  width: clamp(480px, 52vw, 820px);
  max-width: 92vw;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border-left: 1px solid var(--border-lt);
  z-index: 201;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s var(--ease);
  box-shadow: -10px 0 40px rgba(0,0,0,.5);
  overflow: hidden;
}
.detail-panel.show { transform: translateX(0); }

/* 2026-05-11 — Ticket panel only: centered modal pattern (matches menaxhimi).
   Wide (up to 1120px), centered, top-bottom safe margins, rounded corners.
   Mobile is handled by the @media block below — full-screen bottom-sheet feel. */
#ticket-panel.detail-panel {
  top: 24px;
  right: 50%;
  bottom: 24px;
  transform: translateX(50%) translateY(0);
  width: min(1120px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  border: 1px solid var(--border-lt);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
#ticket-panel.detail-panel:not(.show) {
  transform: translateX(50%) translateY(8px);
  opacity: 0;
}
#ticket-panel.detail-panel.show {
  transform: translateX(50%) translateY(0);
  opacity: 1;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}

.panel-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}
.panel-title {
  font-size: 18px; font-weight: 700;
  color: var(--text);
  letter-spacing: -.4px;
}
.panel-sub {
  margin-top: 4px;
  color: var(--text-sub); font-size: 12px;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}

.panel-body {
  flex: 1; overflow-y: auto;
  padding: 20px;
}
.detail-section {
  margin-bottom: 22px;
}
.detail-section-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase; letter-spacing: .8px;
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.match-id {
  font-size: 10px; color: var(--text-mute);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  margin-top: 1px;
}

/* ─── Ticket detail polish — 2026-05-11 (desktop UX pass) ──────────────
   Hero stat tiles, sticky action row, section cards, prominent state pill.
   No function changes — pure visual hierarchy improvements. */

/* Section gets a soft elevated card background so sections feel distinct. */
#ticket-panel .detail-section,
#user-panel .detail-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
#ticket-panel .detail-section-title,
#user-panel .detail-section-title {
  margin-top: 0;
}

/* Hero stat tiles for stake / total odds / potential win.
   Three big cells side-by-side; on narrow viewports they wrap to 1 col. */
.tk-stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 14px;
}
.tk-stat-tile {
  background: var(--bg-elev, rgba(255,255,255,0.03));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.tk-stat-tile-k {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--text-mute, #737f95);
}
.tk-stat-tile-v {
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #fff);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.4px;
  line-height: 1.1;
}
.tk-stat-tile-sub {
  font-size: 10px;
  color: var(--text-sub, #a6b0c3);
}
/* Tint potential-win tile by state — green for won, neutral for lost, amber for pending */
.tk-stat-tile.is-won  { background: rgba(94, 227, 141, 0.08); border-color: rgba(94, 227, 141, 0.35); }
.tk-stat-tile.is-won  .tk-stat-tile-v { color: #5ee38d; }
.tk-stat-tile.is-lost { background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.22); }
.tk-stat-tile.is-lost .tk-stat-tile-v { color: #f87171; }
.tk-stat-tile.is-pending { background: rgba(251, 191, 36, 0.06); border-color: rgba(251, 191, 36, 0.28); }
.tk-stat-tile.is-pending .tk-stat-tile-v { color: #fbbf24; }
.tk-stat-tile.is-void { background: rgba(148, 163, 184, 0.05); border-color: rgba(148, 163, 184, 0.25); }
.tk-stat-tile.is-void .tk-stat-tile-v { color: #94a3b8; }

/* Prominent state badge in the panel header — replaces tiny pill in subline */
.panel-state-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 8px;
  border: 1px solid currentColor;
}
.panel-state-badge.is-won     { color: #5ee38d; background: rgba(94, 227, 141, 0.12); }
.panel-state-badge.is-lost    { color: #f87171; background: rgba(239, 68, 68, 0.12); }
.panel-state-badge.is-void    { color: #94a3b8; background: rgba(148, 163, 184, 0.12); }
.panel-state-badge.is-pending { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }

/* Sticky action row — Aprovo/Refuzo/Vendos Vetë stays in view while
   scrolling the audit timeline below. Subtle blurred backdrop so content
   underneath fades cleanly.
   2026-05-11 M99 M14 — reserve bottom padding so the sticky bar never
   covers timeline / note form / final entry. ~88px = bar height + breathing room. */
#ticket-panel .panel-body {
  padding-bottom: 88px;
}
#ticket-actions-section {
  position: sticky;
  bottom: -1px;
  z-index: 4;
  background: rgba(15, 18, 27, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-left: -20px;
  margin-right: -20px;
  padding-left: 20px;
  padding-right: 20px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}
.ticket-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Selections section gets a tiny bit more vertical breathing room */
#ticket-panel .mini-table-selections {
  margin-top: 4px;
}

/* Mobile: tiles collapse to single column for readability, sections un-card */
@media (max-width: 600px) {
  .tk-stat-tiles { grid-template-columns: 1fr 1fr; }
  .tk-stat-tile { padding: 10px 12px; }
  .tk-stat-tile-v { font-size: 17px; }
  #ticket-panel .detail-section,
  #user-panel .detail-section {
    padding: 12px 12px;
    border-radius: 8px;
  }
  #ticket-actions-section {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .panel-state-badge { margin-left: 4px; font-size: 10px; padding: 2px 8px; }
}

/* Mobile: detail panel becomes full-screen */
@media (max-width: 600px) {
  .detail-panel { width: 100vw; max-width: 100vw; }
  .panel-header { padding: 14px 14px; }
  .panel-body { padding: 14px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .chips-row { overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .filter-chip { flex-shrink: 0; }
  /* 2026-05-11 — ticket-panel on mobile reverts to bottom-sheet, full width */
  #ticket-panel.detail-panel {
    top: auto; right: 0; bottom: 0; left: 0;
    transform: translateY(100%);
    width: 100vw; max-width: 100vw;
    border-radius: 14px 14px 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    max-height: 92dvh;
  }
  #ticket-panel.detail-panel.show { transform: translateY(0); }
  #ticket-panel.detail-panel:not(.show) { transform: translateY(100%); opacity: 1; }
}

/* ─── Audit page additions (slice 4) ───────────────────────────────── */
.audit-table tbody tr.audit-row { cursor: pointer; }
.audit-table tbody tr.audit-row:hover { background: var(--brand-soft); }
.audit-reason {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-sub);
  font-size: 11px;
}
.audit-reason-full {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}
.audit-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.diff-col {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.diff-col-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-sub);
  padding: 8px 12px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
}
.diff-pre {
  margin: 0;
  padding: 12px;
  font-size: 11px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .audit-diff { grid-template-columns: 1fr; }
  .audit-reason { max-width: 180px; }
  .diff-pre { font-size: 10px; max-height: 200px; }
}

/* ─── Vendor health card (slice 5) ─────────────────────────────────── */
.vendor-host {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-sub);
  word-break: break-all;
}
.vendor-rtt-ok    { color: var(--ok);   }
.vendor-rtt-info  { color: var(--info); }
.vendor-rtt-warn  { color: var(--warn); }

/* ─── Keyboard shortcut modal (slice 9) ────────────────────────────── */
.shortcut-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  max-width: 92vw;
}
.shortcut-modal-title {
  margin: 0 0 16px;
  font-size: 16px; font-weight: 700;
  color: var(--brand);
  letter-spacing: -.3px;
}
.shortcut-table { width: 100%; border-collapse: collapse; }
.shortcut-table tbody td {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.shortcut-table tbody tr:last-child td { border-bottom: 0; }
.shortcut-key { width: 110px; }
.shortcut-desc { color: var(--text-sub); }
.kbd {
  display: inline-block;
  background: var(--bg-input);
  border: 1px solid var(--border-lt);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--brand);
}
.kbd-pair .kbd { margin-right: 2px; }
.shortcut-foot {
  margin: 16px 0 0;
  font-size: 11px; color: var(--text-mute);
  text-align: center;
}

/* ─── User activity timeline (slice 9) ──────────────────────────────── */
.user-link {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color var(--speed);
  cursor: pointer;
}
.user-link:hover { border-bottom-color: var(--brand); }

.timeline { display: flex; flex-direction: column; gap: 1px; }
.timeline-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}
.timeline-row:last-child { border-bottom: 0; }
.timeline-row:hover { background: var(--brand-soft); }
.timeline-time {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
}
.timeline-date { font-size: 9px; color: var(--text-mute); }
.timeline-content { min-width: 0; }
.timeline-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.timeline-title {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  font-size: 12px;
}
.timeline-extra { color: var(--text-mute); font-size: 11px; }
.timeline-ref {
  color: var(--info);
  font-size: 10px;
  text-decoration: none;
}
.timeline-ref:hover { text-decoration: underline; }
.timeline-amount {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .timeline-row { grid-template-columns: 64px 1fr auto; padding: 8px 10px; gap: 8px; }
  .timeline-title { max-width: 140px; }
}

/* ─── Cmd+K command palette (slice 9) ───────────────────────────────── */
.cmdk-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
  z-index: 400;
  animation: fadeIn .12s var(--ease);
}
.cmdk-modal {
  position: fixed;
  top: 12vh; left: 50%;
  transform: translateX(-50%);
  width: 600px; max-width: 92vw;
  max-height: 70vh;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border-lt);
  border-radius: 12px;
  z-index: 401;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(251,191,36,.06);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: cmdkIn .18s var(--ease);
}
@keyframes cmdkIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cmdk-input-wrap {
  display: flex; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.cmdk-icon {
  color: var(--brand);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.cmdk-input {
  flex: 1;
  background: transparent;
  border: 0; outline: 0;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  letter-spacing: -.2px;
}
.cmdk-input::placeholder { color: var(--text-mute); }
.cmdk-hint { flex-shrink: 0; }
.cmdk-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  min-height: 60px;
}
.cmdk-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}
.cmdk-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  align-items: center;
  border-left: 2px solid transparent;
  transition: background var(--speed), border-color var(--speed);
}
.cmdk-row.selected {
  background: var(--brand-soft);
  border-left-color: var(--brand);
}
.cmdk-row-icon {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-sub);
  font-size: 12px;
  flex-shrink: 0;
}
.cmdk-row.selected .cmdk-row-icon { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.cmdk-row-text { min-width: 0; }
.cmdk-row-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmdk-row-sub {
  color: var(--text-sub);
  font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.cmdk-row-kind {
  flex-shrink: 0;
}
.cmdk-foot {
  display: flex; gap: 18px; align-items: center;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-mute);
  font-size: 11px;
}
.cmdk-foot kbd { font-size: 10px; padding: 1px 5px; }

@media (max-width: 600px) {
  .cmdk-modal { top: 6vh; width: 96vw; max-height: 80vh; }
  .cmdk-input { font-size: 14px; }
  .cmdk-input-wrap { padding: 12px 14px; }
  .cmdk-row-title { font-size: 12px; }
  .cmdk-row-sub { font-size: 10px; }
  .cmdk-foot { flex-wrap: wrap; gap: 10px; padding: 8px 14px; }
}

/* ─── Skeleton loaders (slice 9 iter 13) ───────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 0%, var(--bg-elev-2) 50%, var(--bg-input) 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeletonShimmer 1.4s linear infinite;
  display: block;
}
@keyframes skeletonShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
  width: 100%;
}
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.title {
  height: 14px;
  width: 40%;
  margin-bottom: 12px;
}
.skeleton-pill {
  height: 16px;
  width: 50px;
  border-radius: 8px;
  display: inline-block;
}
.skeleton-card-body { padding: 4px 0; }
.skeleton-row {
  display: flex; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.skeleton-row .skeleton-line { margin-bottom: 0; }

/* Per-card refresh timestamp badge */
.card-foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px;
  color: var(--text-mute);
}
.card-foot .refresh-tick {
  display: inline-flex; align-items: center; gap: 5px;
}
.card-foot .refresh-tick::before {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 6px var(--live);
  animation: pulse 2s infinite;
}

/* ─── Note form + audit history (slice 5 iter 14) ──────────────────── */
.note-form {
  background: var(--bg-input);
  border: 1px solid var(--border-lt);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 16px;
}
.note-textarea {
  width: 100%;
  background: transparent;
  border: 0; outline: 0; resize: vertical;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  min-height: 60px;
  padding: 4px 0;
}
.note-textarea::placeholder { color: var(--text-mute); }
.note-form-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.note-status { font-size: 11px; color: var(--text-mute); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.note-submit {
  background: linear-gradient(180deg, var(--brand) 0%, #f59e0b 100%);
  color: #1a1308;
  border: 0; border-radius: 5px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: filter var(--speed), opacity var(--speed);
}
.note-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.note-submit:hover:not(:disabled) { filter: brightness(1.07); }

.ticket-audit-history { display: flex; flex-direction: column; gap: 8px; }
.ticket-audit-list-title {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 4px;
}
.ticket-audit-entry {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
}
.ticket-audit-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.ticket-audit-when {
  color: var(--text-sub);
  font-size: 11px;
}
.ticket-audit-reason {
  color: var(--text);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Iter 18: dashboard notes feed — clickable rows surfacing peer activity */
.notes-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.note-feed-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid #fbbf24;
  border-radius: 6px;
  padding: 9px 12px 10px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.note-feed-item:hover {
  background: var(--bg-hover, #1a1f2a);
  border-left-color: #fcd34d;
}
.note-feed-item:active { transform: scale(0.998); }
.note-feed-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.note-feed-target {
  color: #fbbf24;
  font-weight: 600;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.note-feed-meta {
  color: var(--text-sub);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.note-feed-body {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 600px) {
  .note-feed-item { padding: 8px 10px 9px; }
  .note-feed-target { font-size: 12px; }
  .note-feed-meta { font-size: 10px; }
  .note-feed-body { font-size: 11px; }
}

/* Iter 29: pull-to-refresh indicator (mobile only) */
.ptr-indicator {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: rgba(17, 22, 30, 0.95);
  border: 1px solid var(--border-lt);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  z-index: 90;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: transform 220ms var(--ease, ease);
  white-space: nowrap;
}
.ptr-indicator .ptr-arrow {
  font-size: 14px;
  transition: transform 200ms ease;
  display: inline-block;
}
.ptr-indicator.ptr-armed {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.6);
}
.ptr-indicator.ptr-loading .ptr-arrow {
  animation: ptr-spin 700ms linear infinite;
}
@keyframes ptr-spin { to { transform: rotate(360deg); } }
@media (min-width: 901px) {
  /* Desktop has its own refresh button; hide the touch indicator entirely */
  .ptr-indicator { display: none; }
}

/* Iter 28: personal "My Activity Today" stats tile */
.my-stats-body { margin-top: 8px; }
.my-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.my-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.my-stat-num {
  color: #fbbf24;
  font-size: 22px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.my-stat-label {
  color: var(--text-sub);
  font-size: 10.5px;
  letter-spacing: .3px;
  text-transform: uppercase;
  margin-top: 4px;
}
.my-stats-foot {
  color: var(--text-sub);
  font-size: 11px;
  font-style: italic;
  margin-top: 10px;
  text-align: center;
}
@media (max-width: 600px) {
  .my-stat-num   { font-size: 18px; }
  .my-stat-label { font-size: 9.5px; }
}

/* Iter 84: red-edge highlight for failing dashboard cards */
.card.has-error {
  border-left: 3px solid #ef4444;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.06) 0%, transparent 35%);
}

/* Iter 78: panel header action group */
.panel-header-actions { display: inline-flex; gap: 6px; align-items: center; }

/* Iter 104: edit-match button next to team name */
.tk-match-edit {
  margin-left: 6px;
  background: transparent;
  border: 1px solid var(--border-lt);
  color: var(--text-mute);
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.tk-match-edit:hover { color: #fbbf24; border-color: rgba(251, 191, 36, 0.6); }

/* Iter 104: affected-tickets list inside match-edit result modal */
.match-affected-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 14px;
  max-height: 280px;
  overflow-y: auto;
}
.match-affected-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 100ms ease, background 100ms ease;
}
.match-affected-row:hover { border-color: rgba(251, 191, 36, 0.5); background: var(--bg-elev-2, #1a1f2a); }
.match-affected-id    { color: #fbbf24; font-weight: 700; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.match-affected-user  { color: var(--text); font-weight: 600; font-size: 12.5px; }
.match-affected-stake { color: var(--text-sub); font-size: 11px; font-variant-numeric: tabular-nums; }
.match-affected-meta  { color: var(--text-mute); font-size: 10.5px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* Iter 105: verdict banner (apply system verdict) */
.tk-verdict-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.10) 0%, rgba(251, 191, 36, 0.02) 100%);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
}
.tk-verdict-label {
  color: var(--text-sub);
  font-size: 11.5px;
  letter-spacing: 0.2px;
}
.tk-verdict-banner .btn-bulk-primary {
  margin-left: auto;
  padding: 5px 12px;
  font-size: 12px;
}

/* Iter 106: mobile tap-target + affected-row narrow stack */
@media (max-width: 600px) {
  .tk-match-edit {
    width: 28px;
    height: 28px;
    font-size: 13px;
    margin-left: 8px;
  }
  .match-affected-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "id user stake"
      "meta meta meta";
    row-gap: 4px;
  }
  .match-affected-id    { grid-area: id; }
  .match-affected-user  { grid-area: user; }
  .match-affected-stake { grid-area: stake; }
  .match-affected-meta  { grid-area: meta; font-size: 10px; }
  .tk-verdict-banner {
    padding: 10px;
    gap: 8px;
  }
  .tk-verdict-banner .btn-bulk-primary {
    margin-left: 0;
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    min-height: 38px;
  }
  .tk-verdict-label {
    flex: 1 1 100%;
  }
}

/* Iter 92: ticket detail action row */
.ticket-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ticket-action-note {
  color: var(--text-mute);
  font-size: 11.5px;
  font-style: italic;
  padding: 6px 0;
}
/* logout-confirm reused for void modal. Add textarea spacing inside. */
.logout-confirm .note-textarea {
  width: 100%;
  margin: 4px 0 14px;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-lt);
  border-radius: 6px;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}
.logout-confirm .note-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
/* Iter 95: line-edit modal — taller form */
.line-edit-modal { max-width: 440px; }
.line-edit-modal .edit-label {
  display: block;
  margin-top: 8px;
  margin-bottom: 4px;
  color: var(--text-sub);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 600;
}
.line-edit-modal .edit-input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-lt);
  border-radius: 6px;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
}
.line-edit-modal .edit-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.line-edit-btn { width: 26px; height: 26px; font-size: 13px; line-height: 1; }
/* Iter 98: home+away in two columns */
.line-edit-modal .edit-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Iter 91: tickets page section tabs (New / Settled) */
.section-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: -4px 0 16px;
}
.section-tab {
  background: var(--bg-elev);
  border: 1px solid var(--border-lt);
  border-radius: 10px;
  padding: 12px 16px 11px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text-sub);
  transition: background var(--speed), border-color var(--speed), color var(--speed);
  -webkit-tap-highlight-color: transparent;
}
.section-tab:hover { border-color: rgba(251, 191, 36, 0.45); }
.section-tab.active {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.10) 0%, rgba(251, 191, 36, 0.04) 100%);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fbbf24;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.15);
}
.section-tab-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.section-tab-sub {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 2px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-weight: 600;
}
.section-tab.active .section-tab-sub { color: rgba(251, 191, 36, 0.7); }
@media (max-width: 600px) {
  .section-tabs { gap: 8px; margin-bottom: 12px; }
  .section-tab { padding: 10px 12px 9px; }
  .section-tab-label { font-size: 13px; }
  .section-tab-sub { font-size: 10px; }
}

/* Iter 75: mobile bottom-nav bar (phones only) */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(54px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, #0a0d13 0%, #0e131b 100%);
  border-top: 1px solid var(--border-lt);
  z-index: 70;
  justify-content: space-around;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-mute);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .25px;
  text-transform: uppercase;
  transition: color var(--speed);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.bottom-nav-icon {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1;
}
.bottom-nav-item.active {
  color: #fbbf24;
}
.bottom-nav-item.active::before {
  content: "";
  position: absolute;
  top: 0; left: 22%; right: 22%;
  height: 2px;
  background: #fbbf24;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}
.bottom-nav-item[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: 6px; right: 30%;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: #1a1308;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  min-width: 14px;
  text-align: center;
}
/* Iter 76: subtle gold pulse on unattended-but-badged bottom-nav icons */
.bottom-nav-item[data-badge]:not(.active) .bottom-nav-icon {
  animation: bn-pulse 2.4s ease-in-out infinite;
  color: #fbbf24;
}
@keyframes bn-pulse {
  0%, 100% { text-shadow: 0 0 0 rgba(251, 191, 36, 0); }
  50%      { text-shadow: 0 0 8px rgba(251, 191, 36, 0.85); }
}
@media (max-width: 600px) {
  .bottom-nav { display: flex; }
  .content { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

/* Iter 51: Settings page */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.settings-card { padding: 18px 20px 20px; }
.settings-help {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
  margin: 6px 0 14px;
}
.settings-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-sub);
}
.settings-kv .kv-row { font-size: 12px; }
.settings-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border-lt);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--text-mute);
  transition: background var(--speed), border-color var(--speed), color var(--speed);
}
.settings-switch-knob {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-mute);
  transition: background var(--speed), transform var(--speed);
}
.settings-switch.on {
  background: rgba(251, 191, 36, 0.10);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fbbf24;
}
.settings-switch.on .settings-switch-knob {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}
.settings-switch:hover { border-color: rgba(251, 191, 36, 0.55); }

/* Iter 51: compact-mode tightens dashboard card padding */
body.compact-mode .card { padding: 12px 14px; }
body.compact-mode .card-title { font-size: 12.5px; margin-bottom: 8px; }
body.compact-mode .kv-row { padding: 5px 0; font-size: 12px; }
body.compact-mode .cards-grid { gap: 10px; }
/* Iter 72: extend compact-mode to mini-tables (tickets/audit/fraud rows) */
body.compact-mode .mini-table th { padding: 6px 8px; font-size: 10.5px; }
body.compact-mode .mini-table td { padding: 6px 8px; font-size: 11.5px; }
body.compact-mode .audit-row td,
body.compact-mode .ticket-row td { padding: 6px 8px; }
body.compact-mode .page-header  { margin-bottom: 12px; }
body.compact-mode .page-title   { font-size: 17px; }
body.compact-mode .page-sub     { font-size: 11.5px; }

/* Iter 61: tickets pagination footer */
.tickets-footer {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.tickets-footer-note {
  color: var(--text-mute);
  font-size: 11.5px;
  font-style: italic;
}

/* Iter 100: redesigned tickets list — 4-zone rows with status-edged left border */
.tk-list-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 12px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 4px;
}
.tk-list-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}
.tk-list-sub {
  margin-left: auto;
  color: var(--text-sub);
  font-size: 11.5px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tk-cb-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.tk-cb {
  width: 14px; height: 14px;
  accent-color: #fbbf24;
  cursor: pointer;
}

.tk-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.tk-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  grid-template-areas:
    "sel identity money status"
    "sel sels     sels  sels";
  align-items: center;
  gap: 6px 12px;
  padding: 10px 12px 10px 9px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-lt);
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
  -webkit-tap-highlight-color: transparent;
}
.tk-row > .tk-cb-wrap   { grid-area: sel; }
.tk-row > .tk-identity  { grid-area: identity; }
.tk-row > .tk-money     { grid-area: money; }
.tk-row > .tk-status    { grid-area: status; }
.tk-row > .tk-sels      { grid-area: sels; }
.tk-row:hover {
  background: var(--bg-elev-2, #1a1f2a);
  border-color: rgba(251, 191, 36, 0.3);
}
.tk-row:active { transform: scale(0.997); }
.tk-row-selected {
  background: rgba(251, 191, 36, 0.06) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
}
/* state-driven left border (overrides .tk-row default) */
.tk-row-state-won     { border-left-color: #34d399; }
.tk-row-state-lost    { border-left-color: #6b7280; }
.tk-row-state-void    { border-left-color: #f59e0b; }
.tk-row-state-pending { border-left-color: #fbbf24; }

/* Identity zone */
.tk-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tk-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #fbbf24;
  flex-shrink: 0;
}
.tk-identity-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tk-username {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-meta {
  color: var(--text-mute);
  font-size: 11px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Money zone */
.tk-money {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.tk-stake, .tk-payout {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.tk-stake .tk-amt {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.tk-arrow {
  color: var(--text-mute);
  font-size: 10.5px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.tk-payout .tk-amt {
  font-size: 15px;
  font-weight: 700;
}
.tk-payout-win  .tk-amt { color: #34d399; }
.tk-payout-loss .tk-amt { color: var(--text-mute); }
.tk-payout-void .tk-amt { color: #f59e0b; }
.tk-payout-pending .tk-amt { color: #fbbf24; }
.tk-cur {
  color: var(--text-mute);
  font-size: 10px;
  font-weight: 500;
}

/* Status zone */
.tk-status {
  display: inline-flex;
  align-items: center;
}
.tk-status .status-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* Iter 101: inline selections block */
.tk-sels {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tk-sel {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  grid-template-areas:
    "verdict match  odds"
    "verdict market odds";
  column-gap: 10px;
  row-gap: 1px;
  align-items: center;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  padding: 6px 10px;
}
/* Iter 103: per-line verdict glyph */
.tk-sel-verdict {
  grid-area: verdict;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  line-height: 1;
  border-radius: 50%;
}
.verdict-won     { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.verdict-lost    { color: #94a3b8; background: rgba(148, 163, 184, 0.12); }
.verdict-void    { color: #f59e0b; background: rgba(245, 158, 11, 0.14); }
.verdict-pending { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
/* Subtle row tint per verdict */
.tk-sel-won  { background: rgba(52, 211, 153, 0.05); }
.tk-sel-lost { opacity: 0.85; }
.tk-sel-void { background: rgba(245, 158, 11, 0.05); }
/* Match-score chip */
.tk-sel-score {
  margin-left: 8px;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
/* Tinted odds chip per verdict */
.tk-odds-won  { background: rgba(52, 211, 153, 0.18) !important; border-color: rgba(52, 211, 153, 0.5) !important; color: #34d399 !important; }
.tk-odds-lost { background: rgba(148, 163, 184, 0.10) !important; border-color: rgba(148, 163, 184, 0.4) !important; color: var(--text-mute) !important; text-decoration: line-through; }
.tk-odds-void { background: rgba(245, 158, 11, 0.14) !important; border-color: rgba(245, 158, 11, 0.5) !important; color: #f59e0b !important; }
.tk-sel-match {
  grid-area: match;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tk-sel-sport-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}
.tk-sel-code {
  color: var(--text-mute);
  font-size: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  margin-left: 4px;
  opacity: 0.7;
}
.tk-sel-market {
  grid-area: market;
  color: var(--text-sub);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-sel-market-name { color: var(--text-mute); }
.tk-sel-market-sep  { color: var(--text-mute); }
.tk-sel-pick {
  color: #fbbf24;
  font-weight: 600;
}
.tk-sel-odds {
  grid-area: odds;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  background: rgba(251, 191, 36, 0.10);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 4px;
  padding: 2px 8px;
  align-self: center;
  white-space: nowrap;
}
.tk-sel-empty {
  color: var(--text-mute);
  font-size: 11px;
  font-style: italic;
  padding: 4px 0;
}
.tk-sel-more {
  color: var(--text-mute);
  font-size: 11px;
  font-style: italic;
  padding: 2px 6px;
}

/* Mobile collapse */
@media (max-width: 600px) {
  .tk-row {
    grid-template-columns: 28px 1fr auto;
    grid-template-areas:
      "sel identity status"
      "sel money    money"
      "sel sels     sels";
    row-gap: 6px;
  }
  .tk-row > .tk-cb-wrap { grid-area: sel; align-self: start; }
  .tk-row > .tk-identity { grid-area: identity; }
  .tk-row > .tk-money    { grid-area: money; padding-left: 42px; }
  .tk-row > .tk-status   { grid-area: status; }
  .tk-row > .tk-sels     { grid-area: sels; padding-left: 42px; }
  .tk-username { font-size: 12.5px; }
  .tk-meta { font-size: 10.5px; }
  .tk-stake .tk-amt { font-size: 13px; }
  .tk-payout .tk-amt { font-size: 13.5px; }
  .tk-arrow { font-size: 9.5px; }
  .tk-list-head { gap: 8px; padding: 4px 2px 10px; }
  .tk-list-title { font-size: 12.5px; }
  .tk-list-sub { font-size: 10.5px; }
  .tk-sel-match { font-size: 11.5px; }
  .tk-sel-market { font-size: 10.5px; }
  .tk-sel-odds { font-size: 12px; padding: 1px 6px; }
}

/* Iter 49: bulk-select checkbox column + floating action bar */
.ticket-bulk-th, .ticket-bulk-td {
  width: 28px;
  text-align: center;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
.ticket-bulk-cb {
  cursor: pointer;
  width: 14px; height: 14px;
  accent-color: #fbbf24;
  vertical-align: middle;
}
.ticket-row-selected {
  background: rgba(251, 191, 36, 0.07) !important;
  border-left: 2px solid #fbbf24;
}
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(8px);
  z-index: 130;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #11161e 0%, #0e131b 100%);
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.55), 0 0 16px rgba(251, 191, 36, 0.18);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  max-width: calc(100vw - 24px);
}
.bulk-bar.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.bulk-bar-count {
  color: #fbbf24;
  font-weight: 600;
  font-size: 12.5px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: nowrap;
}
.bulk-bar-actions { display: flex; gap: 6px; align-items: center; }
.bulk-bar-totals {
  color: var(--text-sub);
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-left: 1px solid rgba(251, 191, 36, 0.25);
  padding-left: 12px;
}
.bulk-bar-totals strong { color: var(--text); font-weight: 600; }
.bulk-bar-missing { color: #fbbf24; font-style: italic; }
@media (max-width: 600px) {
  .bulk-bar-totals { display: none; }
}
.btn-bulk-primary {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1308;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: filter var(--speed), box-shadow var(--speed);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}
.btn-bulk-primary:hover { filter: brightness(1.06); box-shadow: 0 4px 12px rgba(251, 191, 36, 0.45); }
@media (max-width: 600px) {
  .bulk-bar { padding: 7px 8px 7px 12px; gap: 8px; }
  .bulk-bar-count { font-size: 11.5px; }
  .btn-bulk-primary { padding: 5px 11px; font-size: 11px; }
}

/* Iter 44: active-filter pills (e.g. audit operator scope) */
.active-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 14px;
  font-size: 12px;
  flex-wrap: wrap;
}
.active-filter-label {
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .3px;
  font-size: 10.5px;
}
.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: rgba(251, 191, 36, 0.10);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fbbf24;
  border-radius: 999px;
  cursor: pointer;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
  transition: background var(--speed), border-color var(--speed);
  -webkit-tap-highlight-color: transparent;
}
.active-filter-pill:hover {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.85);
}
.active-filter-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.18);
  font-size: 10px;
  line-height: 1;
}
/* Iter 66: 'Reset all' link button */
.active-filter-reset {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--text-mute);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 6px;
  -webkit-tap-highlight-color: transparent;
}
.active-filter-reset:hover { color: #fbbf24; }

/* Iter 42: right-click context menu (ticket rows) */
.ctx-menu {
  position: absolute;
  z-index: 200;
  min-width: 180px;
  background: linear-gradient(180deg, #11161e 0%, #0e131b 100%);
  border: 1px solid var(--border-lt);
  border-radius: 8px;
  padding: 4px 0;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  opacity: 0;
  transform: scale(0.98);
  transform-origin: top left;
  transition: opacity 100ms ease, transform 100ms ease;
}
.ctx-menu.show { opacity: 1; transform: scale(1); }
.ctx-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
  -webkit-tap-highlight-color: transparent;
}
.ctx-menu-item:hover {
  background: rgba(251, 191, 36, 0.10);
  color: #fbbf24;
}
.ctx-glyph {
  width: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.ctx-menu-item:hover .ctx-glyph { color: #fbbf24; }

/* Iter 47: self-info popover (extends .op-pop) */
.self-pop-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 6px 0 8px;
}
.self-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 4px;
  text-align: center;
}
.self-stat-num {
  color: #fbbf24;
  font-size: 16px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.self-stat-label {
  color: var(--text-sub);
  font-size: 9.5px;
  letter-spacing: .25px;
  text-transform: uppercase;
  margin-top: 2px;
}
.self-pop-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.btn-ghost-sm { padding: 5px 11px; font-size: 11.5px; }

/* Iter 41: operator presence popover */
.op-pop {
  position: absolute;
  z-index: 95;
  width: 280px;
  background: linear-gradient(180deg, #11161e 0%, #0e131b 100%);
  border: 1px solid var(--border-lt);
  border-radius: 10px;
  padding: 10px 12px 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.op-pop.show { opacity: 1; transform: translateY(0); }
.op-pop-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
.op-pop-title {
  color: #fbbf24;
  font-weight: 700;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.op-pop-sub  { color: var(--text-mute); font-size: 10.5px; letter-spacing: .25px; text-transform: uppercase; }
.op-pop-list { display: flex; flex-direction: column; gap: 8px; }
.op-pop-row {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 9px;
}
.op-pop-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.op-pop-row-when { color: var(--text-sub); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.op-pop-row-body {
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.4;
  word-break: break-word;
}
@media (max-width: 600px) {
  .op-pop { width: calc(100vw - 24px); left: 12px !important; }
}

/* Iter 20: operators-online presence pills */
.presence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.presence-pill:hover {
  background: var(--bg-hover, #1a1f2a);
  border-color: rgba(251, 191, 36, 0.4);
}
.presence-pill.presence-me {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(251, 191, 36, 0.08);
}
.presence-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.65);
  animation: presence-breathe 2.4s ease-in-out infinite;
}
.presence-pill.presence-me .presence-dot { background: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.65); }
@keyframes presence-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.presence-name {
  color: var(--text);
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.presence-meta {
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}
@media (max-width: 600px) {
  .presence-pill { font-size: 10px; padding: 3px 8px; }
  .presence-meta { font-size: 9px; }
}

/* Iter 19: peer-activity toast notifications */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
  max-width: calc(100vw - 40px);
  width: 360px;
}
/* Iter 81: clear-all chip */
.toast-clear-all {
  pointer-events: auto;
  align-self: flex-end;
  background: rgba(11, 14, 20, 0.85);
  color: var(--text-sub);
  border: 1px solid var(--border-lt);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--speed), border-color var(--speed);
}
.toast-clear-all:hover { color: #fbbf24; border-color: rgba(251, 191, 36, 0.6); }
.toast {
  pointer-events: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid #fbbf24;
  border-radius: 8px;
  padding: 10px 12px 11px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.toast-in  { opacity: 1; transform: translateX(0); }
.toast.toast-out { opacity: 0; transform: translateX(20px); }
.toast-info { border-left-color: #fbbf24; }
.toast-ok   { border-left-color: #34d399; }
.toast-warn { border-left-color: #f59e0b; }
.toast-err  { border-left-color: #ef4444; }
.toast-soon { border-left-color: #6b7280; }
.toast-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.toast-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  flex: 1;
  word-break: break-word;
}
.toast-x {
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}
.toast-x:hover { color: var(--text); }
.toast-body {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}
@media (max-width: 600px) {
  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
  }
  .toast { padding: 9px 10px; }
  .toast-title { font-size: 11px; }
  .toast-body  { font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════════
   TICKETS V2.0 — 2026-05-07
   3-tab queue UI · Held / Active / Settled · mobile-first
   ═══════════════════════════════════════════════════════════════════ */

.tv2-tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0 12px;
  padding: 4px;
  background: var(--card-bg, #1a2332);
  border-radius: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tv2-tab {
  flex: 1 1 auto;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-sub, #a0b0c0);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  white-space: nowrap;
}
.tv2-tab:hover { background: rgba(255,255,255,.04); color: var(--text, #fff); }
.tv2-tab.active {
  background: linear-gradient(180deg, #fbbf24 0%, #d99a09 100%);
  color: #1a1308;
  box-shadow: 0 2px 10px rgba(251,191,36,.28);
}
.tv2-tab-badge {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255,255,255,.16);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.tv2-tab.active .tv2-tab-badge {
  background: rgba(255,255,255,.25);
}

.tv2-search-row {
  margin: 12px 0;
}
.tv2-search {
  width: 100%;
  max-width: 480px;
}

.tv2-list-card {
  background: var(--card-bg, #1a2332);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.05);
}
.tv2-loading {
  padding: 32px;
  text-align: center;
  color: var(--text-sub, #a0b0c0);
  font-size: 13px;
}

/* ─── Desktop table ─── */
.tv2-table-wrap {
  overflow-x: auto;
  display: block;
}
.tv2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 980px;
}
.tv2-table thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mute, #6b7c8d);
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}
.tv2-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.tv2-table tbody tr:hover td {
  background: rgba(255,255,255,.02);
}
.tv2-num {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  text-align: right;
}
.tv2-zpt {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 12px;
  color: #f59e0b;
}
.tv2-td-time { font-size: 12px; color: var(--text-sub, #a0b0c0); white-space: nowrap; }
.tv2-th-actions, .tv2-td-actions { text-align: right; min-width: 200px; }
.tv2-td-state { min-width: 178px; }
.tv2-table .tv2-btn { padding: 6px 10px; }

/* ─── State chips ─── */
.tv2-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.tv2-chip-hold     { background: rgba(245,158,11,.15);  color: #fbbf24; }
.tv2-chip-offer    { background: rgba(99,102,241,.18);  color: #818cf8; }
.tv2-chip-active   { background: rgba(34,197,94,.15);   color: #4ade80; }
.tv2-chip-won      { background: rgba(34,197,94,.18);   color: #22c55e; font-weight: 700; }
.tv2-chip-lost     { background: rgba(239,68,68,.15);   color: #f87171; }
.tv2-chip-canceled { background: rgba(107,114,128,.18); color: #9ca3af; }
.tv2-chip-rejected { background: rgba(239,68,68,.18);   color: #ef4444; font-weight: 700; }
.tv2-chip-cashout  { background: rgba(14,165,233,.18);  color: #38bdf8; }
.tv2-chip-default  { background: rgba(255,255,255,.06); color: #cbd5e1; }

/* ─── Action buttons ─── */
.tv2-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tv2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 120ms ease, transform 60ms ease;
  white-space: nowrap;
  min-height: 32px;  /* touch-friendly */
}
.tv2-btn:hover { filter: brightness(1.1); }
.tv2-btn:active { transform: translateY(1px); }
.tv2-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tv2-btn-approve  { background: #16a34a; color: #fff; }
.tv2-btn-reject   { background: #dc2626; color: #fff; }
.tv2-btn-offer    { background: #2563eb; color: #fff; }
.tv2-btn-view     { background: rgba(255,255,255,.06); color: var(--text, #fff); border-color: rgba(255,255,255,.1); }
.tv2-btn-cancel   { background: rgba(220,38,38,.15);   color: #f87171; border-color: rgba(220,38,38,.3); }
.tv2-btn-reopen   { background: rgba(245,158,11,.15);  color: #fbbf24; border-color: rgba(245,158,11,.3); }
.tv2-btn-secondary { background: rgba(255,255,255,.06); color: var(--text, #fff); border-color: rgba(255,255,255,.1); }
.tv2-btn-submit   { background: #2563eb; color: #fff; padding: 10px 20px; min-height: 40px; font-size: 13px; }

/* ─── Mobile cards (hidden on desktop) ─── */
.tv2-cards { display: none; padding: 8px; }
.tv2-card {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tv2-card-selected {
  background: rgba(251,191,36,.07);
  border-color: rgba(251,191,36,.55);
}
.tv2-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.tv2-card-head.has-select {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}
.tv2-card-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}
.tv2-card-select .tv2-row-checkbox {
  width: 20px;
  height: 20px;
}
.tv2-card-titleblock {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tv2-zpt-big {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 15px;
  color: #f59e0b;
}
.tv2-card-time {
  color: var(--text-mute, #737f95);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tv2-card-verdict {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}
.tv2-card-body { font-size: 13px; }
.tv2-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.tv2-card-metric {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 6px;
  background: rgba(0,0,0,.14);
}
.tv2-card-label {
  display: block;
  color: var(--text-sub, #a6b0c3);
  font-size: 10.5px;
  line-height: 1.2;
  margin-bottom: 2px;
}
.tv2-card-main {
  display: block;
  min-width: 0;
  color: var(--text, #fff);
  font-weight: 650;
  font-size: 12.5px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.tv2-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}
.tv2-card-k { color: var(--text-sub, #a0b0c0); font-size: 12px; }
.tv2-card-v { color: var(--text, #fff); font-weight: 500; }
.tv2-card-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.05);
  display: flex;
}
.tv2-card-actions .tv2-actions {
  width: 100%;
  justify-content: stretch;
}
.tv2-card-actions .tv2-btn {
  flex: 1 1 auto;
  min-height: 40px;
  font-size: 13px;
}

/* ─── Modal (odds editor) ─── */
.tv2-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  overflow-y: auto;
}
.tv2-modal-inner {
  width: 100%;
  max-width: 560px;
  background: var(--card-bg, #1a2332);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}
.tv2-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.tv2-modal-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #fff);
}
.tv2-modal-close {
  background: none;
  border: none;
  color: var(--text-mute, #6b7c8d);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.tv2-modal-close:hover { color: var(--text, #fff); }
.tv2-modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.tv2-modal-help {
  background: rgba(99,102,241,.08);
  border-left: 3px solid #6366f1;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-sub, #a0b0c0);
  margin: 0 0 16px;
}
.tv2-modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.tv2-odds-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.02);
  border-radius: 8px;
}
.tv2-odds-line { min-width: 0; }
.tv2-odds-match {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tv2-odds-mkt {
  font-size: 11px;
  color: var(--text-sub, #a0b0c0);
  margin-top: 2px;
}
.tv2-odds-current, .tv2-odds-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tv2-odds-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-mute, #6b7c8d);
  letter-spacing: 0.5px;
}
.tv2-odds-val {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub, #a0b0c0);
}
.tv2-odds-input {
  width: 80px;
  padding: 6px 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  color: var(--text, #fff);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.tv2-odds-input:focus {
  outline: none;
  border-color: #2563eb;
  background: rgba(37,99,235,.08);
}

/* ─── Responsive: switch table → cards on narrow screens ─── */
@media (max-width: 768px) {
  .tv2-table-wrap { display: none; }
  .tv2-cards { display: block; }
  .tv2-tabs { padding: 3px; gap: 3px; }
  .tv2-tab {
    flex-direction: column;
    gap: 2px;
    min-width: 90px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .tv2-tab-label { font-size: 12px; }
  .tv2-tab-badge { font-size: 10px; min-width: 18px; }
  .tv2-modal-inner { max-height: 100vh; border-radius: 0; }
  .tv2-modal { padding: 0; }
  .tv2-odds-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }
  .tv2-odds-current, .tv2-odds-new {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ─── Bulk per-line odds editor (v1 detail panel) — 2026-05-07 ────────── */
.bulk-odds-modal {
  max-width: 720px;
  width: 92vw;
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bulk-odds-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  max-height: 40vh;
  overflow-y: auto;
  padding: 4px;
}
.bulk-odds-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
}
.bulk-odds-match { min-width: 0; }
.bulk-odds-teams {
  font-weight: 600;
  font-size: 13px;
  color: #e8e8e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bulk-odds-mkt {
  font-size: 11px;
  color: #9aa0a6;
  margin-top: 2px;
}
.bulk-odds-cur, .bulk-odds-new {
  text-align: center;
  min-width: 70px;
}
.bulk-odds-label {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}
.bulk-odds-val {
  font-weight: 600;
  font-size: 14px;
  color: #c5c5c5;
}
.bulk-odds-arrow {
  font-size: 18px;
  color: #666;
}
.bulk-odds-input {
  width: 80px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.bulk-odds-input:focus {
  outline: none;
  border-color: #3fbf6f;
  background: rgba(63,191,111,0.08);
}
.bulk-odds-summary {
  background: rgba(63,191,111,0.06);
  border: 1px solid rgba(63,191,111,0.18);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bulk-odds-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.bulk-odds-sum-label { color: #aaa; }
.bulk-odds-total-val, .bulk-odds-pot-val, .bulk-odds-diff-val {
  font-weight: 700;
  color: #e8e8e8;
}

@media (max-width: 600px) {
  .bulk-odds-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }
  .bulk-odds-arrow { display: none; }
  .bulk-odds-match { grid-column: 1 / -1; }
  .bulk-odds-modal { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
}

/* ─── Per-line verdict chips on Për Verdikt rows — 2026-05-07 ───────── */
.tv2-leg-chips {
  display: inline-flex;
  gap: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.tv2-leg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
}
.tv2-leg.leg-won     { background: rgba(63,191,111,0.22);  color: #3fbf6f; }
.tv2-leg.leg-lost    { background: rgba(226,85,85,0.22);   color: #e25555; }
.tv2-leg.leg-void    { background: rgba(228,184,73,0.20);  color: #e4b849; }
.tv2-leg.leg-pending { background: rgba(255,255,255,0.06); color: #888; }
.tv2-conf {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  vertical-align: middle;
}
.tv2-conf-high { background: rgba(63,191,111,0.20); color: #3fbf6f; }
.tv2-conf-med  { background: rgba(228,184,73,0.20); color: #e4b849; }
.tv2-conf-low  { background: rgba(226,85,85,0.22); color: #e25555; }
.tv2-td-state {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .tv2-leg-chips { margin-left: 0; margin-top: 4px; }
}

/* Disabled tv2 buttons should look unmistakable */
.tv2-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.7);
}
.tv2-btn:disabled:hover { opacity: 0.4; }

/* ─── v1 detail panel: color-coded selections + clean banner — 2026-05-07 */
.mini-table-selections .sel-row.row-won {
  background: rgba(63,191,111,0.07);
  border-left: 3px solid rgba(63,191,111,0.55);
}
.mini-table-selections .sel-row.row-lost {
  background: rgba(226,85,85,0.07);
  border-left: 3px solid rgba(226,85,85,0.55);
}
.mini-table-selections .sel-row.row-void {
  background: rgba(228,184,73,0.07);
  border-left: 3px solid rgba(228,184,73,0.55);
}
.mini-table-selections .sel-row td {
  padding-top: 8px;
  padding-bottom: 8px;
}
.verdict-auto-tag {
  font-size: 9px;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 0.5px;
  margin-left: 4px;
}
.verdict-conf-inline {
  font-size: 11px;
  color: #888;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.tk-verdict-banner {
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border-left: 3px solid rgba(228,184,73,0.6);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
}
.tk-verdict-label { font-weight: 600; color: #aaa; }
.tk-verdict-conf { }
.tk-verdict-pay { color: #aaa; }
.tk-verdict-partial { color: #e4b849; font-style: italic; }
.ticket-settled-note {
  font-size: 13px;
  color: #aaa;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.paid-on { color: #3fbf6f; font-weight: 600; }
.paid-off { color: #e4b849; }

/* ─── v1 detail panel polish (mobile-friendly) — 2026-05-07 ─────────── */
.detail-more-toggle {
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.18);
  color: #9aa0a6;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 8px;
  width: 100%;
  text-align: left;
}
.detail-more-toggle:hover {
  border-color: rgba(255,255,255,0.32);
  color: #c5c5c5;
}
.detail-more-box.hidden,
.ticket-audit-history.hidden,
.ticket-note-wrap.hidden {
  display: none;
}
.detail-section-history {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}

/* Selections table — responsive: full table on desktop, stacked cards on mobile */
@media (max-width: 600px) {
  /* The selections mini-table flips to per-row cards */
  #panel-body .mini-table thead { display: none; }
  #panel-body .mini-table,
  #panel-body .mini-table tbody,
  #panel-body .mini-table tr,
  #panel-body .mini-table td { display: block; width: 100%; }
  #panel-body .mini-table tr {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 10px 12px;
  }
  #panel-body .mini-table td {
    padding: 4px 0;
    border: none;
    text-align: left;
  }
  #panel-body .mini-table td.num { text-align: left; }
  #panel-body .mini-table td:first-child {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  /* Add an inline label to each cell on mobile (column order: match · pick · odds · score · verdict · edit) */
  #panel-body .mini-table td:nth-child(2)::before { content: "Pick: "; color: #888; }
  #panel-body .mini-table td:nth-child(3)::before { content: "Koef.: "; color: #888; }
  #panel-body .mini-table td:nth-child(4)::before { content: "Skor: "; color: #888; }
  #panel-body .mini-table td:nth-child(5)::before { content: "Verdikt: "; color: #888; }

  /* Detail sections — tighter spacing on mobile */
  #panel-body .detail-section {
    margin-bottom: 10px;
    padding: 10px 12px;
  }
  #panel-body .detail-section-title {
    font-size: 13px;
    margin-bottom: 6px;
  }

  /* Action row stacks buttons full-width */
  #panel-body .ticket-action-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  #panel-body .ticket-action-row > button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  /* kvRow tighter on mobile */
  #panel-body .kv-row {
    padding: 4px 0;
    font-size: 13px;
  }
  #panel-body .kv-row .kv-label { min-width: 90px; font-size: 11px; }

  /* Note textarea full-width */
  #panel-body .note-textarea { font-size: 14px; }
}

/* ─── Aktive row tints + per-leg dots — 2026-05-07 ───────────────────── */
.tv2-row.tv2-row-tint-lost {
  background: rgba(226,85,85,0.05);
  border-left: 2px solid rgba(226,85,85,0.55);
}
.tv2-row.tv2-row-tint-won {
  background: rgba(63,191,111,0.05);
  border-left: 2px solid rgba(63,191,111,0.55);
}

/* ─── Mbyllura: filter pills + paid status — 2026-05-07 ──────────────── */
.tv2-settled-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
}
.tv2-filter-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: #aaa;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 120ms;
}
.tv2-filter-pill:hover {
  background: rgba(255,255,255,0.08);
  color: #e8e8e8;
}
.tv2-filter-pill.active {
  background: rgba(63,191,111,0.16);
  border-color: rgba(63,191,111,0.55);
  color: #3fbf6f;
  font-weight: 600;
}
.tv2-paid-on  { color: #3fbf6f; font-weight: 600; }
.tv2-paid-off { color: #e4b849; font-weight: 600; }

/* ─── Per Verdikt: bulk action bar + checkboxes — 2026-05-07 ─────────── */
.tv2-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(63,191,111,0.10);
  border: 1px solid rgba(63,191,111,0.45);
  border-radius: 6px;
  flex-wrap: wrap;
}
.tv2-bulk-count {
  font-weight: 600;
  color: #3fbf6f;
}
.tv2-btn-bulk {
  font-weight: 700;
}
.tv2-th-checkbox, .tv2-td-checkbox {
  width: 32px;
  text-align: center;
  padding: 6px 4px !important;
}
.tv2-row-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3fbf6f;
}
.tv2-bulk-progress {
  background: rgba(63,191,111,0.12);
  border: 1px solid rgba(63,191,111,0.5);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #3fbf6f;
  font-weight: 600;
}

@media (max-width: 600px) {
  .tv2-settled-filters { gap: 4px; }
  .tv2-filter-pill { font-size: 11px; padding: 5px 10px; }
  .tv2-bulk-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .tv2-bulk-bar .tv2-btn { width: 100%; }
}

.audit-filter-rails {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ─── Mobile polish for Shëndeti / Auditi / Vendos / Mashtrime — 2026-05-08 ─── */
@media (max-width: 600px) {
  /* Page header stack tighter on mobile */
  .page-header { gap: 8px; padding: 10px 12px; }
  .page-title { font-size: 18px !important; }
  .page-sub { font-size: 11.5px !important; line-height: 1.3; }
  .page-actions { flex-wrap: wrap; gap: 6px; }
  .page-actions .icon-btn { min-width: 38px; min-height: 38px; }

  /* Refresh indicator hidden on mobile (saves space; user sees toast anyway) */
  .refresh-indicator { display: none; }

  /* Audit table: hide ticket col, give reason more room */
  .audit-table thead th:nth-child(4),
  .audit-table tbody td:nth-child(4) { display: none; }
  .audit-table .audit-reason {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }

  /* Settlements table: hide odds + type cols on phone (least informative) */
  .tickets-table thead th:nth-child(4),
  .tickets-table tbody td:nth-child(4),
  .tickets-table thead th:nth-child(6),
  .tickets-table tbody td:nth-child(6) { display: none; }

  /* Fraud tables: show only top 4 cols; rest available on tap-to-detail */
  #fraud-card-1 .mini-table thead th:nth-child(4),
  #fraud-card-1 .mini-table tbody td:nth-child(4) { display: none; }
  #fraud-card-3 .mini-table thead th:nth-child(3),
  #fraud-card-3 .mini-table tbody td:nth-child(3),
  #fraud-card-3 .mini-table thead th:nth-child(6),
  #fraud-card-3 .mini-table tbody td:nth-child(6) { display: none; }

  /* Health page: Money Flow + Classifier + Vendor cards take full width */
  .cards-grid { gap: 10px !important; }
  .card { padding: 10px 12px; }
  .card-title { font-size: 13.5px; gap: 6px; flex-wrap: wrap; }
  .kv-row { padding: 5px 0; font-size: 12.5px; }

  /* Filter chips wrap nicer */
  .chips-row { gap: 6px; flex-wrap: wrap; }
  .chips-row-tight { gap: 4px; }
  .filter-chip { font-size: 11.5px; padding: 5px 9px; }

  /* Active filter row stacked */
  .active-filter-row {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .active-filter-pill { font-size: 11.5px; }
  .active-filter-reset { font-size: 11.5px; padding: 4px 8px; }

  /* My-stats grid 3-col → 1-col on phone */
  .my-stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .my-stat-num { font-size: 22px !important; }
  .my-stat-label { font-size: 10.5px !important; }

  /* Presence list: smaller pills */
  .presence-pill { padding: 5px 9px; font-size: 11.5px; }
  .presence-meta { font-size: 10px; }

  /* Notes feed: tighter */
  .note-feed-item { padding: 8px 10px; }
  .note-feed-target { font-size: 12.5px; }
  .note-feed-meta { font-size: 10.5px; }
  .note-feed-body { font-size: 12px; line-height: 1.35; }

  /* System banner stacks on mobile */
  .system-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 12px;
    font-size: 12.5px;
  }
  .banner-meta { font-size: 11px; }

  /* Detail panels (audit-panel / user-panel) full-width sheet */
  .detail-panel { width: 100% !important; max-width: 100% !important; }
  .panel-header { padding: 10px 12px; }
  .panel-title { font-size: 15px; }
  .panel-sub { font-size: 11.5px; flex-wrap: wrap; }
  .panel-body { padding: 10px 12px; gap: 12px; }
  .detail-section-title { font-size: 12.5px; }
  .audit-diff { flex-direction: column; gap: 8px; }
  .diff-pre { font-size: 10.5px; padding: 6px 8px; }

  /* Page-actions hide CSV button text on phone, keep arrow only */
  .page-actions .icon-btn { font-size: 12px; padding: 6px 8px; }
}

/* Tablet sweet spot — 2-col grid for cards */
@media (max-width: 900px) and (min-width: 601px) {
  .audit-table { font-size: 12.5px; }
  .audit-table .audit-reason { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Touch targets on every action button */
@media (pointer: coarse) {
  .icon-btn { min-height: 44px; min-width: 44px; }
  .filter-chip { min-height: 38px; }
  .tv2-btn,
  .btn-ghost,
  .btn-danger,
  .btn-warn,
  .btn-bulk-primary,
  .note-submit {
    min-height: 44px;
  }
  .audit-row, .ticket-row { min-height: 44px; }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE POLISH — Tickets v2 + Audit — 2026-05-08
   Sticky tabs, denser cards, compact filters, better tap targets
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Tickets v2: sticky tabs + search on mobile ─── */
/* Note: .content is the scroll container, so sticky `top: 0` pins to top of viewport */
@media (max-width: 768px) {
  .tv2-tabs {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 -12px 8px;
    padding: 6px 12px;
    background: var(--bg, #0b0e14);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  }
  .tv2-search-row {
    margin: 0 0 10px;
  }
  .tv2-search { font-size: 13px; padding: 9px 12px; }

  /* Compact card body: stack stake/odds horizontal, hide repetitive labels */
  .tv2-card { padding: 11px; margin-bottom: 9px; border-radius: 8px; }
  .tv2-card-head { padding-bottom: 7px; margin-bottom: 7px; }
  .tv2-zpt-big { font-size: 14px; }
  .tv2-card-body { font-size: 12.5px; }
  .tv2-card-row { padding: 4px 0; }
  .tv2-card-k { font-size: 11.5px; }
  .tv2-card-grid { gap: 5px; }
  .tv2-card-metric { padding: 5px 7px; }
  .tv2-card-verdict .tv2-chip { font-size: 10.5px; padding: 3px 8px; }
  .tv2-card-verdict .tv2-conf {
    margin-left: 0;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 10.5px;
  }
  .tv2-card-actions { margin-top: 9px; padding-top: 8px; }
  .tv2-card-actions .tv2-btn {
    flex: 1 1 auto;
    min-height: 44px;
    font-size: 13px;
    font-weight: 600;
  }

  /* Bigger leg chips on mobile for finger reach */
  .tv2-leg-chips { gap: 3px; }
  .tv2-leg {
    width: 16px;
    height: 16px;
    font-size: 11px;
    line-height: 16px;
  }

  /* Bulk bar sticky bottom on mobile (when in Per Verdikt with selections) */
  .tv2-bulk-bar {
    position: -webkit-sticky;
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)); /* above bottom-nav */
    z-index: 35;
    margin: 0 -12px 6px;
    padding: 9px 12px;
    border-width: 1.5px;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.4);
  }
  .tv2-bulk-progress {
    position: -webkit-sticky;
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    z-index: 35;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.4);
  }
}

/* ─── Audit page: compact filters on mobile ─── */
@media (max-width: 600px) {
  /* Stack filters tighter, search input full-width */
  .toolbar.toolbar-stack { gap: 6px; padding: 6px 0; }
  .search-wrap { width: 100%; }
  .search-input {
    width: 100%;
    font-size: 13px;
    padding: 9px 12px;
  }

  /* Sticky filter bar so it stays visible while scrolling audit rows */
  #content > .toolbar.toolbar-stack {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--bg, #0b0e14);
    margin: 0 -12px 8px;
    padding: 6px 12px 7px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .audit-filter-rails {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 2px 0;
  }
  .audit-filter-rails .chips-row {
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    overflow: visible;
    padding-bottom: 0;
  }
  .audit-filter-rails .chips-row + .chips-row {
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,.08);
  }

  /* Audit row: increase tap target, give reason more room */
  .audit-table tbody td { padding: 9px 6px; font-size: 12px; }
  .audit-reason {
    max-width: none;
    white-space: normal;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
  }

  /* Ticket meta cell smaller on phone */
  .audit-table tbody td:nth-child(4) {
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 10.5px;
    color: var(--text-sub);
  }
}

/* ─── Tickets v2 desktop: subtle row hover with cursor ─── */
.tv2-table-wrap tbody tr.tv2-row {
  cursor: default;
  transition: background 80ms ease;
}
.tv2-table-wrap tbody tr.tv2-row:hover {
  background: rgba(251, 191, 36, 0.04);
}
.tv2-table-wrap tbody tr.tv2-row.tv2-row-tint-won:hover {
  background: rgba(34, 197, 94, 0.07);
}
.tv2-table-wrap tbody tr.tv2-row.tv2-row-tint-lost:hover {
  background: rgba(239, 68, 68, 0.07);
}

/* ─── Per Verdikt confidence tooltip pill on mobile ─── */
@media (max-width: 600px) {
  .tv2-conf {
    font-size: 10px;
    padding: 1px 6px;
    margin-left: 4px;
  }
}

/* ─── Detail panel polish on phone (auto-fits) ─── */
@media (max-width: 600px) {
  .detail-panel {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0;
  }
  .panel-header {
    padding: 11px 12px;
    position: sticky;
    top: 0;
    background: var(--card-bg, #1a2332);
    z-index: 5;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .panel-body { padding: 10px 12px calc(94px + env(safe-area-inset-bottom, 0px)); }
  #ticket-panel .ticket-action-row {
    position: sticky;
    bottom: env(safe-area-inset-bottom, 0px);
    background: var(--card-bg, #1a2332);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    margin: 0 -12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -3px 12px rgba(0,0,0,0.4);
    z-index: 5;
  }
  #ticket-panel .ticket-action-row .btn-bulk-primary,
  #ticket-panel .ticket-action-row .btn-ghost-sm,
  #ticket-panel .ticket-action-row .btn-danger {
    flex: 1;
    min-height: 44px;
    font-size: 13px;
  }
  .panel-backdrop,
  .cmdk-backdrop,
  .sidebar-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ─── Touch-friendly chips throughout ─── */
@media (pointer: coarse) {
  .tv2-tab { min-height: 44px; }
  .tv2-leg { min-width: 18px; min-height: 18px; }
  .filter-chip { padding: 7px 12px; }
}

/* ─── Audit cards (mobile) — 2026-05-08 ─── */
.audit-cards { display: none; }

@media (max-width: 600px) {
  .card .audit-table { display: none; }
  .audit-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
  }
  .audit-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--text-mute, #6b7280);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 80ms ease, transform 60ms ease;
    min-height: 92px;
  }
  .audit-card:active { transform: scale(0.99); }
  .audit-card-ok   { border-left-color: #34d399; }
  .audit-card-warn { border-left-color: #f59e0b; }
  .audit-card-err  { border-left-color: #ef4444; }
  .audit-card-info { border-left-color: #fbbf24; }
  .audit-card-soon { border-left-color: #6b7280; }

  .audit-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }
  .audit-card-head .status-pill {
    font-size: 10.5px;
    padding: 2px 7px;
    max-width: 68vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .audit-card-when {
    font-size: 11px;
    color: var(--text-sub, #a0b0c0);
    white-space: nowrap;
  }
  .audit-card-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-sub, #a0b0c0);
    margin-bottom: 4px;
  }
  .audit-card-op {
    font-weight: 600;
    color: var(--text, #fff);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .audit-card-ticket {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 10.5px;
    color: var(--text-sub);
    background: rgba(251, 191, 36, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
  }
  .audit-card-reason {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text, #fff);
    margin-top: 4px;
    word-break: break-word;
    /* Allow up to 3 lines, then ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ─── Ticket timeline (rich audit history in detail panel) — 2026-05-08 ─── */
.ticket-audit-history { margin-top: 6px; }

.ticket-timeline-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-sub, #a6b0c3);
}

/* Timeline header — title + system-event filter chips. 2026-05-11. */
.tl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tl-filters {
  display: flex;
  gap: 6px;
}
.tl-filter-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  background: transparent;
  color: var(--text-sub, #a6b0c3);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.tl-filter-chip:hover:not(:disabled) {
  background: rgba(255,255,255,0.04);
  color: var(--text, #fff);
}
.tl-filter-chip.active {
  background: var(--brand-soft, rgba(99, 102, 241, 0.14));
  border-color: rgba(99, 102, 241, 0.5);
  color: var(--text, #fff);
}
.tl-filter-chip:disabled { cursor: default; opacity: 0.9; }

/* Dedup count badge — "×3" when consecutive entries are collapsed */
.tl-count {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: var(--text-sub, #a6b0c3);
  margin-left: 4px;
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
}

/* System-event entries — dimmer so operator-attributable events stand out */
.tl-is-system .tl-action { color: var(--text-sub, #a6b0c3); font-weight: 500; }
.tl-is-system .tl-actor  { opacity: 0.7; }

.ticket-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical guide line connecting markers */
.ticket-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255,255,255,0.08) 8%,
    rgba(255,255,255,0.08) 92%,
    transparent 100%);
}

.tl-entry {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  padding: 8px 0 10px 0;
  position: relative;
}

.tl-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elev, #1a2332);
  border: 2px solid var(--text-mute, #737f95);
  margin-top: 4px;
  z-index: 1;
  flex-shrink: 0;
}

.tl-tone-ok   .tl-marker { border-color: #5ee38d; box-shadow: 0 0 0 3px rgba(94,227,141,0.12); }
.tl-tone-warn .tl-marker { border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,0.12); }
.tl-tone-err  .tl-marker { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,0.12); }
.tl-tone-info .tl-marker { border-color: #7bb7ff; }
.tl-tone-soon .tl-marker { border-color: var(--text-mute, #737f95); }

.tl-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-action {
  font-weight: 600;
  font-size: 13px;
  color: var(--text, #fff);
}

.tl-actor {
  font-size: 11.5px;
  color: var(--text-sub, #a6b0c3);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: nowrap;
}

.tl-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tl-fact {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-sub, #a6b0c3);
}
.tl-fact-state { background: rgba(123,183,255,0.10); border-color: rgba(123,183,255,0.25); color: #c2dcff; }
.tl-fact-money { background: rgba(94,227,141,0.10); border-color: rgba(94,227,141,0.25); color: #c0f4d4; }
.tl-fact-odds  { background: rgba(251,191,36,0.10); border-color: rgba(251,191,36,0.25); color: #ffe9a8; }
.tl-fact-paid  { background: rgba(94,227,141,0.10); border-color: rgba(94,227,141,0.25); color: #c0f4d4; }
.tl-fact-lines { background: rgba(167,139,250,0.10); border-color: rgba(167,139,250,0.25); color: #ddd6fe; }

.tl-reason {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text, #fff);
  background: rgba(0,0,0,0.18);
  border-left: 2px solid rgba(255,255,255,0.08);
  padding: 5px 9px;
  border-radius: 0 4px 4px 0;
  margin-top: 2px;
  word-break: break-word;
}

.tl-when {
  font-size: 10.5px;
  color: var(--text-mute, #737f95);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

@media (max-width: 600px) {
  .tl-action { font-size: 12.5px; }
  .tl-actor  { font-size: 11px; }
  .tl-fact   { font-size: 10.5px; padding: 2px 6px; }
  .tl-reason { font-size: 11.5px; padding: 5px 8px; }
  .tl-when   { font-size: 10px; }
}

/* Raw vendor market/outcome code shown under humanized label — 2026-05-08 */
.tk-raw-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  color: var(--text-mute, #737f95);
  margin-top: 1px;
  letter-spacing: 0.2px;
  opacity: 0.75;
}

/* Player-style combined Loja-Zgjedhja@Koeficienti column — 2026-05-08 */
.tk-combined {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  letter-spacing: 0.2px;
  word-break: break-all;
}
.tk-match-meta {
  display: flex;
  gap: 8px;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--text-mute, #737f95);
}
.tk-sport {
  color: var(--text-sub, #a6b0c3);
  font-weight: 500;
}
.tk-mid {
  font-family: ui-monospace, "SF Mono", monospace;
  color: #6366f1;
  opacity: 0.85;
}

/* Structured per-leg detail cell: Tregu / Zgjedhja / Koeficienti — 2026-05-08 */
.tk-leg-detail {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.45;
  position: relative;
  padding: 6px 10px !important;
  min-width: 280px;
}
.tk-leg-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.tk-leg-k {
  color: var(--text-mute, #737f95);
  font-weight: 500;
  flex: 0 0 auto;
  min-width: 78px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.tk-leg-v {
  color: var(--text, #fff);
  font-weight: 500;
  word-break: break-word;
  min-width: 0;
}
.tk-leg-odds {
  color: #fbbf24;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tk-live-tag {
  display: inline-block;
  font-size: 9px;
  padding: 1px 5px;
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 3px;
  margin-bottom: 4px;
  letter-spacing: 0.6px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .tk-leg-detail { min-width: 0; padding: 5px 8px !important; font-size: 11px; }
  .tk-leg-k { min-width: 64px; font-size: 9.5px; }
  .tk-leg-v { font-size: 11px; }
  .tk-leg-row { flex-wrap: wrap; }
}

/* Green secondary button — for "Vendos Vetë" alongside primary "Pranoja" — 2026-05-08 */
.btn-success-ghost {
  background: rgba(94, 227, 141, 0.10);
  color: #5ee38d;
  border: 1px solid rgba(94, 227, 141, 0.45);
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 100ms ease, border-color 100ms ease, color 100ms ease;
}
.btn-success-ghost:hover {
  background: rgba(94, 227, 141, 0.18);
  border-color: rgba(94, 227, 141, 0.7);
  color: #c0f4d4;
}
.btn-success-ghost:active { transform: translateY(1px); }
.btn-success-ghost.btn-ghost-sm {
  padding: 5px 12px;
  font-size: 12.5px;
}

/* Match Results modal — 2026-05-08 */
.match-results-modal {
  width: 92vw;
  display: flex;
  flex-direction: column;
}
.match-results-section {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.match-results-section:last-child { border-bottom: 0; }
.match-results-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
  flex-wrap: wrap;
}
.match-results-teams {
  font-weight: 600;
}
.match-results-head .match-id {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-mute);
}
.match-results-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 12.5px;
}
.match-results-table thead th {
  text-align: left;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  color: var(--text-sub);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.match-results-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.match-results-table tbody tr:last-child td { border-bottom: 0; }
.match-results-k {
  color: var(--text-sub);
  width: 60%;
}
.match-results-v {
  text-align: right;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.match-results-raw thead th { color: var(--text-mute); font-size: 10px; }
.match-results-raw tbody td { font-size: 11.5px; opacity: 0.85; }

.tk-results-btn {
  margin-left: auto;
  font-size: 11.5px;
  padding: 4px 10px;
}

@media (max-width: 600px) {
  .match-results-table { font-size: 11.5px; }
  .match-results-table tbody td { padding: 5px 8px; }
  .match-results-modal { width: 100%; max-width: 100%; padding: 14px 12px; }
}


/* ═══════════════════════════════════════════════════════════════════
 *  MESAZHET — chat UI v2 (revamped 2026-05-08)
 * ═══════════════════════════════════════════════════════════════════ */

/* --- Sidebar/bottom-nav badge --- */
.nav-badge, .bn-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--err); color: #fff;
  border-radius: 9px; font-size: 11px; font-weight: 700;
  margin-left: auto;
}
.bn-badge {
  position: absolute; top: 4px; right: calc(50% - 18px);
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; border-radius: 8px;
}
.bottom-nav-item { position: relative; }
.nav-badge.hidden, .bn-badge.hidden { display: none; }

/* --- Page shell --- */
.msg-page {
  padding: 16px;
  height: calc(100vh - 56px);
  display: flex; flex-direction: column; gap: 12px;
}
.msg-page-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.msg-page-title-row { display: flex; align-items: center; gap: 12px; }
.msg-page-title { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); }

/* --- Start (+) button --- */
.msg-start-btn {
  width: 32px; height: 32px; border-radius: 16px;
  background: var(--brand); color: var(--bg);
  border: 0; font-size: 22px; font-weight: 600; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: filter var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.msg-start-btn:hover { filter: brightness(1.1); transform: scale(1.05); }
.msg-start-btn:active { transform: scale(.95); }

/* --- Status tabs row (Në Pritje / Aktive / Mbyllura) --- */
.msg-tabs-row {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
}
.msg-tab-btn {
  background: transparent; color: var(--text-sub);
  border: 0; padding: 10px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--speed) var(--ease), border var(--speed) var(--ease);
  flex: 1; justify-content: center;
}
.msg-tab-btn:hover { color: var(--text); }
.msg-tab-btn.active { color: var(--text); border-bottom-color: var(--brand); }
.msg-tab-btn.tab-open.active { border-bottom-color: var(--info); }
.msg-tab-btn.tab-active.active { border-bottom-color: var(--ok); }
.msg-tab-btn.tab-closed.active { border-bottom-color: var(--text-mute); }
.msg-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 18px; padding: 0 6px;
  background: var(--bg-elev-2); color: var(--text-sub);
  border-radius: 9px; font-size: 11px; font-weight: 700;
}
.msg-tab-count.zero { opacity: .35; }
.msg-tab-btn.tab-open.active .msg-tab-count { background: var(--info); color: var(--bg); }
.msg-tab-btn.tab-active.active .msg-tab-count { background: var(--ok); color: var(--bg); }
.msg-tab-btn.tab-closed.active .msg-tab-count { background: var(--text-mute); color: var(--bg); }

/* --- Split layout --- */
.msg-split {
  flex: 1; display: grid; grid-template-columns: 340px 1fr; gap: 12px;
  min-height: 0;
}

/* --- List pane --- */
.msg-list-pane {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
}
.msg-list-toolbar {
  padding: 10px; border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
  display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0;
}
.msg-filter-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.msg-filter-pill {
  background: transparent; color: var(--text-mute);
  border: 1px solid var(--border); padding: 4px 10px;
  border-radius: 12px; font-size: 12px; cursor: pointer;
  transition: all var(--speed) var(--ease); flex: 1;
  white-space: nowrap;
}
.msg-filter-pill:hover { color: var(--text); border-color: var(--border-lt); }
.msg-filter-pill.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.msg-thread-search {
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 7px 10px; font-size: 13px; width: 100%;
  outline: none; transition: border-color var(--speed) var(--ease);
}
.msg-thread-search:focus { border-color: var(--brand); background: var(--bg-elev); }

.msg-thread-list { flex: 1; overflow-y: auto; padding: 6px; }
.msg-empty {
  padding: 32px 16px; text-align: center;
  color: var(--text-mute); font-size: 13px;
}

/* --- Thread row --- */
.msg-thread-item {
  position: relative; padding: 10px;
  border-radius: var(--radius); cursor: pointer;
  display: flex; gap: 10px; align-items: flex-start;
  transition: background var(--speed) var(--ease);
  margin-bottom: 2px;
}
.msg-thread-item:hover { background: var(--bg-elev-2); }
.msg-thread-item.active { background: var(--brand-soft); }
.msg-thread-item.unread .msg-thread-peer { font-weight: 700; color: var(--text); }
.msg-thread-item.unread .msg-thread-preview { color: var(--text); font-weight: 500; }

.msg-avatar {
  width: 38px; height: 38px; border-radius: 19px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0; position: relative;
  letter-spacing: .3px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.msg-avatar-mgr::after {
  content: ""; position: absolute; bottom: -1px; right: -1px;
  width: 12px; height: 12px; border-radius: 6px;
  background: var(--ok); border: 2px solid var(--bg-elev);
}

.msg-thread-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-thread-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px;
}
.msg-thread-peer {
  color: var(--text-sub); font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-thread-time {
  color: var(--text-mute); font-size: 11px; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.msg-thread-row2 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.msg-thread-preview {
  color: var(--text-sub); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.msg-thread-unread {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--brand); color: var(--bg);
  border-radius: 9px; font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.msg-thread-meta { display: flex; gap: 6px; align-items: center; }
.msg-thread-kind {
  font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
  padding: 1px 6px; border-radius: 8px; line-height: 1.5;
}
.msg-thread-kind.kind-player  { background: rgba(123,183,255,.14); color: var(--info); }
.msg-thread-kind.kind-manager { background: rgba(94,227,141,.14); color: var(--ok); }

/* --- Conversation pane --- */
.msg-conv-pane {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; min-height: 0;
}
.msg-conv-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  padding: 60px 20px; color: var(--text-mute);
}
.msg-conv-empty-icon {
  font-size: 48px; opacity: .35; margin-bottom: 8px;
}
.msg-conv-empty-title { color: var(--text-sub); font-size: 16px; font-weight: 600; }
.msg-conv-empty-sub { font-size: 13px; color: var(--text-mute); }

.msg-conv-head {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.msg-conv-back {
  display: none;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text); font-size: 22px; padding: 4px 8px;
  border-radius: var(--radius); line-height: 1;
}
.msg-conv-back:hover { background: var(--bg-input); }
.msg-conv-peer { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-conv-peer-line1 { display: flex; align-items: center; gap: 8px; }
.msg-conv-peer-line2 { display: flex; gap: 6px; }
.msg-conv-peer-name { color: var(--text); font-weight: 600; font-size: 15px; }
.msg-conv-peer-kind {
  font-size: 9.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .4px; padding: 1px 6px; border-radius: 8px; line-height: 1.5;
}
.msg-conv-peer-kind.kind-player  { background: rgba(123,183,255,.14); color: var(--info); }
.msg-conv-peer-kind.kind-manager { background: rgba(94,227,141,.14); color: var(--ok); }
.msg-conv-status {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 10px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.msg-conv-status.status-open   { background: rgba(123,183,255,.16); color: var(--info); }
.msg-conv-status.status-active { background: rgba(94,227,141,.16); color: var(--ok); }
.msg-conv-status.status-closed { background: var(--bg-elev-2); color: var(--text-mute); }

.msg-conv-close-btn {
  background: transparent; color: var(--text-sub);
  border: 1px solid var(--border-lt); border-radius: var(--radius);
  padding: 6px 12px; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all var(--speed) var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.msg-conv-close-btn:hover { background: var(--err); color: #fff; border-color: var(--err); }
.msg-conv-close-icon { font-size: 14px; line-height: 1; }

/* --- Messages --- */
.msg-conv-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg);
}
.msg-date-sep {
  display: flex; align-items: center; justify-content: center;
  margin: 8px 0;
}
.msg-date-sep-label {
  background: var(--bg-elev-2); color: var(--text-mute);
  font-size: 10px; font-weight: 600; padding: 3px 12px;
  border-radius: 10px; text-transform: uppercase; letter-spacing: .5px;
}
.msg-bubble-row { display: flex; margin: 1px 0; }
.msg-bubble-row.mine { justify-content: flex-end; }
.msg-bubble-row.theirs { justify-content: flex-start; }
.msg-bubble {
  max-width: 70%; padding: 8px 12px;
  border-radius: 14px; font-size: 14px;
  word-wrap: break-word; position: relative;
  box-shadow: 0 1px 1px rgba(0,0,0,.18);
}
.msg-bubble.theirs {
  background: var(--bg-elev-2); color: var(--text);
  border-bottom-left-radius: 4px;
}
.msg-bubble.mine {
  background: var(--brand); color: #1a1305;
  border-bottom-right-radius: 4px;
}
.msg-bubble-body { white-space: pre-wrap; line-height: 1.4; }
.msg-bubble-time {
  font-size: 10px; opacity: .55;
  margin-top: 2px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.msg-bubble.mine .msg-bubble-time { color: rgba(0,0,0,.6); opacity: .65; }

/* --- Closed-thread notice --- */
.msg-conv-closed-notice {
  padding: 10px 14px; margin: 8px 12px 12px;
  background: var(--bg-elev-2); color: var(--text-sub);
  border: 1px dashed var(--border-lt); border-radius: var(--radius);
  text-align: center; font-size: 12px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.msg-conv-closed-icon { opacity: .7; }

/* --- Composer --- */
.msg-composer {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev-2);
  flex-shrink: 0;
  align-items: flex-end;
}
.msg-composer-input {
  flex: 1; resize: none; min-height: 38px; max-height: 160px;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: 19px;
  padding: 9px 14px; font-family: inherit; font-size: 14px;
  line-height: 1.4; outline: none;
  transition: border var(--speed) var(--ease);
}
.msg-composer-input:focus { border-color: var(--brand); background: var(--bg-elev); }
.msg-send-btn {
  width: 38px; height: 38px; border-radius: 19px;
  background: var(--brand); color: var(--bg);
  border: 0; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: filter var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.msg-send-btn:hover { filter: brightness(1.08); transform: scale(1.05); }
.msg-send-btn:active { transform: scale(.92); }
.msg-send-icon { font-size: 16px; line-height: 1; transform: translateX(1px); }

/* --- Mobile (≤720px) — stack-based navigation --- */
@media (max-width: 720px) {
  .msg-page { padding: 8px; gap: 8px; height: calc(100vh - 56px - 60px); }
  .msg-tabs-row { font-size: 13px; }
  .msg-tab-btn { padding: 8px 10px; font-size: 13px; }
  .msg-split {
    grid-template-columns: 1fr; grid-template-rows: 1fr;
  }
  .msg-list-pane, .msg-conv-pane {
    grid-row: 1 / 2; grid-column: 1 / 2;
  }
  /* Default: show list, hide conv */
  .msg-conv-pane { display: none; }
  .msg-list-pane { display: flex; }
  /* When conv is open, swap */
  body.msg-mobile-conv-open .msg-list-pane { display: none; }
  body.msg-mobile-conv-open .msg-conv-pane { display: flex; }
  /* Show back button on mobile */
  .msg-conv-back { display: inline-flex; }
  /* Tighter bubbles */
  .msg-bubble { max-width: 85%; font-size: 14px; }
  /* Hide close button text on mobile, keep icon */
  .msg-conv-close-label { display: none; }
  .msg-conv-close-btn { padding: 6px 8px; }
}

/* --- Start-chat picker modal --- */
.msg-start-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  animation: msgStartFade .15s ease;
}
@keyframes msgStartFade { from{opacity:0;} to{opacity:1;} }
.msg-start-modal {
  background: var(--bg-elev); color: var(--text);
  width: min(480px, 92vw); max-height: 60vh;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.msg-start-head {
  padding: 14px 16px; background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.msg-start-title { margin: 0; font-size: 15px; font-weight: 600; }
.msg-start-close {
  background: transparent; color: var(--text-mute); border: 0;
  font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: var(--radius);
}
.msg-start-close:hover { background: var(--bg-input); color: var(--text); }
.msg-start-input {
  margin: 12px 16px 0; padding: 10px 12px;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none;
  transition: border-color var(--speed) var(--ease);
}
.msg-start-input:focus { border-color: var(--brand); background: var(--bg-elev); }
.msg-start-results {
  margin: 8px 12px 12px; padding: 4px;
  flex: 1; overflow-y: auto; min-height: 60px;
}
.msg-start-empty {
  padding: 20px 12px; text-align: center;
  color: var(--text-mute); font-size: 13px;
}
.msg-start-row {
  padding: 10px 12px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: background var(--speed) var(--ease);
}
.msg-start-row:hover, .msg-start-row.selected { background: var(--bg-elev-2); }
.msg-start-row-name { display: flex; align-items: baseline; gap: 8px; }
.msg-start-row-username { color: var(--text); font-weight: 600; font-size: 14px; }
.msg-start-row-kind {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  padding: 1px 6px; border-radius: 8px;
}
.msg-start-row-kind.kind-player  { background: rgba(123,183,255,.16); color: var(--info); }
.msg-start-row-kind.kind-manager { background: rgba(94,227,141,.16); color: var(--ok); }
.msg-start-row-id { color: var(--text-mute); font-size: 11px; }

@media (max-width: 600px) {
  .msg-start-backdrop { padding-top: 8vh; }
  .msg-start-modal { max-height: 80vh; }
}

/* ─── Broadcast (newsletter) button + modal ──────────────────── */
.msg-broadcast-btn {
  width: 32px; height: 32px; border-radius: 16px;
  background: rgba(251,191,36,.14); color: var(--brand);
  border: 1px solid var(--brand-soft); font-size: 16px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  margin-left: 8px;
  transition: all var(--speed) var(--ease);
}
.msg-broadcast-btn:hover {
  background: var(--brand); color: var(--bg);
  border-color: var(--brand);
  transform: scale(1.05);
}
.msg-broadcast-btn:active { transform: scale(.95); }

/* Broadcast modal — slightly larger than start picker */
.msg-bcast-modal { width: min(560px, 92vw); }
.msg-bcast-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.msg-bcast-target-row { display: flex; gap: 8px; flex-wrap: wrap; }
.msg-bcast-target {
  flex: 1; min-width: 130px;
  background: var(--bg-input); color: var(--text-sub);
  border: 1px solid var(--border); padding: 8px 12px;
  border-radius: var(--radius); font-size: 13px; cursor: pointer;
  transition: all var(--speed) var(--ease);
}
.msg-bcast-target:hover { border-color: var(--border-lt); color: var(--text); }
.msg-bcast-target.active {
  background: var(--brand-soft); color: var(--brand);
  border-color: var(--brand);
}
.msg-bcast-input {
  margin: 0; min-height: 100px; max-height: 240px;
  resize: vertical; line-height: 1.4;
}
.msg-bcast-counter {
  font-size: 11px; color: var(--text-mute);
  text-align: right; font-variant-numeric: tabular-nums;
}
.msg-bcast-counter.over { color: var(--err); font-weight: 600; }
.msg-bcast-warning {
  padding: 10px 12px; background: rgba(251,191,36,.08);
  border: 1px solid var(--brand-soft); border-radius: var(--radius);
  font-size: 12px; color: var(--text-sub); line-height: 1.4;
}
.msg-bcast-send {
  background: var(--brand); color: #1a1305;
  border: 0; padding: 10px 16px;
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
  cursor: pointer; align-self: flex-end;
  transition: filter var(--speed) var(--ease);
}
.msg-bcast-send:hover { filter: brightness(1.1); }
.msg-bcast-send:disabled { opacity: .5; cursor: wait; }

/* ─── Close-all-active button ──────────────────────────────── */
.msg-close-all-btn {
  width: 32px; height: 32px; border-radius: 16px;
  background: rgba(239,68,68,.10); color: var(--err);
  border: 1px solid rgba(239,68,68,.22); font-size: 14px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  margin-left: 8px;
  transition: all var(--speed) var(--ease);
}
.msg-close-all-btn:hover {
  background: var(--err); color: #fff;
  border-color: var(--err);
  transform: scale(1.05);
}
.msg-close-all-btn:active { transform: scale(.95); }

/* ─── Operatorët admin page (2026-05-09) ──────────────────────────── */
.ops-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.ops-table thead th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(255,255,255,.03);
  color: var(--muted, #8a92a3);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ops-table thead th.ops-actions-th { text-align: right; }
.ops-table tbody td {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.ops-table tbody tr:hover { background: rgba(255,255,255,.02); }
.ops-secondary { font-size: 12px; color: var(--muted, #8a92a3); margin-top: 2px; }
.ops-self-tag { color: #d4af37; font-size: 12px; font-weight: 500; }
.ops-num { font-variant-numeric: tabular-nums; color: var(--muted, #8a92a3); }
.ops-when { color: var(--muted, #8a92a3); font-size: 13px; font-variant-numeric: tabular-nums; }
.ops-pill {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: .03em;
}
.ops-pill-ok    { background: rgba(80,200,120,.15); color: #50c878; }
.ops-pill-err   { background: rgba(220,80,80,.15);  color: #dc5050; }
.ops-pill-admin { background: rgba(212,175,55,.15); color: #d4af37; }
.ops-pill-op    { background: rgba(120,160,220,.12); color: #88a8dc; }
.ops-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.ops-actions-td { text-align: right; }

/* ─── Admin modal (create operator / reset password) ──────────────── */
.op-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9050;
  backdrop-filter: blur(2px);
  animation: fadeIn .12s ease;
}
.op-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 92vw; max-width: 460px;
  background: var(--card, #141822);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  z-index: 9060;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: popIn .15s ease;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.op-modal-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 16px;
  font-weight: 600;
  color: #d4af37;
}
.op-modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.op-modal-label {
  font-size: 12px;
  color: var(--muted, #8a92a3);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
}
.op-modal-input {
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .12s;
}
.op-modal-input:focus {
  border-color: rgba(212,175,55,.5);
}
.op-modal-hint {
  font-size: 12px;
  color: var(--muted, #8a92a3);
  margin: 4px 0 8px;
  line-height: 1.4;
}
.op-modal-err {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(220,80,80,.12);
  border: 1px solid rgba(220,80,80,.3);
  border-radius: 8px;
  color: #ff8888;
  font-size: 13px;
  min-height: 0;
}
.op-modal-err:empty {
  padding: 0; margin: 0; border: none; background: none;
}
.op-modal-foot {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 520px) {
  .ops-table thead th { padding: 8px; font-size: 11px; }
  .ops-table tbody td { padding: 10px 8px; }
  .ops-row-actions { justify-content: flex-start; }
  .ops-when { font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   2026-05-09 — iOS safe-area + 44px tap-target fix
   - .logout-confirm modals (used for approval, bulk-action, void)
   - .tv2-modal centered modals (line override, odds editor, etc.)
   - Modal close ✕ button gets ≥44px tap area
   - Action buttons in modal footers get ≥44px touch height on phones
   Apple HIG: minimum interactive target 44×44pt. iOS home bar can hide
   content past `env(safe-area-inset-bottom)` if not respected.
   ═══════════════════════════════════════════════════════════ */
.logout-confirm {
  padding-bottom: max(18px, env(safe-area-inset-bottom, 18px)) !important;
}
.tv2-modal {
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
}
.tv2-modal-close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (pointer: coarse), (max-width: 640px) {
  .logout-confirm-actions .btn-ghost,
  .logout-confirm-actions .btn-danger,
  .logout-confirm-actions .btn-warn,
  .logout-confirm-actions .btn-bulk-primary {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 14px;
  }
}


/* ═════════════════════════════════════════════════════════════════════
   2026-05-13 — Floating global ≡ button. Visible only when
   ta-fullscreen is on AND ta-fullscreen-paused is NOT on (menu hidden).
   Click → ta-fullscreen-paused added → topbar+sidebar fade in. */
.ta-global-menu-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev, #131722);
  border: 1px solid var(--border, #2a3142);
  border-radius: 6px;
  color: var(--text, #e6e6e6);
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
  transition: background .12s, border-color .12s, transform .12s;
}
.ta-global-menu-btn:hover {
  background: var(--bg-elev-2, #1a1f2e);
  border-color: var(--brand, #5a8cff);
  color: var(--brand, #5a8cff);
  transform: scale(1.05);
}
/* Push page-header content right so it doesn't collide with the floating btn */
body.ta-fullscreen #content .page-header {
  padding-left: 56px;
}
body.ta-fullscreen .ta-global-menu-btn {
  display: inline-flex !important;
}
/* Hide floating ≡ on any page that already has an inline ≡ button
   (ticket pages, match-results, signal-monitor, bet-configs). */
body.ta-fullscreen:has(.ta-inline-menu-btn) .ta-global-menu-btn {
  display: none !important;
}
body.ta-fullscreen.ta-fullscreen-paused .ta-global-menu-btn {
  /* When menu open, button stays visible as close-control (shows ✕) */
  z-index: 201;
}


/* ═════════════════════════════════════════════════════════════════════
   2026-05-13 — Universal user-quick popover (.op-uq-*) */
.op-uq-pop {
  position: fixed; inset: 0;
  z-index: 950;
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}
.op-uq-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.op-uq-panel {
  position: relative;
  width: min(640px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--bg-elev, #131722);
  border: 1px solid var(--border, #2a3142);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  color: var(--text, #e6e6e6);
  display: flex; flex-direction: column;
  gap: 14px;
}
.op-uq-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #2a3142);
}
.op-uq-title {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  font-size: 16px;
}
.op-uq-title strong { font-size: 17px; font-weight: 700; color: var(--text-hi, #fff); }
.op-uq-id { font-size: 10px; color: var(--text-dim, #666); }
.op-uq-role {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--card-elev, #1a1f2e);
  border: 1px solid var(--border, #2a3142);
  letter-spacing: 0.06em;
  color: var(--text-2, #aaa);
}
.op-uq-role.role-13 { color: #ff5870; border-color: rgba(255,88,112,.5); background: rgba(255,88,112,.08); }
.op-uq-role.role-12, .op-uq-role.role-11, .op-uq-role.role-10 { color: #5a8cff; border-color: rgba(90,140,255,.5); background: rgba(90,140,255,.08); }
.op-uq-close {
  background: transparent; border: 0; color: var(--text-dim, #888);
  font-size: 22px; cursor: pointer; padding: 0; width: 28px; height: 28px;
  line-height: 1; border-radius: 5px;
}
.op-uq-close:hover { background: var(--card-elev, #1a1f2e); color: var(--text, #fff); }

.op-uq-chain {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-2, #aaa);
  flex-wrap: wrap;
}
.op-uq-chain-label { color: var(--text-3, #888); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 9px; }
.op-uq-chain-node {
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  background: var(--card-elev, #1a1f2e);
  border: 1px solid var(--border, #2a3142);
  transition: background .08s;
}
.op-uq-chain-node:hover { background: var(--bg-elev-hi, #1f2536); color: var(--text-hi, #fff); border-color: var(--brand, #5a8cff); }
.op-uq-chain-node.is-self { background: var(--brand, #5a8cff); color: #fff; cursor: default; border-color: var(--brand, #5a8cff); }
.op-uq-chain-sep { color: var(--text-dim, #555); }

.op-uq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.op-uq-box {
  padding: 10px 12px;
  background: var(--card-elev, #1a1f2e);
  border: 1px solid var(--border, #2a3142);
  border-radius: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.op-uq-box-label { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-3, #888); text-transform: uppercase; }
.op-uq-box-val { font-size: 18px; font-weight: 800; color: var(--text-hi, #fff); }
.op-uq-box-val.op-uq-good { color: #34d399; }
.op-uq-box-val.op-uq-bad  { color: #ff5870; }
.op-uq-box-sub { font-size: 10px; color: var(--text-3, #888); }

.op-uq-flags {
  display: flex; flex-wrap: wrap;
  gap: 6px;
}
.op-uq-flag {
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 10px;
  background: var(--card-elev, #1a1f2e);
  border: 1px solid var(--border, #2a3142);
  color: var(--text-2, #aaa);
}
.op-uq-flag.warn { color: #f59e0b; border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.06); }
.op-uq-flag.info { color: #5a8cff; border-color: rgba(90,140,255,.45); background: rgba(90,140,255,.06); }

.op-uq-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #2a3142);
}
.op-uq-btn {
  padding: 8px 16px;
  background: var(--card-elev, #1a1f2e);
  border: 1px solid var(--border, #2a3142);
  color: var(--text, #e6e6e6);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
}
.op-uq-btn:hover { background: var(--bg-elev-hi, #1f2536); border-color: var(--brand, #5a8cff); }
.op-uq-btn-primary { background: var(--brand, #5a8cff); color: #fff; border-color: var(--brand, #5a8cff); }
.op-uq-btn-primary:hover { background: #6a9cff; }
.op-uq-error { text-align: center; padding: 30px; }
.op-uq-error-detail { font-size: 11px; color: var(--text-dim, #888); margin: 10px 0; }
