/* DANZFLO — Event User Management */

.evt-users-page {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(124, 58, 237, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(37, 99, 235, 0.05), transparent 50%),
    #f8fafc;
}

.evt-users-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.evt-users-badge {
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 1.125rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 9999px;
}

.evt-users-title {
  margin: 0.5rem 0 0;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.evt-users-subtitle {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
}

.evt-users-header-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.evt-users-header-stat__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.evt-users-header-stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

/* Panel */
.evt-users-panel {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.evt-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
}

.evt-users-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.evt-users-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.evt-users-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.625rem;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evt-users-filter-btn svg {
  width: 1rem;
  height: 1rem;
}

.evt-users-filter-btn:hover,
.evt-users-filter-btn.is-open {
  color: #7c3aed;
  border-color: #c4b5fd;
  background: rgba(124, 58, 237, 0.04);
}

.evt-users-search {
  display: flex;
  align-items: center;
  gap: 0;
  height: 2.625rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.evt-users-search:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  background: #fff;
}

.evt-users-search input {
  width: 12rem;
  max-width: 40vw;
  height: 100%;
  padding: 0 0.875rem;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: #0f172a;
}

.evt-users-search input::placeholder { color: #94a3b8; }

.evt-users-search-btn {
  height: 100%;
  padding: 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: #0f172a;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.evt-users-search-btn:hover { background: #1e293b; }

/* Filter panel */
.evt-users-filter-panel {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
}

.evt-users-filter-panel[hidden] { display: none; }

.evt-users-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.875rem;
}

.evt-users-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 10rem;
}

.evt-users-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.evt-users-filter-select {
  height: 2.5rem;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #0f172a;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 0.5rem center / 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  appearance: none;
  cursor: pointer;
}

.evt-users-filter-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.evt-users-filter-clear,
.evt-users-filter-apply {
  height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evt-users-filter-clear {
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.evt-users-filter-clear:hover {
  color: #ef4444;
  border-color: #fca5a5;
}

.evt-users-filter-apply {
  color: #fff;
  background: #7c3aed;
  border: none;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.evt-users-filter-apply:hover {
  background: #6d28d9;
}

/* Table */
.evt-users-table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.evt-users-table-wrap--initial {
  min-height: 220px;
}

.evt-users-table-wrap--busy .evt-users-table {
  opacity: 0.45;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.evt-users-table-busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.evt-users-table th.text-center,
.evt-users-table td.text-center {
  text-align: center;
}

.evt-users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
}

.evt-users-table th {
  padding: 0.875rem 1.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

.evt-users-table th.text-center,
.evt-users-table td.text-center { text-align: center; }

.evt-users-table td {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.evt-users-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.evt-users-table tbody tr {
  transition: background 0.15s ease;
}

.evt-users-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.04);
}

.evt-users-table tbody tr:last-child td { border-bottom: none; }

.evt-users-name {
  font-weight: 600;
  color: #0f172a;
}

.evt-users-username {
  color: #64748b;
  font-size: 0.8125rem;
}

.evt-users-email {
  color: #475569;
  font-size: 0.8125rem;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evt-users-type {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.evt-users-type--admin {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.18);
}

.evt-users-type--organizer {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.18);
}

.evt-users-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
}

.evt-users-flag--no {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.evt-users-flag--yes {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
}

.evt-users-flag svg {
  width: 0.875rem;
  height: 0.875rem;
}

.evt-users-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Pagination */
.evt-users-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #eef2f7;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.4), rgba(255, 255, 255, 0.9));
}

.evt-users-pagination-info {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
}

.evt-users-pagination-info strong {
  color: #334155;
  font-weight: 600;
}

.evt-users-page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evt-users-page-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evt-users-page-nav,
.evt-users-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.125rem;
  height: 2.125rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evt-users-page-nav svg { width: 1rem; height: 1rem; }

.evt-users-page-nav:hover:not(:disabled),
.evt-users-page-btn:hover {
  color: #7c3aed;
  border-color: #c4b5fd;
  background: rgba(124, 58, 237, 0.04);
}

.evt-users-page-nav:disabled { opacity: 0.4; cursor: not-allowed; }

.evt-users-page-nums {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.evt-users-page-btn.active {
  color: #7c3aed;
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
}

.evt-users-page-ellipsis {
  color: #94a3b8;
  font-size: 0.8125rem;
  padding: 0 0.125rem;
}

.evt-users-page-size-select {
  height: 2.125rem;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 0.5rem center / 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  appearance: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .evt-users-header { flex-direction: column; }
  .evt-users-toolbar { flex-direction: column; align-items: stretch; }
  .evt-users-toolbar-actions { flex-direction: column; align-items: stretch; }
  .evt-users-search { width: 100%; }
  .evt-users-search input { flex: 1; width: auto; max-width: none; }
  .evt-users-filter-actions { margin-left: 0; width: 100%; }
  .evt-users-filter-clear,
  .evt-users-filter-apply { flex: 1; }
}
