/* HERO */
.hero {
    background: linear-gradient(135deg, #6c5ce7, #00cec9);
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* FEATURES */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 60px 20px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: transform .2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card .icon {
    font-size: 40px;
    margin-bottom: 15px;
}

/* CTA */
.cta {
    background: #f5f7fa;
    padding: 80px 20px;
    text-align: center;
}

.btn-large {
    padding: 14px 32px;
    font-size: 18px;
}

.cta {
    background: linear-gradient(135deg, #6C63FF, #5a52e0);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.cta .container {
    max-width: 900px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta p {
    margin-bottom: 30px; /* 👈 clave para que no se solape */
    font-size: 1.1rem;
    opacity: 0.95;
}

.cta .btn-large {
    display: inline-block; /* 👈 evita solapamientos */
    padding: 14px 32px;
    font-size: 1.1rem;
    border-radius: 10px;
}


/* HERO */

.pricing-hero {
    padding: 80px 20px 40px;
    text-align: center;
    background: linear-gradient(135deg, #6C63FF, #5a52e0);
    color: white;
}

.pricing-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* GRID */

.pricing {
    padding: 60px 20px 90px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

/* CARD */

.price-card {
    background: white;
    border-radius: 18px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    position: relative;
    transition: 0.25s;
}

.price-card:hover {
    transform: translateY(-6px);
}

.price-card.featured {
    border: 2px solid #6C63FF;
    transform: scale(1.05);
}

/* BADGE */

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff7a18;
    color: white;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* PRICE */

.price {
    font-size: 2.4rem;
    font-weight: bold;
    margin: 20px 0;
    color: #222;
}

.price span {
    font-size: 0.9rem;
    color: #777;
}

/* LIST */

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.price-card li {
    margin: 10px 0;
    color: #444;
}

/* BUTTONS */

.btn-outline {
    border: 2px solid #6C63FF;
    color: #6C63FF;
    padding: 12px 24px;
    border-radius: 10px;
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
}

.btn-outline:hover {
    background: #6C63FF;
    color: white;
}

/* MOBILE */

@media (max-width: 768px) {
    .price-card.featured {
        transform: none;
    }
}

.site-logo-bg {
    width: 220px;
    height: 55px;
    border-radius: 10px;
    display: block;
    background-image: url('/img/logo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.logo {
    display: flex;
    align-items: center;
}

@media (max-width: 640px) {
    .site-logo-bg {
        width: 136px;
        height: 40px;
    }
}

/* AUTH */

.auth-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #f5f7fb;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: white;
    padding: 40px 30px;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 25px;
}

.form-row {
    margin-bottom: 18px;
}

.btn-block {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
}

/* ===== FORM MODERNO ===== */

.auth-form .input,
.auth-form .form-group {
    margin-bottom: 20px;
}

/* Label */

.auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.9rem;
}

/* Input base */

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #e3e6ef;
    background: #fafbff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
}

/* Focus bonito */

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    border-color: #6C63FF;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

/* Hover suave */

.auth-form input:hover,
.auth-form select:hover {
    border-color: #cfd5ff;
}

.stand-row {
    border: 1px dashed #d7d9ef;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.stand-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.stand-card {
    border: 1px solid #e4e8f8;
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

/* Error */

.auth-form .error-message {
    color: #ff4d4f;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Placeholder */

.auth-form ::placeholder {
    color: #aaa;
}

/* Required asterisco */

.auth-form label .required {
    color: #ff4d4f;
}

/* ===== MARKETPLACE SCREENS ===== */

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.hero-market {
    text-align: left;
    padding: 84px 0 96px;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18), transparent 44%),
        linear-gradient(128deg, #0f766e 0%, #0f4c81 52%, #093057 100%);
}

.hero-market h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
    max-width: 740px;
}

.hero-market p {
    margin: 18px 0 30px;
    max-width: 620px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    padding: 7px 14px;
    margin-bottom: 14px;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.search-hub {
    margin-top: -54px;
    margin-bottom: 34px;
}

.search-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 12px 36px rgba(4, 21, 52, 0.15);
}

.search-box h2 {
    margin-bottom: 14px;
}

.hub-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.hub-grid label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.hub-grid input,
.hub-grid select,
.filters-grid input,
.filters-grid select {
    width: 100%;
    border: 1px solid #d8dce6;
    border-radius: 10px;
    height: 44px;
    padding: 0 12px;
    background: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

.section-list {
    margin-bottom: 28px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-link {
    color: #0f4c81;
    font-weight: 700;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.market-card,
.card-empty {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 22px rgba(20, 27, 45, 0.08);
}

.market-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.market-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(20, 27, 45, 0.14);
}

.market-card.is-current-plan {
    border: 2px solid #0f766e;
}

.market-card h3 {
    margin: 4px 0 10px;
    font-size: 1.07rem;
    line-height: 1.3;
}

.market-card p {
    margin-bottom: 8px;
    color: #4b5563;
}

.card-thumb {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    aspect-ratio: 16 / 9;
    background: #e6edf7;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-kicker {
    display: inline-block;
    color: #0f4c81;
    background: #e8f2ff;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.8rem;
    font-weight: 700;
}

.card-meta {
    font-size: 0.9rem;
}

.card-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    color: #0f766e;
}

.listing-page {
    padding-top: 38px;
}

.listing-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 16px;
}

.listing-head h1 {
    margin-bottom: 4px;
}

.filters-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(20, 27, 45, 0.08);
    padding: 14px;
    margin-bottom: 18px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.filters-actions {
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
}

.results-meta {
    margin-bottom: 12px;
    color: #475569;
    font-size: 0.95rem;
}

.btn-soft {
    background: #eef2ff;
    color: #334155;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
}

.btn-soft:hover {
    background: #dde5ff;
}

.card-empty {
    border: 1px dashed #cfd8ea;
}

.empty-state-icon {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: #0f4c81;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.83rem;
    font-weight: 700;
    color: #0f4c81;
    background: #edf4ff;
    border: 1px solid #d3e2f8;
}

.suggestion-chip:hover {
    background: #dfeeff;
    border-color: #b8d2f3;
    color: #0b3d68;
}

.listing-grid {
    margin-bottom: 22px;
}

.suggested-carousel-wrap {
    margin: 8px 0 24px;
}

.suggested-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

.suggested-carousel::-webkit-scrollbar {
    height: 8px;
}

.suggested-carousel::-webkit-scrollbar-thumb {
    background: #c9d5eb;
    border-radius: 999px;
}

.suggested-card {
    scroll-snap-align: start;
    min-height: 100%;
}

.suggested-status {
    display: inline-block;
    margin: 8px 0 2px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    color: #0f4c81;
    background: #e6f0ff;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.28);
    outline-offset: 2px;
}

@media (max-width: 920px) {
    .hub-grid,
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filters-actions {
        justify-content: stretch;
    }
}

@media (max-width: 640px) {
    .hero-market {
        text-align: center;
        padding: 70px 0 92px;
    }

    .hero-market h1,
    .hero-market p {
        max-width: none;
    }

    .hero-buttons {
        justify-content: center;
    }

    .search-hub {
        margin-top: -44px;
    }

    .search-box {
        padding: 18px;
    }

    .hub-grid,
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .listing-head,
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .suggested-carousel {
        grid-auto-columns: minmax(240px, 84vw);
    }
}

/* ===== DASHBOARD / PROFILE / FORMS ===== */

.form-shell,
.profile-card,
.admin-users-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(20, 27, 45, 0.08);
    padding: 22px;
}

.fair-form-page,
.profile-page,
.admin-page {
    padding-top: 30px;
}

.fair-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-header {
    margin-bottom: 14px;
}

.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.profile-tab {
    border: 1px solid #d7dfef;
    background: #f8faff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.profile-tab.is-active {
    background: #0f4c81;
    color: #fff;
    border-color: #0f4c81;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.is-active {
    display: block;
}

.profile-fairs {
    margin-top: 16px;
}

.profile-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.badge-role {
    background: #eef5ff;
    color: #0f4c81;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 10px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.admin-stat {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(20, 27, 45, 0.08);
    padding: 16px;
}

.admin-stat strong {
    display: block;
    font-size: 1.65rem;
    color: #0f4c81;
}

.admin-stat span {
    color: #4b5563;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

@media (max-width: 920px) {
    .fair-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .profile-meta {
        flex-direction: column;
    }
}

/* ===== TABLES / ADMIN NAV ===== */

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
}

.table-responsive thead th {
    background: #f1f5fb;
    color: #1f2937;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #dfe5ef;
}

.table-responsive th,
.table-responsive td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid #eef1f7;
}

.table-responsive tbody tr:hover {
    background: #f9fbff;
}

.actions a {
    margin-right: 10px;
    font-weight: 600;
}

.admin-table {
    border-radius: 12px;
    overflow: hidden;
}

.table-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #eaf0fb;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.table-badge.role-admin {
    background: #fee2e2;
    color: #991b1b;
}

.table-badge.role-organizer {
    background: #dbeafe;
    color: #1e3a8a;
}

.table-badge.role-user {
    background: #ecfeff;
    color: #115e59;
}

.table-badge.is-active {
    background: #dcfce7;
    color: #166534;
}

.table-badge.is-inactive {
    background: #fef2f2;
    color: #991b1b;
}

.admin-page .listing-head {
    align-items: center;
}

.admin-page .admin-actions .btn-outline {
    border-color: #c6d2ea;
    color: #16416d;
}

/* ===== FLASH TOASTS ===== */

.flash-stack {
    position: fixed;
    bottom: 84px;
    right: 16px;
    z-index: 2400;
    display: grid;
    gap: 10px;
    width: min(400px, calc(100vw - 24px));
    pointer-events: none;
}

.flash-toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 11px 12px;
    border: 1px solid #dbe4f0aa;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(3px);
    color: #0f172a;
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.22);
    pointer-events: auto;
    animation: toastIn .22s ease;
}

