/* ── LAYOUT ──────────────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Nav lateral */
.admin-nav {
  width: 56px;
  background: var(--nav-bg) !important;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
}
.nav-logo {
  width: 32px;
  height: 32px;
  background: var(--purple);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.nav-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: all 0.15s;
  border: none;
  background: none;
  position: relative;
}
.nav-item:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.07); }
.nav-item.active { color: white; background: rgba(255,255,255,0.1); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--purple);
  border-radius: 0 2px 2px 0;
}
.nav-spacer { flex: 1; }

/* Lista */
.admin-list {
  width: 300px;
  border-right: 1px solid var(--border);
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}
.list-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.list-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
  flex: 1;
}
.list-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.list-search input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
}
.list-search input:focus { border-color: var(--purple); outline: none; }
.session-list { overflow-y: auto; flex: 1; }
.session-list::-webkit-scrollbar { width: 3px; }
.session-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.list-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Thread */
.admin-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
  min-width: 0;
}
.thread-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.thread-empty-icon { font-size: 48px; opacity: 0.3; }
#threadContent { display: flex; flex-direction: column; flex: 1; overflow: hidden; }

/* Sidebar */
.admin-sidebar {
  width: 300px;
  border-left: 1px solid var(--border);
  background: var(--white);
  overflow-y: auto;
  flex-shrink: 0;
}

/* Empty state */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: white;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.2s;
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
}
.admin-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Bottom tabs (mobile only) */
.admin-bottom-tabs { display: none; }

/* Responsive */
@media (max-width: 1199px) {
  .admin-sidebar {
    display: none;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  }
  .admin-sidebar.open { display: block; }
}

@media (max-width: 767px) {
  .admin-nav { display: none; }
  .admin-list { width: 100%; }
  .admin-thread {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--white);
    transform: translateX(100%);
    transition: transform 250ms ease-out;
    padding-bottom: 56px;
  }
  .admin-thread.active { transform: translateX(0); }
  .admin-sidebar { width: min(85vw, 300px); }
  .admin-bottom-tabs {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--white);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 200;
  }
  .bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    transition: color 0.1s;
  }
  .bottom-tab.active { color: var(--purple); }
  .session-list { padding-bottom: 0; }
}
