/* KidMate expanded sidebar — labels always visible (no hover required) */
body.dashboard .sidebar,
body.dashboard .sidebar.sidebar-expanded,
.sidebar,
.sidebar.sidebar-expanded,
#main-wrapper .sidebar {
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: #121569 !important;
  background-color: #121569 !important;
  background-image: none !important;
}

body.dashboard .sidebar .menu,
.sidebar .menu,
.sidebar.sidebar-expanded .menu {
  background: #121569 !important;
  background-color: #121569 !important;
}

body.dashboard .sidebar .brand-logo,
.sidebar .brand-logo {
  text-align: left !important;
  margin: 18px 20px !important;
}

body.dashboard .sidebar .menu,
.sidebar .menu {
  margin-top: 8px !important;
  padding: 10px 16px 24px !important;
}

body.dashboard .sidebar .menu ul li a,
.sidebar .menu ul li a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Always show label text — override theme display:none and hover-only tooltip */
body.dashboard .sidebar .menu ul li a .nav-text,
body.dashboard .sidebar .menu ul li:hover a .nav-text,
body.dashboard .sidebar .menu ul li:focus a .nav-text,
body.dashboard .sidebar .menu ul li:active a .nav-text,
.sidebar .menu ul li a .nav-text,
.sidebar .menu ul li:hover a .nav-text,
.sidebar .menu ul li:focus a .nav-text,
.sidebar .menu ul li:active a .nav-text {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  background: transparent !important;
  color: #ffffff !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

body.dashboard .sidebar .menu ul li i,
.sidebar .menu ul li i {
  margin-right: 4px !important;
  opacity: 1 !important;
  color: #fff !important;
  min-width: 22px !important;
  font-size: 18px !important;
}

body.dashboard .sidebar .menu ul li:hover > a,
.sidebar .menu ul li:hover > a {
  background: rgba(255, 255, 255, 0.14) !important;
}

body.dashboard .sidebar .menu ul li.logout,
.sidebar .menu ul li.logout {
  position: sticky !important;
  bottom: 12px !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  margin-top: 20px !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

body.dashboard .sidebar .menu ul li.logout a,
.sidebar .menu ul li.logout a {
  padding-left: 14px !important;
}

body.dashboard .content-body,
.dashboard .content-body {
  margin-left: 300px !important;
}

@media only screen and (max-width: 991px) {
  body.dashboard .sidebar .menu ul li a .nav-text,
  .sidebar .menu ul li a .nav-text,
  body.dashboard .sidebar .menu ul li:hover a .nav-text,
  .sidebar .menu ul li:hover a .nav-text {
    display: inline !important;
  }

  body.dashboard .sidebar .menu ul li a,
  .sidebar .menu ul li a {
    justify-content: flex-start !important;
  }
}

@media only screen and (max-width: 767px) {
  body.dashboard .sidebar,
  .sidebar,
  body.dashboard .sidebar .menu,
  .sidebar .menu {
    background: #121569 !important;
    background-color: #121569 !important;
  }

  body.dashboard .sidebar,
  .sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    position: relative !important;
    height: auto !important;
  }

  body.dashboard .content-body,
  .dashboard .content-body {
    margin-left: 0 !important;
  }
}

/* Top bar with Signout on the right */
.kidmate-topbar {
  position: fixed;
  top: 0;
  left: 300px;
  right: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e8ecf4;
  box-shadow: 0 2px 10px rgba(18, 21, 105, 0.04);
}
.kidmate-topbar__left {
  min-width: 0;
}
.kidmate-topbar__school {
  font-weight: 600;
  color: #121569;
  font-size: 15px;
}
.kidmate-topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  position: relative;
  z-index: 25;
}
.kidmate-topbar__user {
  text-align: right;
  line-height: 1.2;
}
.kidmate-topbar__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.kidmate-topbar__email {
  display: block;
  font-size: 12px;
  color: #6b7280;
}
.kidmate-topbar__signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fee2e2;
  color: #b91c1c !important;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  white-space: nowrap;
}
.kidmate-topbar__signout:hover {
  background: #fecaca;
  color: #991b1b !important;
}

/* Language flag switcher */
.kidmate-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  position: relative;
  z-index: 30;
  pointer-events: auto;
}
.kidmate-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none !important;
  color: #4b5563 !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: background .15s ease, color .15s ease;
  position: relative;
  z-index: 31;
  pointer-events: auto;
  cursor: pointer;
}
.kidmate-lang__btn:hover {
  background: #e5e7eb;
  color: #111827 !important;
}
.kidmate-lang__btn.is-active {
  background: #121569;
  color: #fff !important;
}
.kidmate-lang__flag {
  font-size: 14px;
  line-height: 1;
}
.kidmate-lang.dark {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}
.kidmate-lang.dark .kidmate-lang__btn {
  color: rgba(255,255,255,0.85) !important;
}
.kidmate-lang.dark .kidmate-lang__btn:hover {
  background: rgba(255,255,255,0.18);
  color: #fff !important;
}
.kidmate-lang.dark .kidmate-lang__btn.is-active {
  background: #fff;
  color: #121569 !important;
}
.kidmate-lang.compact .kidmate-lang__code {
  display: none;
}
.cs_header_btns .kidmate-lang {
  margin-right: 10px;
  vertical-align: middle;
}

/* Home header: language switcher beside logo */
.cs_header_brand_lang {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 5;
}
.cs_header_brand_lang h3 {
  margin: 0;
  white-space: nowrap;
}
.cs_header_brand_lang .kidmate-lang {
  margin-right: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}

/* Centered nav spans full header width and was blocking logo/lang clicks */
@media screen and (min-width: 1200px) {
  .cs_site_header.cs_style_1 .cs_main_header_center {
    pointer-events: none;
  }
  .cs_site_header.cs_style_1 .cs_main_header_center .cs_nav,
  .cs_site_header.cs_style_1 .cs_main_header_center .cs_nav a,
  .cs_site_header.cs_style_1 .cs_main_header_center .cs_menu_toggle {
    pointer-events: auto;
  }
  .cs_site_header.cs_style_1 .cs_main_header_left,
  .cs_site_header.cs_style_1 .cs_main_header_right {
    position: relative;
    z-index: 5;
  }
}
.login-lang-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
}
.btn-icon-delete {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  font-size: 1.15rem;
  line-height: 1;
}
.btn-icon-delete i {
  font-size: 1.15rem;
}

body.dashboard .content-body {
  padding-top: 72px !important;
}
body.dashboard .header,
.dashboard .header .search {
  display: none !important;
}
@media only screen and (max-width: 767px) {
  .kidmate-topbar {
    left: 0;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .kidmate-topbar__right {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 100%;
  }
  .kidmate-topbar__email {
    display: none;
  }
  .kidmate-topbar__school {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
}
