/* =========================================================
   KLUB GOLF BOGOR RAYA — SIDEBAR & ADMIN LAYOUT
   Visual cleanup only.
   Existing class names, dropdowns and responsive behavior retained.
   ========================================================= */

:root {
  --sb-bg: #ffffff;
  --sb-text: #64748b;
  --sb-text-active: #00756c;
  --sb-bg-hover: #f8fafc;
  --sb-bg-active: #eaf5f3;
  --sb-border: #e2e8f0;
  --sb-width: 270px;
  --admin-navbar-height: 72px;
}

/* Layout */
.cs-layout-wrapper {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f5f7fb;
}

/* Sidebar */
.cs-sidebar {
  flex: 0 0 var(--sb-width);
  width: var(--sb-width);
  min-width: var(--sb-width);
  min-height: 100vh;
  background-color: var(--sb-bg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sb-border);
  transition: left 0.25s ease, box-shadow 0.25s ease;
  z-index: 1000;
}

/* Brand — keep this compact so OVERVIEW sits closer to the logo */
.cs-sidebar__brand {
  min-height: 72px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #0f766e;
  font-weight: 700;
  font-size: 1.02rem;
  border-bottom: 1px solid var(--sb-border);
  background: #fff;
}

.cs-sidebar__brand-icon {
  width: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #00756c;
}

