/*********************************************************
 * BetEngine Enterprise – CORE BUNDLE CSS
 * Merged Sequence: VARIABLES -> BASE -> LAYOUT -> UTILITIES -> AUTH
 *********************************************************/

/* =======================================================
   1. VARIABLES.CSS
======================================================= */
:root {
  /* CORE COLORS */
  --bg-main: #0a0c12;
  --bg-header: #0a0c12;
  --bg-nav: #0a0c12;
  --bg-panel: #11141d;
  --bg-panel-soft: #181824;
  --bg-panel-strong: #0d0d16;

  /* Buttons */
  --bg-chip: #1f1f2d;
  --bg-button-primary: #ffec00;
  --bg-button-primary-soft: rgba(255, 236, 0, 0.12);
  --bg-button-secondary: #222236;

  /* Text */
  --text-primary: #ffec00;
  --text-secondary: #00eaff;
  --text-muted: #b3b3b3;

  /* Badges */
  --bg-badge-live: #ff1744;
  --bg-badge-premium: #ff9800;

  /* Borders */
  --border-neon: #ff0000;

  /* MOBILE HEADER GRADIENT VARIABLES */
  --mobile-header-grad-1: #0b0b12;
  --mobile-header-grad-2: #101018;
  --mobile-header-grad-3: #11141d;

  /* Mobile icon/button background */
  --mobile-icon-bg: rgba(24, 24, 36, 0.95);

  /* Mobile slide panel background */
  --mobile-panel-bg: #0c0c14;

  /* AUTH VARIABLES */
  --auth-bg: #0a0c12;
  --auth-border: rgba(255, 255, 255, 0.1);

  /* NAV VARIABLE */
  --nav-bg: #0a0c12;

  /* AUTH TOKENS */
  --c-auth-ink: #11141d;
  --c-auth-surface: #11141d;
  --c-auth-text: #ffffff;
  --c-auth-overlay-bg: transparent;
  --z-auth-overlay: 4000;
  --shadow-auth-box: 0 22px 60px rgba(0,0,0,0.8);
  --c-auth-accent: #00eaff;
  --c-auth-input-bg: rgb(3, 5, 8);
  --c-auth-border: #2b3040;
  --c-auth-hover-bg: #20243a;
  --c-auth-text-secondary: #cfd3df;
  --c-auth-text-muted: #9aa0b5;
  --c-auth-text-soft: rgba(255, 255, 255, 0.75);
  --c-auth-divider: rgba(255, 255, 255, 0.06);
  --c-auth-divider-soft: rgba(255, 255, 255, 0.08);
  --c-auth-divider-strong: rgba(255, 255, 255, 0.18);
  --c-auth-submit-bg: #ffec00;
  --c-auth-premium-accent: #f4a11a;
  --r-auth-box: 14px;
  --r-auth-pill: 999px;
  --c-auth-box-bg: rgb(20 34 48 / 1);
  --c-auth-box-border: rgba(255, 255, 255, 0.06);
  --c-auth-social-hover-border: rgba(0, 234, 255, 0.65);

  --auth-box-bg-gradient: linear-gradient(180deg,  rgb(18, 60, 78), rgb(10, 36, 53),  rgb(9, 19, 30) );
    
  /* SEARCH TOKENS */
  --c-search-bg: #11141d;
  --c-search-input-bg: #151827;
  --c-search-results-bg-desktop: #151B2B;
  --c-search-text: #ffffff;
  --c-search-accent: #00eaff;
  --c-search-border-subtle: rgba(255, 255, 255, 0.06);
  --c-search-border-input: rgba(255, 255, 255, 0.10);
  --c-search-border-btn: rgba(255, 255, 255, 0.12);
  --c-search-border-btn-hover: rgba(255, 255, 255, 0.22);
  --c-search-border-mobile-results: rgba(255, 255, 255, 0.08);
  --c-search-placeholder: rgba(255, 255, 255, 0.40);
  --c-search-text-subtitle: rgba(255, 255, 255, 0.65);
  --c-search-text-state: rgba(255, 255, 255, 0.70);
  --c-search-text-meta: rgba(255, 255, 255, 0.55);
  --c-search-title-text: rgba(255, 255, 255, 0.92);
  --c-search-icon-text: rgba(255, 255, 255, 0.85);
  --c-search-clear-text: rgba(255, 255, 255, 0.90);
  --c-search-row-hover-bg: #14192a;
  --c-search-clear-hover-bg: #1c2033;
  --c-search-focus-border: rgba(0, 234, 255, 0.55);
  --c-search-accent-soft: rgba(0, 234, 255, 0.10);
  --c-search-loading-bg: rgba(21, 24, 39, 0.55);
  --c-search-loading-bg-strong: rgba(21, 24, 39, 0.90);
  --c-search-mobile-clear-bg: rgba(0, 234, 255, 0.18);
  --c-search-mobile-clear-bg-hover: rgba(0, 234, 255, 0.32);
  --c-search-mobile-clear-border: rgba(0, 234, 255, 0.45);
  --c-search-mobile-clear-border-hover: rgba(0, 234, 255, 0.90);
  --c-search-mobile-clear-strong: rgba(0, 234, 255, 0.45);
  --shadow-search: 0 18px 50px rgba(0, 0, 0, 0.55);
}

