
/* FORT Online — LK UI v2 (dark + neon accent) */
:root{
  --bg: #07111e;
  --bg2:#0a1627;
  --card:#0b1a2e;
  --card2:#0d2038;
  --text:#e8f0ff;
  --muted:#94a3b8;
  --line: rgba(148,163,184,.18);
  --accent:#2aa8ff;
  --accent2:#7c3aed;
  --good:#22c55e;
  --warn:#f59e0b;
  --bad:#ef4444;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 14px;
  /* Layout sizes */
  --topbar-h: 64px;
  --sidebar-w: 348px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body.lk-body{
  margin:0;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(42,168,255,.20), transparent 60%),
    radial-gradient(700px 450px at 85% 0%, rgba(124,58,237,.14), transparent 55%),
    linear-gradient(180deg, var(--bg), #040a13 70%);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

html, body{ overflow-x:hidden; }

a{ color:inherit; }
a:hover{ color:var(--text); text-decoration:none; }

.lk-skip{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.lk-skip:focus{
  left:12px; top:12px; width:auto; height:auto; padding:10px 12px;
  background:var(--card); border:1px solid var(--line); border-radius:12px; z-index:99999;
}

.lk-topbar{
  position:sticky; top:0; z-index:2200;
  backdrop-filter: blur(14px);
  background: rgba(7,17,30,.72);
  border-bottom: 1px solid var(--line);
}

/* Ensure burger is always clickable on mobile */
#lkSidebarToggle{ position:relative; z-index:2300; }

/* Burger button shows only on small screens (sidebar becomes drawer) */
@media (min-width: 992px){
  #lkSidebarToggle{ display:none; }
}
.lk-topbar::after{
  content:""; display:block; height:1px;
  background: linear-gradient(90deg, transparent, rgba(42,168,255,.25), rgba(124,58,237,.22), transparent);
  opacity:.9;
}
.lk-topbar__left, .lk-topbar__right{
  display:flex; align-items:center; gap:12px;
}
.lk-topbar{
  padding: 10px 14px;
  display:flex; align-items:center; justify-content:space-between;
}

.lk-iconbtn{
  width:42px; height:42px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(13,32,56,.55);
  color:var(--text);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.lk-iconbtn:hover{ transform: translateY(-1px); border-color: rgba(42,168,255,.35); background: rgba(13,32,56,.75); }
.lk-iconbtn:active{ transform: translateY(0); }

.lk-brand{
  display:flex; align-items:center; gap:10px;
  padding:6px 10px;
  border-radius: 14px;
  border:1px solid transparent;
}
.lk-brand:hover{ border-color: rgba(42,168,255,.25); background: rgba(13,32,56,.35); }
.lk-brand__logo{ height:34px; width:auto; display:block; }
.lk-brand__text{ font-weight:700; letter-spacing:.2px; }

.lk-pill{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(13,32,56,.55);
}
.lk-pill__muted{ color:var(--muted); font-size:.9rem; }

.lk-user{
  display:flex; align-items:center; gap:10px;
  border:1px solid var(--line);
  background: rgba(13,32,56,.55);
  color:var(--text);
  border-radius: 14px;
  padding:8px 10px;
  cursor:pointer;
}
.lk-user:hover{ border-color: rgba(42,168,255,.35); background: rgba(13,32,56,.75); }
.lk-user__avatar{
  width:34px; height:34px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(42,168,255,.26), rgba(124,58,237,.22));
  border:1px solid rgba(42,168,255,.20);
  font-weight:800;
}
.lk-user__chev{ opacity:.75; font-size:.85rem; }

.lk-dropdown{
  background: rgba(9,20,36,.96);
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  min-width: 220px;
  box-shadow: var(--shadow);
}
.lk-dropdown .dropdown-item{
  color:var(--text);
  border-radius: 12px;
  padding: 10px 12px;
}
.lk-dropdown .dropdown-item i{ width:22px; opacity:.9; }
.lk-dropdown .dropdown-item:hover{ background: rgba(42,168,255,.12); }
.lk-dropdown .dropdown-divider{ border-top:1px solid var(--line); margin: 6px 0; }

.lk-shell{
  position:relative;
  min-height: calc(100vh - var(--topbar-h));
  /* Mobile first: sidebar acts as drawer, so no permanent left padding */
  padding-left: 0;
}

/* Make legacy Bootstrap layout full-width and prevent the "left sidebar column" from reserving space.
   Old LK pages render sidebar inside `.col-lg-3.order-lg-first`, but sidebar is fixed now. */
.lk-body .container{ max-width: 1400px; }
.lk-body .content{ width: 100%; }
.lk-body .order-lg-first.col-lg-3{
  flex: 0 0 0 !important;
  max-width: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.lk-body .order-lg-first.col-lg-3 .leftbar{ padding:0 !important; }
.lk-body .col-lg-9{ flex: 0 0 100% !important; max-width: 100% !important; }

/* Better centering for legacy pages that nest multiple containers */
.lk-body .content > .row{ margin-left: 0; margin-right: 0; }
.lk-body .content > .row > .col{ padding-left: 0; padding-right: 0; }

/* Helper: avoid huge empty center on wide screens, while keeping content roomy */
@media (min-width: 992px){
  .lk-body .container{ max-width: 1360px; }
}

/* Sidebar */
.lk-sidebar{
  position:fixed;
  top: var(--topbar-h);
  left:0;
  bottom:0;
  width: var(--sidebar-w);
  max-width: 92vw;
  padding: 14px;
  z-index: 1200;
  transform: translateX(-102%);
  transition: transform .22s ease;
}
.lk-sidebar.is-open{ transform: translateX(0); }
.lk-body.lk-sidebar-open .lk-sidebar{ transform: translateX(0); }
.lk-sidebar__inner{
  height: 100%;
  overflow:auto;
  border-radius: var(--radius);
  background: rgba(10,22,39,.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 12px;
}
.lk-sidebarBackdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  z-index: 1100;
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease;
}
.lk-sidebarBackdrop.is-open{ opacity:1; pointer-events:auto; }
.lk-body.lk-sidebar-open .lk-sidebarBackdrop{ opacity:1; pointer-events:auto; }

@media (min-width: 992px){
  .lk-sidebar{ transform: translateX(0); width: var(--sidebar-w); }
  .lk-sidebarBackdrop{ display:none; }

  /* Reserve space for the fixed sidebar using padding on the shell.
     IMPORTANT: Do NOT add margin-left to `.content` because old LK pages use `.content`
     on many nested wrappers, which causes the whole page to drift to the right.
  */
  .lk-shell{
    padding-left: var(--sidebar-w);
    padding-right: 24px;
    overflow-x: hidden;
  }

  /* Make legacy bootstrap containers stretch inside the shell (no horizontal overflow). */
  .lk-shell .container{
    /* Center the main content area visually (prevents tiles from sticking to the left) */
    max-width: 1320px !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Legacy Bootstrap components: make them match dark theme */
.lk-body .nav-tabs{ border-bottom: 1px solid var(--line); }
.lk-body .nav-tabs .nav-link{
  border: 1px solid transparent;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  color: var(--muted);
  background: rgba(10,22,39,.35);
  margin-right: 6px;
}
.lk-body .nav-tabs .nav-link.active,
.lk-body .nav-tabs .nav-item.show .nav-link{
  color: var(--text);
  background: rgba(11,26,46,.85);
  border-color: var(--line);
}

.lk-body .tab-content .tab-pane{
  background: rgba(11,26,46,.75);
  border-color: var(--line) !important;
  border-radius: 0 14px 14px 14px;
}

.lk-body .table{ color: var(--text); }
.lk-body .table-responsive{
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}
.lk-body .result, .lk-body .container, .lk-body .content{ max-width:100%; }
.lk-body .table-bordered{ border-color: var(--line); }
.lk-body .table-bordered th,
.lk-body .table-bordered td{ border-color: var(--line); }
.lk-body .table-striped tbody tr:nth-of-type(odd){ background: rgba(255,255,255,.03); }
.lk-body .table thead th{ border-bottom: 1px solid var(--line); color: var(--muted); }

.lk-body .form-control{
  background: rgba(9,20,36,.75);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
}
.lk-body .form-control:focus{ box-shadow: 0 0 0 3px rgba(42,168,255,.15); border-color: rgba(42,168,255,.35); }

/* Fix "Помощь" white list group */
.lk-body .list-group,
.lk-body .list-group-item{
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}
.lk-body .list-group-item a{ color: var(--accent); }

/* Quick buttons (Пополнить/Обмен) — enforce identical sizing */
.lk-quick .lk-btn{ min-height: 46px; }
.lk-quick .lk-btn i{ line-height: 1; }

/* Shop cards: restyle legacy product-card markup to match new theme */
.lk-body .product-card{
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11,26,46,.88), rgba(9,20,36,.88));
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  padding: 14px;
}
.lk-body .product-head{ margin-bottom: 10px; }
.lk-body .product-card-body{ padding-top: 10px; }
.lk-body .product-meta{ color: var(--muted); font-size: .85rem; text-decoration: none; }
.lk-body .product-title a{ color: var(--text); text-decoration: none; }
.lk-body .product-title a:hover{ color: var(--accent); }
.lk-body .product-price{ font-weight: 800; }
.lk-body .product-buttons-wrap{ margin-top: 10px; }
/* getShopItem.php contains repeated blocks; hide all after the first (robust against other <div> siblings) */
.lk-body .product-card .product-buttons-wrap ~ .product-buttons-wrap{ display:none; }
.lk-body .product-button a{
  display:inline-flex; align-items:center; justify-content:center;
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(13,32,56,.55);
  color: var(--text);
}
.lk-body .product-button a:hover{ background: rgba(42,168,255,.14); border-color: rgba(42,168,255,.35); }

/* Remove extra container inside AJAX shop results */
.lk-body .result .container{ max-width: 100% !important; padding-left: 0; padding-right: 0; }

/* Bootstrap modal dark theme (shop + tasks) */
.lk-body .modal-content{
  background: linear-gradient(180deg, rgba(11,26,46,.96), rgba(9,20,36,.96));
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.lk-body .modal-header, .lk-body .modal-footer{
  border-color: var(--line);
}
.lk-body .modal-header .close{ color: var(--text); opacity:.8; }
.lk-body .modal-header .close:hover{ opacity:1; }

/* Task pages (task-ngay / task-thang): prevent huge gaps & giant images */
.lk-body .cart-item{
  max-width: 1100px;
  margin: 0 auto 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11,26,46,.88), rgba(9,20,36,.88));
  border: 1px solid var(--line);
}
.lk-body .cart-item.d-md-flex.justify-content-between{
  justify-content: flex-start !important;
  gap: 24px;
  flex-wrap: wrap;
}
.lk-body .cart-item-product{
  display:flex;
  align-items:flex-start;
  gap: 14px;
}
.lk-body .cart-item-product-thumb img{
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: rgba(13,32,56,.35);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}
.lk-body .cart-item-label{ color: var(--muted); margin-bottom:6px; }
.lk-body .cart-item .text-center{ min-width: 180px; }

@media (max-width: 991px){
  .lk-body .cart-item .text-center{ min-width: auto; }
}

/* Cards / profile */
.lk-card{
  background: linear-gradient(180deg, rgba(11,26,46,.92), rgba(9,20,36,.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  padding: 14px;
}

.lk-card--profile{ margin-bottom: 12px; }

.lk-profile{
  display:flex; align-items:center; gap:12px;
  padding: 6px 4px 12px 4px;
  border-bottom: 1px solid var(--line);
}
.lk-profile__avatar{
  width:46px; height:46px;
  border-radius: 16px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(42,168,255,.28), rgba(124,58,237,.22));
  border:1px solid rgba(42,168,255,.22);
  font-weight:900;
}
.lk-profile__name{ font-weight:800; }
.lk-profile__sub{ color:var(--muted); font-size:.9rem; margin-top:2px; }

.lk-balances{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  padding-top: 12px;
}
.lk-balance{
  position:relative;
  border-radius: var(--radius2);
  background: rgba(13,32,56,.55);
  border: 1px solid var(--line);
  padding: 10px 10px 10px 10px;
}
.lk-balance__label{
  color:var(--muted);
  font-size:.85rem;
  display:flex; align-items:center; gap:8px;
}
.lk-balance__value{
  font-size:1.1rem;
  font-weight:800;
  margin-top:4px;
}
.lk-balance__hint{
  position:absolute;
  right:10px; top:10px;
  opacity:.9;
}
.lk-balance__hint:hover{ opacity:1; color:var(--accent); }

.lk-quick{
  display:grid; grid-template-columns: 1fr 1fr; gap:10px;
  padding-top: 12px;
}
.lk-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
  border-radius: 14px;
  border:1px solid var(--line);
  font-weight:800;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space:nowrap;
}
.lk-btn:hover{ transform: translateY(-1px); }
.lk-btn--primary{
  background: linear-gradient(135deg, rgba(42,168,255,.95), rgba(124,58,237,.85));
  border-color: rgba(42,168,255,.35);
  color: #06101f;
}
.lk-btn--primary:hover{ filter: brightness(1.04); }
.lk-btn--ghost{
  background: rgba(13,32,56,.55);
}

/* ---- Bootstrap component overrides inside LK ---- */
.lk-body .nav-tabs{ border-bottom: 1px solid var(--line); }
.lk-body .nav-tabs .nav-link{
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: 12px 12px 0 0;
  background: rgba(9,20,36,.55);
}
.lk-body .nav-tabs .nav-link.active{
  color: var(--text);
  background: rgba(11,26,46,.92);
  border-color: var(--line);
}
.lk-body .tab-content .tab-pane{ background: rgba(11,26,46,.72); border-color: var(--line) !important; }

/* ---- Legacy dashboard tiles (def.php) ---- */
.lk-body .masthead-cards{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.lk-body .masthead-cards a{ text-decoration: none; }
.lk-body .masthead-cards .card{
  background: linear-gradient(180deg, rgba(11,26,46,.86), rgba(9,20,36,.86)) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.22) !important;
  /* Make all tiles equal height inside flex rows on mobile */
  height: 100%;
  width: 100%;
}
.lk-body .masthead-cards .card-body{
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lk-body .masthead-cards .card-body i{ margin-bottom: 10px; }
.lk-body .masthead-cards .text-uppercase{ letter-spacing: .02em; }

@media (max-width: 991px){
  .lk-body .masthead-cards .card-body{ min-height: 148px; }
}

/* Ensure each <a> tile stretches to the tallest sibling in the row */
.lk-body .masthead-cards .d-flex > a{ display:flex; }
.lk-body .masthead-cards .d-flex{ align-items: stretch; }

.lk-body .list-group,
.lk-body .list-group-item{
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.lk-body .list-group-item a{ color: var(--accent); }

.lk-body .table{
  color: var(--text);
}
.lk-body .table thead th{ border-bottom-color: var(--line); }
.lk-body .table td, .lk-body .table th{ border-top-color: rgba(255,255,255,.08); }
.lk-body .table-striped tbody tr:nth-of-type(odd){ background-color: rgba(255,255,255,.02); }

.lk-body .form-control{
  background: rgba(9,20,36,.55);
  border-color: var(--line);
  color: var(--text);
}
.lk-body .form-control:focus{ box-shadow: 0 0 0 .2rem rgba(42,168,255,.15); border-color: rgba(42,168,255,.35); }

/* Fix weird alignment for quick buttons in sidebar */
.lk-btn i{ line-height: 0; }

/* ---- Shop (product-card) modern look ---- */
.lk-body .product-card{
  background: linear-gradient(180deg, rgba(11,26,46,.92), rgba(9,20,36,.92));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  overflow: hidden;
}
.lk-body .product-head{ padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
.lk-body .product-card-body{ padding: 12px; }
.lk-body .product-meta{ color: var(--muted); font-weight: 700; font-size: .9rem; text-decoration: none; }
.lk-body .product-title{ margin: 6px 0 0 0; font-weight: 900; font-size: 1.05rem; }
.lk-body .product-title a{ color: var(--text); text-decoration: none; }
.lk-body .product-title a:hover{ color: var(--accent); }
.lk-body .product-price{ display:block; margin-top: 6px; font-weight: 900; }
.lk-body .product-buttons-wrap{ padding: 10px 12px 12px; }
.lk-body .product-buttons{ display:flex; justify-content:flex-end; }
.lk-body .product-button a{
  width: 42px; height: 42px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 14px;
  background: rgba(42,168,255,.14);
  border:1px solid rgba(42,168,255,.22);
  color: var(--text);
}
.lk-body .product-button a:hover{ background: rgba(42,168,255,.22); }
/* getShopItem.php contains repeated product-buttons-wrap blocks; keep only the first visually */
.lk-body .product-card .product-buttons-wrap:nth-of-type(n+2){ display:none; }

.lk-btn--ghost:hover{ border-color: rgba(42,168,255,.35); background: rgba(13,32,56,.75); }

/* Nav items */
.lk-nav__title{
  margin: 14px 6px 8px 6px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
  display:flex; align-items:center; gap:10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.lk-nav__item{
  display:flex; align-items:center; gap:12px;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid transparent;
  color: var(--text);
}
.lk-nav__item i{ width:20px; opacity:.9; }
.lk-nav__item:hover{
  background: rgba(42,168,255,.10);
  border-color: rgba(42,168,255,.18);
}
.lk-nav__item--danger:hover{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.20);
}
.lk-badge{
  margin-left:auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight:900;
  font-size:.72rem;
  border: 1px solid var(--line);
}
.lk-badge--hot{
  background: rgba(239,68,68,.14);
  border-color: rgba(239,68,68,.25);
  color:#ffd5d5;
}

/* Main content upgrades (bootstrap overrides) */
.lk-body .container{
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.lk-body .row{
  margin-left: 0;
  margin-right: 0;
}

.content{
  padding-top: 16px;
  padding-left: 14px;
  padding-right: 14px;
  max-width: 1400px;
  margin-right: auto;
}
@media (min-width: 992px){
  .content{ padding-top: 22px; }
}

/* Many legacy pages render mem.php inside a Bootstrap sidebar column.
   Sidebar itself is fixed, so we collapse the legacy column to avoid "узко" and пустой центр. */
@media (min-width: 992px){
  .lk-body .col-lg-3.order-lg-first{
    flex: 0 0 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
  }
  .lk-body .col-lg-3.order-lg-first .leftbar{
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
  }
}
.card{
  border-radius: var(--radius);
  border: 1px solid var(--line) !important;
  background: rgba(11,26,46,.80);
  box-shadow: 0 16px 45px rgba(0,0,0,.22);
}
.card .card-header{
  background: rgba(13,32,56,.55);
  border-bottom: 1px solid var(--line);
}
.table{
  color: var(--text);
}
.table thead th{
  border-bottom: 1px solid var(--line) !important;
  color: var(--muted);
}
.table td, .table th{
  border-top: 1px solid rgba(148,163,184,.14) !important;
}
.form-control, .custom-select{
  border-radius: 14px;
  background: rgba(13,32,56,.55);
  border: 1px solid var(--line);
  color: var(--text);
}
.form-control:focus, .custom-select:focus{
  border-color: rgba(42,168,255,.45);
  box-shadow: 0 0 0 .2rem rgba(42,168,255,.12);
  background: rgba(13,32,56,.65);
  color: var(--text);
}
.btn{
  border-radius: 14px;
  font-weight: 800;
}
.btn-primary{
  background: linear-gradient(135deg, rgba(42,168,255,.95), rgba(124,58,237,.85));
  border: 0;
  color: #06101f;
}
.btn-info{
  background: rgba(42,168,255,.18);
  border: 1px solid rgba(42,168,255,.25);
  color: var(--text);
}
.btn-danger{
  background: rgba(239,68,68,.16);
  border: 1px solid rgba(239,68,68,.22);
}
.alert{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(13,32,56,.55);
  color: var(--text);
}

/* Footer */
.lk-footer{
  margin-top: 22px;
  padding: 18px 14px 26px 14px;
  border-top: 1px solid var(--line);
  background: rgba(7,17,30,.55);
  position: relative;
  z-index: 10;
}
.lk-footer__inner{
  max-width: 1200px;
  margin: 0 auto;
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
}
.lk-footer a{ color: var(--muted); }
.lk-footer a:hover{ color: var(--text); }
.lk-muted{ color: var(--muted); }
.lk-dot{ color: rgba(148,163,184,.45); padding: 0 6px; }

/* On desktop, keep footer content from sitting under the fixed sidebar */
@media (min-width: 992px){
  .lk-footer{
    padding-left: calc(var(--sidebar-w) + 24px);
    padding-right: 24px;
  }
  .lk-footer__inner{
    max-width: 1200px;
  }
}

/* On wide screens the sidebar is always visible (fixed 290px).
   Shift footer content to the right so the sidebar doesn't overlap it. */
@media (min-width: 992px){
  .lk-footer{ padding-left: calc(290px + 22px); padding-right: 22px; }
  .lk-footer__inner{ max-width: 1200px; }
}

/* Auth pages */
.lk-auth{
  min-height: 100vh;
  display:flex; align-items:center; justify-content:center;
  padding: 18px;
}
.lk-authCard{
  width: min(520px, 100%);
  border-radius: 22px;
  background: rgba(10,22,39,.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
}
.lk-authHeader{
  display:flex; align-items:center; gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.lk-authHeader img{ height:38px; }
.lk-authTitle{ font-weight:900; font-size: 1.15rem; margin:0; }
.lk-authSub{ color: var(--muted); margin: 2px 0 0 0; font-size:.92rem; }

.lk-noscroll{ overflow:hidden; }



/* ===== Stable mobile sidebar patch (v9) ===== */
html, body { overflow-x: hidden; }

#lkSidebarBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 1090; /* under sidebar, above content */
}
#lkSidebarBackdrop.is-open,
body.lk-sidebar-open #lkSidebarBackdrop{
  opacity: 1;
  pointer-events: auto;
}

/* Mobile slide-in */
@media (max-width: 991.98px){
  body.lk-sidebar-open{ overflow: hidden; }
  #lkSidebar{
    /* Place the drawer under the sticky topbar to avoid clipped scrolling on iOS */
    top: var(--topbar-h) !important;
    height: calc(100vh - var(--topbar-h));
    transform: translateX(-105%);
    transition: transform .2s ease;
    /* Above the topbar so it is never visually clipped */
    z-index: 1400;
    padding-top: 14px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #lkSidebar.is-open{ transform: translateX(0); }
}

/* Allow the last menu items to be reachable on mobile (safe area + extra space) */
.lk-sidebar__inner{ padding-bottom: calc(18px + env(safe-area-inset-bottom)); }


/* Social login block (VKID/OAuth list) */
.lk-social{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.lk-socialTitle{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: 10px;
}
#vkid-oauth{
  width: 100%;
}
#vkid-oauth > *{
  max-width: 100%;
}


/* Hide vertical scrollbar in left sidebar but keep scrolling */
.lk-sidebar__inner {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.lk-sidebar__inner::-webkit-scrollbar {
    width: 0;
    display: none;
}


/* ===== Vongquay (Wheel of Fortune) redesign ===== */
.lk-page{ padding: 16px; }
.lk-card{ border-radius: var(--radius); background: rgba(10,22,39,.82); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lk-muted{ color: rgba(220,235,255,.65); }
.lk-label{ display:block; margin: 10px 0 6px; color: rgba(220,235,255,.85); font-weight: 600; font-size: 13px; }
.lk-help{ margin-top: 6px; font-size: 12px; color: rgba(220,235,255,.55); }
.lk-select{ width:100%; padding: 10px 12px; border-radius: 12px; background: rgba(6,12,24,.65); border: 1px solid rgba(255,255,255,.08); color: rgba(240,248,255,.95); outline: none; }
.lk-select:focus{ border-color: rgba(80,120,255,.55); box-shadow: 0 0 0 3px rgba(80,120,255,.14); }
.lk-badge{ display:inline-flex; align-items:center; justify-content:center; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.lk-badge--success{ background: rgba(36,190,110,.18); color: rgba(160,255,205,.95); border: 1px solid rgba(36,190,110,.25); }

.lk-btn{ border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 800; cursor: pointer; display:inline-flex; align-items:center; gap:10px; }
.lk-btn--primary{ background: linear-gradient(135deg, #2f7bff, #6a5cff); color: #fff; box-shadow: 0 10px 28px rgba(60,110,255,.25); }
.lk-btn--primary:hover{ filter: brightness(1.07); box-shadow: 0 14px 36px rgba(60,110,255,.32); }
.lk-btn:disabled{ opacity:.55; cursor:not-allowed; }

.lk-vong__card{ padding: 18px; }
.lk-vong__header{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom: 14px; }
.lk-vong__kicker{ font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(200,220,255,.55); }
.lk-vong__title{ margin: 6px 0 6px; font-size: 28px; font-weight: 900; color: rgba(240,248,255,.98); }
.lk-vong__sub{ max-width: 62ch; color: rgba(220,235,255,.68); font-size: 13px; line-height: 1.45; }
.lk-vong__meta{ display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.lk-vong__attempts{ color: rgba(220,235,255,.82); font-weight: 700; }
.lk-vong__buy{ color: rgba(170,205,255,.95); text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.lk-vong__buy:hover{ background: rgba(255,255,255,.10); }

.lk-vong__grid{ display:grid; grid-template-columns: 1.2fr .8fr; gap: 16px; align-items:start; }
.lk-vong__wheel{ padding: 14px; border-radius: 16px; background: rgba(6,12,24,.45); border: 1px solid rgba(255,255,255,.06); }
.lk-vong__wheelWrap{ display:flex; justify-content:center; padding: 6px; }
.lk-vong__wheel canvas{ max-width: 100%; height: auto; border-radius: 999px; background: radial-gradient(circle at 50% 35%, rgba(80,120,255,.18), rgba(0,0,0,0)); box-shadow: 0 18px 55px rgba(0,0,0,.55); }
.lk-vong__actions{ display:flex; flex-direction:column; align-items:center; gap:10px; margin-top: 10px; }
.lk-vong__hint{ font-size: 12px; color: rgba(220,235,255,.55); text-align:center; max-width: 48ch; }
.lk-vong__msg{ margin-top: 6px; width:100%; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: rgba(240,248,255,.92); }

.lk-vong__side{ display:flex; flex-direction:column; gap: 12px; }
.lk-vong__panel{ padding: 12px; border-radius: 16px; background: rgba(6,12,24,.45); border: 1px solid rgba(255,255,255,.06); }
.lk-vong__panelTitle{ font-weight: 900; color: rgba(240,248,255,.95); margin-bottom: 8px; display:flex; align-items:baseline; gap:10px; }
.lk-vong__result{ min-height: 44px; }
.lk-vong__list{ max-height: 220px; overflow:auto; padding-right: 6px; }
.lk-vong__list::-webkit-scrollbar{ width: 0; height: 0; display:none; }
.lk-vong__list{ scrollbar-width:none; -ms-overflow-style:none; }

/* mobile */
@media (max-width: 992px){
  .lk-vong__grid{ grid-template-columns: 1fr; }
  .lk-vong__meta{ align-items:flex-start; }
}

/* ===== Pagination style for FORT LK ===== */

#lkPaymentPagination .pagination {
    gap: 6px;
}

#lkPaymentPagination .page-item .page-link {
    background: rgba(20, 35, 60, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    color: #cfe3ff;
    border-radius: 10px;
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all .2s ease;
}

#lkPaymentPagination .page-item .page-link:hover {
    background: linear-gradient(135deg, #2f7bff, #6a5cff);
    color: #fff;
    box-shadow: 0 0 12px rgba(80,120,255,.45);
}

#lkPaymentPagination .page-item.active .page-link {
    background: linear-gradient(135deg, #2f7bff, #6a5cff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 14px rgba(80,120,255,.6);
}

#lkPaymentPagination .page-item.disabled .page-link {
    opacity: .35;
    pointer-events: none;
}



/* ===== Overlays / notifications in LK style ===== */
/* Bootstrap modal should be above sidebar */
.modal{ z-index: 2600 !important; }
.modal-backdrop{ z-index: 2550 !important; }

/* SweetAlert2 (swal2) / old sweetalert / toastr - force above everything */
.swal2-container{ z-index: 3000 !important; }
.swal-overlay, .swal-modal{ z-index: 3000 !important; }
.toast-container, .toast, .toastr, #toast-container{ z-index: 3000 !important; }

/* SweetAlert2 theme */
.swal2-popup{
  background: linear-gradient(180deg, rgba(11,26,46,.98), rgba(9,20,36,.98)) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 18px !important;
  color: rgba(240,248,255,.96) !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.55) !important;
}
.swal2-title{ color: rgba(240,248,255,.98) !important; font-weight: 900 !important; }
.swal2-html-container{ color: rgba(220,235,255,.78) !important; }
.swal2-icon{ border-color: rgba(255,255,255,.22) !important; }
.swal2-actions{ gap: 10px !important; }
.swal2-styled{
  border-radius: 14px !important;
  padding: 10px 16px !important;
  font-weight: 900 !important;
}
.swal2-styled.swal2-confirm{
  background: linear-gradient(135deg, #2f7bff, #6a5cff) !important;
  box-shadow: 0 12px 30px rgba(60,110,255,.28) !important;
}
.swal2-styled.swal2-cancel{
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: rgba(240,248,255,.92) !important;
}
.swal2-styled:focus{ box-shadow: 0 0 0 3px rgba(80,120,255,.18) !important; }

/* Old SweetAlert (swal) theme */
.swal-modal{
  background: linear-gradient(180deg, rgba(11,26,46,.98), rgba(9,20,36,.98)) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 18px !important;
  color: rgba(240,248,255,.96) !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.55) !important;
}
.swal-title{ color: rgba(240,248,255,.98) !important; font-weight: 900 !important; }
.swal-text{ color: rgba(220,235,255,.78) !important; }
.swal-button{
  border-radius: 14px !important;
  padding: 10px 16px !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #2f7bff, #6a5cff) !important;
  color: #fff !important;
  border: 0 !important;
}
.swal-button--cancel{
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: rgba(240,248,255,.92) !important;
}

/* ===== Sidebar width + quick actions layout ===== */
:root{ --sidebar-w: 360px; } /* slightly wider */
.lk-sidebar{ width: var(--sidebar-w) !important; }

.lk-profileActions{
  display:flex;
  gap: 10px;
  align-items: stretch;
}
.lk-profileActions .lk-btn,
.lk-profileActions .btn{
  flex: 1 1 0;
  min-width: 0;
}
.lk-profileActions .lk-btn span,
.lk-profileActions .btn span{ white-space: nowrap; }

/* Normalize old bootstrap buttons inside LK */
.lk-body .btn.btn-success,
.lk-body .btn.btn-primary{
  border-radius: 14px;
  border: 0;
  font-weight: 900;
}
.lk-body .btn.btn-success{
  background: rgba(36,190,110,.18);
  border: 1px solid rgba(36,190,110,.25);
  color: rgba(160,255,205,.95);
}
.lk-body .btn.btn-success:hover{
  background: rgba(36,190,110,.26);
}


.lk-quick{ align-items: stretch; }
.lk-quick .lk-btn{ min-width:0; justify-content:center; padding-left:14px; padding-right:14px; }
.lk-quick .lk-btn i{ flex:0 0 auto; }
.lk-quick .lk-btn{ white-space:nowrap; }


/* ===== Richest Top (dua-top-tp) ===== */
.lk-top{ display:flex; flex-direction:column; gap: 14px; }
.lk-top__empty{ padding: 14px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: rgba(220,235,255,.8); text-align:center; }
.lk-top__hero{
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px 18px;
  background: linear-gradient(135deg, rgba(47,123,255,.30), rgba(106,92,255,.20), rgba(0,0,0,0));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 55px rgba(0,0,0,.45);
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height: 110px;
}
.lk-top__hero:before{
  content:'';
  position:absolute;
  inset:-40px -80px auto auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(90,160,255,.55), rgba(90,160,255,0));
  filter: blur(0px);
  opacity:.65;
}
.lk-top__place{ font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: rgba(220,235,255,.75); font-size: 12px; }
.lk-top__name{ margin-top: 6px; font-size: 26px; font-weight: 900; color: rgba(240,248,255,.98); }
.lk-top__sum{ margin-top: 6px; font-size: 18px; font-weight: 800; color: rgba(190,215,255,.95); }
.lk-top__heroRight{ position: relative; width: 120px; height: 90px; display:flex; align-items:center; justify-content:center; }
.lk-top__crown{ font-size: 44px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.45)); }
.lk-top__glow{
  position:absolute;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(255,210,90,.35), rgba(255,210,90,0));
  filter: blur(0px);
  opacity:.8;
}

.lk-top__row{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lk-top__card{
  position: relative;
  overflow:hidden;
  border-radius: 18px;
  padding: 14px 14px;
  background: rgba(6,12,24,.45);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 44px rgba(0,0,0,.35);
  min-height: 92px;
}
.lk-top__card:before{
  content:'';
  position:absolute;
  inset:auto -60px -60px auto;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(80,120,255,.22), rgba(80,120,255,0));
  opacity: .8;
}
.lk-top__card--silver:before{ background: radial-gradient(circle at 30% 30%, rgba(210,230,255,.28), rgba(210,230,255,0)); }
.lk-top__card--bronze:before{ background: radial-gradient(circle at 30% 30%, rgba(255,190,130,.22), rgba(255,190,130,0)); }

.lk-top__placeSm{ font-weight: 900; letter-spacing:.12em; text-transform: uppercase; color: rgba(220,235,255,.70); font-size: 12px; }
.lk-top__nameSm{ margin-top: 6px; font-size: 18px; font-weight: 900; color: rgba(240,248,255,.98); }
.lk-top__sumSm{ margin-top: 6px; font-size: 14px; font-weight: 800; color: rgba(190,215,255,.92); }
.lk-top__medal{ position:absolute; right: 14px; top: 14px; font-size: 28px; opacity:.95; filter: drop-shadow(0 12px 20px rgba(0,0,0,.45)); }

.lk-top__tableWrap{
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(6,12,24,.35);
}
.lk-top__table{ margin:0; }
.lk-top__table thead th{
  background: rgba(255,255,255,.06);
  color: rgba(220,235,255,.85);
  border-color: rgba(255,255,255,.08);
}
.lk-top__table tbody td{
  color: rgba(240,248,255,.90);
  border-color: rgba(255,255,255,.06);
}
.lk-top__table tbody tr:hover td{ background: rgba(255,255,255,.04); }

@media (max-width: 992px){
  .lk-top__row{ grid-template-columns: 1fr; }
  .lk-top__hero{ padding: 16px; }
  .lk-top__name{ font-size: 22px; }
}
