/* =========================================================
   HOME NAV CSS
   Source: inline <style> homepage cackoe.com
   Scope: sidebar, mobile drawer, bottom nav, topbar,
          admin panel, badge
   ========================================================= */

/* =========================
   LEFT SIDEBAR
   ========================= */
.twLeftFixed .sideBrand{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.twLeftFixed .sideLogo{
  width:42px;
  height:42px;
  border-radius:14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display:grid;
  place-items:center;
  font-weight:900;
  color:#061022;
  flex:0 0 auto;
}

.twLeftFixed .sideTitle{
  min-width:0;
}

.twLeftFixed .sideTitle .name{
  font-weight:900;
  margin:0;
  font-size:16px;
  line-height:1.1;
}

.twLeftFixed .sideTitle .sub{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.twLeftFixed .sideNav{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:10px;
}

.twLeftFixed .sideLink{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid transparent;
  text-decoration:none;
  color:rgba(231,236,255,.92);
  background:transparent;
  font-weight:800;
  position:relative;
}

.twLeftFixed .sideLink:hover{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.08);
}

.twLeftFixed .sideLink.is-active{
  background:rgba(58,160,255,.14);
  border-color:rgba(58,160,255,.20);
}

.twLeftFixed .sideLink.danger{
  margin-top:6px;
  background:rgba(255,77,77,.10);
  border-color:rgba(255,77,77,.14);
}

.twLeftFixed .sideLink.danger:hover{
  background:rgba(255,77,77,.16);
}

.twLeftFixed .sideIcon{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.16);
  display:grid;
  place-items:center;
  color:#fff;
  font-size:14px;
  flex:0 0 auto;
  position:relative;
}

.twLeftFixed a,
.twLeftFixed a:visited,
.twLeftFixed a:hover,
.twLeftFixed a:active{
  color:inherit;
  text-decoration:none;
}

/* =========================
   BADGE (GLOBAL)
   ========================= */
.badgeDot{
  position:absolute;
  top:8px;
  right:10px;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  font-weight:1000;
  display:none;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 8px 22px rgba(0,0,0,.45);
}

.badgeDot.show{
  display:inline-flex;
}

.badgeDot.dotOnly{
  min-width:10px;
  height:10px;
  padding:0;
  top:10px;
  right:10px;
}

/* =========================
   MOBILE TOP BAR
   ========================= */
.mobileTopBar{
  display:none;
}

@media (max-width: 760px){
  .mobileTopBar{
    display:flex;
    position:fixed;
    left:68px;
    right:12px;
    top:12px;
    z-index:100000;
    gap:10px;
    align-items:center;
  }

  .mtSearchWrap{
    flex:1;
    min-width:0;
    border:1px solid rgba(255,255,255,.10);
    background: rgba(11,18,38,.85);
    border-radius: 999px;
    padding: 10px 12px;
    display:flex;
    align-items:center;
    gap:10px;
  }

  .mtSearchWrap input{
    flex:1;
    min-width:0;
    border:0;
    outline:none;
    background:transparent;
    color:#fff;
    font-weight:900;
    font-size:14px;
  }

  .mtSearchWrap input::placeholder{
    color: rgba(168,179,207,.9);
    font-weight:800;
  }
}

/* =========================
   MOBILE DRAWER
   ========================= */
.mobileDrawerBtn{
  display:none;
}

.mobileDrawerOverlay{
  display:none;
}

.mobileDrawer{
  display:none;
}