/* =======================================================
   2. BASE.CSS
======================================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-secondary);
    overflow-x: hidden;
}

body, button, input {
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

p {
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 12px;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0d0d16;
}

::-webkit-scrollbar-thumb {
    background: #2d2d3d;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f3f55;
}

input, select, textarea {
    background: var(--bg-panel-soft);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    padding: 8px 10px;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--text-secondary);
    box-shadow: 0 0 0 2px rgba(0,234,255,0.15);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: inherit;
    font-family: inherit;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

button:active {
    transform: scale(0.97);
}

img {
    display: block;
    max-width: 100%;
}

.icon,
.icon-caret,
.icon-lang {
    pointer-events: none;
    user-select: none;
}

::selection {
    background: rgba(255,236,0,0.35);
    color: #000;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px 10px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
    font-weight: 600;
    color: var(--text-primary);
}

td {
    color: var(--text-muted);
}

a,
button,
.nav-item,
.sub-item,
.nav-chip,
.sub-chip {
    transition: all 0.18s ease;
}

input,
select,
textarea {
    transition: border-color .15s ease, box-shadow .15s ease;
}

.hidden { display: none !important; }
.invisible { visibility: hidden !important; }
.click-block { pointer-events: none !important; }
.rounded { border-radius: 12px; }
.shadow { box-shadow: 0 6px 18px rgba(0,0,0,0.28); }
.bold { font-weight: 700; }
.text-center { text-align: center; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

@media (max-width: 900px) {
    p { font-size: 13px; }
    h1 { font-size: 20px; }
}

/* =======================================================
   3. LAYOUT.CSS
======================================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: var(--bg-main, #0a0c12);
}

body { overflow-x: hidden; }

.be-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 18px;
}

.header-desktop {
    width: 100%;
    position: relative;
    background: var(--bg-header, #0a0c12);
    z-index: 100;
}

.header-mobile { }

.header-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 18px;
}

.header-desktop {
  position: sticky;
  top: 0;
  z-index: 999;
  background: transparent;
  display: block;
}

.header-desktop .header-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  box-sizing: border-box;
}

.header-desktop .row-top {
  background-image: linear-gradient(180deg, rgb(39, 45, 49) 0%, rgb(10, 12, 18) 100%);
  background-color: rgb(10, 12, 18);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.header-desktop .row-main {
  background: linear-gradient(180deg, #272d31, #0f1112);
}

.header-desktop .row-separator {
  width: 100%;
  height: 1px;
  background: rgba(80, 85, 88, 0.35);
  flex-shrink: 0;
}

.header-desktop .row-sub {
  width: 100%;
  background: linear-gradient(to bottom, rgba(74, 74, 74, 1) 0%, rgba(44, 44, 44, 1) 46%, rgba(19, 19, 19, 1) 100%);
  border-bottom: 1px solid rgba(80, 85, 88, 0.35);
}

main {
    width: 100%;
    padding: 20px 18px;
    margin: 0 auto;
    color: var(--text-secondary, #00eaff);
    min-height: calc(100vh - 200px);
}

main h1 {
    font-size: 24px;
    color: var(--text-primary, #ffec00);
    margin-bottom: 10px;
}

main p {
    font-size: 14px;
    color: var(--text-muted, #b3b3b3);
}

footer {
    width: 100%;
    margin-top: 40px;
    padding: 18px;
    text-align: center;
    background: var(--bg-header, #0a0c12);
    border-top: 1px solid rgba(255,255,255,0.06);
    color: var(--text-muted, #b3b3b3);
    font-size: 12px;
}

.be-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    width: 100%;
    margin: 0 auto;
}

.col-12 { grid-column: span 12; }
.col-9  { grid-column: span 9;  }
.col-8  { grid-column: span 8;  }
.col-6  { grid-column: span 6;  }
.col-4  { grid-column: span 4;  }
.col-3  { grid-column: span 3;  }

.be-flex { display: flex; }
.be-center { display: flex; justify-content: center; align-items: center; }
.be-between { display: flex; justify-content: space-between; align-items: center; }
.be-vcenter { display: flex; align-items: center; }

.sp-4  { height: 4px; }
.sp-8  { height: 8px; }
.sp-12 { height: 12px; }
.sp-16 { height: 16px; }
.sp-24 { height: 24px; }
.sp-32 { height: 32px; }

.page-wrapper {
    width: 100%;
    display: block;
    padding-bottom: 30px;
}

.module-box {
    width: 100%;
    background: var(--bg-panel, #11141d);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 0 18px rgba(0,0,0,0.18);
}

@media (max-width: 1100px) {
    .be-container { max-width: 1100px; }
}

@media (max-width: 900px) {
    main { padding: 18px 14px; }
    .module-box { padding: 14px 14px; }
}

@media (max-width: 380px) {
    main { padding: 16px 10px; }
    .module-box { padding: 12px 12px; }
}

/* =======================================================
   4. UTILITIES.CSS
======================================================= */
.d-block     { display: block !important; }
.d-inline    { display: inline !important; }
.d-inlineflex{ display: inline-flex !important; }
.d-flex      { display: flex !important; }
.d-grid      { display: grid !important; }
.d-none      { display: none !important; }