.flash-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: .95rem;
}

.flash-toast-body {
    font-weight: 600;
    line-height: 1.3;
    font-size: 0.92rem;
}

.flash-toast-close {
    border: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.flash-toast-close:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #111827;
}

.flash-toast.is-success {
    border-color: #16a34a4f;
    background: #f0fdf4f0;
}

.flash-toast.is-success .flash-toast-icon {
    background: #dcfce7;
    color: #15803d;
}

.flash-toast.is-error {
    border-color: #dc26264a;
    background: #fef2f2f0;
}

.flash-toast.is-error .flash-toast-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.flash-toast.is-warning {
    border-color: #d9770650;
    background: #fffbebf0;
}

.flash-toast.is-warning .flash-toast-icon {
    background: #fef3c7;
    color: #b45309;
}

.flash-toast.is-info {
    border-color: #2563eb4a;
    background: #eff6fff2;
}

.flash-toast.is-info .flash-toast-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.flash-toast.is-leaving {
    opacity: 0;
    transform: translateX(14px);
    transition: opacity .22s ease, transform .22s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 520px) {
    .flash-stack {
        bottom: 70px;
        right: 10px;
        left: auto;
        width: min(360px, calc(100vw - 20px));
    }
}

/* ===== NEWSLETTER POPUP ===== */

