/* =====================================================================
   Aranjuez Frontend Panel — estilos
   ===================================================================== */

/* Ocultar la cabecera/footer del tema en el panel para look "admin" */
body.aranjuez-panel header,
body.aranjuez-panel .site-header,
body.aranjuez-panel #masthead,
body.aranjuez-panel footer,
body.aranjuez-panel .site-footer,
body.aranjuez-panel #colophon,
body.aranjuez-panel .ast-above-header,
body.aranjuez-panel .ast-below-header {
    display: none !important;
}

body.aranjuez-panel #content,
body.aranjuez-panel main#main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

body.aranjuez-panel.aranjuez-panel--login #content,
body.aranjuez-panel.aranjuez-panel--login main#main {
    background: linear-gradient(135deg, #1f3a5f 0%, #3d6195 100%);
    min-height: 100vh;
}

/* Reset suave dentro del panel */
body.aranjuez-panel {
    background: #f1f4f9;
    color: #2d3748;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Variables utilitarias */
.panel-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Login ---------- */
.panel-shell--login {
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.panel-login {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
}

.panel-login__brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.panel-login__brand h1 {
    font-size: 1.6rem;
    margin: 0 0 .25rem;
    color: #1f3a5f;
}

.panel-login__brand p {
    margin: 0;
    color: #718096;
    font-size: .9rem;
}

.panel-login__form label {
    display: block;
    margin-bottom: 1rem;
}

.panel-login__form label > span {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: .35rem;
}

.panel-login__form input[type="text"],
.panel-login__form input[type="password"] {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.panel-login__form input:focus {
    outline: none;
    border-color: #3d6195;
    box-shadow: 0 0 0 3px rgba(61, 97, 149, .15);
}

.panel-login__remember {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: #4a5568;
    margin-bottom: 1.25rem;
}

.panel-login__remember > span {
    font-weight: 400;
    margin-bottom: 0;
}

.panel-login__forgot {
    text-align: center;
    margin: 1rem 0 0;
    font-size: .85rem;
}

.panel-login__forgot a {
    color: #3d6195;
}

.panel-login__help {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    font-size: .8rem;
    color: #718096;
    text-align: center;
}

/* ---------- Nav ---------- */
.panel-nav {
    background: #1f3a5f;
    color: #fff;
    padding: .9rem 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.panel-nav__brand a {
    color: #fff;
    text-decoration: none;
    line-height: 1.1;
    display: block;
}

.panel-nav__brand strong {
    display: block;
    font-size: 1rem;
}

.panel-nav__brand span {
    font-size: .75rem;
    color: #a8c0e0;
}

.panel-nav__links {
    display: flex;
    gap: 1.25rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.panel-nav__links a {
    color: #d1dae8;
    text-decoration: none;
    font-size: .9rem;
    padding: .4rem 0;
    border-bottom: 2px solid transparent;
}

.panel-nav__links a:hover,
.panel-nav__links a.is-active {
    color: #fff;
    border-bottom-color: #f6c66d;
}

.panel-nav__user {
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #d1dae8;
}

.panel-nav__user strong {
    color: #fff;
}

.panel-nav__user a {
    color: #f6c66d;
    text-decoration: none;
}

/* ---------- Main ---------- */
.panel-main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

/* ---------- Cards ---------- */
.panel-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.panel-card__head {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.panel-card__head h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #2d3748;
}

/* ---------- Filters ---------- */
.panel-filters {
    padding: 1rem 1.5rem;
    background: #f7fafc;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.panel-filters label {
    display: flex;
    flex-direction: column;
    font-size: .8rem;
    color: #718096;
    min-width: 200px;
}

.panel-filters label > span {
    margin-bottom: .25rem;
}

.panel-filters select,
.panel-filters input[type="search"] {
    padding: .5rem .65rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: .95rem;
    background: #fff;
}

/* ---------- Lists ---------- */
.panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.panel-list__item {
    display: grid;
    grid-template-columns: 64px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: .85rem 1.5rem;
    border-bottom: 1px solid #edf2f7;
}

.panel-list--rutas .panel-list__item {
    grid-template-columns: 1fr auto auto;
}

.panel-list__item:last-child {
    border-bottom: none;
}

.panel-list__item:hover {
    background: #f7fafc;
}

.panel-list__thumb {
    width: 64px;
    height: 48px;
    background: #edf2f7;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-list__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-list__noimg {
    font-size: .7rem;
    color: #a0aec0;
}

.panel-list__title {
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.panel-list__title a {
    color: inherit;
    text-decoration: none;
}

.panel-list__title a:hover {
    color: #3d6195;
}

.panel-list__meta {
    font-size: .85rem;
    color: #718096;
}

.panel-list__actions {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

/* ---------- Badges ---------- */
.panel-badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 12px;
    background: #e2e8f0;
    color: #4a5568;
    font-size: .75rem;
    font-weight: 500;
}

.panel-badge--draft {
    background: #fef3c7;
    color: #92400e;
}

.panel-badge--warn {
    background: #fee2e2;
    color: #991b1b;
}

/* ---------- Buttons ---------- */
.panel-btn {
    display: inline-block;
    padding: .55rem 1.1rem;
    background: #fff;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: .9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    line-height: 1.2;
}

.panel-btn:hover {
    background: #edf2f7;
    border-color: #a0aec0;
}

.panel-btn--primary {
    background: #3d6195;
    color: #fff;
    border-color: #3d6195;
}

.panel-btn--primary:hover {
    background: #2c4a78;
    border-color: #2c4a78;
    color: #fff;
}

.panel-btn--ghost {
    background: transparent;
    border-color: #cbd5e0;
    color: #4a5568;
}

.panel-btn--danger {
    background: #c53030;
    color: #fff;
    border-color: #c53030;
}

.panel-btn--danger:hover {
    background: #9b2c2c;
    border-color: #9b2c2c;
    color: #fff;
}

.panel-btn--small {
    padding: .35rem .7rem;
    font-size: .8rem;
}

.panel-btn--big {
    padding: .8rem 1.6rem;
    font-size: 1rem;
}

.panel-btn--block {
    display: block;
    width: 100%;
}

.panel-btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

/* ---------- Forms ---------- */
.panel-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.panel-form-head h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #2d3748;
}

.panel-form__breadcrumb {
    margin-bottom: 1rem;
}

.panel-form__breadcrumb a {
    color: #3d6195;
    font-size: .9rem;
    text-decoration: none;
}

/* ACF fields wrapper */
.panel-form,
.acf-form {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    margin-bottom: 1.5rem;
}

.acf-fields > .acf-field {
    border-top: 1px solid #edf2f7;
    padding: 1.25rem 0;
    display: block;
}

.acf-fields > .acf-field:first-child {
    border-top: none;
    padding-top: 0;
}

.acf-field .acf-label {
    margin-bottom: .5rem;
}

.acf-field .acf-label label {
    font-weight: 600;
    color: #2d3748;
    font-size: .95rem;
}

.acf-field .acf-label .description,
.acf-field .acf-label p {
    color: #718096;
    font-size: .82rem;
    margin: .25rem 0 0;
    font-weight: normal;
}

.acf-field input[type="text"],
.acf-field input[type="url"],
.acf-field input[type="number"],
.acf-field textarea,
.acf-field select {
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: .55rem .75rem;
    font-size: .95rem;
    width: 100%;
    box-sizing: border-box;
}

.acf-required {
    color: #c53030;
}

/* Featured image + Rutas (side-by-side en desktop) */
.panel-form__topgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: .5rem;
    border-bottom: 1px solid #edf2f7;
}

@media (max-width: 720px) {
    .panel-form__topgrid {
        grid-template-columns: 1fr;
    }
}

.panel-form__topgrid h3 {
    margin: 0 0 .25rem;
    font-size: 1rem;
    color: #2d3748;
}

.panel-form__hint {
    color: #718096;
    font-size: .82rem;
    margin: 0 0 .75rem;
}

.panel-featured {
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    padding: 1rem;
    background: #f7fafc;
}

.panel-featured__preview {
    aspect-ratio: 16 / 10;
    background: #edf2f7;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .75rem;
}

.panel-featured__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-featured__placeholder {
    color: #a0aec0;
    font-size: .9rem;
}

.panel-featured__actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Rutas checkbox list */
.panel-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    max-height: 240px;
    overflow-y: auto;
}

.panel-checks li {
    padding: .45rem .75rem;
    border-bottom: 1px solid #f1f5f9;
}

.panel-checks li:last-child {
    border-bottom: none;
}

.panel-checks label {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-size: .9rem;
    color: #2d3748;
    margin: 0;
}

.panel-checks input {
    margin: 0;
}

/* Mapa picker */
.panel-form__map {
    margin-top: 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid #edf2f7;
}

.panel-form__map h3 {
    margin: 0 0 .25rem;
    font-size: 1rem;
}

.panel-map-search {
    display: flex;
    gap: .5rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

.panel-map-search input {
    flex: 1 1 280px;
    padding: .55rem .75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: .95rem;
}

#panel-map {
    width: 100%;
}

/* Submit area */
.panel-form__submit,
.acf-form-submit {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding-top: 1.25rem;
    margin-top: 1rem;
    border-top: 1px solid #edf2f7;
}

.acf-form-submit input[type="submit"] {
    background: #3d6195;
    color: #fff;
    border: 1px solid #3d6195;
    padding: .8rem 1.6rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.acf-form-submit input[type="submit"]:hover {
    background: #2c4a78;
}

/* Danger zone (delete) */
.panel-form-danger {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.panel-form-danger .panel-form__hint {
    margin: 0;
    color: #742a2a;
    font-size: .82rem;
}

/* Flash messages */
.panel-flash {
    padding: .75rem 1rem;
    border-radius: 8px;
    margin: 1rem 1.5rem 0;
    font-size: .9rem;
}

.panel-flash--ok {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #68d391;
}

.panel-flash--err {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Empty state */
.panel-empty {
    padding: 1.5rem;
    text-align: center;
    color: #718096;
    font-size: .9rem;
    margin: 0;
}

/* WP editor (TinyMCE) integration */
.panel-form .wp-editor-wrap {
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    overflow: hidden;
}

.panel-form .wp-editor-tabs {
    background: #f7fafc;
}

/* Responsive */
@media (max-width: 720px) {
    .panel-nav {
        padding: .75rem 1rem;
    }
    .panel-nav__links {
        flex-basis: 100%;
        margin-left: 0;
    }
    .panel-main {
        padding: 1rem;
    }
    .panel-form,
    .acf-form {
        padding: 1rem;
    }
    .panel-list__item {
        grid-template-columns: 56px 1fr;
        grid-template-rows: auto auto;
    }
    .panel-list--rutas .panel-list__item {
        grid-template-columns: 1fr;
    }
    .panel-list__meta,
    .panel-list__actions {
        grid-column: span 2;
    }
    .panel-list--rutas .panel-list__meta,
    .panel-list--rutas .panel-list__actions {
        grid-column: 1;
    }
}

/* =====================================================================
   Versión 1.0.1 — estética institucional y ancho completo
   ===================================================================== */
:root {
    --aranjuez-blue: #0f315a;
    --aranjuez-blue-2: #1e5b91;
    --aranjuez-blue-3: #2f78b7;
    --aranjuez-gold: #d6a94a;
    --aranjuez-gold-2: #f0cf7a;
    --aranjuez-ink: #1c2633;
    --aranjuez-muted: #667085;
    --aranjuez-border: rgba(15, 49, 90, .12);
    --aranjuez-shadow: 0 22px 55px rgba(12, 35, 64, .12);
}

body.aranjuez-panel,
body.aranjuez-panel #page,
body.aranjuez-panel .site,
body.aranjuez-panel #content,
body.aranjuez-panel .site-content,
body.aranjuez-panel .ast-container,
body.aranjuez-panel .content-area,
body.aranjuez-panel main#main,
body.aranjuez-panel .site-main,
body.aranjuez-panel article,
body.aranjuez-panel .entry-content {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.aranjuez-panel .entry-content > *,
body.aranjuez-panel .wp-site-blocks > * {
    max-width: none !important;
}

body.aranjuez-panel {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(47, 120, 183, .18), transparent 34rem),
        linear-gradient(180deg, #eef4fb 0%, #f7f9fc 42%, #ffffff 100%) !important;
    color: var(--aranjuez-ink);
}

body.aranjuez-panel * {
    box-sizing: border-box;
}

.panel-shell {
    width: 100%;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(15, 49, 90, .045) 0%, rgba(255, 255, 255, 0) 18rem),
        transparent;
}

body.aranjuez-panel--login .panel-shell--login,
body.aranjuez-panel.aranjuez-panel--login #content,
body.aranjuez-panel.aranjuez-panel--login main#main {
    background:
        linear-gradient(135deg, rgba(10, 33, 62, .90), rgba(30, 91, 145, .78)),
        url('https://rutas.aranjuez.es/wp-content/uploads/migracion/palacios-templos_35.jpg') center center / cover no-repeat !important;
}

.panel-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    padding: .85rem clamp(1rem, 2.5vw, 2.5rem);
    background:
        linear-gradient(135deg, rgba(15, 49, 90, .98) 0%, rgba(30, 91, 145, .96) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 12px 32px rgba(10, 33, 62, .24);
    backdrop-filter: blur(12px);
}

.panel-nav__brand a {
    display: flex;
    align-items: center;
    gap: .95rem;
    min-width: 260px;
}

.panel-nav__logo {
    width: 138px;
    max-width: 38vw;
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .26));
}

.panel-nav__brand-text {
    display: block;
    padding-left: .9rem;
    border-left: 1px solid rgba(255, 255, 255, .22);
}

.panel-nav__brand strong {
    font-size: 1.02rem;
    letter-spacing: .01em;
}

.panel-nav__brand span span,
.panel-nav__brand-text > span {
    color: rgba(255, 255, 255, .78);
}

.panel-nav__links {
    gap: .35rem;
}

.panel-nav__links a {
    padding: .62rem .85rem;
    border-radius: 999px;
    border-bottom: 0;
    color: rgba(255, 255, 255, .82);
    font-weight: 600;
}

.panel-nav__links a:hover,
.panel-nav__links a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.panel-nav__user {
    padding: .48rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
}

.panel-main {
    max-width: none !important;
    width: 100% !important;
    padding: clamp(1.1rem, 2.1vw, 2.25rem) clamp(1rem, 2.7vw, 3rem) 3rem !important;
}

.panel-dashboard-hero {
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: clamp(1rem, 2vw, 2rem);
    margin: 0 0 1.5rem;
    padding: clamp(1.25rem, 2.7vw, 2.8rem);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(15, 49, 90, .94), rgba(30, 91, 145, .80)),
        url('https://rutas.aranjuez.es/wp-content/uploads/migracion/palacios-templos_35.jpg') center center / cover no-repeat;
    box-shadow: var(--aranjuez-shadow);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.panel-dashboard-hero::after {
    content: '';
    position: absolute;
    inset: auto -8rem -10rem auto;
    width: 24rem;
    height: 24rem;
    border-radius: 999px;
    background: rgba(214, 169, 74, .22);
    filter: blur(4px);
}

.panel-dashboard-hero__content,
.panel-dashboard-hero__stats {
    position: relative;
    z-index: 1;
}

.panel-dashboard-hero__eyebrow {
    margin: 0 0 .6rem;
    color: var(--aranjuez-gold-2);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .76rem;
}

.panel-dashboard-hero h1 {
    margin: 0;
    max-width: 980px;
    font-size: clamp(1.75rem, 3vw, 3.2rem);
    line-height: 1.05;
    color: #fff;
}

.panel-dashboard-hero p {
    margin: .85rem 0 0;
    max-width: 780px;
    color: rgba(255, 255, 255, .86);
    font-size: clamp(.98rem, 1.2vw, 1.12rem);
}

.panel-dashboard-hero__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: .85rem;
    align-self: stretch;
    min-width: 280px;
}

.panel-dashboard-hero__stats div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.15rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .20);
    backdrop-filter: blur(8px);
}

