/* ── Users & Roles pages (shared) ───────────────────────────────────────────── */

.um-page {
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
}

.um-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 12px;
}

.um-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.um-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.um-header-count {
  font-size: .82rem;
  color: var(--placeholder-color);
}

.um-table-wrap {
  padding: 0 24px 24px;
}

.um-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.um-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--placeholder-color);
  border-bottom: 1px solid var(--card-border);
}

.um-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
}

.um-table tr:hover td {
  background: var(--bs-tertiary-bg);
}

.um-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
}

.um-badge-encrypted { background: rgba(99, 102, 241, .15);  color: #6366f1; }
.um-badge-clear     { background: rgba(108, 117, 125, .15); color: #6c757d; }
.um-badge-active    { background: rgba(25, 135, 84, .15);   color: #198754; }
.um-badge-inactive  { background: rgba(220, 53, 69, .15);   color: #dc3545; }

.um-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.um-btn-icon {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--placeholder-color);
  font-size: .95rem;
  transition: background .15s, color .15s;
}

.um-btn-icon:hover      { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.um-btn-icon:disabled    { opacity: .3; cursor: not-allowed; }

/* ── Modal form ─────────────────────────────────────────────────────────────── */

.um-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.um-modal {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.um-modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 1rem;
}

.um-modal-body    { padding: 20px; }
.um-modal-footer   { padding: 12px 20px; display: flex; justify-content: flex-end; gap: 8px; }

.um-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--placeholder-color);
}
