/* ============================================================
   WIRTZ MARKETING · SIDEBAR COMPACT
   Professional / Premium / Minimal
   ============================================================ */

:root {
  --wm-sidebar-width: 224px;
  --wm-topbar-height: 56px;
  --wm-sidebar-speed: 220ms;
  --wm-sidebar-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ============================================================
   01. SIDEBAR BASE
   ============================================================ */

.wm-app .wm-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;

  display: flex;
  flex-direction: column;

  width: var(--wm-sidebar-width);
  height: 100dvh;

  background: var(--wm-surface);
  color: var(--wm-text);

  border-right: 1px solid var(--wm-border);

  overflow: hidden;
  box-shadow: none;

  transition:
    transform var(--wm-sidebar-speed) var(--wm-sidebar-ease),
    visibility var(--wm-sidebar-speed);
}

.wm-app .wm-main {
  margin-left: var(--wm-sidebar-width);
  min-width: 0;

  transition:
    margin-left var(--wm-sidebar-speed) var(--wm-sidebar-ease);
}

/* ============================================================
   02. BRAND
   ============================================================ */

.wm-sidebar .wm-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;

  height: 56px;
  min-height: 56px;

  padding: 0 15px;

  border-bottom: 1px solid var(--wm-border);
}

.wm-sidebar .wm-brand-symbol {
  display: grid;
  place-items: center;

  width: 25px;
  height: 28px;

  flex-shrink: 0;

  color: var(--wm-text);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.wm-sidebar .wm-brand-symbol svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.7;
}

.wm-sidebar .wm-brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.wm-sidebar .wm-brand-copy strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;
  line-height: 1.15;
}

.wm-sidebar .wm-brand-copy span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--wm-muted);
  line-height: 1.3;
}

.wm-sidebar .wm-sidebar-close {
  display: none !important;
}

/* ============================================================
   03. WORKSPACE STATUS
   ============================================================ */

.wm-sidebar .wm-sidebar-caption {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 15px 15px 17px;

  color: var(--wm-subtle);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
}

.wm-sidebar .wm-sidebar-caption .wm-status-dot {
  width: 6px;
  height: 6px;
  background: var(--wm-success);
  box-shadow: none;
  animation: none;
}

/* ============================================================
   04. NAVIGATION
   ============================================================ */

.wm-sidebar .wm-sidebar-nav {
  flex: 1;
  min-height: 0;

  padding: 0 9px 14px;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
  scrollbar-color: var(--wm-border-strong) transparent;
  overscroll-behavior: contain;
}

.wm-sidebar .wm-sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.wm-sidebar .wm-sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.wm-sidebar .wm-sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--wm-border-strong);
  border-radius: 4px;
}

/* ============================================================
   05. GROUPS
   ============================================================ */

.wm-sidebar .wm-nav-group {
  margin: 0 0 17px;
  padding: 0;
}

.wm-sidebar .wm-nav-group + .wm-nav-group {
  padding-top: 14px;
  border-top: 1px solid var(--wm-border);
}

.wm-sidebar .wm-nav-label {
  margin: 0 10px 8px;

  color: var(--wm-subtle);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.15px;
  line-height: 1.4;
}

/* ============================================================
   06. NAV ITEMS
   ============================================================ */

.wm-sidebar .wm-nav-link {
  position: relative;

  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;
  min-width: 0;
  min-height: 35px;

  margin: 0 0 2px;
  padding: 0 10px;

  background: transparent;
  color: var(--wm-muted);

  border: 1px solid transparent;
  border-radius: 7px;

  text-decoration: none;

  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;

  cursor: pointer;

  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    padding-left 150ms ease;
}

.wm-sidebar .wm-nav-link > svg {
  width: 15px;
  height: 15px;

  flex-shrink: 0;

  stroke-width: 1.8;
  color: currentColor;
}

.wm-sidebar .wm-nav-link > span:not(.wm-active-marker) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* HOVER */

.wm-sidebar .wm-nav-link:hover {
  background: var(--wm-surface-2);
  color: var(--wm-text);
  border-color: var(--wm-border);

  padding-left: 12px;
}