.panel-dashboard-hero__stats strong {
    font-size: clamp(1.7rem, 2.4vw, 2.6rem);
    line-height: 1;
    color: #fff;
}

.panel-dashboard-hero__stats span {
    margin-top: .35rem;
    color: rgba(255, 255, 255, .82);
    font-size: .88rem;
    font-weight: 700;
}

.panel-card,
.panel-form,
.acf-form,
.panel-form-danger {
    border-radius: 22px;
    border: 1px solid var(--aranjuez-border);
    box-shadow: 0 16px 40px rgba(12, 35, 64, .08);
}

.panel-card {
    width: 100%;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.panel-card__head {
    padding: 1.15rem clamp(1rem, 2vw, 1.75rem);
    background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
}

.panel-card__head h2,
.panel-form-head h1 {
    color: var(--aranjuez-blue);
    font-weight: 800;
    letter-spacing: -.02em;
}

.panel-card__head h2::before,
.panel-form-head h1::before {
    content: '';
    display: inline-block;
    width: .55rem;
    height: .55rem;
    margin-right: .55rem;
    border-radius: 99px;
    background: var(--aranjuez-gold);
    vertical-align: .12em;
}

.panel-filters {
    padding: 1.1rem clamp(1rem, 2vw, 1.75rem);
    background: #f4f8fc;
}

.panel-filters label {
    flex: 1 1 260px;
}

.panel-filters select,
.panel-filters input[type="search"],
.acf-field input[type="text"],
.acf-field input[type="url"],
.acf-field input[type="number"],
.acf-field textarea,
.acf-field select,
.panel-map-search input,
.panel-login__form input[type="text"],
.panel-login__form input[type="password"] {
    border-radius: 12px;
    border-color: rgba(15, 49, 90, .18);
    min-height: 42px;
}

.panel-filters select:focus,
.panel-filters input[type="search"]:focus,
.acf-field input[type="text"]:focus,
.acf-field input[type="url"]:focus,
.acf-field input[type="number"]:focus,
.acf-field textarea:focus,
.acf-field select:focus,
.panel-map-search input:focus,
.panel-login__form input:focus {
    outline: none;
    border-color: var(--aranjuez-blue-2);
    box-shadow: 0 0 0 4px rgba(47, 120, 183, .14);
}

.panel-list__item {
    grid-template-columns: 84px minmax(260px, 1.6fr) minmax(220px, .9fr) auto;
    padding: 1rem clamp(1rem, 2vw, 1.75rem);
    transition: background .16s ease, transform .16s ease;
}

.panel-list--rutas .panel-list__item {
    grid-template-columns: minmax(260px, 1fr) minmax(160px, auto) auto;
}

.panel-list__item:hover {
    background: #f4f8fc;
}

.panel-list__thumb {
    width: 84px;
    height: 62px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e8eef6, #f6f8fb);
}

.panel-list__title {
    font-size: .98rem;
}

.panel-list__title a:hover {
    color: var(--aranjuez-blue-2);
}

.panel-badge {
    border-radius: 999px;
    background: rgba(15, 49, 90, .08);
    color: var(--aranjuez-blue);
    font-weight: 700;
}

.panel-btn,
.acf-form-submit input[type="submit"] {
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .01em;
}

.panel-btn--primary,
.acf-form-submit input[type="submit"] {
    background: linear-gradient(135deg, var(--aranjuez-gold), #c4912e);
    border-color: #c4912e;
    color: #13243d;
    box-shadow: 0 10px 22px rgba(196, 145, 46, .22);
}

.panel-btn--primary:hover,
.acf-form-submit input[type="submit"]:hover {
    background: linear-gradient(135deg, var(--aranjuez-gold-2), var(--aranjuez-gold));
    border-color: var(--aranjuez-gold);
    color: #13243d;
    transform: translateY(-1px);
}

.panel-btn--ghost {
    color: var(--aranjuez-blue);
    border-color: rgba(15, 49, 90, .18);
    background: rgba(255, 255, 255, .7);
}

.panel-form,
.acf-form {
    width: 100%;
    padding: clamp(1.1rem, 2.2vw, 2rem) clamp(1rem, 2.5vw, 2.5rem);
    background: rgba(255, 255, 255, .96);
}

.panel-form-head {
    padding: 1.25rem clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1.25rem;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(15, 49, 90, .94), rgba(30, 91, 145, .82)),
        url('https://rutas.aranjuez.es/wp-content/uploads/migracion/palacios-templos_35.jpg') center center / cover no-repeat;
    box-shadow: var(--aranjuez-shadow);
}

.panel-form-head h1 {
    color: #fff;
}

.panel-form-head .panel-btn--ghost {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border-color: rgba(255, 255, 255, .25);
}

.panel-form__breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--aranjuez-blue);
    font-weight: 800;
    background: rgba(255, 255, 255, .75);
    border: 1px solid var(--aranjuez-border);
    border-radius: 999px;
    padding: .55rem .85rem;
}

