/* ====== Sidebar – absolutně NAD hero, úzký sloupec s ikonami ====== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-collapsed);
  height: 100vh;
  padding: 16px 8px 24px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  transition: width var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              padding var(--dur-base) var(--ease-out);
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.0) 100%);
  pointer-events: auto;
}

/* Open state */
.app.sidebar-open .sidebar {
  width: var(--sidebar-open);
  align-items: stretch;
  padding: 22px 16px 24px 16px;
  background: linear-gradient(180deg, #08101F 0%, #0A0F1F 100%);
  box-shadow: 30px 0 80px rgba(0,0,0,0.55);
  border-right: 1px solid var(--stroke-soft);
}

/* Profile chip */
.sidebar-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: var(--r-md);
  margin-bottom: 28px;
  cursor: pointer;
  width: 100%;
  transition: background var(--dur-base) var(--ease-out);
}
.app.sidebar-open .sidebar-profile { padding: 8px 10px; }

.sidebar-profile.is-focused {
  background: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-card);
}

.sidebar-profile .avatar {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6E5CFF, #3A7BFF);
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
  position: relative;
  flex: 0 0 auto;
  overflow: visible;
  /* face placeholder via background */
  background-image:
    radial-gradient(20px 22px at 50% 36%, rgba(255, 220, 200, 0.95) 0%, rgba(220, 180, 150, 0.5) 60%, transparent 70%),
    radial-gradient(28px 18px at 50% 80%, rgba(40, 60, 90, 0.9) 0%, rgba(30, 40, 70, 0.5) 60%, transparent 70%),
    linear-gradient(135deg, #2D3F66 0%, #1A2540 100%);
}
.sidebar-profile .avatar > span { display: none; }
.app.sidebar-open .sidebar-profile .avatar { width: 40px; height: 40px; font-size: 16px; }

.sidebar-profile .avatar::after {
  content: "";
  position: absolute;
  right: -5px; bottom: -5px;
  width: 18px; height: 18px;
  background: #1B2240;
  border: 2px solid #0A0F1F;
  border-radius: 50%;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 22%, var(--text-secondary) 25% 32%, transparent 35%),
    radial-gradient(circle at 50% 50%, transparent 0 14%, #1B2240 14% 16%, transparent 16%);
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.sidebar-profile .label {
  display: none;
  font-weight: 600; font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.2;
}
.sidebar-profile .label .sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
  color: var(--text-secondary);
}
.sidebar-profile.is-focused .label .sub { color: rgba(0,0,0,0.55); }

.app.sidebar-open .sidebar-profile .label { display: block; }

/* Menu items */
.sidebar-items {
  display: flex; flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 0;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  width: 100%;
  height: 48px;
}
.app.sidebar-open .sidebar-item {
  justify-content: flex-start;
  padding: 10px 14px;
}
.sidebar-item .icon {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  color: var(--text-secondary);
  transition: color var(--dur-base) var(--ease-out);
}
.sidebar-item .label {
  display: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
}
.app.sidebar-open .sidebar-item .label { display: block; }

/* Active = home: žluté podtržení pod ikonou */
.sidebar-item.is-active { color: var(--text-primary); }
.sidebar-item.is-active .icon { color: var(--text-primary); }
.sidebar-item.is-active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: var(--brand-yellow);
  border-radius: 2px;
  transition: all var(--dur-base) var(--ease-out);
}
.app.sidebar-open .sidebar-item.is-active::after {
  left: 50px;
  transform: none;
  width: 22px;
}

/* Focus */
.sidebar-item.is-focused {
  background: var(--text-primary);
  color: var(--text-inverse);
}
.sidebar-item.is-focused .icon { color: var(--text-inverse); }

.sidebar-spacer { flex: 1; }

/* Logo dole */
.sidebar-logo {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.app.sidebar-open .sidebar-logo { opacity: 0.95; }
.sidebar-logo img {
  max-height: 24px;
  width: auto;
}

/* Profile dropdown */
.profile-menu {
  position: absolute;
  top: 76px;
  left: 16px;
  right: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--stroke-soft);
  border-radius: var(--r-md);
  padding: 6px;
  display: none;
  z-index: 60;
  pointer-events: none;
}
.app.sidebar-profile-open .profile-menu { display: block; }
.profile-menu .pm-item {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
