/* Lofipay site day/night theme + shared layout polish */
:root {
  --lp-blue: #2f89d6;
  --lp-blue-d: #1f6fb3;
  --lp-accent: #2f89d6;
  --lp-ink: #1e293b;
  --lp-muted: #64748b;
  --lp-line: #e6edf5;
  --lp-bg: #f3f6fb;
  --lp-bg-2: #eef2f7;
  --lp-card: #ffffff;
  --lp-header: #ffffff;
  --lp-soft: #f8fafc;
  --lp-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  --lp-ok: #157347;
  --lp-danger: #b42318;
  --lp-scroll: #cbd5e1;
  --lp-logo: #16324f;
  --lp-nav: #334155;
  --lp-topbar-fg: #ffffff;
}

html.lp-dark {
  color-scheme: dark;
  --lp-blue: #3b9aef;
  --lp-blue-d: #2f89d6;
  --lp-accent: #ffbf0e;
  --lp-ink: #e8eef7;
  --lp-muted: #9aa8bc;
  --lp-line: #243044;
  --lp-bg: #0b1220;
  --lp-bg-2: #121a2b;
  --lp-card: #151c2c;
  --lp-header: #111827;
  --lp-soft: #0f172a;
  --lp-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  --lp-ok: #86efac;
  --lp-danger: #fca5a5;
  --lp-scroll: #475569;
  --lp-logo: #f8fafc;
  --lp-nav: #cbd5e1;
  --lp-topbar-fg: #0b1220;
}

/* Early paint helpers */
html.lp-dark body,
html.lp-dark body.lp-body,
html.lp-dark body.lp-wide,
html.lp-dark body.lp-sport,
html.lp-dark body.lp-livecasino,
html.lp-dark body.lp-content,
html.lp-dark body.lp-account,
html.lp-dark body.body-wrap {
  background: var(--lp-bg) !important;
  color: var(--lp-ink) !important;
}

/* Thin scrollbars site-wide */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--lp-scroll) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--lp-scroll);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

/* Theme switch control (top-right) */
.lp-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--lp-line);
  background: var(--lp-soft);
  color: var(--lp-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}
.lp-theme-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.lp-theme-btn .lp-ico-moon { display: none; }
html.lp-dark .lp-theme-btn .lp-ico-sun { display: none; }
html.lp-dark .lp-theme-btn .lp-ico-moon { display: block; }
.lp-theme-btn:hover {
  border-color: var(--lp-blue);
  color: var(--lp-blue);
}
.lp-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 8px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--lp-bg-2);
  border: 1px solid var(--lp-line);
  color: var(--lp-ink);
  font-weight: 750;
  font-size: 13px;
}
.lp-theme-row .lp-theme-btn {
  height: 32px;
  padding: 0 10px;
}

/* Sticky header stack polish */
.lp-header,
.lp-iconnav {
  background: var(--lp-header);
  border-bottom: 1px solid var(--lp-line);
}
.lp-header {
  position: sticky;
  top: 0;
  z-index: 40;
}
.lp-iconnav {
  position: sticky;
  top: 72px;
  z-index: 35;
}
.lp-logo,
.lp-logo a,
.top-logo-wrap .lp-brand,
.top-logo-wrap a {
  color: var(--lp-logo) !important;
}
.lp-iconnav a,
.lp-nav a,
.lp-side a {
  color: var(--lp-nav);
}
.lp-iconnav a.is-on,
.lp-iconnav a[aria-current="page"] {
  background: rgba(47, 137, 214, 0.14);
  color: var(--lp-blue);
}
html.lp-dark .lp-iconnav a.is-on,
html.lp-dark .lp-iconnav a[aria-current="page"] {
  background: rgba(59, 154, 239, 0.16);
  color: var(--lp-blue);
}

