/* ── sidebar.css — Akino Systems v1.1.66 ── */

#app { display: none; min-height: 100vh; }

:root {
  --sw: 70px;
  /* Tokens do sidebar — sempre escuro independente do tema */
  --sb-bg:           #050505;
  --sb-border:       rgba(255,255,255,0.07);
  --sb-item-hover:   rgba(255,255,255,0.07);
  --sb-item-active:  rgba(255,255,255,0.11);
  --sb-icon:         rgba(255,255,255,0.42);
  --sb-icon-hover:   rgba(255,255,255,0.75);
  --sb-icon-active:  rgba(255,255,255,1);
  --sb-label:        rgba(255,255,255,0.35);
  --sb-label-hover:  rgba(255,255,255,0.65);
  --sb-label-active: rgba(255,255,255,0.92);
  --sb-indicator:    rgba(255,255,255,0.85);
}

/* ─── SIDEBAR CONTAINER ─── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sw);
  height: 100vh;
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  z-index: 110;
  overflow: visible;
  align-items: center;
}

/* ─── WORKSPACE SWITCHER ─── */
.ws-switcher {
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--sb-border);
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
}
.ws-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  padding: 0; border: none; background: none;
  cursor: pointer; border-radius: 9px;
  transition: background .12s;
}
.ws-btn:hover { background: var(--sb-item-hover); }

.ws-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; font-weight: 700;
}
.ws-info, .ws-label, .ws-name, .ws-caret { display: none; }

/* ─── WORKSPACE DROPDOWN (usa tema do app) ─── */
.ws-dropdown {
  position: fixed;
  top: 10px;
  left: calc(var(--sw) + 6px);
  width: 220px;
  background: var(--s1);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  z-index: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  display: none; overflow: hidden;
  animation: fadeUp .18s cubic-bezier(.16,1,.3,1) both;
}
body.dark .ws-dropdown { box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.ws-dropdown.open { display: block; }
.ws-dd-hd {
  padding: 10px 12px 6px;
  font-size: 10px; font-weight: 600;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted);
}
.ws-dd-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; cursor: pointer;
  transition: background .12s;
}
.ws-dd-item:hover,
.ws-dd-item.active { background: var(--s2); }
.ws-dd-mark {
  width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
.ws-dd-info { flex: 1; min-width: 0; }
.ws-dd-name {
  font-size: 12.5px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-dd-role   { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.ws-dd-check  { color: var(--text); flex-shrink: 0; }
.ws-dd-sep    { height: 1px; background: var(--border); margin: 3px 0; }
.ws-dd-action {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; cursor: pointer;
  font-size: 12.5px; color: var(--muted);
  transition: background .12s;
}
.ws-dd-action:hover { background: var(--s2); color: var(--text); }
.ws-dd-action svg { flex-shrink: 0; }

/* ─── NAV ─── */
.sb-nav {
  flex: 1;
  padding: 6px 0;
  overflow-y: auto; overflow-x: visible;
  scrollbar-width: none;
  width: 100%;
  display: flex; flex-direction: column;
  align-items: center; gap: 1px;
}
.sb-nav::-webkit-scrollbar { display: none; }

.sb-group-body {
  display: flex; flex-direction: column;
  align-items: center; gap: 1px;
  width: 100%;
}
.sb-group-sep {
  width: 24px; height: 1px;
  background: var(--sb-border);
  margin: 4px 0; flex-shrink: 0;
}

/* ─── NAV ITEM ─── */
.sb-item {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  width: 54px;
  padding: 8px 4px 7px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .13s;
  user-select: none;
  margin: 0 auto;
  flex-shrink: 0;
}
.sb-item:hover  { background: var(--sb-item-hover); }
.sb-item.active { background: var(--sb-item-active); }

/* Indicador ativo — barra esquerda */
.sb-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 28%; bottom: 28%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--sb-indicator);
}

/* Ícones */
.sb-item svg {
  flex-shrink: 0;
  color: var(--sb-icon);
  transition: color .13s;
}
.sb-item:hover svg  { color: var(--sb-icon-hover); }
.sb-item.active svg { color: var(--sb-icon-active); }

/* Label */
.sb-item-label {
  display: block;
  font-size: 9.5px; font-weight: 500;
  color: var(--sb-label);
  text-align: center; line-height: 1.1;
  letter-spacing: .1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 56px;
  transition: color .13s;
}
.sb-item:hover .sb-item-label  { color: var(--sb-label-hover); }
.sb-item.active .sb-item-label { color: var(--sb-label-active); font-weight: 600; }

/* Badge numérico */
.sb-item-badge {
  position: absolute;
  top: 5px; right: 5px;
  font-size: 9px; font-weight: 700;
  min-width: 14px; height: 14px;
  border-radius: 7px;
  background: #fff; color: #0C0C0C;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--sb-bg);
}

/* ─── TOOLTIP (user/logout) ─── */
.sb-tooltip {
  pointer-events: none;
  position: absolute;
  left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%) translateX(-5px);
  background: #1C1C1C;
  color: rgba(255,255,255,.9);
  font-size: 12px; font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .14s, transform .14s;
  z-index: 999;
}
.sb-user--mini:hover .sb-tooltip,
.sb-logout-mini:hover .sb-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.sb-item:hover .sb-tooltip { opacity: 0; }

/* ─── USER FOOTER ─── */
.sb-bottom {
  display: flex; flex-direction: column;
  align-items: center;
  padding: 6px 0 10px;
  border-top: 1px solid var(--sb-border);
  gap: 2px; width: 100%;
  flex-shrink: 0;
}
.sb-user--mini {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 9px; cursor: pointer;
  transition: background .12s;
  margin: 0 auto 2px; flex-shrink: 0;
}
.sb-user--mini:hover { background: var(--sb-item-hover); }

.sb-logout-mini {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 9px; cursor: pointer;
  margin: 0 auto 10px; flex-shrink: 0;
  color: rgba(255,255,255,.3);
  transition: background .12s, color .12s;
}
.sb-logout-mini:hover { background: rgba(224,85,85,.15); color: #E05555; }
.sb-logout-mini svg { transition: opacity .12s; }

/* Avatar */
.sb-av {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  overflow: hidden;
}
.sb-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }

/* ─── ITEM MASTER (Akino) ─── */
.sb-item--master {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  width: 54px; padding: 8px 4px 7px;
  border-radius: 10px; cursor: pointer;
  transition: background .13s;
  margin: 0 auto; flex-shrink: 0;
}
.sb-item--master:hover  { background: var(--sb-item-hover); }
.sb-item--master.active { background: var(--sb-item-active); }
.sb-item--master.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 28%; bottom: 28%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--sb-indicator);
}
.sb-master-icon {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity .12s;
}
.sb-item--master:hover .sb-master-icon { opacity: .75; }
.sb-item--master .sb-item-label { color: var(--sb-label); }
.sb-item--master.active .sb-item-label { color: var(--sb-label-active); font-weight: 600; }

/* Legacy compat */
.sb-uname,.sb-urole,.sb-uinfo,.sb-out-btn { display: none; }
.sb-group,.sb-group-hd,.sb-menu-label,.sb-sep { display: none; }
.sb-brand { display: none; }
