/* Estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

/* Títulos */
h1 {
  color: #2c5aa0;
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5em;
}

h2 {
  color: #34495e;
  margin: 25px 0 15px 0;
  padding: 10px;
  background: #ecf0f1;
  border-left: 4px solid #3498db;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

h2:hover {
  background: #d5dbdb;
}

/* Información del usuario */
.user-info {
  background: #e8f5e8;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
  text-align: center;
  border: 1px solid #27ae60;
}

.user-info a {
  color: #e74c3c;
  text-decoration: none;
  font-weight: bold;
}

.user-info a:hover {
  text-decoration: underline;
}

/* Paneles desplegables */
.panel {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-content {
  padding: 20px;
  display: none;
}

.panel-content.active {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* Formularios */
form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

input[type="text"],
input[type="date"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

input[type="submit"] {
  background: #3498db;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s;
  width: 100%;
}

input[type="submit"]:hover {
  background: #2980b9;
}

/* Tabla */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

th {
  background: #34495e;
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: bold;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

tr:nth-child(even) {
  background: #f8f9fa;
}

tr:hover {
  background: #e3f2fd;
}

/* Enlaces */
a {
  color: #3498db;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

/* Mensajes de error */
.error {
  background: #ffebee;
  color: #c62828;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #f44336;
  margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
  }

  h1 {
    font-size: 2em;
  }

  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 8px;
  }

  input[type="text"],
  input[type="date"],
  input[type="password"] {
    font-size: 16px; /* Evita zoom en iOS */
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8em;
  }

  .container {
    padding: 15px;
  }

  table {
    font-size: 12px;
  }

  th,
  td {
    padding: 6px;
  }
}

/* Botón especial para CSV */
.csv-button {
  background: #27ae60 !important;
  margin-top: 20px;
}

.csv-button:hover {
  background: #229954 !important;
}

/* Login específico */
.login-container {
  max-width: 400px;
  margin: 100px auto;
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
  margin-bottom: 30px;
  color: #2c5aa0;
}

/* Historial de mascota */
.pet-history {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 20px auto;
}

.visit-item {
  background: #f8f9fa;
  padding: 15px;
  margin: 10px 0;
  border-radius: 6px;
  border-left: 4px solid #3498db;
}
