/* layout-sidebar.css — sidebar 256px, brand/header, nav, team switcher */

/* ───────── Sidebar (256px) ───────── */
.sidebar {
  width: 256px;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--divider);
  overflow-y: auto;
  overflow-x: hidden;
}

/* header: avatar / name / bell */
.sb-head {
  height: 52px;
  margin-top: auto;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.sb-user {
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 40px);
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 6px 0 4px;
  border-radius: 8px;
}
.sb-user:hover, .sb-user.is-open { background: var(--hover); }
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 26px;
  text-align: center;
  flex-shrink: 0;
}
.sb-user-name {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-user .chev { flex-shrink: 0; margin-left: 1px; }
.sb-head .icon-btn { margin-left: auto; }
.icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--hover); }

/* nav */
.sb-nav { padding: 4px 10px 8px 16px; flex-shrink: 0; }
.sb-label {
  padding: 10px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a3a3a3;
  line-height: 14px;
}
.nav-item {
  width: 100%;
  height: 32px;
  margin-bottom: 2px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  gap: 10px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
}
.nav-item:hover { background: var(--hover); }
.nav-item.is-active, .nav-item.is-active:hover { background: var(--selected); }
.nav-item .ico {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #333;
}
.nav-item .ico svg { width: 18px; height: 18px; display: block; }
.nav-item .ico svg [stroke] { stroke: currentColor; }
.nav-item .ico svg [fill]:not([fill="none"]) { fill: currentColor; }

.sb-divider { height: 1px; background: var(--divider); margin: 8px 16px 0; flex-shrink: 0; }

/* team switcher */
.sb-brand {
  height: 54px;
  padding: 0 16px 0 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sb-brand img { display: block; height: 37px; width: auto; mix-blend-mode: multiply; }
.sb-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 2px 0 6px;
  padding: 0;
}
.btn {
  width: 100%;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.btn-primary {
  background: var(--text);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
}
.btn-primary:hover {
  background: #2a2a2a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.btn-primary:active { background: #0f0f0f; box-shadow: none; }
#btnImport { display: none; }
.btn-ghost {
  background: transparent;
  color: #3a3a3a;
  border: 1px dashed #d0d0d0;
}
.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.025);
  border-color: #a8a8a8;
  color: #111;
  border-style: solid;
}
.btn .btn-ico { opacity: 0.9; width: 13px; height: 13px; }
.sb-team { padding: 12px 10px 0 16px; flex-shrink: 0; }
.team-row {
  width: fit-content;
  max-width: 100%;
  height: 32px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  padding: 0 6px 0 10px;
  gap: 8px;
  border-radius: 8px;
}
.team-row:hover, .team-row.is-open { background: var(--hover); }
.team-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}
.team-name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 148px;
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-row .chev { margin-left: 1px; flex-shrink: 0; }
