/* ============================================================
   Imanes QR Hoteles - hoja de estilos propia (sin frameworks)
   Mobile-first. Variables en :root para fácil theming.
   ============================================================ */

:root {
    --color-primary: #0e7490;
    --color-primary-dark: #155e75;
    --color-accent: #f59e0b;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #f3f7f9;
    --color-border: #e5e7eb;
    --color-success: #15803d;
    --color-error: #b91c1c;
    --radius: 10px;
    --shadow: 0 4px 14px rgba(15, 40, 55, 0.08);
    --container: 1120px;
    --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}
.container-narrow { max-width: 720px; }

/* ---------- Botones ---------- */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-outline { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.1rem; }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.inline-form { display: inline; }

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1rem;
    flex-wrap: wrap;
}
.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
}
.nav-toggle {
    display: block;
    margin-left: auto;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1.3rem;
    padding: 0.2rem 0.7rem;
    cursor: pointer;
    color: var(--color-text);
}
.main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem 0;
}
.main-nav.open { display: flex; }
.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.3rem 0.4rem;
}
.main-nav a:hover { color: var(--color-primary); }
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.lang-selector { display: inline-flex; gap: 0.25rem; }
.lang-selector a {
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-light);
    border: 1px solid transparent;
}
.lang-selector a.active {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ---------- Flash ---------- */
.flash { padding: 0.8rem 1rem; font-weight: 500; }
.flash-success { background: #dcfce7; color: var(--color-success); }
.flash-error { background: #fee2e2; color: var(--color-error); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}
.hero h1 { font-size: 2rem; line-height: 1.25; max-width: 800px; margin: 0 auto 1rem; }
.hero-subtitle { font-size: 1.1rem; opacity: 0.92; max-width: 680px; margin: 0 auto 1.8rem; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--color-primary); }

/* ---------- Secciones ---------- */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title { text-align: center; font-size: 1.7rem; margin-bottom: 0.4rem; }
.section-subtitle { text-align: center; color: var(--color-text-light); max-width: 640px; margin: 0 auto 2.2rem; }
.page-hero { padding: 2.5rem 0 1rem; text-align: center; }
.page-hero h1 { font-size: 2rem; }

/* ---------- Pasos ---------- */
.steps-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: 1fr;
}
.step-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow);
}
.section-alt .step-card { background: #fff; }
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.step-card h3 { margin-bottom: 0.4rem; }
.step-card p { color: var(--color-text-light); }

/* ---------- Diseños ---------- */
.designs-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.design-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.design-card img { width: 100%; height: 180px; object-fit: cover; }
.design-placeholder {
    height: 180px;
    background: repeating-linear-gradient(45deg, #e0f2f6, #e0f2f6 12px, #d2eaf0 12px, #d2eaf0 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.design-placeholder-qr {
    width: 56px;
    height: 56px;
    background:
        linear-gradient(90deg, var(--color-primary) 10px, transparent 10px) 0 0 / 18px 18px,
        linear-gradient(var(--color-primary) 10px, transparent 10px) 0 0 / 18px 18px,
        #fff;
    border: 4px solid var(--color-primary);
    border-radius: 6px;
}
.design-placeholder-name { font-weight: 700; color: var(--color-primary-dark); }
.design-info { padding: 1rem; }
.design-info h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.design-info p { color: var(--color-text-light); font-size: 0.92rem; }
.design-meta { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.85rem; }
.design-extra { color: var(--color-accent); font-weight: 600; }
.design-included { color: var(--color-success); font-weight: 600; }

/* ---------- Planes ---------- */
.plans-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: 1fr;
    max-width: 860px;
    margin: 0 auto;
}
.plan-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.plan-featured { border: 2px solid var(--color-primary); }
.plan-badge {
    position: absolute;
    top: -0.8rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.15rem 0.9rem;
    border-radius: 999px;
}
.plan-price { font-size: 2.2rem; font-weight: 800; color: var(--color-primary-dark); margin: 0.6rem 0 0.2rem; }
.plan-interval { font-size: 1rem; font-weight: 500; color: var(--color-text-light); }
.plan-save { color: var(--color-success); font-weight: 600; margin-bottom: 0.4rem; }
.plan-features { list-style: none; margin: 1rem 0 1.5rem; text-align: left; }
.plan-features li { padding: 0.35rem 0 0.35rem 1.6rem; position: relative; color: var(--color-text); }
.plan-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: 700;
}
.pricing-note { text-align: center; color: var(--color-text-light); margin-top: 2rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 0.7rem;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: none;
    border: none;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
}
.faq-icon { font-size: 1.3rem; color: var(--color-primary); transition: transform 0.15s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 1.2rem 1rem; color: var(--color-text-light); }
.faq-item.open .faq-answer { display: block; }