/* ACTIVE */

.wm-sidebar .wm-nav-link.is-active {
  background: var(--wm-surface-3);
  color: var(--wm-text);

  border-color: var(--wm-border-strong);

  font-weight: 800;
}

.wm-sidebar .wm-nav-link.is-active > svg {
  stroke-width: 2;
}

.wm-sidebar .wm-active-marker {
  position: absolute;
  inset: 9px auto 9px 0;

  width: 2px;
  height: auto;

  background: var(--wm-text);

  border-radius: 0 2px 2px 0;
}

/* FOCUS */

.wm-sidebar .wm-nav-link:focus-visible,
.wm-sidebar .wm-sidebar-profile:focus-visible {
  outline: 2px solid var(--wm-text);
  outline-offset: -2px;
}

/* ============================================================
   07. BOTTOM AREA
   ============================================================ */

.wm-sidebar .wm-sidebar-bottom {
  flex-shrink: 0;
  padding: 8px 9px 11px;
  background: var(--wm-surface);
}

.wm-sidebar .wm-sidebar-divider {
  margin: 0 3px 9px;
  border-top: 1px solid var(--wm-border);
}

.wm-sidebar .wm-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 9px;

  min-width: 0;
  min-height: 44px;

  padding: 6px 7px;

  border: 1px solid transparent;
  border-radius: 7px;

  color: var(--wm-text);
  background: transparent;
  text-decoration: none;

  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.wm-sidebar .wm-sidebar-profile:hover {
  background: var(--wm-surface-2);
  border-color: var(--wm-border);
}

.wm-sidebar .wm-profile-avatar {
  display: grid;
  place-items: center;

  width: 29px;
  height: 29px;

  flex-shrink: 0;

  border-radius: 7px;
  border: 1px solid var(--wm-border-strong);

  background: var(--wm-surface-3);
  color: var(--wm-text);

  font-size: 11px;
  font-weight: 800;
}

.wm-sidebar .wm-profile-copy {
  display: flex;
  flex: 1;
  flex-direction: column;

  min-width: 0;
  gap: 3px;
}

.wm-sidebar .wm-profile-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  font-size: 11px;
  font-weight: 800;
}

.wm-sidebar .wm-profile-copy span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  color: var(--wm-muted);
  font-size: 9px;
  font-weight: 600;
}

.wm-sidebar .wm-sidebar-profile > svg {
  width: 13px;
  height: 13px;
  color: var(--wm-muted);
}

/* ============================================================
   08. COLLAPSE / EXPAND
   ============================================================ */

.wm-app.sidebar-hidden .wm-sidebar {
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
}

.wm-app.sidebar-hidden .wm-main {
  margin-left: 0;
}

/* ============================================================
   09. RESPONSIVE TABLET AND MOBILE
   ============================================================ */

@media (max-width: 768px) {
  .wm-app .wm-sidebar {
    width: min(250px, 84vw);

    transform: translateX(-100%);
    visibility: hidden;

    z-index: 200;
  }

  .wm-app .wm-main,
  .wm-app.sidebar-hidden .wm-main {
    margin-left: 0;
    width: 100%;
  }

  .wm-app.mobile-sidebar-open .wm-sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .wm-app.mobile-sidebar-open .wm-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 190;

    display: block;
    background: rgba(0, 0, 0, .68);

    animation: wm-sidebar-fade 180ms ease both;
  }

  .wm-sidebar .wm-sidebar-header {
    height: 54px;
    min-height: 54px;
  }

  .wm-sidebar .wm-nav-link {
    min-height: 39px;
    font-size: 12px;
  }

  .wm-sidebar .wm-nav-link > svg {
    width: 16px;
    height: 16px;
  }
}

/* ============================================================
   10. ANIMATIONS
   ============================================================ */

@keyframes wm-sidebar-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .wm-app .wm-sidebar,
  .wm-app .wm-main,
  .wm-sidebar .wm-nav-link,
  .wm-sidebar .wm-sidebar-profile {
    transition: none !important;
  }

  .wm-app .wm-sidebar-backdrop {
    animation: none !important;
  }
}