.panel-form__topgrid {
    grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
    gap: clamp(1rem, 2vw, 2rem);
}

.panel-featured,
.panel-checks,
.panel-form .wp-editor-wrap {
    border-radius: 16px;
    border-color: rgba(15, 49, 90, .15);
}

.panel-featured__preview {
    border-radius: 14px;
}

#panel-map {
    height: clamp(380px, 50vh, 620px) !important;
    border-radius: 20px !important;
    box-shadow: inset 0 0 0 1px rgba(15, 49, 90, .10);
}

.panel-login {
    max-width: 460px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .32);
}

.panel-login__brand::before {
    content: '';
    display: block;
    width: 210px;
    max-width: 82%;
    height: 70px;
    margin: 0 auto 1.2rem;
    background: url('https://rutas.aranjuez.es/wp-content/uploads/2026/05/aranjuezblanco-1.png') center center / contain no-repeat, var(--aranjuez-blue);
    border-radius: 20px;
    box-shadow: 0 16px 34px rgba(15, 49, 90, .28);
}

.panel-login__brand h1 {
    color: var(--aranjuez-blue);
    font-weight: 900;
}

.panel-flash {
    margin: 1rem clamp(1rem, 2.5vw, 3rem) 0;
    border-radius: 16px;
    font-weight: 700;
}

