/* ===== Reset y base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f4f4;
  color: #1a1a1a;
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Banner rojo superior (estilo Vitruvio) ===== */
.banner-top {
  background: #e30613;
  color: #fff;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 32px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.banner-top a { color: #fff; text-decoration: none; padding: 0 8px; }
.banner-top a:hover { text-decoration: underline; }
.banner-top .sep { opacity: 0.5; }

/* ===== Cabecera con logo ===== */
.header {
  background: #fff;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}
.header-logo img { height: 50px; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}
.header-actions a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
}
.header-actions a:hover { color: #e30613; }
.header-actions .user-email {
  color: #888;
  font-size: 13px;
}

/* ===== Bloque hero con título de herramienta ===== */
.hero {
  background: #fff;
  padding: 40px 32px 32px;
}
.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 56px;
  font-weight: 700;
  color: #e30613;
  line-height: 1.05;
  margin-bottom: 8px;
}
.hero h2 {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.15;
}
.hero h2 .red { color: #e30613; }
.hero p.lead {
  margin-top: 16px;
  color: #555;
  max-width: 720px;
  font-size: 14px;
}

/* ===== Tarjetas de contenido ===== */
.card {
  background: #fff;
  margin: 16px 32px;
  padding: 24px 28px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #1a1a1a;
  margin-bottom: 16px;
  position: relative;
  padding-left: 16px;
}
.card h3::before {
  content: '';
  position: absolute;
  left: 0; top: 5px;
  width: 8px; height: 8px;
  background: #e30613;
  border-radius: 50%;
}

/* ===== Formularios ===== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin-bottom: 4px;
}
.form-row input,
.form-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 14px;
  background: #fff;
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: #e30613;
}

/* ===== Pestañas (admin) ===== */
.tabs {
  display: flex;
  gap: 2px;
  padding: 0 32px;
  margin-top: 16px;
}
.tabs button {
  background: #fff;
  border: 1px solid #ddd;
  border-bottom: none;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px 4px 0 0;
  color: #555;
}
.tabs button:hover { color: #1a1a1a; }
.tabs button.active {
  background: #e30613;
  color: #fff;
  border-color: #e30613;
}

/* ===== Botones ===== */
.btn {
  padding: 10px 20px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
}
.btn:hover { border-color: #999; }
.btn.primary {
  background: #e30613;
  color: #fff;
  border-color: #e30613;
}
.btn.primary:hover { background: #c00510; border-color: #c00510; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

.muted { color: #888; font-size: 13px; }

/* ===== Gate de autenticación (pantalla bloqueante) ===== */
.auth-gate {
  position: fixed; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
  z-index: 9999;
}
.auth-card {
  background: #fff;
  padding: 48px 56px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  max-width: 420px;
}
.auth-card img { height: 60px; margin-bottom: 24px; }
.auth-card h1 {
  font-size: 22px;
  margin-bottom: 8px;
}
.auth-card p {
  color: #666;
  margin-top: 8px;
}
.auth-card a { color: #e30613; }