/* Sidebar navigation */
.cs-sidebar__nav {
  padding: 12px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

/* Section headings such as OVERVIEW / SYSTEM / WEBSITE CONTENT.
   These rules work with existing markup and do not require new HTML. */
.cs-sidebar .sidebar-section-title,
.cs-sidebar .menu-section-title,
.cs-sidebar .nav-section-title {
  margin: 13px 10px 5px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.cs-sidebar__link,
.cs-sidebar__dropdown-btn {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  gap: 12px;
  padding: 10px 13px;
  color: var(--sb-text);
  background: transparent;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

.cs-sidebar__link:hover,
.cs-sidebar__dropdown-btn:hover {
  background-color: var(--sb-bg-hover);
  color: var(--sb-text-active);
}

.cs-sidebar__link--active {
  background-color: var(--sb-bg-active);
  color: var(--sb-text-active);
  font-weight: 700;
}

.cs-sidebar__link--active:hover {
  background-color: var(--sb-bg-active);
  color: var(--sb-text-active);
}

.cs-sidebar__link--logout:hover {
  background-color: #fef2f2;
  color: #dc2626;
}

/* Main icons */
.cs-sidebar__icon {
  width: 21px;
  min-width: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  color: #94a3a0;
}

.cs-sidebar__link:hover .cs-sidebar__icon,
.cs-sidebar__dropdown-btn:hover .cs-sidebar__icon,
.cs-sidebar__link--active .cs-sidebar__icon {
  color: currentColor;
}

/* Dropdown arrow */
.cs-sidebar__arrow-icon {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.25s ease;
}

.cs-sidebar__dropdown-wrapper.is-open .cs-sidebar__arrow-icon {
  transform: rotate(-180deg);
}

/* Submenu */
.cs-sidebar__submenu {
  max-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 31px;
  transition: max-height 0.25s ease-out, padding 0.25s ease;
}

.cs-sidebar__dropdown-wrapper.is-open .cs-sidebar__submenu {
  max-height: 300px;
  padding-top: 3px;
  padding-bottom: 4px;
}

/* Submenu links.
   Existing submenu links remain clickable and do not affect PHP/JS. */
.cs-sidebar__submenu-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 35px;
  gap: 8px;
  padding: 7px 10px;
  color: #64748b;
  background: transparent;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  border-radius: 8px;
  transition: background-color .18s ease, color .18s ease;
}

.cs-sidebar__submenu-link:hover {
  background-color: #f8fafc;
  color: #00756c;
}

.cs-sidebar__submenu-link--active,
.cs-sidebar__submenu-link.active {
  background-color: #f1f8f6;
  color: #00756c;
  font-weight: 650;
}

/* Footer */
.cs-sidebar__footer {
  padding: 12px;
  border-top: 1px solid var(--sb-border);
  background: #fff;
}

/* Main content */
.cs-main-content {
  flex: 1 1 auto;
  width: calc(100% - var(--sb-width));
  max-width: calc(100% - var(--sb-width));
  min-width: 0;
  padding: clamp(22px, 2.5vw, 34px);
  background-color: #f5f7fb;
  overflow-x: hidden;
}

/* Navbar */
.admin-navbar {
  min-height: var(--admin-navbar-height);
  width: 100%;
  padding-top: 6px;
  padding-bottom: 6px;
  background: #fff;
  border-bottom: 1px solid var(--sb-border);
}

.admin-navbar .container-fluid {
  min-height: 58px;
}

.admin-context-title {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  color: #26322e;
}

.admin-context-subtitle {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.2;
  color: #98a29e;
}

.admin-navbar .sidebar-toggle {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-navbar .notification-button,
.admin-navbar .profile-button {
  min-height: 42px;
}

.admin-navbar .notification-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.admin-navbar .notification-button .bi {
  font-size: 1.15rem;
}

.admin-navbar .profile-button {
  padding: 5px 10px 5px 6px;
  font-size: .92rem;
}

.admin-navbar .profile-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.admin-navbar .profile-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-notification-menu {
  width: min(390px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(70vh, 560px);
  overflow-y: auto;
}

/* Scrollbar */
#list-hole::-webkit-scrollbar {
  width: 5px;
}

#list-hole::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

#list-hole {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* Prevent common content elements from causing horizontal overflow */
.cs-main-content img,
.cs-main-content iframe,
.cs-main-content video {
  max-width: 100%;
}

.cs-main-content .table-responsive {
  max-width: 100%;
}

.cs-main-content .card,
.cs-main-content .modal-dialog {
  max-width: 100%;
}

.profile-menu-label {
  font-size: 11px;
  color: #9aa39f;
}

.profile-menu-name {
  font-size: 13px;
  font-weight: 700;
  color: #26322e;
}

/* Tablet */
@media (max-width: 991.98px) {
  :root {
    --sb-width: 260px;
    --admin-navbar-height: 68px;
  }

  .cs-sidebar {
    flex-basis: var(--sb-width);
    width: var(--sb-width);
    min-width: var(--sb-width);
  }

  .cs-main-content {
    width: calc(100% - var(--sb-width));
    max-width: calc(100% - var(--sb-width));
    padding: 24px;
  }

  .cs-sidebar__link,
  .cs-sidebar__dropdown-btn {
    min-height: 43px;
  }

  .admin-navbar .container-fluid {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Mobile — preserve existing off-canvas behavior */
@media (max-width: 767.98px) {
  :root {
    --sb-width: min(285px, 86vw);
    --admin-navbar-height: 64px;
  }

  .cs-layout-wrapper {
    display: block;
    min-height: 100vh;
  }

  .cs-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: calc(-1 * var(--sb-width));
    width: var(--sb-width);
    min-width: var(--sb-width);
    max-width: 86vw;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: none;
  }

  .cs-sidebar.show-sidebar {
    left: 0;
    box-shadow: 8px 0 28px rgba(15, 23, 42, .14);
  }

  .cs-sidebar__brand {
    min-height: 64px;
    padding: 12px 17px;
  }

  .cs-sidebar__nav {
    padding: 10px 10px 18px;
  }

  .cs-main-content {
    width: 100%;
    max-width: 100%;
    padding: 18px 14px 24px;
  }

  .admin-navbar {
    min-height: var(--admin-navbar-height);
  }

  .admin-navbar .container-fluid {
    min-height: 48px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .admin-context-title {
    font-size: 13px;
  }

  .admin-context-subtitle {
    font-size: 10px;
  }

  .admin-navbar .profile-button {
    padding-right: 5px;
  }

  .admin-navbar .profile-name {
    display: none !important;
  }

  .admin-navbar .profile-avatar {
    width: 36px;
    height: 36px;
  }

  .admin-navbar .notification-button,
  .admin-navbar .sidebar-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .navbar-actions {
    gap: 5px !important;
  }

  .admin-notification-menu {
    position: fixed !important;
    top: 58px !important;
    right: 12px !important;
    left: auto !important;
    width: min(390px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px);
  }
}

/* Small phones */
@media (max-width: 479.98px) {
  .admin-navbar .ms-2 {
    margin-left: 6px !important;
  }

  .admin-context-subtitle {
    display: none;
  }

  .cs-main-content {
    padding-left: 12px;
    padding-right: 12px;
  }
}