* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #fff8f2;
}

/* ── Header ── */
header {
    background-color: #ff9f43;
    color: white;
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.4em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
nav ul { list-style:none; display:flex; margin:0; padding:0; gap:4px; flex-wrap:wrap; }
nav ul li a {
    color: white; text-decoration: none;
    padding: 6px 12px; border-radius: 6px;
    font-weight: bold; font-size: .93em;
    transition: background .2s;
}
nav ul li a:hover { background: rgba(255,255,255,.22); }

/* ── Badge sesión ── */
.badge-sesion {
    max-width: 900px; margin: 18px auto 0;
    padding: 10px 20px;
    background: #fff3cd; border-left: 4px solid #ff9f43;
    border-radius: 8px; font-size: .95em;
}

/* ── Contenedor ── */
.contenedor {
    max-width: 900px; margin: 28px auto;
    background: white; padding: 26px 30px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(255,159,67,.10);
}

/* ── Galería ── */
.galeria { display:flex; gap:18px; justify-content:center; flex-wrap:wrap; }
.tarjeta {
    border: 1px solid #ffe0b2; padding: 14px;
    border-radius: 12px; text-align: center; width: 210px;
    transition: transform .25s, box-shadow .25s;
    background: #fffaf5;
}
.tarjeta:hover { transform: scale(1.05); box-shadow: 0 6px 18px rgba(255,159,67,.18); }
.tarjeta img { width:100%; height:160px; object-fit:cover; border-radius:8px; }

/* ── Paginado ── */
.paginado { text-align:center; margin-top:20px; }
.paginado a {
    padding: 8px 16px; border: 2px solid #ff9f43;
    text-decoration: none; color: #ff9f43;
    margin: 0 3px; border-radius: 6px; font-weight: bold;
    transition: background .2s, color .2s;
}
.paginado a:hover, .paginado a.activo { background:#ff9f43; color:#fff; }

/* ── Formulario ── */
form { display:flex; flex-direction:column; }
label { margin-bottom:5px; font-weight:600; color:#444; }
input, select, textarea, button {
    margin-bottom: 14px; padding: 10px 13px;
    border: 1px solid #ddd; border-radius: 8px;
    font-size: 15px; font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: #ff9f43;
    box-shadow: 0 0 0 3px rgba(255,159,67,.15);
}
textarea { resize: vertical; }
button[type="submit"] {
    background: #ff9f43; color: white;
    font-weight: bold; cursor: pointer; border: none;
    border-radius: 8px; transition: background .2s;
}
button[type="submit"]:hover { background: #e68a2e; }

/* ── Alertas ── */
.alerta {
    background:#d4edda; color:#155724; padding:14px 18px;
    margin-bottom:18px; border-radius:8px; border:1px solid #c3e6cb;
}
.alerta-error {
    background:#f8d7da; color:#721c24; padding:14px 18px;
    margin-bottom:18px; border-radius:8px; border:1px solid #f5c6cb;
}
.aviso-error {
    background:#f8d7da; color:#721c24; padding:14px 20px;
    border-radius:8px; max-width:900px; margin:18px auto;
}

/* ── Badges de roles ── */
.badge-rol {
    padding: 3px 12px; border-radius: 20px;
    font-size: .82em; font-weight: bold; display: inline-block;
}
.badge-administrador { background:#ffd6a5; color:#9c4a00; }
.badge-usuario       { background:#a8d8ea; color:#005780; }
.badge-invitado      { background:#e0e0e0; color:#555; }
.badge { padding:3px 10px; border-radius:12px; font-size:.82em; font-weight:bold; }

/* ── Estados solicitudes ── */
.estado-pendiente { color:#856404; font-weight:bold; }
.estado-revisada  { color:#004085; font-weight:bold; }
.estado-resuelta  { color:#155724; font-weight:bold; }

/* ── Tabla admin ── */
.tabla-admin { width:100%; border-collapse:collapse; font-size:.91em; }
.tabla-admin th, .tabla-admin td {
    border: 1px solid #eed9c4; padding: 9px 11px;
    text-align: left; vertical-align: middle;
}
.tabla-admin thead { background:#ff9f43; color:#fff; }
.tabla-admin tbody tr:nth-child(even) { background:#fffaf5; }
.tabla-admin tbody tr:hover { background:#fff3e0; }

/* ── Botones pequeños ── */
.btn-sm {
    padding: 5px 11px; font-size: .82em;
    margin: 0 2px; border-radius: 6px;
    cursor: pointer; border: none;
    font-weight: bold; background: #ff9f43; color: #fff;
}
.btn-sm:hover   { background: #e68a2e; }
.btn-danger     { background: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-success    { background: #28a745; }
.btn-success:hover { background: #218838; }