/* Admin sidebar — premium dark navigation */

body.page-admin .admin-app .side_menu {
  background-color: #0b1220 !important;
  background-image:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(232, 201, 106, 0.1) 0%, transparent 52%),
    radial-gradient(ellipse 90% 60% at 100% 100%, rgba(59, 130, 246, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #101a2e 48%, #0a101c 100%) !important;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}

body.page-admin #header .top.side-brand {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
  height: auto;
  min-height: 5.25rem;
  padding: 0.85rem 0.75rem 0.8rem;
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%) !important;
  border-bottom: 1px solid rgba(232, 201, 106, 0.2);
  backdrop-filter: blur(10px);
}

[data-admin-theme="dark"] #header .top.side-brand,
[data-admin-theme="green"] #header .top.side-brand,
[data-admin-theme="pink"] #header .top.side-brand,
[data-admin-theme="light"] #header .top.side-brand {
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%) !important;
}

.side-brand__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.side-brand__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.side-brand__img {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.side-brand__img--kl {
  height: 2.5rem;
  width: auto;
  max-width: 9.5rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.side-brand__img--nexa {
  height: 2.25rem;
  width: auto;
  min-width: 4rem;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
}

.side-brand__sep {
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(100, 116, 139, 0.75);
  line-height: 1;
  flex-shrink: 0;
}

.side-brand__role {
  margin: 0;
  padding-left: 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25rem;
  color: #e8c96a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-brand__collapse {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.65);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.side-brand__collapse:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(232, 201, 106, 0.35);
}

.side-brand__collapse-icon {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-left: 2px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
  transform: rotate(45deg) translateX(1px);
  transition: transform 0.2s ease;
}

body.page-admin.admin-sidebar-collapsed .side-brand__collapse-icon {
  transform: rotate(-135deg) translateX(1px);
}

.side_menu {
  display: flex;
  flex-direction: column;
}

.side_menu .inner {
  flex-shrink: 0;
}

.side_menu .top_info.side-user {
  display: block;
  height: auto !important;
  min-height: 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(2, 6, 23, 0.2) 100%) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.side-user__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.7rem 0.75rem 0.45rem;
}

.side-user__close {
  display: none;
  height: 2rem;
  padding: 0 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.side-user__logout {
  height: 2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0 !important;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 2rem;
  text-indent: 0 !important;
  width: auto !important;
  background-image: none !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.side-user__logout:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(232, 201, 106, 0.35);
  color: #fff !important;
}

.side-user__profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 0.8rem 0.65rem;
}

.side-user__avatar {
  flex-shrink: 0;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(232, 201, 106, 0.25), rgba(59, 130, 246, 0.2)),
    rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
}

.side-user__avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.2rem;
  height: 1.2rem;
  background: url(../img/icon_name.svg) no-repeat center center / contain;
  opacity: 0.85;
}

.side-user__meta {
  flex: 1;
  min-width: 0;
}

.side-user__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user__point {
  margin: 0.12rem 0 0;
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}

.side-user__point-value {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2rem;
  color: #e8c96a;
  letter-spacing: -0.02em;
}

.side-user__point-unit {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.9);
}

.side-user__tickets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.32rem;
  padding: 0 0.75rem 0.75rem;
}

.side-ticket {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  padding: 0.38rem 0.42rem;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.side-ticket__label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1rem;
  color: rgba(148, 163, 184, 0.88);
  letter-spacing: 0.03em;
}

.side-ticket__value {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.1rem;
  color: #f8fafc;
}

.side-ticket--weekly .side-ticket__value { color: #fde68a; }
.side-ticket--free .side-ticket__value { color: #7dd3fc; }
.side-ticket--monthly .side-ticket__value { color: #bbf7d0; }
.side-ticket--invite .side-ticket__value { color: #fca5a5; }
.side-ticket--klpt .side-ticket__value { color: #fdba74; }

/* Navigation */
.side_menu .menu.side-nav {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.65rem 0.6rem 1rem !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.side_menu .menu.side-nav::-webkit-scrollbar {
  width: 4px;
}

.side_menu .menu.side-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
}

.side-nav__toolbar {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  padding: 0 0.15rem;
}

.side-nav__toolbar-btn {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.55);
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.side-nav__toolbar-btn:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(232, 201, 106, 0.35);
  color: #fff;
}

.side-nav__toolbar-btn:active {
  background: rgba(51, 65, 85, 0.85);
}

.side-nav .menu_box {
  margin-bottom: 0.85rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  overflow: visible;
  box-shadow: none;
}

.side-nav .menu_box .side-nav__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.25rem;
  padding: 0.62rem 0.6rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.side-nav .menu_box .side-nav__heading:hover {
  background: rgba(30, 41, 59, 0.45);
}

.side-nav .menu_box .side-nav__heading-text {
  font-size: 0.98rem;
  line-height: 1.4rem;
  font-weight: 600;
  letter-spacing: normal;
  color: rgba(226, 232, 240, 0.88);
}

.side-nav .menu_box.active .side-nav__heading-text {
  color: rgba(232, 201, 106, 0.95);
}

.side-nav .menu_box .side-nav__chevron {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid rgba(148, 163, 184, 0.6);
  border-bottom: 2px solid rgba(148, 163, 184, 0.6);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.15s ease;
}

.side-nav .menu_box.active .side-nav__chevron {
  transform: rotate(-135deg) translateY(1px);
  border-color: rgba(232, 201, 106, 0.75);
}

.side-nav .menu_box ul {
  display: none;
  padding: 0 0 0.35rem;
  margin: 0;
  list-style: none;
}

.side-nav .menu_box.active ul {
  display: block;
}

.side-nav .menu_box ul li {
  margin: 0.1rem 0;
}

.side-nav .menu_box .depth2 {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.62rem 0.75rem 0.62rem 0.95rem !important;
  border-radius: 11px;
  font-size: 0.98rem !important;
  line-height: 1.4rem !important;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.88) !important;
  text-align: left;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.side-nav .menu_box .depth2::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8c96a, #f59e0b);
  transform: translateY(-50%);
  transition: height 0.15s ease;
}

.side-nav .menu_box .depth2:hover {
  background: rgba(30, 41, 59, 0.72);
  color: #fff !important;
  border-color: rgba(148, 163, 184, 0.14);
  transform: translateX(2px);
}

.side-nav .menu_box .depth2:hover::before {
  height: 55%;
}

.side-nav .menu_box .depth2:active {
  transform: translateX(0);
  background: rgba(51, 65, 85, 0.75);
}

.side-nav .menu_box .depth2.is-active {
  background: rgba(30, 41, 59, 0.92) !important;
  color: #fff !important;
  border-color: rgba(232, 201, 106, 0.35) !important;
  box-shadow: inset 0 0 0 1px rgba(232, 201, 106, 0.12);
}

.side-nav .menu_box .depth2.is-active::before {
  height: 70%;
  background: linear-gradient(180deg, #f59e0b, #e8c96a);
}

@media screen and (max-width: 768px) {
  body.page-admin #header .top.side-brand {
    display: none !important;
  }

  .side-user__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .side-user__toolbar {
    justify-content: space-between;
  }

  .side_menu .menu.side-nav {
    max-height: calc(100dvh - 15rem);
  }
}

@media screen and (max-width: 360px) {
  .side-user__tickets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
