* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
}


.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
}

.header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.header-left .logo-link {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.header-left .logo-link:hover {
  opacity: 0.8;
}

.header-left .logo {
  color: #6366f1;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-btn {
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-btn:hover {
  background: #4f46e5;
}


.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
}

.user-menu:hover {
  background: #f1f5f9;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.user-name {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
}

.dropdown-icon {
  font-size: 12px;
  color: #64748b;
}


.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  color: #1e293b;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
  border-radius: 6px;
  margin: 4px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background-color: #f1f5f9;
}

.dropdown-item.logout:hover {
  color: #dc2626;
}

.dropdown-icon-item {
  font-size: 16px;
}

.dropdown-divider {
  height: 1px;
  background-color: #e2e8f0;
  margin: 8px 0;
}


.edit-container {
  width: 100%;
  max-width: 500px;
  padding: 32px 28px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  text-align: center;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-group {
  width: 100%;
  text-align: left;
  margin-bottom: 20px;
}

input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-sizing: border-box;
  background: #f8fafc;
  font-size: 16px;
  color: #374151;
  transition: all 0.2s ease;
}

input:focus {
  outline: none;
  border-color: #6366f1;
  background: white;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input[readonly] {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
  font-size: 14px;
}

.edit-container h2 {
  margin-bottom: 32px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.025em;
  position: relative;
}

.edit-container h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 2px;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  width: 100%;
}

.btn-save {
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-cancel {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-save:hover {
  background: #5856eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-cancel:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-save span,
.btn-cancel span {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 41, 59, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-box {
  background: white;
  padding: 28px;
  border-radius: 14px;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
}

.modal-box p {
  font-size: 18px;
  margin-bottom: 18px;
}

.modal-box.success p {
  color: #065f46;
}

.modal-box.error p {
  color: #000000;
}

.modal-box button {
  flex: 0;
  min-width: 120px;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.modal-box.success button {
  background: #6366f1;
  color: #fff;
}

.modal-box.error button {
  background: #c20000;
  color: #fff;
}

.modal-box.success button:hover {
  background: #5856eb;
}

.modal-box.error button:hover {
  background: #940000;
}

/* Estilos para modales de tipo warning con botones diferenciados */
.modal-box.warning .modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-box.warning button:first-child {
  background: #ef4444; /* Rojo para acción destructiva */
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.modal-box.warning button:last-child {
  background: white; /* Blanco para cancelar */
  color: #374151;
  border: 1px solid #d1d5db; /* Borde gris */
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.modal-box.warning button:first-child:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-box.warning button:last-child:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }

  .header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .header-right {
    gap: 12px;
  }

  .back-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .edit-container {
    padding: 24px 20px;
    margin: 0;
    max-height: calc(100vh - 100px);
  }

  .edit-container h2 {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
  }

  .btn-save,
  .btn-cancel {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .edit-container {
    padding: 24px 20px;
    margin: 0 8px;
  }

  .edit-container h2 {
    font-size: 20px;
  }

  input {
    padding: 14px 16px;
    font-size: 16px;
  }

  .btn-save,
  .btn-cancel {
    padding: 12px 24px;
    font-size: 15px;
  }
}