/* ---------- CTA ---------- */
.cta-section {
    background: var(--color-primary-dark);
    color: #fff;
    text-align: center;
}
.cta-section h2 { margin-bottom: 0.5rem; }
.cta-section p { opacity: 0.9; margin-bottom: 1.5rem; }

/* ---------- Formularios ---------- */
.form-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.form-card h1 { font-size: 1.5rem; margin-bottom: 1.2rem; }
.auth-intro { color: var(--color-text-light); margin-bottom: 1.2rem; }
.auth-section { padding: 3rem 0; }
.auth-alt { margin-top: 1rem; text-align: center; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid var(--color-primary);
    border-color: var(--color-primary);
}
.field-error { color: var(--color-error); font-size: 0.88rem; margin-top: 0.25rem; }

/* ---------- Panel ---------- */
.panel-body { background: var(--color-bg-alt); }
.panel-layout { display: flex; min-height: 100vh; flex-direction: column; }
.panel-sidebar {
    background: #fff;
    border-right: 1px solid var(--color-border);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.panel-logo { font-size: 1.1rem; }
.panel-menu { display: flex; flex-direction: column; gap: 0.2rem; }
.panel-menu a {
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    color: var(--color-text);
    font-weight: 500;
}
.panel-menu a:hover { background: var(--color-bg-alt); }
.panel-menu a.active { background: var(--color-primary); color: #fff; }
.panel-sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.panel-main { flex: 1; padding: 1.5rem; }
.panel-content h1 { font-size: 1.5rem; margin-bottom: 1.2rem; }

.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.4rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow);
}
.card h2 { font-size: 1.15rem; margin-bottom: 0.8rem; }
.card-notice { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.data-list { display: grid; grid-template-columns: 160px 1fr; row-gap: 0.4rem; }
.data-list dt { font-weight: 600; color: var(--color-text-light); }
.data-list dd { margin: 0; }

/* ---------- Errores ---------- */
.error-section { text-align: center; padding: 5rem 0; }
.error-section h1 { font-size: 4rem; color: var(--color-primary); }
.error-section h2 { margin-bottom: 0.6rem; }
.error-section p { color: var(--color-text-light); margin-bottom: 1.4rem; }

/* ---------- Legal ---------- */
.legal-content { color: var(--color-text); }

/* ---------- Footer ---------- */
.site-footer {
    background: #0b3540;
    color: #cbd5e1;
    padding: 2.5rem 0 1.2rem;
    margin-top: 2rem;
}
.footer-grid {
    display: grid;
    gap: 1.6rem;
    grid-template-columns: 1fr;
}
.footer-brand { font-weight: 800; color: #fff; font-size: 1.1rem; }
.footer-tagline { font-size: 0.9rem; opacity: 0.8; }
.footer-heading { font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.site-footer a { display: block; color: #cbd5e1; padding: 0.15rem 0; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.site-footer .lang-selector a { display: inline-block; color: #cbd5e1; }
.site-footer .lang-selector a.active { color: #fff; border-color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 1.8rem;
    padding-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
    .steps-grid { grid-template-columns: repeat(3, 1fr); }
    .plans-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
    .hero h1 { font-size: 2.6rem; }
}

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .main-nav {
        display: flex;
        width: auto;
        flex-direction: row;
        gap: 1rem;
        padding: 0;
        margin-left: 1.5rem;
    }
    .header-inner { flex-wrap: nowrap; }
    .header-actions { margin-left: auto; }
    .panel-layout { flex-direction: row; }
    .panel-sidebar { width: 240px; min-height: 100vh; }
}

/* ============================================================
   Panel del hotel (fase 3)
   ============================================================ */
.panel-intro { margin-bottom: 1.2rem; color: var(--color-text-light); }
.form-grid {
    display: grid;
    gap: 0 1.2rem;
    grid-template-columns: 1fr;
}
.form-help { font-size: 0.85rem; color: var(--color-text-light); margin-top: 0.3rem; }
.checkbox-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.checkbox-group input { width: auto; }
.copy-row { display: flex; gap: 0.5rem; align-items: center; }
.copy-row input { flex: 1; background: var(--color-bg-alt); }

/* Tarjetas de estadísticas */
.stat-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-bottom: 1.2rem;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.stat-label { font-size: 0.85rem; color: var(--color-text-light); font-weight: 600; }
.stat-value { font-size: 1.6rem; color: var(--color-primary-dark); }
.stat-note { font-size: 0.85rem; color: var(--color-text-light); }
a.stat-note { color: var(--color-primary); }

/* Accesos rápidos */
.quick-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* Badges de estado */
.badge {
    display: inline-block;
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
}
.badge-active, .badge-order-delivered { background: #dcfce7; color: var(--color-success); }
.badge-grace, .badge-past_due, .badge-order-production { background: #fef3c7; color: #92400e; }
.badge-cancelled, .badge-expired, .badge-order-cancelled { background: #fee2e2; color: var(--color-error); }
.badge-none { background: var(--color-bg-alt); color: var(--color-text-light); }
.badge-order-pending { background: #e0f2f6; color: var(--color-primary-dark); }
.badge-order-shipped { background: #dbeafe; color: #1d4ed8; }
.badge-main { background: var(--color-accent); color: #fff; }

.flash-warning { background: #fef3c7; color: #92400e; }

/* Tablas del panel */
.table-responsive { overflow-x: auto; }
.panel-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.panel-table th, .panel-table td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.panel-table th { font-weight: 700; color: var(--color-text-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.02em; }
.url-cell { word-break: break-all; font-size: 0.85rem; }
.actions-cell { white-space: nowrap; }
.actions-cell .btn { margin: 0.1rem 0.1rem 0.1rem 0; }

/* Selector de plantilla con mockup CSS */
.template-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.template-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.8rem;
    cursor: pointer;
    background: #fff;
}
.template-card input { position: absolute; opacity: 0; pointer-events: none; }
.template-card:has(input:checked) { border-color: var(--color-primary); box-shadow: var(--shadow); }
.template-mockup {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    padding-bottom: 10px;
}
.template-mockup .tm-header { display: block; height: 34px; }
.template-mockup .tm-title { display: block; height: 8px; width: 55%; margin: 8px 10px 0; border-radius: 4px; opacity: 0.85; }
.template-mockup .tm-text { display: block; height: 5px; width: 80%; margin: 0 10px; border-radius: 3px; opacity: 0.35; }
.template-mockup .tm-text.short { width: 60%; }
.template-mockup .tm-btn { display: block; height: 14px; width: 42%; margin: 6px 10px 0; border-radius: 7px; }
.template-desc { font-size: 0.85rem; color: var(--color-text-light); }

/* Checkboxes de amenidades con icono */
.amenities-checks {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.amenity-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    font-weight: 500;
}
.amenity-check:hover { background: var(--color-bg-alt); }
.amenity-check input { width: auto; }
.amenity-check svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }

/* Galería de fotos */
.upload-form { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.photo-grid {
    list-style: none;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.photo-item {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}
.photo-item.is-main { border: 2px solid var(--color-accent); }
.photo-item img { width: 100%; height: 130px; object-fit: cover; }
.photo-item .badge-main { position: absolute; top: 0.4rem; left: 0.4rem; }
.photo-actions {
    display: flex;
    gap: 0.3rem;
    padding: 0.45rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Barras horizontales de desgloses */
.card-duo { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.bar-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.bar-label { width: 90px; font-size: 0.88rem; font-weight: 600; flex-shrink: 0; }
.bar-track { flex: 1; height: 12px; background: var(--color-bg-alt); border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--color-primary); border-radius: 6px; }
.bar-value { width: 44px; text-align: right; font-size: 0.85rem; color: var(--color-text-light); flex-shrink: 0; }

/* Gráfico canvas */
.chart-wrap { width: 100%; overflow-x: auto; }
.chart-wrap canvas { width: 100%; max-width: 100%; }

/* Modal "ver QR" */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 40, 55, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal[hidden] { display: none; }
.modal-box {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.modal-box img { width: 300px; height: 300px; }
.modal-close {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--color-text-light);
}

/* Diseños seleccionables (nuevo pedido) */
.design-select { cursor: pointer; position: relative; }
.design-select input { position: absolute; opacity: 0; pointer-events: none; }
.design-select:has(input:checked) { border: 2px solid var(--color-primary); }
.design-select .design-placeholder { display: flex; }
.design-cell { display: flex; align-items: center; gap: 0.6rem; }
.design-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.design-thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

@media (min-width: 720px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .card-duo { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Fase 5: panel SUPER ADMIN, impersonación y GDPR
   ============================================================ */

/* Sidebar admin: variante oscura diferenciadora */
.admin-sidebar { background: #0b3540; border-right: none; }
.admin-sidebar .panel-logo { color: #fff; }
.admin-sidebar .panel-menu a { color: #cbd5e1; }
.admin-sidebar .panel-menu a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-sidebar .panel-menu a.active { background: var(--color-accent); color: #fff; }
.admin-sidebar .panel-sidebar-footer > a { color: #cbd5e1; }
.admin-sidebar .panel-sidebar-footer > a:hover { color: #fff; }
.admin-sidebar .lang-selector a { color: #cbd5e1; }
.admin-sidebar .lang-selector a.active { color: #fff; border-color: #fff; }
.admin-sidebar .btn-outline { border-color: #cbd5e1; color: #cbd5e1; }
.admin-sidebar .btn-outline:hover { background: #cbd5e1; color: #0b3540; }

/* Banner fijo de impersonación (panel hotel visto por el admin) */
.impersonation-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #92400e;
    color: #fff;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.92rem;
}
.impersonation-banner .btn { border-color: #fff; color: #fff; background: transparent; }
.impersonation-banner .btn:hover { background: #fff; color: #92400e; }
body.has-impersonation-banner .panel-layout { padding-top: 2.6rem; }

/* Paginación */
.pagination { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.pagination a, .pagination span {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.9rem;
}
.pagination span.current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Filtros de listados admin */
.filter-form { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.2rem; }
.filter-form .form-group { margin-bottom: 0; min-width: 180px; }

/* Pestañas de configuración */
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.tabs a {
    padding: 0.45rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-weight: 600;
    color: var(--color-text);
    background: #fff;
}
.tabs a.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Miniaturas de diseños en admin */
.design-thumb-lg { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }

/* raw_response de pagos */
.raw-response {
    background: #0b3540;
    color: #d1fae5;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.82rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 480px;
    overflow-y: auto;
}

/* ---------- Banner de cookies GDPR ---------- */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: #0b3540;
    color: #e2e8f0;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.25);
}
.gdpr-banner-text { max-width: 640px; font-size: 0.92rem; }
.gdpr-policy-link { color: #7dd3fc; text-decoration: underline; }
.gdpr-banner-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gdpr-banner .btn-outline { border-color: #cbd5e1; color: #cbd5e1; }
.gdpr-banner .btn-outline:hover { background: #cbd5e1; color: #0b3540; }

/* Modal de preferencias de cookies */
.gdpr-modal {
    position: fixed;
    inset: 0;
    z-index: 310;
    background: rgba(15, 40, 55, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.gdpr-modal-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.6rem;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow);
}
.gdpr-modal-box h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.gdpr-toggle { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--color-border); font-weight: 500; }
.gdpr-toggle input { width: 1.1rem; height: 1.1rem; }
.gdpr-modal-box .btn { margin-top: 1.2rem; }

/* Zona de peligro (borrado de cuenta) */
.card-danger { border-color: #fca5a5; }
.card-danger h2 { color: var(--color-error); }

/* ============================================================
   Home comercial (rediseño Barcelona): hero, flotantes, skyline,
   reveal on scroll, sección piloto BCN, planes y CTA final.
   ============================================================ */

/* ---------- Hero home ---------- */
.hero-home {
    position: relative;
    overflow: hidden;
    text-align: left;
    padding: 4.5rem 0 0;
    /* Fallback: degradado oscuro si la foto no carga */
    background-color: #0b3540;
    background-image:
        linear-gradient(155deg, rgba(11, 53, 64, 0.92) 0%, rgba(14, 116, 144, 0.82) 55%, rgba(21, 94, 117, 0.88) 100%),
        url('https://images.unsplash.com/photo-1583422409516-2895a77efded?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
}
.hero-home-inner {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
    align-items: center;
    padding-bottom: 6.5rem;
}
.hero-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.65);
    color: #fcd34d;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}
.hero-home h1 { margin: 0 0 1rem; font-size: 2.1rem; line-height: 1.2; max-width: 620px; }
.hero-home .hero-subtitle { margin: 0 0 1.8rem; max-width: 560px; font-size: 1.08rem; opacity: 0.94; }
.hero-home .hero-actions { justify-content: flex-start; }
.hero-points {
    list-style: none;
    display: flex;
    gap: 0.5rem 1.4rem;
    flex-wrap: wrap;
    margin-top: 1.6rem;
    font-size: 0.92rem;
    font-weight: 600;
}
.hero-points li { position: relative; padding-left: 1.4rem; opacity: 0.92; }
.hero-points li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    font-weight: 800;
}

/* Skyline de Barcelona (separador con la siguiente sección) */
.hero-skyline {
    display: block;
    width: 100%;
    height: 90px;
    fill: #ffffff; /* color de fondo de la sección siguiente */
}

/* ---------- Composición visual flotante ---------- */
.hero-visual {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.phone-mockup {
    position: relative;
    width: 220px;
    background: #0f172a;
    border-radius: 34px;
    padding: 10px;
    box-shadow: 0 24px 50px rgba(2, 20, 28, 0.55);
    transform: rotate(-4deg);
}
.phone-notch {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 14px;
    background: #0f172a;
    border-radius: 999px;
    z-index: 2;
}
.phone-screen {
    background: #fff;
    border-radius: 26px;
    overflow: hidden;
}
.pm-cover {
    height: 110px;
    /* Fallback: degradado si la foto no carga */
    background-color: #155e75;
    background-image:
        linear-gradient(160deg, rgba(14, 116, 144, 0.35), rgba(11, 53, 64, 0.55)),
        url('https://images.unsplash.com/photo-1590490360182-c33d57733427?auto=format&fit=crop&w=600&q=70');
    background-size: cover;
    background-position: center;
}
.pm-body {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px 14px 16px;
}
.pm-hotel { font-weight: 800; font-size: 0.95rem; color: #1f2937; }
.pm-city { font-size: 0.72rem; color: #6b7280; margin-top: -6px; }
.pm-btn {
    display: block;
    text-align: center;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 0;
    border-radius: 8px;
    margin-top: 4px;
}
.pm-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    color: #374151;
    background: #f3f7f9;
    border-radius: 7px;
    padding: 6px 8px;
}
.pm-ico {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--color-primary);
    position: relative;
}
.pm-ico-wifi { border-radius: 50%; background: conic-gradient(var(--color-primary) 0 25%, #cbd5e1 25% 100%); }
.pm-ico-star { background: var(--color-accent); clip-path: polygon(50% 0, 63% 35%, 100% 38%, 72% 60%, 82% 100%, 50% 76%, 18% 100%, 28% 60%, 0 38%, 37% 35%); }
.pm-ico-pin { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #dc2626; }

.magnet-card {
    position: absolute;
    right: 0;
    bottom: 8px;
    background: #fff;
    border-radius: 16px;
    padding: 12px 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 18px 40px rgba(2, 20, 28, 0.45);
    transform: rotate(5deg);
}
.magnet-card img { width: 96px; height: 96px; display: block; }
.magnet-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.float-chip {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(2, 20, 28, 0.35);
    white-space: nowrap;
}
.float-chip::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-right: 7px;
    vertical-align: 1px;
}
.chip-reviews { top: 6px; right: 12px; }
.chip-wifi { top: 34%; left: -10px; }
.chip-scans { bottom: 26%; left: 6px; }

/* Animación flotante */
@keyframes hero-float {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -12px; }
}
.float-slow { animation: hero-float 7s ease-in-out infinite; }
.float-med { animation: hero-float 5.6s ease-in-out 0.7s infinite; }
.float-fast { animation: hero-float 4.6s ease-in-out 1.2s infinite; }

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.steps-grid .step-card:nth-child(2) { transition-delay: 0.12s; }
.steps-grid .step-card:nth-child(3) { transition-delay: 0.24s; }
.designs-grid .design-card:nth-child(3n+2) { transition-delay: 0.1s; }
.designs-grid .design-card:nth-child(3n) { transition-delay: 0.2s; }

/* ---------- Diseños: hover 3D suave ---------- */
.design-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
}
.design-card:hover {
    transform: perspective(900px) rotateX(4deg) rotateY(-6deg) translateY(-6px);
    box-shadow: 0 20px 38px rgba(15, 40, 55, 0.16);
}

/* ---------- Sección Barcelona (piloto) ---------- */
.bcn-grid {
    display: grid;
    gap: 2.2rem;
    grid-template-columns: 1fr;
    align-items: center;
}
.bcn-badge {
    background: rgba(14, 116, 144, 0.1);
    border-color: rgba(14, 116, 144, 0.4);
    color: var(--color-primary-dark);
}
.bcn-title { font-size: 1.8rem; margin-bottom: 0.7rem; }
.bcn-text { color: var(--color-text-light); margin-bottom: 1.1rem; max-width: 540px; }
.bcn-points { list-style: none; margin-bottom: 1.4rem; }
.bcn-points li {
    position: relative;
    padding: 0.35rem 0 0.35rem 1.7rem;
    font-weight: 600;
}
.bcn-points li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.72rem;
    border-radius: 50%;
}
.bcn-zones-label { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.5rem; }
.zone-chips { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.zone-chip {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    color: var(--color-primary-dark);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
}
.bcn-media { display: flex; flex-direction: column; gap: 1.2rem; }
.bcn-photo {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 40, 55, 0.18);
    /* Fallback si la foto no carga */
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}
.bcn-counters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}
.counter {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.9rem 0.6rem;
    text-align: center;
}
.counter-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    font-variant-numeric: tabular-nums;
}
.counter-label { font-size: 0.78rem; color: var(--color-text-light); font-weight: 600; }

/* ---------- Plan destacado (anual) ---------- */
.plan-featured {
    border: 2px solid transparent;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, var(--color-primary), var(--color-accent)) border-box;
    box-shadow: 0 16px 36px rgba(14, 116, 144, 0.18);
}
.plan-badge {
    background: linear-gradient(135deg, var(--color-accent), #d97706);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

/* ---------- CTA final ---------- */
.cta-final {
    position: relative;
    overflow: hidden;
    color: #fff;
    text-align: center;
    padding: 5rem 0;
    /* Fallback: color oscuro si la foto no carga */
    background-color: #0b3540;
    background-image:
        linear-gradient(120deg, rgba(14, 116, 144, 0.94), rgba(21, 94, 117, 0.9), rgba(245, 158, 11, 0.75), rgba(14, 116, 144, 0.94)),
        url('https://images.unsplash.com/photo-1551882547-ff40c63fe5fa?auto=format&fit=crop&w=1600&q=80');
    background-size: 300% 300%, cover;
    background-position: 0% 50%, center;
    animation: cta-gradient 14s ease infinite;
}
@keyframes cta-gradient {
    0%, 100% { background-position: 0% 50%, center; }
    50% { background-position: 100% 50%, center; }
}
.cta-final-inner h2 { font-size: 2rem; margin-bottom: 0.6rem; }
.cta-final-inner p { opacity: 0.94; max-width: 560px; margin: 0 auto 1.8rem; font-size: 1.08rem; }
.btn-cta {
    background: #fff;
    color: var(--color-primary-dark);
}
.btn-cta:hover { background: var(--color-accent); color: #fff; }

/* ---------- Responsive home ---------- */
@media (min-width: 720px) {
    .hero-home h1 { font-size: 2.9rem; }
    .hero-skyline { height: 120px; }
}
@media (min-width: 900px) {
    .hero-home-inner { grid-template-columns: 1.05fr 0.95fr; }
    .bcn-grid { grid-template-columns: 1fr 1fr; }
    .plan-featured { transform: scale(1.045); }
}
@media (max-width: 560px) {
    .hero-visual { min-height: 0; margin-top: 0.5rem; flex-wrap: wrap; gap: 1rem; }
    .magnet-card { position: static; transform: rotate(3deg); margin-top: 1.2rem; }
    .chip-wifi, .chip-scans { display: none; }
    .chip-reviews { top: -14px; right: -4px; }
    .bcn-counters { grid-template-columns: 1fr; }
}

.footer-dev { margin-top: 0.3rem; opacity: 0.85; }

/* ---------- Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    .float-slow, .float-med, .float-fast { animation: none; }
    .cta-final { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .design-card, .design-card:hover { transform: none; transition: none; }
}

/* ============================================================
   Auth split-screen (login / registro, layouts/auth.php)
   Columna izquierda: imagen + marca + bullets (oculta en móvil).
   Columna derecha: tarjeta del formulario centrada.
   ============================================================ */
.auth-body { min-height: 100vh; }

.auth-split {
    display: flex;
    min-height: 100vh;
}

/* Columna de marca (degradado como fallback bajo la imagen) */
.auth-aside {
    position: relative;
    flex: 1 1 45%;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: 3rem;
    color: #fff;
    background: linear-gradient(150deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, #0b3540 100%);
}
.auth-aside-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Velo para legibilidad del texto sobre la imagen */
.auth-aside::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 53, 64, 0.85) 0%, rgba(11, 53, 64, 0.25) 55%, rgba(11, 53, 64, 0.15) 100%);
}
.auth-aside-content { position: relative; z-index: 1; max-width: 420px; }
.auth-brand {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
}
.auth-brand:hover { color: #fff; opacity: 0.9; }
.auth-tagline { font-size: 1.05rem; opacity: 0.92; margin-bottom: 1.4rem; }
.auth-bullets { list-style: none; }
.auth-bullets li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0;
    font-size: 0.95rem;
}
.auth-bullets svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

/* Columna del formulario */
.auth-main {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--color-bg-alt);
}
.auth-main > * { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
.auth-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.auth-back { font-size: 0.92rem; color: var(--color-text-light); }
.auth-back:hover { color: var(--color-primary); }
.auth-topbar .lang-selector { display: flex; gap: 0.6rem; }
.auth-topbar .lang-selector a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-decoration: none;
}
.auth-topbar .lang-selector a.active { color: var(--color-primary); text-decoration: underline; }
.auth-main .flash { border-radius: var(--radius); margin-bottom: 1rem; }

.auth-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(15, 40, 55, 0.1);
}
.auth-card h1 { font-size: 1.45rem; margin-bottom: 1.2rem; }

/* Input de contraseña con toggle mostrar/ocultar */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 2.8rem; }
.pass-toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--color-text-light);
    cursor: pointer;
}
.pass-toggle:hover, .pass-toggle:focus { color: var(--color-primary); outline: none; }
.pass-toggle svg { width: 20px; height: 20px; }

/* Botón principal con degradado de la paleta */
.auth-submit {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    box-shadow: 0 8px 18px rgba(14, 116, 144, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.auth-submit:hover {
    background: linear-gradient(135deg, #1089aa 0%, #17708d 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(14, 116, 144, 0.35);
}

/* Móvil: la imagen se oculta y el formulario ocupa toda la pantalla */
@media (max-width: 900px) {
    .auth-aside { display: none; }
    .auth-main { padding: 1.25rem 1rem 2rem; justify-content: flex-start; }
}