.panel-shell--login .panel-flash {
    margin: 0 0 1rem;
}

@media (min-width: 1180px) {
    .panel-main {
        padding-left: 3.2rem !important;
        padding-right: 3.2rem !important;
    }
}

@media (max-width: 980px) {
    .panel-nav {
        position: static;
    }
    .panel-nav__brand,
    .panel-nav__links,
    .panel-nav__user {
        width: 100%;
        justify-content: center;
        text-align: center;
        margin-left: 0;
    }
    .panel-nav__brand a {
        justify-content: center;
        min-width: 0;
        width: 100%;
    }
    .panel-nav__links {
        justify-content: center;
    }
    .panel-dashboard-hero {
        flex-direction: column;
    }
    .panel-dashboard-hero__stats {
        min-width: 0;
        align-self: auto;
    }
    .panel-list__item,
    .panel-list--rutas .panel-list__item {
        grid-template-columns: 72px minmax(0, 1fr);
    }
    .panel-list__meta,
    .panel-list__actions,
    .panel-list--rutas .panel-list__meta,
    .panel-list--rutas .panel-list__actions {
        grid-column: 2;
    }
    .panel-list--rutas .panel-list__title {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .panel-main {
        padding: .85rem .75rem 2rem !important;
    }
    .panel-dashboard-hero,
    .panel-form-head,
    .panel-card,
    .panel-form,
    .acf-form,
    .panel-form-danger {
        border-radius: 18px;
    }
    .panel-dashboard-hero__stats {
        grid-template-columns: 1fr 1fr;
    }
    .panel-nav__brand a {
        flex-direction: column;
        gap: .6rem;
    }
    .panel-nav__brand-text {
        padding-left: 0;
        border-left: 0;
    }
    .panel-nav__links a {
        padding: .55rem .7rem;
    }
    .panel-form__topgrid {
        grid-template-columns: 1fr;
    }
    .panel-list__item,
    .panel-list--rutas .panel-list__item {
        grid-template-columns: 1fr;
        gap: .65rem;
    }
    .panel-list__thumb,
    .panel-list__meta,
    .panel-list__actions,
    .panel-list--rutas .panel-list__meta,
    .panel-list--rutas .panel-list__actions,
    .panel-list--rutas .panel-list__title {
        grid-column: 1;
    }
    .panel-list__thumb {
        width: 100%;
        height: 160px;
    }
    .panel-list__actions {
        justify-content: flex-start;
    }
}

/* ---------- Ayuda y formación ---------- */
.panel-card__eyebrow {
    margin: 0 0 .25rem;
    color: var(--aranjuez-gold, #c7a75b);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .76rem;
    font-weight: 800;
}

.panel-muted {
    color: #64748b;
    margin: .25rem 0 0;
}

.panel-help-card {
    background: linear-gradient(135deg, #ffffff 0%, #f6f8fc 100%);
}

.panel-dashboard-hero--help {
    background:
        linear-gradient(135deg, rgba(20,58,99,.95), rgba(30,85,137,.86)),
        url('https://rutas.aranjuez.es/wp-content/uploads/migracion/palacios-templos_35.jpg') center center / cover no-repeat;
}

.panel-dashboard-hero__stats--help strong {
    font-size: 1.15rem;
}

.panel-help-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 1.4rem;
    align-items: start;
}

.panel-help-block {
    min-width: 0;
}

.panel-pdf-viewer {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(20, 58, 99, .14);
    background: #eef3f8;
    min-height: 680px;
}

.panel-pdf-viewer iframe {
    display: block;
    width: 100%;
    height: 680px;
    border: 0;
    background: #eef3f8;
}

.panel-video-embed {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #0f2339;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.panel-video-embed iframe,
.panel-video-embed video,
.panel-video-file {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 260px;
    border: 0;
    border-radius: 18px;
    background: #0f2339;
}

.panel-help-placeholder {
    border: 1px dashed rgba(20, 58, 99, .28);
    background: linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
    border-radius: 18px;
    padding: 2rem;
    color: #415168;
}

.panel-help-placeholder h3 {
    margin-top: 0;
    color: #143a63;
}

.panel-help-quick {
    margin-top: 1.4rem;
}

.panel-help-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.panel-help-steps div {
    background: #f7f9fc;
    border: 1px solid #dfe7f0;
    border-radius: 18px;
    padding: 1.1rem;
    min-height: 120px;
}

.panel-help-steps strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #143a63;
    color: #fff;
    margin-bottom: .75rem;
    font-weight: 900;
}

.panel-help-steps span {
    display: block;
    color: #334155;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .panel-help-grid {
        grid-template-columns: 1fr;
    }
    .panel-pdf-viewer,
    .panel-pdf-viewer iframe {
        min-height: 560px;
        height: 560px;
    }
    .panel-help-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .panel-pdf-viewer,
    .panel-pdf-viewer iframe {
        min-height: 420px;
        height: 420px;
    }
    .panel-help-steps {
        grid-template-columns: 1fr;
    }
    .panel-help-placeholder {
        padding: 1.25rem;
    }
}

/* ---------- Ayuda 1.0.5: vídeo grande y PDF descargable ---------- */
.panel-main--help {
    display: grid;
    gap: 1.4rem;
}

.panel-help-video-card,
.panel-help-manual-card {
    overflow: hidden;
}

.panel-help-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.panel-video-embed--large iframe,
.panel-video-embed--large video,
.panel-video-file--large {
    width: 100% !important;
    min-height: 520px;
    aspect-ratio: 16 / 9;
}

.panel-video-file--large {
    display: block;
    border-radius: 18px;
    background: #0f2339;
}

.panel-help-placeholder--large {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-pdf-viewer--large,
.panel-pdf-viewer--large iframe {
    min-height: 760px;
    height: 760px;
}

@media (max-width: 900px) {
    .panel-card__head--stack-mobile {
        display: block;
    }
    .panel-help-actions {
        justify-content: flex-start;
        margin-top: 1rem;
    }
    .panel-video-embed--large iframe,
    .panel-video-embed--large video,
    .panel-video-file--large {
        min-height: 360px;
    }
    .panel-pdf-viewer--large,
    .panel-pdf-viewer--large iframe {
        min-height: 560px;
        height: 560px;
    }
}

@media (max-width: 600px) {
    .panel-help-actions .panel-btn {
        width: 100%;
        justify-content: center;
    }
    .panel-video-embed--large iframe,
    .panel-video-embed--large video,
    .panel-video-file--large {
        min-height: 240px;
    }
    .panel-pdf-viewer--large,
    .panel-pdf-viewer--large iframe {
        min-height: 430px;
        height: 430px;
    }
}

/* ---------- Visibilidad pública 1.0.6 ---------- */
.panel-badge--hidden {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid rgba(30, 58, 138, .14);
}

.panel-btn--success {
    background: #15803d;
    color: #fff;
    border-color: #15803d;
}

.panel-btn--success:hover {
    background: #166534;
    border-color: #166534;
    color: #fff;
}

.panel-inline-form {
    display: inline-flex;
    margin: 0;
}

.panel-form__visibility {
    padding: 1rem;
    border: 1px solid rgba(15, 49, 90, .12);
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
}

.panel-switch {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    cursor: pointer;
    padding: .85rem;
    border: 1px solid rgba(15, 49, 90, .10);
    border-radius: 16px;
    background: #fff;
}

.panel-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.panel-switch__ui {
    position: relative;
    flex: 0 0 auto;
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: inset 0 0 0 1px rgba(15, 49, 90, .08);
    transition: all .18s ease;
}

.panel-switch__ui::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .20);
    transition: all .18s ease;
}

.panel-switch input[type="checkbox"]:checked + .panel-switch__ui {
    background: #1e5b91;
}

.panel-switch input[type="checkbox"]:checked + .panel-switch__ui::after {
    transform: translateX(24px);
}

.panel-switch__text {
    display: grid;
    gap: .25rem;
    color: #143a63;
    font-weight: 800;
    line-height: 1.35;
}

.panel-switch__text small {
    color: #64748b;
    font-weight: 500;
    line-height: 1.45;
}

.panel-visibility-field .panel-switch {
    max-width: 720px;
}

@media (min-width: 1180px) {
    .panel-form__topgrid {
        grid-template-columns: minmax(280px, .8fr) minmax(320px, 1fr) minmax(300px, .95fr);
    }
}

@media (max-width: 980px) {
    .panel-inline-form {
        width: auto;
    }
}

@media (max-width: 720px) {
    .panel-inline-form,
    .panel-inline-form .panel-btn {
        width: 100%;
    }
    .panel-switch {
        padding: .75rem;
    }
}

.panel-dashboard-hero__stats {
    grid-template-columns: repeat(3, minmax(105px, 1fr));
}

@media (max-width: 720px) {
    .panel-dashboard-hero__stats {
        grid-template-columns: 1fr;
    }
}