.newsletter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 12, 31, 0.54);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 2100;
    padding: 14px;
}

.newsletter-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.newsletter-modal {
    width: min(480px, 100%);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(7, 12, 31, 0.35);
    padding: 24px 22px 20px;
    position: relative;
}

.newsletter-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
    color: #61708a;
    cursor: pointer;
}

.newsletter-kicker {
    color: #0f4c81;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.newsletter-modal h3 {
    margin-bottom: 8px;
}

.newsletter-text {
    color: #4b5563;
    margin-bottom: 12px;
}

.newsletter-form label {
    display: block;
    font-weight: 700;
    color: #24324a;
    margin-bottom: 6px;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"],
.newsletter-form select {
    width: 100%;
    border: 1.5px solid #d3deef;
    background: #f8fbff;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 0.95rem;
    color: #1f2937;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.newsletter-form input[type="text"]:focus,
.newsletter-form input[type="email"]:focus,
.newsletter-form select:focus {
    outline: none;
    border-color: #0f4c81;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, .15);
}

.newsletter-optout {
    margin: 8px 0 12px;
}

.newsletter-optout label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0;
}

.newsletter-optout input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.newsletter-form #newsletterWebsite {
    position: absolute;
    left: -9999px;
}

.newsletter-open-btn {
    position: fixed;
    right: 14px;
    bottom: 18px;
    z-index: 2050;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    background: #0f4c81;
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 76, 129, 0.35);
    cursor: pointer;
}