.flex-row    { flex-direction: row !important; }
.flex-col    { flex-direction: column !important; }
.flex-center { display: flex !important; justify-content: center; align-items: center; }
.flex-between{ display: flex !important; justify-content: space-between; align-items: center; }
.flex-start  { display: flex !important; justify-content: flex-start; align-items: center; }
.flex-end    { display: flex !important; justify-content: flex-end; align-items: center; }

.items-center { align-items: center !important; }
.items-start  { align-items: flex-start !important; }
.items-end    { align-items: flex-end !important; }

.justify-center { justify-content: center !important; }
.justify-between{ justify-content: space-between !important; }
.justify-start  { justify-content: flex-start !important; }
.justify-end    { justify-content: flex-end !important; }

.p-4  { padding: 4px !important; }
.p-8  { padding: 8px !important; }
.p-12 { padding: 12px !important; }
.p-16 { padding: 16px !important; }
.p-24 { padding: 24px !important; }
.pt-8  { padding-top: 8px !important; }
.pb-8  { padding-bottom: 8px !important; }
.m-4  { margin: 4px !important; }
.m-8  { margin: 8px !important; }
.m-12 { margin: 12px !important; }
.m-16 { margin: 16px !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.max-w-100 { max-width: 100% !important; }

.text-left   { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.uppercase { text-transform: uppercase !important; }
.bold      { font-weight: 700 !important; }

.bg-main     { background: var(--bg-main) !important; }
.bg-header   { background: var(--bg-header) !important; }
.bg-panel    { background: var(--bg-panel) !important; }
.bg-soft     { background: var(--bg-panel-soft) !important; }
.bg-primary  { background: var(--bg-button-primary) !important; }
.bg-premium  { background: var(--bg-badge-premium) !important; }

.rounded     { border-radius: 12px !important; }
.rounded-sm  { border-radius: 6px !important; }
.rounded-lg  { border-radius: 18px !important; }
.border      { border: 1px solid rgba(255,255,255,0.08) !important; }
.border-light{ border: 1px solid rgba(255,255,255,0.05) !important; }
.border-heavy{ border: 1px solid rgba(255,255,255,0.15) !important; }

.z-1   { z-index: 1 !important; }
.z-10  { z-index: 10 !important; }
.z-100 { z-index: 100 !important; }
.z-500 { z-index: 500 !important; }
.z-999 { z-index: 999 !important; }

.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100{ opacity: 1 !important; }

.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }
.cursor-none    { cursor: none !important; }

/* =======================================================
   5. AUTH.CSS
======================================================= */
.be-auth-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--c-auth-overlay-bg);
    z-index: var(--z-auth-overlay);
}

