/* --- ESTILOS GENERALES --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* --- BANNER Y NAVEGACIÓN --- */
.banner-container {
    width: 100%;
    line-height: 0; /* Elimina espacios extra */
}

.banner-container img {
    width: 100%;
    height: auto;
    display: block;
}

.main-header {
    background-color: #ffffff;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.main-header .main-nav {
    width: 100%;
    display: flex;
    justify-content: center; /* Centra el menú */
}

.main-header .main-nav ul {
    margin: 0;
    padding: 0;
    list-style-type: none; /* Quita las viñetas */
    display: flex;
    gap: 1.5rem; /* Espacio entre los elementos del menú */
}

.main-header .main-nav a {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.main-header .main-nav a:hover {
    color: #0056b3;
}

/* --- ESTILOS DE FORMULARIOS --- */
.form-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-width: 450px;
    margin: 2rem auto;
}

.form-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Importante para que el padding no desborde */
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #0056b3;
}

/* --- MENSAJES DE ERROR Y ÉXITO --- */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Fix: hacer clicable el link "Volver" en BDP sobre los botones */
.link-back{
  display:inline-block;
  margin:10px 0 14px;
  color:#0a58ca;
  text-decoration:none;
  position:relative;
  z-index:5;   /* por encima de los botones */
}
.link-back:hover{ text-decoration:underline; }
.dashboard-actions{ position:relative; z-index:1; } /* botones por detrás */
/* Barra superior y botón Volver en BDP */
.bdp-toolbar{
  margin: 6px 0 14px;
  position: relative;
  z-index: 20; /* por encima de los botones */
}
.btn-link.back-link{
  display:inline-block;
  background:transparent;
  color:#0a58ca;
  text-decoration:none;
  font-weight:600;
  padding:.25rem 0;
  border:0;
  cursor:pointer;
}
.btn-link.back-link:hover{ text-decoration:underline; }
/* Asegurar que los botones no se monten encima */
.dashboard-actions{ position:relative; z-index: 5; margin-top: 0; }

/* ===== Footer mejorado ===== */
.main-footer {
  text-align: center;
  padding: 24px 12px;
  background: #0f5fff0d; /* un azul muy suave */
  border-top: 1px solid #e6e8ef;
}
.main-footer .byline {
  font-size: 0.95rem;
  color: #556;
  margin-top: 6px;
  opacity: .9;
}

/* ====== UI tweaks / footer centrado ====== */
.site-footer{
  margin-top: 2rem;
  background: #0d47a1;   /* azul sobrio */
  color: #fff;
  text-align: center;
  padding: 24px 12px;
}
.site-footer p{ margin: 0; font-size: 0.95rem; letter-spacing: .2px; }
.site-footer span{ font-weight: 600; }

/* Botones un poco más elegantes */
.btn, .btn-primary, .btn-secondary{
  border-radius: 10px;
  padding: .75rem 1.15rem;
  box-shadow: 0 6px 14px rgba(13,71,161,.18);
  transition: transform .04s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:hover{ transform: translateY(-1px); }

/* Tablas del admin más legibles */
.admin-table{ width:100%; border-collapse: collapse; }
.admin-table th, .admin-table td{
  padding: .65rem .75rem;
  border-bottom: 1px solid #e8eef6;
  text-align: left;
}
.admin-table thead th{
  background: #f4f8ff;
  font-weight: 600;
}
/* ===== Mostrar / Ocultar contraseña ===== */
.pw-row{
  display: flex;
  gap: 8px;
}

.pw-row input{
  flex: 1;
}

.pw-toggle{
  background: #0d6efd;
  color: #fff;
  border: none;
  padding: 0 14px;
  border-radius: 6px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .2s ease, transform .05s ease;
}

.pw-toggle:hover{
  background: #0b5ed7;
}

.pw-toggle:active{
  transform: scale(.97);
}