body.is-auth-screen .newsletter-open-btn {
    display: none;
}

.newsletter-open-btn i {
    margin-right: 6px;
}

@media (max-width: 520px) {
    .newsletter-open-btn {
        width: auto;
        max-width: 220px;
        right: 10px;
        bottom: 10px;
        padding: 9px 12px;
        font-size: 0.88rem;
        text-align: center;
    }

    body.is-auth-screen .newsletter-open-btn {
        display: none;
    }
}

/* ===== LEGAL / FOOTER ===== */

.legal-check label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.92rem;
    color: #374151;
}

.legal-check input[type="checkbox"] {
    margin-top: 3px;
}

.legal-mini {
    margin-top: 2px;
}

.legal-mini label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.35;
}

.legal-mini input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(0.95);
}

.legal-mini a {
    color: #0f4c81;
    text-decoration: underline;
}

.legal-page {
    padding: 34px 0 50px;
    max-width: 840px;
}

.legal-page h1 {
    margin-bottom: 10px;
}

.legal-page h3 {
    margin: 18px 0 6px;
}

.legal-page p {
    color: #4b5563;
}

.legal-content-wrap {
    padding-top: 34px;
}

.legal-content {
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.legal-item {
    background: #ffffff;
    border: 1px solid #e6ecf5;
    border-radius: 14px;
    padding: 16px 16px 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.legal-item h3 {
    margin: 0 0 7px;
    font-size: 1.04rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-item p {
    margin: 0;
    color: #4b5563;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 20px;
    text-align: left;
}

.footer-title {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer a {
    color: #d1d5db;
}

.footer a:hover {
    color: #ffffff;
}

.footer-copy {
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 16px;
}

@media (max-width: 820px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== PAGINATION ===== */

.paginator {
    margin-top: 12px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.pagination li {
    list-style: none;
}

.pagination a,
.pagination .current,
.pagination .disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #d7e1ee;
    background: #fff;
    color: #1f2937;
    font-weight: 600;
}

.pagination .current {
    background: #0f4c81;
    color: #fff;
    border-color: #0f4c81;
}

.pagination .disabled {
    opacity: 0.45;
}

.pagination a:hover {
    background: #f0f7ff;
}

.nav-link i,
.btn-primary i,
.btn-outline i,
.card-link i {
    margin-right: 6px;
}

/* ===== DETAIL PAGES ===== */

.detail-page {
    padding-top: 34px;
}

.detail-shell {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(20, 27, 45, 0.08);
    padding: 20px;
}

.detail-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.detail-head h1 {
    margin: 2px 0 6px;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.detail-subtitle {
    color: #4b5563;
}

.detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-danger {
    border-color: #ef4444;
    color: #991b1b;
}

.detail-cover {
    margin-top: 14px;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 6;
    background: #eef2f9;
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 14px;
}

.detail-card {
    border: 1px solid #e4eaf3;
    border-radius: 14px;
    padding: 16px;
}

.detail-card h3 {
    margin-bottom: 10px;
}

.detail-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.detail-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #e4eaf3;
    color: #374151;
}

.detail-list li:last-child {
    border-bottom: 0;
}

.detail-description p {
    color: #4b5563;
    margin-bottom: 10px;
}

.countdown-pill {
    display: inline-block;
    margin: 8px 0 2px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e5f9f0;
    color: #0f766e;
    font-weight: 700;
    font-size: 0.82rem;
}

.countdown-pill.is-ended {
    background: #f3f4f6;
    color: #4b5563;
}

.event-stand-map {
    margin-top: 12px;
    display: grid;
    gap: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #f8fafc;
}

.stand-cell {
    min-height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.stand-cell.is-food {
    background: #fff7ed;
    border-color: #fb923c;
    color: #9a3412;
}

.stand-cell.is-regular {
    background: #eff6ff;
    border-color: #60a5fa;
    color: #1e3a8a;
}

.stand-cell.is-empty {
    background: #eef2f7;
    border-style: dashed;
    cursor: default;
}

.event-stand-legend {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #334155;
}

.map-profile-link {
    margin-left: 10px;
    font-weight: 700;
}

.map-kind-legend {
    display: flex;
    gap: 8px;
    margin: 8px 0 4px;
}

.kind-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
}

.kind-pill i {
    margin-right: 6px;
}

.kind-food {
    background: #fff7ed;
    color: #9a3412;
}

.kind-normal {
    background: #eff6ff;
    color: #1e3a8a;
}

/* ===== FAIR LIVE EXPERIENCE ===== */
.live-page {
    background: #0b1120;
    color: #f1f5f9;
    min-height: 100vh;
}

.live-hero {
    padding: 16px 14px 22px;
    background-size: cover;
    background-position: center;
}

.live-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.live-badge {
    font-size: .72rem;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.live-badge i {
    font-size: .55rem;
    margin-right: 4px;
}

.live-badge.is-on {
    background: rgba(34, 197, 94, .18);
    color: #86efac;
}

.live-badge.is-off {
    background: rgba(148, 163, 184, .24);
    color: #cbd5e1;
}

.live-headline h1 {
    margin: 8px 0 2px;
    font-size: 1.3rem;
    color: #fff;
}

.live-headline p,
.live-headline small {
    margin: 0;
    color: #dbeafe;
}

.live-controls {
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.chip {
    border: 1px solid #334155;
    background: #121a2f;
    color: #cbd5e1;
    border-radius: 999px;
    padding: 8px 11px;
    font-size: .83rem;
    white-space: nowrap;
}

.chip.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.live-grid-wrap {
    padding: 10px 12px 0;
}

.live-grid {
    display: grid;
    gap: 6px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 10px;
}

.live-cell {
    min-height: 30px;
    border-radius: 7px;
    border: 1px solid #334155;
    color: #e2e8f0;
    font-weight: 700;
    font-size: .72rem;
}

.live-cell.is-food {
    background: #3b1f06;
    border-color: #f59e0b;
    animation: livePulse 1.9s infinite;
}

.live-cell.is-normal {
    background: #13213f;
    border-color: #60a5fa;
}

.live-cell.is-empty {
    background: #0b1222;
    border-style: dashed;
}

.live-cell.is-highlight {
    outline: 2px solid #f43f5e;
    transform: scale(1.03);
}

.live-sheet {
    padding: 12px;
}

.live-hint {
    color: #94a3b8;
    font-size: .9rem;
}

.live-card,
.live-route {
    margin-top: 10px;
    border: 1px solid #1e293b;
    border-radius: 12px;
    background: #0f172a;
    padding: 12px;
}

.live-card h3,
.live-route h4 {
    margin: 0 0 8px;
    color: #fff;
}

.live-card p,
.live-route li,
.live-route small {
    color: #cbd5e1;
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 8px;
}

.live-tag.is-food {
    background: #422006;
    color: #fcd34d;
}

.live-tag.is-normal {
    background: #1e3a8a;
    color: #bfdbfe;
}

.live-likes {
    margin-left: 6px;
    font-size: .8rem;
}

.live-profile-link {
    color: #93c5fd;
    font-weight: 700;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

@media (max-width: 860px) {
    .detail-head {
        flex-direction: column;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}