.be-auth-overlay.show {
    display: flex;
}

.be-auth-box {
    width: 100%;
    max-width: 350px;
    background-color: var(--c-auth-box-bg);
    border-radius: var(--r-auth-box);
    box-shadow: var(--shadow-auth-box);
    color: var(--c-auth-text);
    border: 1px solid var(--c-auth-box-border);
    background-image: var(--auth-box-bg-gradient);
    background-clip: padding-box;
    display: flex;
    max-height: 97vh;
    flex-direction: column;
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--c-auth-divider);
    flex-shrink: 0;
}

.auth-header-title,
.auth-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--c-auth-accent);
}

.auth-close {
    background: none;
    border: none;
    cursor: pointer;
}

.auth-close img {
    width: 18px;
    height: 18px;
}

.auth-body {
    padding: 22px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-scroll {
    display: block;
}

.auth-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.auth-social-btn,
.auth-social button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 35px;
    border-radius: 12px;
    background: var(--c-auth-input-bg);
    border: 1px solid var(--c-auth-border);
    color: var(--c-auth-text);
    font-size: 14px;
    cursor: pointer;
}

.auth-social-btn:hover,
.auth-social button:hover {
      border-color: var(--c-auth-social-hover-border);
}

.auth-social-btn img,
.auth-social button img {
    width: 18px;
    height: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1px 0 1px;
    color: var(--c-auth-text-secondary);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--c-auth-divider);
}

.auth-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.auth-field label {
    font-size: 13px;
    color: var(--c-auth-text-secondary);
    margin-bottom: 6px;
}

.auth-field input,
.auth-field select {
    height: 35px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--c-auth-border);
    background: var(--c-auth-input-bg);
    color: var(--c-auth-text);
    font-size: 14px;
}

.auth-field input::placeholder {
    color: var(--c-auth-text-muted);
}

.auth-checkbox {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--c-auth-text-secondary);
    margin: 10px 0 12px;
}

.auth-checkbox span {
    color: var(--c-auth-text);
}

.auth-legal-text {
    color: var(--c-auth-text-soft);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    margin-top: 10px;
}

.auth-legal-text a {
    color: var(--c-auth-accent);
    text-decoration: underline;
}

.auth-submit {
    margin-top: 12px;      
    width: 100%;           
    height: 35px;
    border: none;          
    border-radius: var(--r-auth-pill);
    background: var(--c-auth-submit-bg);
    color: var(--c-auth-ink);
    font-weight: 600;
    cursor: pointer;
    display: block;
    text-align: center;
    margin-bottom: 12px;
}

.auth-footer-text {
    margin-top: 16px;
    font-size: 12px;
    color: var(--c-auth-text-muted);
    text-align: center;
}

.auth-link {
    background: none;
    border: none;
    color: var(--c-auth-accent);
    cursor: pointer;
    display: block;
    text-align: center;    
}

form.auth-form .auth-forgot-link {
  align-self: center;
  width: 100%;
  padding-top: 6px;
}

.auth-forgot-section {
    display: none;
    margin-top: 6px;   
}