@media (max-width: 760px){
  .mobileDrawerBtn{
    display:block;
    position:fixed;
    top:12px;
    left:12px;
    z-index:100000;
    width:44px;
    height:44px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.12);
    background: rgba(11,18,38,.85);
    padding:0;
    cursor:pointer;
    overflow:hidden;
  }

  .mobileDrawerBtn img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }

  .mobileDrawerBtn .fallback{
    width:100%;
    height:100%;
    display:grid;
    place-items:center;
    font-weight:900;
    color:#fff;
    background: rgba(58,160,255,.18);
  }

  .mobileDrawerOverlay{
    position:fixed;
    inset:0;
    z-index:100001;
    background: rgba(0,0,0,.55);
    display:none;
  }

  .mobileDrawerOverlay.open{
    display:block;
  }

  .mobileDrawer{
    display:block;
    position:fixed;
    top:0;
    left:-86%;
    width:min(86%, 360px);
    height:100vh;
    z-index:100002;
    background: rgba(11,18,38,.97);
    border-right: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 20px 70px rgba(0,0,0,.55);
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
    transition: left .22s ease;
    overflow:auto;
  }

  .mobileDrawer.open{
    left:0;
  }

  .mdTop{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }

  .mdClose{
    width:40px;
    height:40px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(255,255,255,.06);
    color:#fff;
    font-weight:900;
    cursor:pointer;
  }

  .mdUser{
    margin-top:14px;
    display:flex;
    gap:12px;
    align-items:center;
  }

  .mdAvatar{
    width:56px;
    height:56px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.12);
    object-fit:cover;
    background:rgba(0,0,0,.18);
    flex:0 0 auto;
  }

  .mdAvatarFallback{
    width:56px;
    height:56px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(58,160,255,.18);
    display:grid;
    place-items:center;
    color:#fff;
    font-weight:900;
    flex:0 0 auto;
  }

  .mdUserTxt{
    min-width:0;
  }

  .mdName{
    font-weight:1000;
    font-size:16px;
    margin:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .mdSub{
    margin-top:6px;
    color:rgba(168,179,207,.92);
    font-size:12px;
    line-height:1.35;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .mdNav{
    margin-top:14px;
    display:flex;
    flex-direction:column;
    gap:8px;
  }

  .mdItem{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 12px;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.08);
    background:rgba(0,0,0,.14);
    color:rgba(231,236,255,.95);
    text-decoration:none;
    font-weight:1000;
    position:relative;
  }

  .mdItem:hover{
    background:rgba(255,255,255,.06);
  }

  .mdIco{
    width:38px;
    height:38px;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(0,0,0,.18);
    display:grid;
    place-items:center;
    flex:0 0 auto;
    overflow:hidden;
    position:relative;
  }

  .mdIco img{
    width:18px;
    height:18px;
    display:block;
    object-fit:contain;
  }

  .mdDivider{
    margin:12px 0;
    border:0;
    border-top:1px solid rgba(255,255,255,.10);
  }
}

/* =========================
   MOBILE ADMIN PANEL
   ========================= */
.mobileAdminPanelOverlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:100005;
  background:rgba(0,0,0,.55);
}

.mobileAdminPanelOverlay.open{
  display:block;
}

.mobileAdminPanel{
  position:fixed;
  top:0;
  right:-86%;
  width:min(86%, 360px);
  height:100vh;
  z-index:100006;
  background: rgba(11,18,38,.97);
  border-left: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 70px rgba(0,0,0,.55);
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  transition: right .22s ease;
  overflow:auto;
}

.mobileAdminPanel.open{
  right:0;
}

.mapTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.mapTitle{
  font-weight:1000;
}

.mapClose{
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

.mapList{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.mapItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.12);
}

.mapLeft{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.mapAv{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  object-fit:cover;
  background:rgba(0,0,0,.18);
  flex:0 0 auto;
}

.mapAvFallback{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(58,160,255,.14);
  display:grid;
  place-items:center;
  font-weight:900;
  color:#fff;
  flex:0 0 auto;
}

.mapName{
  font-weight:1000;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mapDot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.12);
  flex:0 0 auto;
  margin-top:2px;
}

.mapDot.off{
  background:#ef4444;
  box-shadow:0 0 0 3px rgba(239,68,68,.12);
}

.mapEmpty{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.16);
  color:rgba(168,179,207,.9);
  background:rgba(0,0,0,.10);
}

/* =========================
   MOBILE BOTTOM NAV
   ========================= */
.mobileBottomNav{
  display:none;
}

@media (max-width: 760px){
  .mobileBottomNav{
    display:flex;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:99999;
    border-top:1px solid rgba(255,255,255,.10);
    background: rgba(11,18,38,.94);
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    gap: 6px;
    align-items:center;
    justify-content: space-between;
  }

  .mobileBottomNav a{
    flex:1;
    min-width:0;
    text-decoration:none;
    color: rgba(231,236,255,.88);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 900;
    font-size: 11px;
    line-height: 1;
    user-select:none;
    position:relative;
  }

  .mobileBottomNav a .ico{
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display:grid;
    place-items:center;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.16);
    position:relative;
  }

  .mobileBottomNav a .ico img{
    width:18px;
    height:18px;
    display:block;
    object-fit:contain;
  }

  .mobileBottomNav a.active{
    background: rgba(58,160,255,.16);
    border-color: rgba(58,160,255,.20);
    color:#fff;
  }

  .mobileBottomNav a.active .ico{
    background: rgba(58,160,255,.22);
    border-color: rgba(58,160,255,.30);
  }
}