/* Shared surface remaps for dark */
html.lp-dark .lp-side a,
html.lp-dark .lp-pay,
html.lp-dark .lp-providers a,
html.lp-dark .lp-prov,
html.lp-dark .lp-slot,
html.lp-dark .lp-search,
html.lp-dark .lp-cside,
html.lp-dark .lp-gcard,
html.lp-dark .lp-dialog,
html.lp-dark .lp-drop,
html.lp-dark .lp-bal,
html.lp-dark .lp-ico,
html.lp-dark .lp-acc,
html.lp-dark .finance-well,
html.lp-dark .lp-promo,
html.lp-dark .lp-promo-empty,
html.lp-dark .lp-promo-detail {
  background: var(--lp-card) !important;
  color: var(--lp-ink) !important;
  border-color: var(--lp-line) !important;
}
html.lp-dark .lp-pill-line {
  background: var(--lp-soft) !important;
  color: var(--lp-ink) !important;
  border-color: var(--lp-line) !important;
}
html.lp-dark .lp-footer,
html.lp-dark .footer-pro,
html.lp-dark .footer-pro1,
html.lp-dark .bottom-payment-row {
  background: var(--lp-header) !important;
  color: var(--lp-muted) !important;
  border-top-color: var(--lp-line) !important;
}
html.lp-dark .lp-footgrid a,
html.lp-dark .footer-pro a,
html.lp-dark .bottom-links a,
html.lp-dark .title-text {
  color: var(--lp-muted) !important;
}
html.lp-dark .lp-muted,
html.lp-dark .lp-drop-h span,
html.lp-dark .lp-gcard span,
html.lp-dark .lp-switch,
html.lp-dark .lp-copy {
  color: var(--lp-muted) !important;
}
html.lp-dark .lp-dialog input,
html.lp-dark .lp-dialog select,
html.lp-dark .lp-dialog textarea,
html.lp-dark .lp-cside input,
html.lp-dark .lp-search {
  background: var(--lp-soft) !important;
  color: var(--lp-ink) !important;
  border-color: var(--lp-line) !important;
}
html.lp-dark .header-main-wrap,
html.lp-dark .header-pro,
html.lp-dark .header-pro1,
html.lp-dark .header-pro-inside,
html.lp-dark .navbar,
html.lp-dark .top-menu,
html.lp-dark .menu-pro {
  background: var(--lp-header) !important;
  color: var(--lp-ink) !important;
  border-bottom-color: var(--lp-line) !important;
}
html.lp-dark .content-pro,
html.lp-dark .content-pro3,
html.lp-dark .main-wrap-pro,
html.lp-dark body.lp-sport .main-wrap-pro,
html.lp-dark body.lp-sport .content-pro,
html.lp-dark body.lp-sport .content-pro3,
html.lp-dark body.lp-sport .content-row,
html.lp-dark body.lp-live .main-wrap-pro,
html.lp-dark body.lp-live .content-pro,
html.lp-dark body.lp-live .content-pro3,
html.lp-dark body.lp-live .content-row,
html.lp-dark body.lp-live .landing-wrap {
  background: var(--lp-bg) !important;
  color: var(--lp-ink) !important;
}
html.lp-dark a.menubtn,
html.lp-dark .header-pro a.menubtn,
html.lp-dark a.menubtn span.title,
html.lp-dark .menubtn,
html.lp-dark .topmenu_link,
html.lp-dark .header-pro a.topmenu_link {
  color: var(--lp-nav) !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
html.lp-dark a.menubtn:hover,
html.lp-dark a.menubtn.active,
html.lp-dark a.menubtn:hover span.title,
html.lp-dark a.menubtn.active span.title,
html.lp-dark a.menubtn:hover span.imgholder,
html.lp-dark a.menubtn.active span.imgholder,
html.lp-dark a.menubtn:hover span.imgholder svg,
html.lp-dark a.menubtn.active span.imgholder svg,
html.lp-dark a.menubtn.active .arrow-right {
  background: rgba(59, 154, 239, 0.16) !important;
  color: var(--lp-blue) !important;
  stroke: currentColor;
  border-color: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
/* Sport / live surfaces stay on tokens in dark */
html.lp-dark body.lp-sport .lp-rail,
html.lp-dark body.lp-sport .lp-card,
html.lp-dark body.lp-sport .lp-extra,
html.lp-dark body.lp-sport .lp-empty,
html.lp-dark body.lp-sport #coupon_block,
html.lp-dark body.lp-sport .kupon-pro,
html.lp-dark body.lp-live .lp-rail,
html.lp-dark body.lp-live .lp-card,
html.lp-dark body.lp-live .lp-extra,
html.lp-dark body.lp-live .lp-empty,
html.lp-dark body.lp-live #coupon_block,
html.lp-dark body.lp-live .kupon-pro {
  background: var(--lp-card) !important;
  border-color: var(--lp-line) !important;
  color: var(--lp-ink) !important;
}
html.lp-dark body.lp-sport .lp-teams b,
html.lp-dark body.lp-sport .lp-card-h,
html.lp-dark body.lp-sport .lp-card-h strong,
html.lp-dark body.lp-sport .lp-main-h strong,
html.lp-dark body.lp-sport .lp-odd,
html.lp-dark body.lp-live .lp-sides b,
html.lp-dark body.lp-live .lp-card-h,
html.lp-dark body.lp-live .lp-card-h strong,
html.lp-dark body.lp-live .lp-live-top strong,
html.lp-dark body.lp-live .lp-odd {
  color: var(--lp-ink) !important;
}
html.lp-dark body.lp-sport .lp-when,
html.lp-dark body.lp-sport .lp-teams em,
html.lp-dark body.lp-sport .lp-teams .lp-mtype,
html.lp-dark body.lp-sport .lp-odd small,
html.lp-dark body.lp-live .lp-sides small,
html.lp-dark body.lp-live .lp-mkt-n,
html.lp-dark body.lp-live .lp-odd small,
html.lp-dark body.lp-live .lp-sportname {
  color: var(--lp-muted) !important;
}
html.lp-dark body.lp-sport .lp-odd,
html.lp-dark body.lp-live .lp-odd {
  background: var(--lp-bg-2) !important;
}
html.lp-dark body.lp-sport .lp-odd:hover,
html.lp-dark body.lp-sport .lp-odd.is-on,
html.lp-dark body.lp-live .lp-odd:hover,
html.lp-dark body.lp-live .lp-odd.is-on {
  background: var(--lp-blue) !important;
  color: #fff !important;
}
html.lp-dark body.lp-sport .lp-row,
html.lp-dark body.lp-live .lp-lrow {
  background: var(--lp-card) !important;
  border-color: var(--lp-line) !important;
}
html.lp-dark body.lp-sport .lp-row:nth-child(even),
html.lp-dark body.lp-live .lp-lrow:nth-child(even),
html.lp-dark body.lp-sport .lp-card-h,
html.lp-dark body.lp-live .lp-card-h {
  background: var(--lp-soft) !important;
}
html.lp-dark body.lp-sport .lp-find input,
html.lp-dark body.lp-live .lp-find input,
html.lp-dark body.lp-sport .lp-fold,
html.lp-dark body.lp-live .lp-fold,
html.lp-dark body.lp-sport .lp-chips button,
html.lp-dark body.lp-live .lp-chips button {
  background: var(--lp-soft) !important;
  color: var(--lp-ink) !important;
  border-color: var(--lp-line) !important;
}
html.lp-dark .lp-note2 {
  background: #2a2110 !important;
  border-color: #854d0e !important;
  color: #fde68a !important;
}
html.lp-dark .lp-note2.err {
  background: #3f1218 !important;
  border-color: #991b1b !important;
  color: #fecaca !important;
}
html.lp-dark .lp-note2.ok {
  background: #102a1a !important;
  border-color: #166534 !important;
  color: #bbf7d0 !important;
}
html.lp-dark .lp-casino .lp-demo {
  background: #334155 !important;
  color: #f8fafc !important;
}
html.lp-dark .casinov2container,
html.lp-dark body.lp-livecasino .casinov2container {
  background: var(--lp-card) !important;
  border-color: var(--lp-line) !important;
  color: var(--lp-ink) !important;
}
html.lp-dark body.lp-livecasino .ca-menu li a {
  background: var(--lp-bg-2) !important;
  color: var(--lp-ink) !important;
}
html.lp-dark body.lp-livecasino .ca-menu li.active a,
html.lp-dark body.lp-livecasino .ca-menu li a:hover {
  background: var(--lp-blue) !important;
  color: #fff !important;
}
html.lp-dark body.lp-account .content-center .main-well,
html.lp-dark body.lp-account .content-center .main-content-all,
html.lp-dark body.lp-account .content-center .main-content-modal,
html.lp-dark body.lp-account .content-center .datagrid table,
html.lp-dark body.lp-account .content-center .datagrid th,
html.lp-dark body.lp-account .content-center .datagrid td,
html.lp-dark body.lp-account .panel,
html.lp-dark body.lp-account .panel-body {
  background: var(--lp-card) !important;
  color: var(--lp-ink) !important;
  border-color: var(--lp-line) !important;
}
html.lp-dark body.lp-account .content-center .main-title-all,
html.lp-dark body.lp-account .content-center .main-title-modal,
html.lp-dark body.lp-account .content-center h4.title-text,
html.lp-dark body.lp-account .content-center .datagrid th,
html.lp-dark body.lp-account .content-center .datagrid td {
  color: var(--lp-ink) !important;
}
html.lp-dark body.lp-account .content-center .datagrid thead th,
html.lp-dark body.lp-account .panel-heading,
html.lp-dark body.lp-account .pro-panel-heading,
html.lp-dark body.lp-account .info-well {
  background: var(--lp-bg-2) !important;
  color: var(--lp-ink) !important;
  border-color: var(--lp-line) !important;
}
html.lp-dark .content-left .lp-accside a {
  background: var(--lp-bg-2) !important;
  color: var(--lp-ink) !important;
}
html.lp-dark .content-left .lp-accside a.is-on {
  background: var(--lp-blue) !important;
  color: #fff !important;
}

/* Layout stability */
.lp-header-in,
.lp-iconnav-in {
  min-width: 0;
}
.lp-actions,
.lp-session {
  min-width: 0;
  flex-wrap: wrap;
}
.lp-iconnav-in {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lp-iconnav-in::-webkit-scrollbar { display: none; }
.lp-layout,
.lp-casino {
  min-width: 0;
}
.lp-cgrid,
.lp-slots,
.lp-tiles,
.lp-pays {
  min-width: 0;
}
/* Shell header: keep actions on one line */
.header-pro .lp-session {
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.header-pro .lp-session .lp-pill-line[href="/ortaklik/"] {
  display: none;
}
@media (max-width: 1100px) {
  .header-pro .lp-theme-btn span.lp-theme-txt { display: none; }
  .header-pro .lp-theme-btn { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 720px) {
  .lp-theme-btn span.lp-theme-txt { display: none; }
  .lp-theme-btn { width: 40px; padding: 0; justify-content: center; }
  .lp-session .lp-pill-line[href="/ortaklik/"] { display: none; }
  .header-pro .top-login-wrap { max-width: 100%; }
}
