/* CityReport - Usuarios */

.users-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .22);
  background:
    radial-gradient(820px 280px at 8% -8%, rgba(14, 165, 233, .15), transparent 62%),
    radial-gradient(720px 260px at 96% 0%, rgba(99, 102, 241, .11), transparent 60%),
    rgba(255, 255, 255, .94);
  animation: usersEnter .38s ease both;
}

.users-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #154965, #0ea5e9, #6366f1);
}

.users-toolbar {
  gap: 12px;
}

.users-table-wrap {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(2, 6, 23, .07);
}

.users-table-wrap .table {
  min-width: 720px;
}

.users-table-wrap thead {
  background: linear-gradient(135deg, #154965, #0f766e);
}

.users-table-wrap thead th {
  color: #fff;
  font-weight: 950;
  letter-spacing: .02em;
}

.users-table-wrap tbody tr {
  transition: background .18s ease, box-shadow .18s ease;
}

.users-table-wrap tbody tr:hover {
  background: #f0f9fb;
  box-shadow: inset 4px 0 0 #0ea5e9;
}

.user-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 950;
}

.user-name::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #0ea5e9;
  box-shadow: 0 0 0 5px rgba(14, 165, 233, .12);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #154965;
  background: rgba(14, 165, 233, .09);
  border: 1px solid rgba(14, 165, 233, .18);
  font-size: .82rem;
  font-weight: 900;
}

.user-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.user-actions .btn {
  min-width: 42px;
}

.user-actions .btn-danger-soft {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, .45);
  background: rgba(254, 242, 242, .72);
}

.user-actions .btn-danger-soft:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
}

.users-form {
  margin-top: 30px;
  padding: 25px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, .9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(248, 250, 252, .72)),
    radial-gradient(420px 140px at 10% 0%, rgba(14, 165, 233, .10), transparent 70%);
  box-shadow: 0 16px 36px rgba(2, 6, 23, .07);
}

.users-form h3 {
  margin-bottom: 20px;
  color: #154965;
  font-weight: 950;
}

.users-form label {
  color: #154965;
  font-size: .84rem;
  font-weight: 950;
  letter-spacing: .02em;
}

.users-form .form-control {
  min-height: 46px;
  border-radius: 14px;
  border-color: rgba(148, 163, 184, .38);
  background-color: rgba(255, 255, 255, .94);
}

.users-form .form-control:focus {
  border-color: rgba(14, 165, 233, .65);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .13);
}

.users-form-actions {
  justify-content: flex-end;
  gap: 15px;
}

@keyframes usersEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 680px) {
  .users-toolbar,
  .users-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .users-toolbar .btn,
  .users-form-actions .btn {
    justify-content: center;
  }

  .users-form {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .users-panel,
  .users-table-wrap tbody tr {
    animation: none !important;
    transition: none !important;
  }
}
