/**
 * SWAMI 777 — UI theme (swami777UIUX colors/layout)
 * Size density matches the OLD polished webapp (compact, readable on 430px),
 * NOT the oversized mock font sizes from the design HTML.
 *
 * Scale reference (old app):
 *   body ~14px, labels 11–13px, titles 14–15px bold, badges 44px, pills 40–44px tall
 */

:root {
  /* ── Palette (Big Daddy / Vardhan design kit) ── */
  --c-gold: #F5C542;
  --c-gold-dark: #E8B530;
  --c-cream: #FFFFFF;
  --c-cream-2: #F9FAFB;
  --c-cream-page: #FFFFFF;
  --c-cream-scroll: #FFFFFF;
  --c-pink: #7A0C1F;
  --c-pink-alt: #9B1832;
  --c-pink-dark: #4A0814;
  --c-pink-light: #C45A6E;
  --brand: #7A0C1F;
  --brand-2: #9B1832;
  --brand-deep: #4A0814;
  --brand-soft: #FDF2F4;
  --brand-light: #C45A6E;
  --brand-primary: #7A0C1F;
  --c-king: #4A0814;
  --c-king-alt: #7A0C1F;
  --c-red: #B8303E;
  --c-danger: #C62828;
  --c-danger-btn: #D32F2F;
  --c-green: #4CAF50;
  --c-green-result: #34B760;
  --c-green-wa: #25D366;
  --c-blue-call: #2196F3;
  --c-text: #1A1A1A;
  --c-text-2: #4A4A4A;
  --c-text-mute: #8A8A8A;
  --c-white: #FFF;
  --c-border: #E5E7EB;

  /* ── Compact density tokens (old webapp feel) ── */
  --ui-pad-x: 12px;
  --ui-pad-y: 10px;
  --ui-gap: 10px;
  --ui-radius-card: 14px;
  --ui-radius-pill: 22px;
  --ui-radius-md: 12px;
  --ui-fs-xs: 11px;
  --ui-fs-sm: 12px;
  --ui-fs-md: 13px;
  --ui-fs-base: 14px;
  --ui-fs-lg: 15px;
  --ui-fs-title: 15px;
  --ui-fs-name: 14px;
  --ui-ctrl-h: 40px;
  --ui-ctrl-h-sm: 36px;
  --ui-icon: 18px;
  --ui-fab: 52px;
  --ui-badge: 44px;
  --ui-tab-pad: 72px; /* bottom safe for tabbar + FAB */

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.10);
  --font-ui: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Legacy brand bridge → pink theme */
  --brand-primary: var(--c-pink);
  --brand-primary-hover: var(--c-pink-dark);
  --brand-primary-light: rgba(194, 117, 128, 0.12);
  --brand-accent-start: var(--c-pink);
  --brand-accent-end: var(--c-pink-light);
  --brand-accent-solid: var(--c-pink);
  --brand-secondary: var(--c-pink-alt);
  --text-brand: var(--c-pink);
  --bg-body: var(--c-cream-page);
  --bg-card: #FFFFFF;
  --phone-bg: var(--c-cream-page);
  --phone-rail: #C4B59A;
  --success: #16a34a;
  --danger: #dc2626;
}

/* ═══════════════════════════════════════════
   GLOBAL THEME (all app pages)
   ═══════════════════════════════════════════ */
html {
  background: var(--phone-rail) !important;
}
body {
  font-family: var(--font-ui) !important;
  font-size: var(--ui-fs-base) !important;
  line-height: 1.4;
  background: var(--c-cream-page) !important;
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
}
body > .min-h-dvh,
.min-h-dvh,
.bg-gray-50,
.dark\:bg-gray-900 {
  background-color: var(--c-cream-page) !important;
}

