html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden; /* OverlayScrollbars pusher üzerinde çalışacak */
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
}

body.caku-shell {
  background: #efeff5;
  color: #1f2937;
}

.pusher {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* OverlayScrollbars internal wrappers must also be flex containers to support sticky footer */
.os-viewport,
[data-overlayscrollbars-viewport],
.os-content,
[data-overlayscrollbars-contents] {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 100% !important;
}

.caku-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #d8e3ee;
  background: rgba(255, 255, 255, 0.92);
}

.caku-menu.ui.menu {
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0.35rem 0;
}

.caku-menu.ui.menu .header.item {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.caku-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.caku-user-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.caku-user-role-line {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #64748b;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rehber-search .results {
  height: auto;
  max-height: min(510px, 70vh);
  overflow-y: auto;
}

.caku-main {
  background: #efeff5;
  flex: 1;
  padding: 2.25rem 0 2.75rem;
}

.caku-footer {
  border-top: 1px solid #d8e3ee;
  background: #ffffff;
  padding: 1rem 0;
  color: #64748b;
}

.caku-footer a {
  color: #2563eb;
}

.caku-dashboard-welcome {
  max-width: 840px;
}

.caku-muted {
  color: #64748b;
  margin-top: 0.35rem;
}

.caku-role-wrap {
  margin-top: 1.2rem;
}

.caku-role-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.45rem;
}

.caku-role-label.ui.label {
  margin-bottom: 0.4rem;
}

.caku-auth-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}

.caku-auth-btn iconify-icon,
.caku-user-name iconify-icon {
  font-size: 1.08rem;
  line-height: 1;
}

@media only screen and (max-width: 767px) {
  .caku-user-meta {
    display: none;
  }
}

/* --- SIDEBAR CUSTOM STYLES --- */
.sidebar-user-box {
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px;
  margin: 5px 0 !important;
  padding: 10px !important;
  transition: background 0.2s;
}

.sidebar-user-box:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.sidebar-menu .item iconify-icon {
  font-size: 1.2rem;
  vertical-align: middle;
}

.caku-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 130px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}

.caku-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.caku-back-to-top img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
