@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --primary: #2259a5;
  --primary-hover: #2766be;
  --secondary: #dadad7;
  --dark: #14181c;
  --white: #ffffff;
  --danger: #c0392b;
  --success: #1e7a34;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--dark);
  background: #f7f7f6;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--primary);
  margin: 0 0 0.5em;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--secondary);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar .marca {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.topbar .marca-texto {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark);
  padding-left: 0.8rem;
  border-left: 1px solid var(--secondary);
}

.topbar .usuario {
  font-size: 0.95rem;
}

.topbar a {
  color: var(--primary);
  text-decoration: none;
}
.topbar a:hover { text-decoration: underline; }

.contenedor {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.tarjeta {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--secondary);
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}

input[type="email"],
input[type="password"],
input[type="number"],
input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--secondary);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 89, 165, 0.15);
}

button, .boton {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
button:hover, .boton:hover { background: var(--primary-hover); }

.tabla-scroll {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

th, td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--secondary);
}

th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

tr:nth-child(even) td { background: #fafafa; }

input[type="number"] {
  max-width: 90px;
}

.mensaje-error {
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f5c6cb;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
}

.mensaje-exito {
  background: #eafaf0;
  color: var(--success);
  border: 1px solid #c3e6cb;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
}

.login-wrap {
  max-width: 380px;
  margin: 4rem auto;
}
