*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: linear-gradient(135deg, #eef2f3, #d9e2ec);
  min-height: 100vh;
  color: #1f2937;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 24px;
}

.header {
  margin-bottom: 12px;
}

.header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.header p {
  margin-top: 6px;
  color: #6b7280;
}

.form-card {
  backdrop-filter: blur(12px);
  padding: 10px;
  border-radius: 16px;
  margin-bottom: 12px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.user-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.user-form input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 36px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

.btn-cancel {
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  padding: 12px 36px;
  font-size: 14px;
  cursor: pointer;
}

#error {
  grid-column: span 2;
  color: #dc2626;
  font-size: 13px;
}

.user-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.user-card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s, box-shadow 0.25s;
}

.user-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 12px;
}

.user-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.user-card p {
  margin: 4px 0;
  font-size: 13px;
  color: #6b7280;
}

.user-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.user-actions button {
  flex: 1;
  padding: 9px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  cursor: pointer;
}

.btn-view {
  background: #e0e7ff;
  color: #3730a3;
}

.btn-view:hover {
  background: #c7d2fe;
}

.btn-delete {
  background: #fee2e2;
  color: #991b1b;
}

.btn-delete:hover {
  background: #fecaca;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}

.modal.show {
  display: block;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-content {
  position: relative;
  background: white;
  width: 470px;
  max-width: 90%;
  margin: 80px auto;
  padding: 24px;
  border-radius: 16px;
}


.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  grid-column: span 2;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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