.auth-forgot-title {
    margin-bottom: 6px;
}

.auth-forgot-text {
    margin-bottom: 6px;
    line-height: 1.5;
}

.auth-forgot-section .auth-submit {
    width: 100%;
    max-width: 260px;
    margin: 18px auto 0;
    height: 30px;
    display: block;
    text-align: center;
}

#login-modal.state-forgot-open .auth-forgot-section {
  display: block;
}

.auth-forgot-title,
.auth-forgot-text {
  text-align: center;
}

.auth-forgot-section .auth-field,
.auth-forgot-section label,
.auth-forgot-section input {
  text-align: left;
}

.be-auth-overlay *::-webkit-scrollbar {
    width: 4px !important;
    height: 4px !important;
}

.be-auth-overlay *::-webkit-scrollbar-track {
    background: transparent !important;
}

.be-auth-overlay *::-webkit-scrollbar-thumb {
    background: var(--c-auth-divider) !important;
    border-radius: 999px !important;
}

.be-auth-overlay *::-webkit-scrollbar-thumb:hover {
    background: var(--c-auth-text-muted) !important;
}

.be-auth-overlay * {
    scrollbar-width: thin;
    scrollbar-color: var(--c-auth-divider) transparent;
}

.be-auth-overlay { align-items: flex-start; padding-top: 0px; }

@media (max-width: 900px) {
    .be-auth-box {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
        overflow: hidden;
        background-color: var(--c-auth-box-bg);
        border: 1px solid var(--c-auth-box-border);
        background-image: var(--auth-box-bg-gradient);
    }

    .auth-header {
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .auth-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .auth-forgot-section {
        margin-top: 22px;
    }

    #login-modal.state-forgot-open .auth-forgot-section {
        display: block;
    }

    .auth-forgot-title {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 6px;
    }

    .auth-forgot-text {
        font-size: 13px;
        color: var(--c-auth-text-secondary);
        margin-bottom: 14px;
    }

    .mobile-menu-panel .menu-section.account {
        border-top: 1px solid var(--c-auth-divider-soft);
        padding-top: 14px;
        margin-top: 0;
    }

    .mobile-menu-panel .menu-section.account > h4 {
        margin-top: 0;
        margin-bottom: 10px;
    }

    .mobile-menu-panel .mobile-auth-user {
        border-top: 1px solid var(--c-auth-divider-soft);
        padding-top: 2px;
    }

    .mobile-menu-panel .mobile-auth-user .mobile-user-header + * {
        margin-top: 14px;
        padding-left: 8px;
        padding-right: 12px;
        box-sizing: border-box;
    }
 
    .mobile-menu-panel .mobile-auth-user .mobile-user-header {
      display: grid !important;
      grid-template-columns: 40px minmax(0, 1fr) auto !important;
      grid-template-rows: auto auto !important;
      column-gap: 10px;
      row-gap: 2px;
      align-items: center;
      padding-left: 16px;
      padding-right: 34px;
      box-sizing: border-box;
      padding-top: 16px;
    }

    .mobile-menu-panel .mobile-auth-user .mobile-user-avatar {
      grid-column: 1;
      grid-row: 1 / span 2;
      width: 34px !important;
      height: 34px !important;
      max-width: none !important;
      max-height: none !important;
      display: block !important;
      align-self: center;
    }

    .mobile-menu-panel .mobile-auth-user .mobile-user-header .username {
      grid-column: 2;
      grid-row: 1;
      min-width: 0;                
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0 !important;
      font-size: 18px;
      line-height: 1.0 !important;
      color: var(--color-accent, #f4a11a) !important;
    }

    .mobile-menu-panel .mobile-auth-user .mobile-user-header .be-user-caret {
      grid-column: 3;
      grid-row: 1;
      justify-self: end;
      margin-left: 8px;
    }

    .mobile-menu-panel .mobile-auth-user .mobile-user-header .roi {
      grid-column: 2 / 4;
      grid-row: 2;
      margin: 0 !important;
      font-size: 13px;
      line-height: 1.0 !important;
      white-space: nowrap;
    }
}
