/* Estilos para el Panel de Administraci��n */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  background-color: #f4f7f9;

  margin: 0;

  color: #333;
}

/* --- Formulario de Login --- */

.login-container {
  display: flex;

  justify-content: center;

  align-items: center;

  height: 100vh;
}

.login-form {
  background: #fff;

  padding: 40px;

  border-radius: 8px;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

  width: 100%;

  max-width: 400px;

  text-align: center;
}

.login-form h2 {
  margin-top: 0;

  margin-bottom: 10px;

  color: #0d47a1;
}

.login-form p {
  margin-bottom: 25px;

  color: #666;
}

.form-group {
  margin-bottom: 20px;

  text-align: left;
}

.form-group label {
  display: block;

  margin-bottom: 5px;

  font-weight: bold;
}

.form-group input {
  width: 100%;

  padding: 10px;

  border: 1px solid #ccc;

  border-radius: 5px;

  box-sizing: border-box;
}

.btn {
  background-color: #0d47a1;

  color: #fff;

  padding: 12px 20px;

  border: none;

  border-radius: 5px;

  cursor: pointer;

  font-size: 16px;

  width: 100%;

  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0b3a82;
}

.error {
  color: #d9534f;

  background: #f2dede;

  border: 1px solid #ebccd1;

  padding: 10px;

  border-radius: 5px;

  margin-bottom: 15px;
}

/* --- Panel Principal --- */

.admin-panel {
  max-width: 900px;

  margin: 0 auto;

  padding: 20px;
}

.admin-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 30px;

  border-bottom: 1px solid #ddd;

  padding-bottom: 20px;
}

.admin-header h1 {
  margin: 0;
}

.admin-header a {
  text-decoration: none;

  background-color: #6c757d;

  color: white;

  padding: 8px 15px;

  border-radius: 5px;
}

.admin-content {
  display: flex;

  flex-direction: column;

  gap: 30px;
}

.card {
  background: #fff;

  padding: 25px;

  border-radius: 8px;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.card h2 {
  margin-top: 0;
}

.message {
  padding: 15px;

  background-color: #d4edda;

  color: #155724;

  border: 1px solid #c3e6cb;

  border-radius: 5px;

  margin-bottom: 20px;
}

.event-list-admin .event-item {
  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 15px 0;

  border-bottom: 1px solid #eee;
}

.event-list-admin .event-item:last-child {
  border-bottom: none;
}

.event-list-admin .event-details {
  display: flex;

  flex-direction: column;
}

.event-list-admin .event-details small {
  font-size: 0.9em;

  color: #777;

  margin-top: 5px;
}

.btn-delete {
  background-color: #d9534f;

  color: white;

  padding: 5px 10px;

  text-decoration: none;

  border-radius: 5px;

  font-size: 0.9em;
}

/* --- NUEVO: Dashboard Menu --- */

.dashboard-menu {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

  gap: 20px;
}

.dashboard-button {
  display: flex;

  align-items: center;

  background: #fff;

  padding: 25px;

  border-radius: 8px;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);

  text-decoration: none;

  color: inherit;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-button:hover {
  transform: translateY(-5px);

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-button .button-icon {
  font-size: 2.5rem;

  margin-right: 20px;
}

.dashboard-button .button-text h3 {
  margin: 0 0 5px 0;

  color: #0d47a1;
}

.dashboard-button .button-text p {
  margin: 0;

  font-size: 0.9em;

  color: #666;
}

.dashboard-button-placeholder {
  display: flex;

  align-items: center;

  background: #f8f9fa;

  padding: 25px;

  border-radius: 8px;

  border: 2px dashed #e0e0e0;

  color: #aaa;
}

/* --- NUEVO: Back Link --- */

.back-link-container {
  margin-top: 20px;
}

.btn-secondary {
  background-color: #6c757d;

  color: #fff;

  padding: 10px 18px;

  border: none;

  border-radius: 5px;

  cursor: pointer;

  font-size: 14px;

  text-decoration: none;

  display: inline-block;

  transition: background-color 0.3s ease;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

/* --- Estilos para el formulario de publicaciones --- */
.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 1rem;
}

.form-group input[type="file"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

.post-list-admin .post-content-preview {
  max-height: 100px;
  overflow-y: auto;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 5px;
  background: #f9f9f9;
}

/* --- NUEVO: Estilos para el Módulo de Usuarios --- */
.admin-module {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 25px;
  margin-top: 30px;
}

.admin-module h2 {
  margin-top: 0;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.user-form .form-group {
  margin-bottom: 20px;
}

.user-form .btn {
  width: auto;
  padding: 10px 20px;
  cursor: pointer;
}

/* --- NUEVO: Estilos para mensajes de feedback --- */
.success-message {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.error-message {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.dashboard-menu .analytics-button {
  background-color: #e6f7e8; /* Un fondo verde muy suave (color de Google) */
  border-left: 5px solid #4285f4; /* Borde azul de Google */
  transition: background-color 0.3s ease;
}

.dashboard-menu .analytics-button .button-icon {
  color: #4285f4; /* Ícono azul */
  background: none;
}

.dashboard-menu .analytics-button:hover {
  background-color: #d1e7dd; /* Un verde más fuerte al pasar el mouse */
}