/* Remap leftover maroon utilities → pink (theme consistency) */
.bg-\[\#C27580\],
.text-\[\#C27580\],
.border-\[\#C27580\] {
  /* handled via more specific overrides below */
}
[class*="bg-[#C27580]"],
[style*="#C27580"] {
  /* inline styles still win; PHP pages gradually migrate */
}

/* Common brand solid / text remaps used across pages */
.text-\[\#C27580\] { color: var(--c-pink) !important; }
.bg-\[\#C27580\] { background-color: var(--c-pink) !important; }
.border-\[\#C27580\] { border-color: var(--c-pink) !important; }
.border-\[\#C27580\]\/25,
.border-\[\#7A0C1F\]\/25 { border-color: rgba(122, 12, 31, 0.25) !important; }
.border-\[\#C27580\]\/20,
.border-\[\#7A0C1F\]\/20 { border-color: rgba(122, 12, 31, 0.2) !important; }
.border-\[\#C27580\]\/35,
.border-\[\#7A0C1F\]\/35 { border-color: rgba(122, 12, 31, 0.35) !important; }
.bg-\[\#C27580\]\/08,
.bg-\[\#7A0C1F\]\/08,
.bg-\[\#C27580\]\/10,
.bg-\[\#7A0C1F\]\/10 { background-color: rgba(122, 12, 31, 0.1) !important; }
.from-\[\#C27580\],
.from-\[\#7A0C1F\] { --tw-gradient-from: var(--c-pink) !important; }
.to-\[\#C45A6E\],
.to-\[\#9B1832\],
.to-\[\#C96884\] { --tw-gradient-to: var(--c-pink-light) !important; }

/*
 * UNIFY inner sticky headers → cream chrome (same language as Funds / My Bids hub)
 * Full pink bars looked inconsistent with the cream design system.
 */
body.bg-gray-50,
body.h-full.bg-gray-50,
.min-h-dvh.bg-gray-50,
.bg-gray-50.min-h-dvh,
div.min-h-dvh.bg-gray-50,
div.bg-gray-50 {
  background: var(--c-cream-scroll, #FFFFFF) !important;
}
/* Don't force cream on input fields that use bg-gray-50 intentionally */
input.bg-gray-50,
textarea.bg-gray-50,
button.bg-gray-50,
.star-btn.bg-gray-50 {
  background: #f9fafb !important;
}

header.sticky.top-0.z-40.h-14,
header.sticky.top-0.z-40.min-h-\[56px\],
header[style*="background:#C27580"],
header[style*="background: #C27580"],
header[style*="C27580"]:not(.app-top-header) {
  background: var(--c-cream-scroll, #FFFFFF) !important;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  min-height: 52px !important;
  height: auto !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
/* Title / subtitle: dark on cream */
header.sticky.top-0.z-40 .text-white,
header[style*="C27580"] .text-white,
header.sticky.top-0.z-40 h1 {
  color: #111 !important;
}
header.sticky.top-0.z-40 .text-white\/70,
header.sticky.top-0.z-40 [class*="text-white/70"] {
  color: #6B6B6B !important;
}
/* Back / icon circles: soft cream chip, dark icon */
header.sticky.top-0.z-40 a.bg-white\/20:not([href="/wallet"]):not([href*="wallet"]),
header.sticky.top-0.z-40 button.bg-white\/20,
header.sticky.top-0.z-40 a.rounded-full.bg-white\/20 {
  background: #EDE0C8 !important;
  color: #111 !important;
}
/* Wallet pill stays pink */
header.sticky.top-0.z-40 a[href="/wallet"].bg-white\/20,
header.sticky.top-0.z-40 a[href="/wallet"],
header.sticky.top-0.z-40 a[href*="wallet"].flex.items-center.gap-1\.5 {
  background: var(--c-pink) !important;
  color: #fff !important;
}
header.sticky.top-0.z-40 .text-sm { font-size: 14px !important; line-height: 1.25 !important; font-weight: 800 !important; }
header.sticky.top-0.z-40 .text-xs { font-size: 11px !important; }
header.sticky.top-0.z-40 .w-9.h-9,
header.sticky.top-0.z-40 .w-8.h-8 {
  width: 36px !important;
  height: 36px !important;
}

/* ═══════════════════════════════════════════
   TOP HEADER — compact pink pills
   ═══════════════════════════════════════════ */
header.app-top-header,
.app-top-header {
  position: sticky !important;
  top: 0;
  z-index: 40;
  background: var(--c-cream-page) !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}
.app-header-bar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px var(--ui-pad-x) 6px !important;
  min-height: 0 !important;
  background: var(--c-cream-page) !important;
}
.app-header-left {
  flex: 1;
  min-width: 0;
  display: flex !important;
  align-items: center;
}
.app-header-menu,
button.app-header-menu {
  flex: 1;
  display: flex !important;
  align-items: center;
  gap: 8px;
  background: var(--c-pink) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--ui-radius-pill) !important;
  padding: 0 12px !important;
  min-height: var(--ui-ctrl-h) !important;
  height: var(--ui-ctrl-h) !important;
  width: auto !important;
  max-width: 100%;
  box-shadow: 0 1px 4px rgba(194, 117, 128, 0.28);
  cursor: pointer;
  text-align: left;
}
.app-header-menu svg {
  width: var(--ui-icon) !important;
  height: var(--ui-icon) !important;
  flex-shrink: 0;
  stroke: #fff !important;
  color: #fff !important;
}
.app-header-logo { display: none !important; }
.app-header-brand-text {
  font-size: var(--ui-fs-lg);
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}
.app-header-right {
  display: flex !important;
  align-items: center;
  gap: 6px !important;
  flex-shrink: 0;
}
#headerWalletLink,
a#headerWalletLink {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--c-pink) !important;
  color: #fff !important;
  border-radius: var(--ui-radius-pill) !important;
  padding: 0 12px !important;
  min-height: var(--ui-ctrl-h) !important;
  height: var(--ui-ctrl-h) !important;
  min-width: 72px;
  max-width: 120px;
  font-size: var(--ui-fs-md) !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 4px rgba(194, 117, 128, 0.28);
  text-decoration: none !important;
}
#headerWalletLink svg { display: none; }
#headerWalletBalance {
  font-size: var(--ui-fs-md);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#headerRefreshBtn,
.app-refresh-btn { display: none !important; }

a.app-header-bell,
.app-header-bell {
  width: var(--ui-ctrl-h) !important;
  height: var(--ui-ctrl-h) !important;
  min-width: var(--ui-ctrl-h);
  border-radius: 50% !important;
  background: transparent !important;
  color: var(--c-pink) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: none !important;
}
.app-header-bell svg {
  width: 22px !important;
  height: 22px !important;
  fill: var(--c-pink) !important;
  stroke: none !important;
}

/* ═══════════════════════════════════════════
   BOTTOM TAB BAR — compact + FAB
   ═══════════════════════════════════════════ */
nav.app-tabbar,
.app-tabbar {
  position: fixed !important;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex !important;
  justify-content: space-around;
  align-items: flex-end;
  background: #fff !important;
  border-top: 1px solid var(--c-border) !important;
  padding: 6px 2px max(8px, env(safe-area-inset-bottom, 0px)) !important;
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.04);
  min-height: 56px;
}
.app-tabbar .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 52px;
  padding: 2px 4px 4px;
  color: #8A8A8A;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none !important;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.app-tabbar .tab svg {
  width: 22px;
  height: 22px;
  /* Solid icons (Material-style paths) + stroke fallback */
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-tabbar .tab.active:not(.tab-center) { color: #333; }
.app-tabbar .tab.tab-center {
  width: var(--ui-fab);
  height: var(--ui-fab);
  min-width: var(--ui-fab);
  border-radius: 50%;
  background: var(--c-pink);
  color: #fff !important;
  transform: translateY(-12px);
  box-shadow: 0 3px 10px rgba(194, 117, 128, 0.4);
  padding: 0;
  gap: 0;
  align-self: flex-end;
}
.app-tabbar .tab.tab-center svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  stroke: #fff;
  stroke-width: 0.5;
}
.app-tabbar .tab.tab-center span { display: none; }
.app-tabbar .tab span {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
}

/* Generic main padding for tabbar on shell pages */
main.flex-1,
main.home-main {
  padding-bottom: calc(var(--ui-tab-pad) + env(safe-area-inset-bottom, 0px)) !important;
}

/* ═══════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════ */
.home-page main,
main.home-main {
  background: var(--c-cream-scroll) !important;
}
.home-scroll {
  padding: 6px var(--ui-pad-x) 16px;
  background: var(--c-cream-scroll);
}

/* King markets */
.king-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ui-gap);
  margin-bottom: 12px;
}
.king-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-king);
  color: #fff;
  border: 1.5px solid #111;
  border-radius: var(--ui-radius-pill);
  padding: 3px 10px 3px 3px;
  text-decoration: none !important;
  min-height: var(--ui-ctrl-h);
  height: var(--ui-ctrl-h);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.king-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.king-play::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 10px solid #111;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}
.king-label {
  color: #fff;
  font-size: var(--ui-fs-sm);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1px;
}

/* Support + actions */
.quick-card {
  background: linear-gradient(180deg, #FFF8D6 0%, #FBEFB0 100%);
  border-radius: var(--ui-radius-card);
  padding: 10px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.support-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.support-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: var(--ui-radius-pill);
  padding: 3px 10px 3px 3px;
  text-decoration: none !important;
  color: #111 !important;
  box-shadow: var(--shadow-sm);
  font-size: var(--ui-fs-sm);
  font-weight: 700;
  min-height: var(--ui-ctrl-h-sm);
  height: var(--ui-ctrl-h-sm);
  overflow: hidden;
}
.support-pill .ic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.support-pill .ic svg {
  width: 15px;
  height: 15px;
  fill: #fff;
}
.support-pill.call .ic { background: var(--c-blue-call); }
.support-pill.wa .ic { background: var(--c-green-wa); }
.support-pill span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: var(--ui-radius-pill);
  padding: 3px 10px 3px 3px;
  color: #fff !important;
  font-size: var(--ui-fs-sm);
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  min-height: var(--ui-ctrl-h);
  height: var(--ui-ctrl-h);
  letter-spacing: 0.2px;
}
.action-btn .ic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 900;
}
.action-btn.add { background: var(--c-green); }
.action-btn.add .ic { color: var(--c-green); }
.action-btn.withdraw { background: var(--c-danger-btn); }
.action-btn.withdraw .ic { color: var(--c-danger-btn); }
.action-btn.withdraw .ic svg {
  width: 15px;
  height: 15px;
  stroke: var(--c-danger-btn);
  fill: none;
}

/* Search */
.home-market-search { margin-bottom: 12px; }
.home-market-search .market-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(194, 117, 128, 0.3);
  border-radius: 18px;
  padding: 4px 8px 4px 6px;
  box-shadow: var(--shadow-sm);
}
.home-market-search .market-search-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--c-pink);
  flex-shrink: 0;
}
.home-market-search .market-search-icon svg {
  width: 14px;
  height: 14px;
}
.home-market-search .market-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: var(--ui-fs-sm);
  font-weight: 600;
  color: #111;
  padding: 6px 0;
  font-family: inherit;
}
.home-market-search .market-search-input::placeholder {
  color: #A0A0A0;
  font-weight: 500;
  font-size: var(--ui-fs-sm);
}
.home-market-search .market-search-clear {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #F3F4F6;
  color: #6B7280;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

/* Game cards — compact like old market cards */
.home-games {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}
.tg-game-card {
  background: #fff;
  border-radius: var(--ui-radius-card);
  padding: 12px 12px 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.tg-game-card .card-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tg-game-card .card-badge {
  width: var(--ui-badge);
  height: var(--ui-badge);
  background: var(--c-pink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.tg-game-card .card-title-wrap {
  flex: 1;
  min-width: 0;
  padding-right: 24px;
}
.tg-game-card .card-title {
  font-weight: 800;
  font-size: var(--ui-fs-name);
  color: #111;
  letter-spacing: 0.2px;
  line-height: 1.2;
  text-transform: uppercase;
  word-break: break-word;
}
.tg-game-card .card-result {
  margin-top: 5px;
  display: inline-block;
  padding: 3px 10px;
  background: #FDF2F4;
  border: 1px solid #F8D7DC;
  border-radius: 12px;
  color: #7A0C1F;
  font-weight: 800;
  font-size: var(--ui-fs-sm);
  letter-spacing: 0.8px;
  font-variant-numeric: tabular-nums;
}
/* Single result-chart icon — only next to Play/Closed (no duplicate) */
.tg-chart-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  background: #FDF2F4;
  border: 1px solid #F8D7DC;
  color: #7A0C1F;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.12s ease, background 0.12s ease;
}
.tg-chart-btn:active {
  transform: scale(0.95);
  background: #FCE8EC;
}
.tg-chart-btn svg {
  width: 18px;
  height: 18px;
}
.tg-game-card .card-bottom {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
}
.tg-game-card .card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.tg-game-card .status-text {
  color: var(--c-danger);
  font-weight: 600;
  font-size: var(--ui-fs-sm);
  line-height: 1.25;
}
.tg-game-card .status-text.open { color: var(--c-green); }
.tg-game-card .status-text.holiday { color: #d97706; }
.tg-game-card .timing {
  margin-top: 2px;
  color: #333;
  font-weight: 600;
  font-size: var(--ui-fs-xs);
  line-height: 1.3;
}
.tg-game-card .status-pill {
  background: #6B7280;
  color: #fff !important;
  border: none;
  border-radius: 16px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: var(--ui-fs-sm);
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  font-family: inherit;
  flex-shrink: 0;
  line-height: 1;
}
.tg-game-card .status-pill.open {
  background: #7A0C1F;
  box-shadow: 0 2px 6px rgba(122, 12, 31, 0.25);
}
.tg-game-card .status-pill.holiday {
  background: #d97706;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}
.tg-game-card .status-pill:disabled {
  opacity: 0.95;
  cursor: not-allowed;
}
.tg-game-card[data-search-hidden="1"] { display: none !important; }
.home-empty {
  text-align: center;
  padding: 20px 14px;
  background: #fff;
  border-radius: var(--ui-radius-card);
  color: var(--c-text-mute);
  font-weight: 600;
  font-size: var(--ui-fs-sm);
  box-shadow: var(--shadow-sm);
}
#marketSearchEmpty {
  display: none;
  text-align: center;
  padding: 18px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(194, 117, 128, 0.35);
  background: #FFF8F0;
  color: var(--c-pink);
  font-weight: 700;
  font-size: var(--ui-fs-sm);
  margin-top: 6px;
}
#marketSearchEmpty.is-visible { display: block; }

/* Closed market modal */
.market-closed-modal__icon { color: var(--c-pink) !important; }
.market-closed-modal__btn {
  background: var(--c-pink) !important;
  font-size: var(--ui-fs-md) !important;
  min-height: 42px !important;
  border-radius: 12px !important;
}
.market-closed-modal__title { font-size: 16px !important; }
.market-closed-modal__body { font-size: var(--ui-fs-sm) !important; }

/* ═══════════════════════════════════════════
   SIDEBAR DRAWER — compact pink icons
   ═══════════════════════════════════════════ */
.sidebar {
  background: #fff !important;
  font-size: var(--ui-fs-base);
}
.sb-top {
  background: #fff !important;
  color: #111 !important;
  border-bottom: 1px solid var(--c-border);
  padding: 14px 14px 12px !important;
  position: relative;
}
.sb-user-row {
  gap: 12px !important;
  padding-right: 32px !important;
}
.sb-avatar {
  width: 48px !important;
  height: 48px !important;
  background: var(--c-pink) !important;
  border: none !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}
.sb-user-name {
  color: #111 !important;
  font-size: var(--ui-fs-lg) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}
.sb-user-phone {
  color: #6B6B6B !important;
  font-size: var(--ui-fs-sm) !important;
  font-weight: 600 !important;
}
.sb-user-bal {
  color: #6BA3B5 !important;
  font-size: var(--ui-fs-xs) !important;
  font-weight: 600 !important;
}
.sb-close {
  background: transparent !important;
  color: #C53030 !important;
  top: 10px !important;
  right: 10px !important;
  width: 28px !important;
  height: 28px !important;
}
.sb-close svg { stroke: #C53030 !important; width: 16px !important; height: 16px !important; }

.sb-nav {
  padding: 6px 0 12px !important;
  gap: 0 !important;
}
.sb-item {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  padding: 9px 14px !important;
  color: #111 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: var(--ui-fs-md) !important;
  border: 0 !important;
  background: transparent !important;
  min-height: 44px !important;
  border-radius: 0 !important;
}
.sb-item:hover,
.sb-item:active,
.sb-item.is-active {
  background: #FFF5E0 !important;
  color: #111 !important;
}
.sb-item:hover .sb-ico,
.sb-item.is-active .sb-ico {
  color: #fff !important;
}
.sb-ico {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px;
  border-radius: 50% !important;
  background: var(--c-pink) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(194, 117, 128, 0.28);
}
.sb-ico svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #fff !important;
  color: #fff !important;
}
.sb-label {
  flex: 1;
  font-weight: 700;
  font-size: var(--ui-fs-md);
  color: #111;
  line-height: 1.25;
}
.sb-chev { display: none !important; }
.sb-bottom {
  border-top: 1px solid #EEE;
  padding: 6px 0 10px;
  box-shadow: none !important;
  background: #fff !important;
}
.sb-logout .sb-ico {
  background: #E53E3E !important;
  box-shadow: 0 2px 6px rgba(229, 62, 62, 0.25);
}
.sb-logout .sb-label { color: #E53E3E !important; }
.sb-logout:hover { background: #FEF2F2 !important; }

/* ═══════════════════════════════════════════
   INNER PAGES — shared cream theme polish
   (wallet / bids / support / settings shells)
   ═══════════════════════════════════════════ */
.page-card,
.card,
.rounded-2xl.bg-white,
.rounded-xl.bg-white,
.bg-white.rounded-2xl,
.bg-white.shadow-sm {
  box-shadow: var(--shadow-sm);
}
/* Primary buttons still using maroon class hooks */
button.bg-\[\#C27580\],
a.bg-\[\#C27580\],
.btn-primary {
  background: var(--c-pink) !important;
}
/* Funds / wallet accent bars */
.h-1.w-full[style*="#C27580"],
.h-0\.5.w-full[style*="#C27580"] {
  background: linear-gradient(to right, var(--c-pink), var(--c-pink-light)) !important;
}

/* Reduce oversized Tailwind text on themed pages */
.home-page .text-base { font-size: var(--ui-fs-base) !important; }
.home-page .text-sm { font-size: var(--ui-fs-sm) !important; }
.home-page .text-xs { font-size: var(--ui-fs-xs) !important; }

@media (max-width: 360px) {
  :root {
    --ui-fs-name: 13px;
    --ui-badge: 40px;
    --ui-ctrl-h: 38px;
    --ui-fab: 48px;
  }
  .king-label { font-size: 11px; }
  .action-btn, .support-pill { font-size: 11px; }
  .app-header-brand-text { font-size: 13px; }
}


/* ══════════════════════════════════════════════════════════════
   BIG DADDY — 100% Exact Parity with Android App (0% Difference)
   ══════════════════════════════════════════════════════════════ */

/* Background canvas */
body.home-page,
.__className_f367f3.home-page,
.home-scroll {
  background: #FFFFFF !important;
}

/* ── Top Header ── */
header.app-top-header,
.app-top-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: #7A0C1F !important;
  box-shadow: 0 2px 10px rgba(74, 8, 20, 0.3) !important;
  border: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.app-header-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 56px !important;
  padding: 0 14px !important;
  background: #7A0C1F !important;
}

/* Circle Icon Buttons (Menu, Refresh, Notifications) */
.app-hdr-circle-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #5E0817 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
  padding: 0 !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}
.app-hdr-circle-btn:active {
  transform: scale(0.92) !important;
  background: #4A0814 !important;
}
.app-hdr-circle-btn svg {
  stroke: #FFFFFF !important;
  color: #FFFFFF !important;
}

/* Center Brand with Crown & Gold Line */
.app-hdr-center-brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 !important;
}
.app-hdr-brand-img {
  height: 38px !important;
  max-width: 175px !important;
  object-fit: contain !important;
  display: block !important;
}
.app-hdr-brand-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
.app-hdr-crown {
  font-size: 15px !important;
  line-height: 1 !important;
}
.app-hdr-brand-name {
  font-size: 17px !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  color: #FFFDF5 !important;
  line-height: 1.1 !important;
  font-family: Inter, system-ui, sans-serif !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
.app-hdr-gold-line {
  width: 28px !important;
  height: 2.5px !important;
  background: #D4AF37 !important;
  border-radius: 2px !important;
  margin-top: 2px !important;
}

/* Right Group: Wallet Capsule + Actions */
.app-hdr-right-group {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex-shrink: 0 !important;
}
.app-hdr-wallet-capsule {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 32px !important;
  padding: 0 10px !important;
  background: #5E0817 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 16px !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-decoration: none !important;
  transition: transform 0.15s ease !important;
}
.app-hdr-wallet-capsule:active {
  transform: scale(0.94) !important;
}
.app-hdr-wallet-capsule svg {
  fill: #FFFFFF !important;
}

/* Marquee Notice Bar */
.app-hdr-marquee {
  display: flex !important;
  align-items: center !important;
  height: 36px !important;
  background: #4A0814 !important;
  overflow: hidden !important;
}
.app-hdr-marquee-icon {
  background: #38060F !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  flex-shrink: 0 !important;
}
.app-hdr-marquee-text {
  color: #FFFFFF !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 0 10px !important;
}

/* ── 2x2 Action Buttons Grid ── */
.home-action-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 12px 14px 0 !important;
}
.home-action-row {
  display: flex !important;
  gap: 10px !important;
  width: 100% !important;
}
.home-action-pill {
  flex: 1 !important;
  height: 46px !important;
  border-radius: 23px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.12s ease, opacity 0.12s ease !important;
  border: none !important;
  cursor: pointer !important;
}
.home-action-pill:active {
  transform: scale(0.96) !important;
  opacity: 0.9 !important;
}
.home-action-pill.maroon {
  background: #7A0C1F !important;
  color: #FFFFFF !important;
}
.home-action-pill.green {
  background: #1B8A44 !important;
  color: #FFFFFF !important;
}
.home-action-pill.dpboss {
  background: #C2185B !important;
  color: #FFFFFF !important;
  border: none !important;
}
.home-action-ic {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.home-dpboss-badge {
  height: 22px !important;
  width: auto !important;
  object-fit: contain !important;
}

/* ── Full Horizontal Divider Line ── */
.home-divider-line {
  height: 1.2px !important;
  background: #D48090 !important;
  margin: 12px 14px 0 !important;
}

/* ── App Header Brand Image ── */
.app-hdr-center-brand {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.app-hdr-brand-img {
  display: block !important;
  height: 27px !important;
  max-height: 27px !important;
  width: auto !important;
  max-width: min(220px, 48vw) !important;
  object-fit: contain !important;
}
  margin: 14px 0 12px !important;
  width: 100% !important;
}

/* ── Market Search Bar ── */
.home-market-search {
  padding: 0 14px 14px !important;
}
.market-search-bar {
  display: flex !important;
  align-items: center !important;
  height: 48px !important;
  background: #FFFFFF !important;
  border: 1.2px solid #E5E7EB !important;
  border-radius: 24px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  padding: 0 8px 0 7px !important;
  gap: 8px !important;
}
.market-search-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #7A0C1F !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #FFFFFF !important;
  flex-shrink: 0 !important;
}
.market-search-icon svg {
  stroke: #FFFFFF !important;
  width: 16px !important;
  height: 16px !important;
}
.market-search-input {
  flex: 1 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #1F2937 !important;
}
.market-search-input::placeholder {
  color: #9CA3AF !important;
}

/* ── Section Title "Main Markets" ── */
.main-markets-header {
  display: flex !important;
  align-items: center !important;
  padding: 0 14px 10px !important;
}
.market-indicator-bar {
  width: 4px !important;
  height: 18px !important;
  background: #7A0C1F !important;
  border-radius: 2px !important;
  margin-right: 8px !important;
  display: inline-block !important;
}
.main-markets-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #1F2937 !important;
  margin: 0 !important;
}

/* ── Main Market Cards (MaterialCard Parity) ── */
.home-games {
  padding: 0 14px !important;
}
.tg-game-card {
  background: #FFFFFF !important;
  border: 1.5px solid #B82842 !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  padding: 14px 14px 12px !important;
  margin-bottom: 12px !important;
  transition: transform 0.12s ease !important;
}
.tg-game-card:active {
  transform: scale(0.99) !important;
}
.tg-game-card .card-top {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}
.tg-game-card .card-badge {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  background: #7A0C1F !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.tg-game-card .card-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #1F2937 !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
}
.tg-game-card .card-result {
  display: inline-flex !important;
  align-items: center !important;
  background: #FDF2F4 !important;
  border: 1px solid #F8D7DA !important;
  border-radius: 8px !important;
  padding: 3px 10px !important;
  margin-top: 5px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #7A0C1F !important;
  letter-spacing: 0.06em !important;
}
.tg-game-card .card-bottom {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-top: 10px !important;
  border-top: 1px solid #F3F4F6 !important;
}
.tg-game-card .status-text {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #DC2626 !important;
  margin-bottom: 2px !important;
}
.tg-game-card .status-text.open {
  color: #16A34A !important;
}
.tg-game-card .timing {
  font-size: 11px !important;
  color: #6B7280 !important;
  font-weight: 500 !important;
}
.tg-game-card .card-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.tg-game-card .tg-chart-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  border: 1px solid #E5E7EB !important;
  background: #FFFFFF !important;
  color: #7A0C1F !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  text-decoration: none !important;
}
.tg-game-card .tg-chart-btn svg {
  stroke: #7A0C1F !important;
  width: 17px !important;
  height: 17px !important;
}
.tg-game-card .status-pill.open {
  background: #7A0C1F !important;
  color: #FFFFFF !important;
  border-radius: 8px !important;
  padding: 7px 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-block !important;
  box-shadow: 0 2px 6px rgba(122, 12, 31, 0.25) !important;
}
.tg-game-card .status-pill:not(.open) {
  background: #F3F4F6 !important;
  color: #9CA3AF !important;
  border-radius: 8px !important;
  padding: 7px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border: none !important;
}

/* ── Bottom Navigation Tab Bar ── */
.app-tabbar {
  background: #FFFFFF !important;
  border-top: 1px solid #E5E7EB !important;
  height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
}
.app-tabbar .tab {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #9CA3AF !important;
  text-decoration: none !important;
  position: relative !important;
}
.app-tabbar .tab svg {
  width: 22px !important;
  height: 22px !important;
  fill: #9CA3AF !important;
  margin-bottom: 2px !important;
}
.app-tabbar .tab.active {
  color: #7A0C1F !important;
}
.app-tabbar .tab.active svg {
  fill: #7A0C1F !important;
}
.app-tabbar .tab.active::after {
  content: "" !important;
  display: block !important;
  width: 4px !important;
  height: 4px !important;
  background: #7A0C1F !important;
  border-radius: 50% !important;
  margin-top: 2px !important;
}

/* Floating Center Home FAB with White Ring */
.app-tabbar .tab.tab-center {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: #7A0C1F !important;
  border: 3px solid #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(122, 12, 31, 0.4) !important;
  transform: translateY(-12px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #FFFFFF !important;
}
.app-tabbar .tab.tab-center svg {
  width: 26px !important;
  height: 26px !important;
  fill: #FFFFFF !important;
  margin: 0 !important;
}
.app-tabbar .tab.tab-center::after {
  display: none !important;
}
