/* ═══════════════════════════════════════════════
   Verpa Hub — hub-admin.css  v2.0
   Auth UI + Admin gebruikersbeheer styles
   ═══════════════════════════════════════════════ */

/* ══════════════════════════════
   AUTH UI
══════════════════════════════ */
.login-btn {
  gap: 6px;
  padding: 0 12px;
  width: auto;
  font-size: 12.5px;
  font-weight: 600;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.user-chip:hover { border-color: var(--orange); background: var(--orange-light); }
.user-chip.hidden { display: none; }

.user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════
   LOADING SPINNER
══════════════════════════════ */
.sp-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Admin sectie in instellingenpaneel ── */
.admin-badge-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid #c7d2fe;
}

.admin-open-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 14px;
  margin-top: 4px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, color .15s, background .15s;
}
.admin-open-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

/* ══════════════════════════════
   ADMIN PANEEL
══════════════════════════════ */
.admin-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  z-index: 299;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.admin-panel.open { transform: translateX(0); }

/* ── Nieuwe gebruiker formulier ── */
.add-user-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.admin-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,80,10,.12);
  background: white;
}
.admin-input::placeholder { color: var(--text-muted); }

.admin-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.admin-add-btn:hover { background: #d04508; }
.admin-add-btn:active { transform: scale(.98); }

/* ── Zoeken ── */
.admin-search-wrap {
  position: relative;
}
.admin-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}
.admin-search-input:focus { border-color: var(--orange); background: white; }
.admin-search-input::placeholder { color: var(--text-muted); }

/* ── Gebruikersrij ── */
.admin-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.admin-user-row:last-child { border-bottom: none; }

.admin-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.admin-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-email {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-user-badge.has-hidden {
  background: #FFF1F2;
  color: #E11D48;
  border-color: #FECDD3;
}

.admin-edit-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color .15s, color .15s, background .15s;
}
.admin-edit-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-light);
}

.admin-empty {
  text-align: center;
  padding: 40px 20px;
}

/* ══════════════════════════════
   APP EDITOR (slide-in binnen admin)
══════════════════════════════ */
.admin-user-editor {
  position: absolute;
  inset: 0;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.admin-user-editor.open { transform: translateX(0); }

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.editor-user-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.editor-user-email-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.editor-actions {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.editor-action-btn {
  flex: 1;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.editor-action-btn:hover { border-color: var(--orange); color: var(--orange); }
.editor-action-btn.warn:hover { border-color: #E11D48; color: #E11D48; }

.editor-app-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}
.editor-app-list::-webkit-scrollbar { width: 4px; }
.editor-app-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.editor-app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.editor-app-row:last-child { border-bottom: none; }
.editor-app-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.editor-app-name { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.editor-app-cat  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ── Delete zone ── */
.editor-delete-zone {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.editor-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 1.5px solid #FECDD3;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #E11D48;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.editor-delete-btn:hover {
  background: #FFF1F2;
  border-color: #E11D48;
}

/* ══════════════════════════════
   UTILITY
══════════════════════════════ */
.hidden { display: none !important; }

@media (max-width: 640px) {
  .admin-panel { width: 100vw; }
  .user-name { max-width: 80px; }
}
