:root {
  --naranja: #D1932E;
  --rojo: #A31F23;
  --marron: #8E5033;
  --rosa: #D17659;
  --gris-fondo: #f8f4f1;
  --blanco: #ffffff;
  --fuente-titulo: 'Mohave', sans-serif;
  --fuente-cuerpo: 'Kanit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--fuente-cuerpo);
  background-color: var(--gris-fondo);
  color: #333;
  animation: fadeIn 1.2s ease-in-out;
  min-height: 100vh;
}

/* ----------------- LOGIN ----------------- */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: 100vh;
}

.login-box {
  background-color: var(--blanco);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 400px;
  width: 100%;
  animation: fadeIn 0.8s ease-in-out;
}

.login-box .logo {
  width: 80px;
  margin-bottom: 1rem;
}

.login-box h1 {
  color: var(--rojo);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-family: var(--fuente-titulo);
}

.login-box p {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-box label {
  text-align: left;
  font-weight: bold;
  font-size: 0.95rem;
  color: #444;
}

.login-box input {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.login-box input:focus {
  border-color: var(--naranja);
  outline: none;
}

.login-box button {
  padding: 0.75rem;
  background: var(--naranja);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.login-box button:hover {
  background: var(--marron);
}

/* ----------------- PRODUCTOR (CARD) ----------------- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  height: 80px;
  animation: slideDown 1s ease;
}

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--blanco);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  animation: slideUp 1s ease-in;
}

.card:hover {
  transform: scale(1.01);
}

.photo img {
  width: 100%;
  height: auto;
}

.info {
  padding: 1.5rem;
}

.nombre {
  font-family: var(--fuente-titulo);
  font-size: 2rem;
  color: var(--rojo);
  margin-bottom: 1rem;
}

.descripcion {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1rem;
}

.historia h2 {
  font-family: var(--fuente-titulo);
  color: var(--naranja);
  margin-bottom: 0.5rem;
}

.historia p {
  font-size: 1rem;
  line-height: 1.5;
}

footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #777;
}

/* ----------------- FORMULARIO + TABLA ----------------- */
.wide-container {
  width: 90%;
  margin: 0 auto;
  padding: 2rem 0;
}

.flex-wrapper {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
}

.form-column {
  flex: 0 0 30%;
}

.table-column {
  flex: 1;
}

/* FORM */
.form-box {
  background-color: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  animation: fadeIn 0.8s ease-in-out;
}

.form-box h1 {
  color: var(--rojo);
  font-family: var(--fuente-titulo);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.form-box label {
  font-weight: bold;
  font-size: 0.95rem;
  color: #444;
  display: block;
  margin: 0.8rem 0 0.3rem;
}

.form-box input,
.form-box textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--fuente-cuerpo);
  resize: vertical;
}

.form-box input:focus,
.form-box textarea:focus {
  border-color: var(--naranja);
  outline: none;
}

.form-box button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.75rem;
  background: var(--naranja);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.form-box button:hover {
  background: var(--marron);
}

/* TABLA */
.tabla-contenedor {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

th {
  background-color: var(--naranja);
  color: white;
  font-family: var(--fuente-titulo);
}

td a {
  color: var(--rojo);
  text-decoration: underline;
  font-size: 0.9rem;
}

.btn-accion {
  background: var(--rojo);
  color: white;
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-right: 0.4rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-accion:hover {
  background: var(--marron);
}

/* ----------------- ANIMACIONES ----------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ----------------- RESPONSIVE ----------------- */
@media (max-width: 900px) {
  .flex-wrapper {
    flex-direction: column;
  }

  .form-column,
  .table-column {
    flex: 1 1 100%;
  }

  .tabla-contenedor {
    padding: 0.5rem;
  }

  table {
    font-size: 0.85rem;
  }

  .form-box,
  .login-box {
    padding: 1.5rem;
  }

  .logo {
    height: 60px;
  }
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: white;
  border-bottom: 1px solid #eee;
  margin-bottom: 1rem;
}

.logo-area .logo {
  height: 60px;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  font-family: var(--fuente-cuerpo);
  color: #333;
}

.cerrar-sesion {
  background-color: var(--rojo);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s;
}

.cerrar-sesion:hover {
  background-color: var(--marron);
}
