/* ── topbar.css — Akino Systems ── */
/* ── MEMBERS WIDGET (topbar) ── */
.tp-members {
  display: flex; align-items: center; gap: 0; position: relative;
}
.tp-member-stack {
  display: none; /* stack de avatares removido da topbar */
}
.tp-member-av {
  width: 26px; height: 26px; border-radius: 6px;
  border: 2px solid var(--topbar-bg, #fff);
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700; color: #fff;
  margin-left: -7px; cursor: pointer;
  transition: transform .12s; flex-shrink: 0;
  overflow: hidden;
}
.tp-member-av:first-child { margin-left: 0; }
.tp-member-av:hover { transform: translateY(-2px); z-index: 2; }
.tp-member-more {
  width: 26px; height: 26px; border-radius: 6px;
  border: 2px solid var(--topbar-bg, #fff); background: var(--s3);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--muted);
  margin-left: -7px; cursor: pointer;
}
/* .tp-members-btn substituído por .tp-btn-outline no HTML — mantido para compatibilidade */
.tp-members-btn {
  margin-left: 6px;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 11px; height: 32px; border-radius: 7px;
  border: 1px solid #E5E7EB; background: #fff; cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: #374151;
  transition: all .15s; font-family: 'Geist', sans-serif;
}
.tp-members-btn:hover { border-color: #D1D5DB; background: #F9FAFB; }
.tp-members-btn svg { flex-shrink: 0; color: #6B7280; }
body.dark .tp-members-btn { background: var(--s2); border-color: var(--border); color: var(--text); }
body.dark .tp-members-btn:hover { border-color: var(--border2); background: var(--s3); }
body.dark .tp-members-btn svg { color: var(--muted); }

/* Members dropdown */
.members-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--s1); border: 1px solid var(--border2);
  border-radius: var(--radius); width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
  z-index: 500; display: none; overflow: hidden;
  animation: fadeUp .2s cubic-bezier(.16,1,.3,1) both;
}
body.dark .members-dropdown { box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.members-dropdown.open { display: block; }
.md-hd {
  padding: 14px 14px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.md-title { font-size: 13px; font-weight: 600; color: var(--text); }
.md-count {
  font-size: 11px; color: var(--muted); background: var(--s3);
  padding: 2px 7px; border-radius: 10px; border: 1px solid var(--border);
}
.md-list { padding: 8px 0; max-height: 220px; overflow-y: auto; }
.md-member {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px;
}
.md-av {
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  overflow: hidden;
}
.md-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.md-info { flex: 1; min-width: 0; }
.md-name { font-size: 12.5px; font-weight: 500; color: var(--text); }
.md-role-badge {
  font-size: 10px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 4px; margin-top: 1px;
}
.md-status {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.md-status.online { background: #22c55e; }
.md-status.away { background: #f59e0b; }
.md-status.offline { background: var(--dim); }
.md-footer {
  border-top: 1px solid var(--border); padding: 8px;
}
.md-invite-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 8px; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--bg); border: none;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  font-family: 'Geist', sans-serif; transition: opacity .15s;
}
.md-invite-btn:hover { opacity: .85; }

/* ── INVITE MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 900; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
  backdrop-filter: blur(2px);
}
body.dark .modal-overlay { background: rgba(0,0,0,.6); }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--s1); border: 1px solid var(--border2);
  border-radius: calc(var(--radius) + 2px); width: 480px; max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  transform: translateY(10px) scale(.98);
  transition: transform .22s cubic-bezier(.16,1,.3,1);
  max-height: 90vh; overflow-y: auto;
}
body.dark .modal { box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal-overlay.open .modal { transform: none; }
.modal-hd {
  padding: 20px 20px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -.3px; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-close {
  width: 28px; height: 28px; border-radius: 6px;
  background: none; border: none; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s; flex-shrink: 0;
}
.modal-close:hover { background: var(--s2); color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 0 20px 20px;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}

/* Invite tabs */
.invite-tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--s2); border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.invite-tab {
  flex: 1; padding: 6px 8px; border-radius: 5px;
  border: none; background: none; cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--muted);
  font-family: 'Geist', sans-serif; transition: all .15s; text-align: center;
}
.invite-tab.active {
  background: var(--s1); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.invite-panel { display: none; }
.invite-panel.active { display: block; }

/* Link / code boxes */
.copy-box {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--s2); border: 1px solid var(--border);
  margin-bottom: 12px;
}
.copy-box-val {
  flex: 1; font-size: 12px; color: var(--text); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: 'Geist Mono', monospace;
}
.copy-btn {
  background: none; border: 1px solid var(--border); padding: 4px 10px;
  border-radius: 5px; font-size: 11.5px; font-weight: 500; cursor: pointer;
  color: var(--muted); font-family: 'Geist', sans-serif; transition: all .12s;
  white-space: nowrap; flex-shrink: 0;
}
.copy-btn:hover { border-color: var(--text); color: var(--text); background: var(--s1); }
.copy-btn.copied { color: #22c55e; border-color: #22c55e; }
.invite-note {
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
  padding: 10px 12px; background: var(--s2); border-radius: var(--radius-sm);
}
.invite-note strong { color: var(--text); }

/* Pending invites */
.pending-invite {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--s2); margin-bottom: 6px;
}
.pi-email { flex: 1; font-size: 12.5px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pi-status {
  font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500;
  background: var(--s3); color: var(--muted);
}
.pi-status.sent { color: #f59e0b; }
.pi-status.accepted { color: #22c55e; }

/* Workspace management modal */
.ws-modal-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ws-modal-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer; transition: all .12s;
}
.ws-modal-item:hover { border-color: var(--border2); background: var(--s2); }
.ws-modal-item.active { border-color: var(--ink); background: var(--s2); }
.ws-modal-mark {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--bg);
}
.ws-modal-info { flex: 1; min-width: 0; }
.ws-modal-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.ws-modal-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ws-modal-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 500;
  background: var(--s3); color: var(--muted); border: 1px solid var(--border);
}
.ws-modal-badge.admin { background: rgba(99,102,241,.1); color: #6366f1; border-color: rgba(99,102,241,.2); }
.ws-invited {
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px dashed var(--border2); margin-bottom: 8px;
}
.ws-invited-hd { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ws-invited-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
}
.ws-invited-mark {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--bg);
}
.ws-invited-info { flex: 1; min-width: 0; }
.ws-invited-name { font-size: 12.5px; font-weight: 500; color: var(--text); }
.ws-invited-from { font-size: 11px; color: var(--muted); }
.ws-accept-btn {
  padding: 5px 12px; border-radius: 5px; border: none;
  background: var(--ink); color: var(--bg); font-size: 11.5px; font-weight: 500;
  cursor: pointer; font-family: 'Geist', sans-serif; transition: opacity .15s;
  white-space: nowrap;
}
.ws-accept-btn:hover { opacity: .85; }
.ws-decline-btn {
  padding: 5px 10px; border-radius: 5px; border: 1px solid var(--border);
  background: none; color: var(--muted); font-size: 11.5px; font-weight: 500;
  cursor: pointer; font-family: 'Geist', sans-serif; transition: all .15s;
  white-space: nowrap;
}
.ws-decline-btn:hover { border-color: var(--red); color: var(--red); }

