/* ==========================================================================
   Medallo Motors Fest 3.0 · Sistema de diseño (site.css)
   Paleta y vocabulario definidos en la especificación (sección 8).
   ========================================================================== */

:root {
    --mm-blue: #1f5eff;
    --mm-blue-dark: #1238b8;
    --mm-violet: #7b2ff7;
    --mm-purple: #5b1a8f;
    --mm-cyan: #19b4ff;
    --mm-navy: #0b1446;
    --mm-navy-2: #17207a;
    --mm-ink: #111827;
    --mm-muted: #6b7280;
    --mm-bg: #f4f6fc;
    --mm-border: #e5e8f2;
    --mm-gradient: linear-gradient(90deg, #1f5eff 0%, #7b2ff7 100%);
    --mm-gradient-diag: linear-gradient(135deg, #1f5eff 0%, #7b2ff7 100%);
    --mm-gradient-sidebar: linear-gradient(180deg, #0b1446 0%, #17207a 55%, #3a1d8f 100%);
    --mm-success: #16a34a;
    --mm-danger: #dc2626;
    --mm-warning: #f59e0b;

    --mm-radius: 18px;
    --mm-radius-sm: 12px;
    --mm-shadow: 0 10px 30px -12px rgba(17, 24, 39, .18), 0 2px 6px rgba(17, 24, 39, .05);
    --mm-shadow-lg: 0 24px 50px -18px rgba(31, 94, 255, .35), 0 6px 14px rgba(17, 24, 39, .06);
    --mm-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mm-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --mm-navbar-h: 72px;
    --mm-sidebar-w: 260px;

    /* Bootstrap 5.3 */
    --bs-body-font-family: var(--mm-font);
    --bs-body-color: var(--mm-ink);
    --bs-body-bg: var(--mm-bg);
    --bs-primary: #1f5eff;
    --bs-primary-rgb: 31, 94, 255;
    --bs-link-color: #1f5eff;
    --bs-link-color-rgb: 31, 94, 255;
    --bs-link-hover-color: #1238b8;
    --bs-link-hover-color-rgb: 18, 56, 184;
    --bs-border-color: #e5e8f2;
    --bs-border-radius: .65rem;
    --bs-border-radius-lg: 1rem;
    --bs-focus-ring-color: rgba(31, 94, 255, .25);
}

/* ---------- Base ---------- */
html {
    font-size: 15px;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--mm-navbar-h) + 12px);
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

body {
    font-family: var(--mm-font);
    color: var(--mm-ink);
    background-color: var(--mm-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--mm-font);
    font-weight: 700;
    color: var(--mm-ink);
    letter-spacing: -.01em;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a.btn:hover, .nav-link:hover, .dropdown-item:hover, .mm-card a:hover.stretched-link { text-decoration: none; }

img { max-width: 100%; }

::selection { background: rgba(123, 47, 247, .18); }

.text-muted, .mm-muted { color: var(--mm-muted) !important; }
.text-mm-blue { color: var(--mm-blue) !important; }
.text-mm-violet { color: var(--mm-violet) !important; }
.bg-mm-soft { background: linear-gradient(135deg, rgba(31, 94, 255, .06), rgba(123, 47, 247, .06)) !important; }
.fw-800 { font-weight: 800 !important; }
.ls-wide { letter-spacing: .12em; }
.mm-mono { font-family: var(--mm-mono); }

/* Focus en azul de marca */
.form-control:focus, .form-select:focus, .form-check-input:focus,
.btn:focus-visible, .page-link:focus, .accordion-button:focus {
    border-color: rgba(31, 94, 255, .55);
    box-shadow: 0 0 0 .22rem rgba(31, 94, 255, .18);
    outline: 0;
}

.form-check-input:checked {
    background-color: var(--mm-blue);
    border-color: var(--mm-blue);
}

.form-control, .form-select {
    border-color: var(--mm-border);
    border-radius: .7rem;
    padding: .6rem .85rem;
}

.form-control-sm, .form-select-sm { padding: .35rem .65rem; border-radius: .55rem; }
.form-control-lg, .form-select-lg { padding: .8rem 1rem; border-radius: .85rem; }
.form-label { font-weight: 500; font-size: .92rem; margin-bottom: .35rem; }
.form-text { color: var(--mm-muted); }
.input-group-text { background: #f8f9fe; border-color: var(--mm-border); color: var(--mm-muted); }
.input-group > .form-control, .input-group > .form-select { border-radius: .7rem; }
.field-validation-error, .validation-summary-errors { color: var(--mm-danger); font-size: .86rem; }
.validation-summary-errors ul { margin-bottom: 0; padding-left: 1.1rem; }
.input-validation-error { border-color: var(--mm-danger) !important; }

/* ---------- Tipografía de marca ---------- */
.mm-title {
    font-family: var(--mm-font);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--mm-ink);
    letter-spacing: -.015em;
    line-height: 1.05;
    font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3rem);
    margin-bottom: .75rem;
}

.mm-title .mm-accent {
    display: block;
    margin-top: .3rem;
    font-weight: 600;
    font-size: .48em;
    letter-spacing: .08em;
    color: var(--mm-violet);
    text-transform: uppercase;
}

.mm-title.mm-title-sm { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem); }

.mm-kicker {
    display: inline-block;
    font-size: .76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .25em;
    color: var(--mm-muted);
    margin-bottom: .6rem;
}

.mm-kicker strong, .mm-kicker b { color: var(--mm-blue); font-weight: 700; }

.mm-underline {
    display: block;
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: var(--mm-gradient);
    margin: .4rem 0 1.25rem;
}

.text-center .mm-underline, .mm-underline.mx-auto { margin-left: auto; margin-right: auto; }

.mm-text-gradient {
    background: var(--mm-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--mm-blue);
}

.mm-lead { font-size: 1.08rem; color: #374151; line-height: 1.7; }

/* ---------- Botones ---------- */
.btn { font-weight: 500; border-radius: .7rem; }

.btn-mm {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .6rem 1.35rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    letter-spacing: .01em;
    background: var(--mm-gradient);
    background-size: 160% 100%;
    background-position: 0 0;
    box-shadow: 0 8px 20px -8px rgba(31, 94, 255, .6);
    transition: transform .18s ease, box-shadow .18s ease, background-position .35s ease, opacity .18s ease;
}

.btn-mm:hover, .btn-mm:focus-visible {
    color: #fff;
    transform: translateY(-2px);
    background-position: 100% 0;
    box-shadow: 0 14px 26px -10px rgba(123, 47, 247, .65);
}

.btn-mm:active { transform: translateY(0); color: #fff; }

.btn-mm:disabled, .btn-mm.disabled {
    opacity: .55;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.btn-mm-outline {
    --bs-btn-hover-color: var(--mm-blue-dark);
    --bs-btn-active-color: var(--mm-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .55rem 1.3rem;
    border-radius: 999px;
    border: 2px solid var(--mm-blue);
    background: #fff;
    color: var(--mm-blue);
    font-weight: 600;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}

.btn-mm-outline:hover, .btn-mm-outline:focus-visible {
    color: var(--mm-blue-dark);
    border-color: var(--mm-blue-dark);
    background: #f1f5ff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -12px rgba(31, 94, 255, .6);
}

.btn-mm-lg, .btn-mm.btn-lg, .btn-mm-outline.btn-lg {
    padding: .85rem 2rem;
    font-size: 1.08rem;
    font-weight: 700;
}

.btn-mm.btn-sm, .btn-mm-outline.btn-sm { padding: .35rem .9rem; font-size: .85rem; }

.btn-mm-white {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .6rem 1.35rem;
    font-weight: 600;
    background: #fff;
    color: var(--mm-blue-dark);
    border: 0;
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .35);
}

.btn-mm-white:hover { color: var(--mm-violet); transform: translateY(-2px); }

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-radius: 999px;
    padding: .6rem 1.35rem;
    font-weight: 600;
    background: #25d366;
    color: #fff;
    border: 0;
    box-shadow: 0 8px 20px -10px rgba(37, 211, 102, .8);
    transition: transform .18s ease, background-color .18s ease;
}

.btn-whatsapp:hover, .btn-whatsapp:focus-visible { background: #1ebe5a; color: #fff; transform: translateY(-2px); }

.btn-primary {
    --bs-btn-bg: var(--mm-blue);
    --bs-btn-border-color: var(--mm-blue);
    --bs-btn-hover-bg: var(--mm-blue-dark);
    --bs-btn-hover-border-color: var(--mm-blue-dark);
    --bs-btn-active-bg: var(--mm-blue-dark);
    --bs-btn-active-border-color: var(--mm-blue-dark);
    --bs-btn-disabled-bg: var(--mm-blue);
    --bs-btn-disabled-border-color: var(--mm-blue);
}

.btn-outline-primary {
    --bs-btn-color: var(--mm-blue);
    --bs-btn-border-color: var(--mm-blue);
    --bs-btn-hover-bg: var(--mm-blue);
    --bs-btn-hover-border-color: var(--mm-blue);
    --bs-btn-active-bg: var(--mm-blue-dark);
    --bs-btn-active-border-color: var(--mm-blue-dark);
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .65rem;
}

/* ---------- Superficies ---------- */
.mm-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(229, 232, 242, .8);
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow);
    padding: 1.35rem;
}

@media (min-width: 768px) {
    .mm-card { padding: 1.6rem; }
}

.mm-card.p-0 { padding: 0; overflow: hidden; }
.mm-card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.mm-card-hover:hover { transform: translateY(-4px); box-shadow: var(--mm-shadow-lg); }

.mm-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    padding-bottom: .9rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--mm-border);
}

.mm-card-header h2, .mm-card-header h3, .mm-card-header h4, .mm-card-header h5, .mm-card-header .mm-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.mm-card-header .bi { color: var(--mm-blue); }

.mm-section {
    position: relative;
    padding: 3.5rem 0;
}

@media (min-width: 992px) {
    .mm-section { padding: 5rem 0; }
}

.mm-section-alt { background: rgba(255, 255, 255, .78); backdrop-filter: blur(2px); }
.mm-section-dark { background: var(--mm-navy); color: #e5e7ff; }
.mm-section-dark .mm-title, .mm-section-dark h2, .mm-section-dark h3 { color: #fff; }

.mm-skew-badge {
    display: inline-block;
    transform: skewX(-12deg);
    background: var(--mm-gradient);
    color: #fff;
    font-weight: 800;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .38rem 1rem;
    border-radius: 6px;
    box-shadow: 0 8px 18px -8px rgba(123, 47, 247, .7);
    line-height: 1.2;
}

.mm-skew-badge > * { display: inline-block; transform: skewX(12deg); }

.mm-empty {
    text-align: center;
    padding: 2.5rem 1.25rem;
    border: 2px dashed var(--mm-border);
    border-radius: var(--mm-radius);
    background: rgba(255, 255, 255, .7);
    color: var(--mm-muted);
}

.mm-empty > .bi, .mm-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 1.8rem;
    color: var(--mm-violet);
    background: linear-gradient(135deg, rgba(31, 94, 255, .1), rgba(123, 47, 247, .14));
    margin-bottom: .9rem;
}

.mm-empty h3, .mm-empty h4, .mm-empty h5 { color: var(--mm-ink); font-size: 1.1rem; }

/* Franjas diagonales en esquinas (evoca el brochure). Usar en un contenedor con position:relative. */
.mm-stripes { position: relative; overflow: hidden; isolation: isolate; }

.mm-stripes::before, .mm-stripes::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 0;
    opacity: .95;
}

.mm-stripes::before {
    top: 0;
    right: 0;
    background:
        linear-gradient(225deg, var(--mm-violet) 0 11%, transparent 11% 15%, var(--mm-blue) 15% 20%, transparent 20% 25%, rgba(31, 94, 255, .35) 25% 27%, transparent 27%);
}

.mm-stripes::after {
    bottom: 0;
    left: 0;
    background:
        linear-gradient(45deg, var(--mm-purple) 0 9%, var(--mm-navy-2) 9% 13%, transparent 13% 17%, var(--mm-blue) 17% 23%, transparent 23% 28%, rgba(25, 180, 255, .45) 28% 30%, transparent 30%);
}

.mm-stripes > * { position: relative; z-index: 1; }

.mm-stripes-sm::before, .mm-stripes-sm::after { width: 120px; height: 120px; }

/* ---------- Imágenes ---------- */
.mm-img-card {
    display: block;
    width: 100%;
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow-lg);
    object-fit: cover;
    background: #e8ecfa;
}

.mm-img-frame { position: relative; }

.mm-img-frame::before {
    content: "";
    position: absolute;
    inset: 14px -14px -14px 14px;
    border-radius: var(--mm-radius);
    background: var(--mm-gradient-diag);
    opacity: .9;
    z-index: 0;
}

.mm-img-frame > img { position: relative; z-index: 1; }

/* ---------- Badges de estado ---------- */
.mm-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .7rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    border: 1px solid transparent;
    vertical-align: middle;
}

.mm-badge::before {
    content: "";
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.mm-badge-pending { background: #fff7e6; color: #b45309; border-color: #fde3b0; }
.mm-badge-verify { background: #eaf1ff; color: #1238b8; border-color: #c9d8ff; }
.mm-badge-approved { background: #e9f9ef; color: #15803d; border-color: #bfe9cf; }
.mm-badge-rejected { background: #fdecec; color: #b91c1c; border-color: #f7c9c9; }
.mm-badge-cancelled { background: #f1f2f5; color: #4b5563; border-color: #dfe2e8; }
.mm-badge-active { background: #fff; color: #15803d; border-color: #22c55e; }
.mm-badge-used { background: #f3ebff; color: #5b1a8f; border-color: #dcc7fd; }
.mm-badge-lg { font-size: .88rem; padding: .4rem .9rem; }

/* Contador (ej. pendientes junto a "Pedidos") */
.mm-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 .4rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    background: var(--mm-warning);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .15);
}

/* ---------- Chips ---------- */
.mm-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--mm-border);
    background: #fff;
    color: #374151;
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

a.mm-chip:hover, button.mm-chip:hover { border-color: var(--mm-blue); color: var(--mm-blue); text-decoration: none; }

.mm-chip .bi { color: var(--mm-blue); }

.mm-chip .mm-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0 .35rem;
    height: 1.4rem;
    border-radius: 999px;
    background: var(--mm-bg);
    color: var(--mm-ink);
    font-size: .74rem;
    font-weight: 700;
}

.mm-chip.active {
    background: var(--mm-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 16px -10px rgba(31, 94, 255, .8);
}

.mm-chip.active .bi { color: #fff; }
.mm-chip.active .mm-chip-count { background: rgba(255, 255, 255, .25); color: #fff; }

.mm-chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.mm-chips-scroll {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    scrollbar-width: thin;
}

/* ---------- Encabezado de página (backoffice) ---------- */
.mm-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mm-page-header > :first-child { min-width: 0; }

.mm-page-title {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
    font-weight: 700;
    margin: 0;
    color: var(--mm-ink);
}

.mm-page-subtitle { margin: .25rem 0 0; color: var(--mm-muted); font-size: .95rem; }

.mm-page-actions, .mm-page-header > .d-flex { display: flex; flex-wrap: wrap; gap: .5rem; }

@media (max-width: 575.98px) {
    .mm-page-header { align-items: stretch; }
    .mm-page-header > :last-child:not(:first-child) { width: 100%; }
}

/* ---------- KPI ---------- */
.mm-kpi {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    height: 100%;
    background: #fff;
    border: 1px solid rgba(229, 232, 242, .8);
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow);
    padding: 1.15rem 1.25rem;
    overflow: hidden;
}

.mm-kpi::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: var(--mm-gradient);
    opacity: .85;
}

.mm-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.3rem;
    color: #fff;
    background: var(--mm-gradient-diag);
    box-shadow: 0 8px 16px -8px rgba(31, 94, 255, .7);
    margin-bottom: .55rem;
}

.mm-kpi-icon.is-success { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 8px 16px -8px rgba(22, 163, 74, .7); }
.mm-kpi-icon.is-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 8px 16px -8px rgba(245, 158, 11, .7); }
.mm-kpi-icon.is-danger { background: linear-gradient(135deg, #dc2626, #f87171); box-shadow: 0 8px 16px -8px rgba(220, 38, 38, .7); }
.mm-kpi-icon.is-violet { background: linear-gradient(135deg, #5b1a8f, #7b2ff7); }

.mm-kpi-value {
    font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--mm-ink);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.mm-kpi-label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--mm-muted);
}

.mm-kpi-foot {
    margin-top: auto;
    padding-top: .6rem;
    font-size: .82rem;
    color: var(--mm-muted);
}

.mm-kpi .progress { height: 6px; border-radius: 99px; background: #eef1fa; margin-top: .6rem; }
.mm-kpi .progress-bar, .mm-progress .progress-bar { background: var(--mm-gradient); }

/* ---------- Tablas ---------- */
.mm-table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #f6f8ff;
    margin-bottom: 0;
    vertical-align: middle;
    font-size: .92rem;
}

.mm-table > thead > tr > th {
    background: #f7f8fc;
    color: var(--mm-muted);
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
    border-bottom: 1px solid var(--mm-border);
    padding: .8rem .85rem;
}

.mm-table > thead > tr > th:first-child { border-top-left-radius: 10px; }
.mm-table > thead > tr > th:last-child { border-top-right-radius: 10px; }

.mm-table > tbody > tr > td {
    padding: .8rem .85rem;
    border-bottom-color: #eef0f6;
}

.mm-table > tbody > tr:last-child > td { border-bottom: 0; }
.mm-table.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f6f8ff; }
.mm-table .mm-cell-strong { font-weight: 600; color: var(--mm-ink); }
.mm-table .mm-cell-sub { display: block; font-size: .8rem; color: var(--mm-muted); }
.mm-table tfoot td, .mm-table tfoot th { font-weight: 700; background: #fafbff; }

.mm-card > .table-responsive { margin: -.25rem; }
.mm-card.p-0 > .table-responsive { margin: 0; }

/* ---------- Barra de filtros ---------- */
.mm-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .75rem;
    background: #fff;
    border: 1px solid rgba(229, 232, 242, .8);
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
}

.mm-filters > * { flex: 1 1 180px; min-width: 0; }
.mm-filters > .mm-filters-actions, .mm-filters > .btn { flex: 0 0 auto; }
.mm-filters .form-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mm-muted); margin-bottom: .25rem; }
.mm-filters-actions { display: flex; gap: .5rem; }

/* ---------- Pasos / línea de tiempo ---------- */
.mm-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    counter-reset: mmstep;
}

.mm-step {
    position: relative;
    counter-increment: mmstep;
    padding: 0 0 0 3.4rem;
    min-height: 2.6rem;
}

.mm-step::before {
    content: counter(mmstep);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--mm-muted);
    background: #fff;
    border: 2px solid var(--mm-border);
    z-index: 1;
}

.mm-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 1.2rem;
    top: 2.6rem;
    bottom: -1rem;
    width: 2px;
    background: var(--mm-border);
}

.mm-step-title { display: block; font-weight: 600; color: var(--mm-ink); line-height: 1.3; padding-top: .35rem; }
.mm-step-text, .mm-step small { display: block; color: var(--mm-muted); font-size: .88rem; margin-top: .15rem; }

.mm-step.done::before {
    content: "\2713";
    color: #fff;
    background: var(--mm-success);
    border-color: var(--mm-success);
}

.mm-step.done:not(:last-child)::after { background: var(--mm-success); }

.mm-step.current::before {
    color: #fff;
    background: var(--mm-gradient-diag);
    border-color: transparent;
    box-shadow: 0 0 0 5px rgba(31, 94, 255, .15);
}

.mm-step.current .mm-step-title { color: var(--mm-blue-dark); }

@media (min-width: 768px) {
    .mm-steps.mm-steps-horizontal { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; }
    .mm-steps-horizontal .mm-step { padding: 3.3rem .75rem 0; text-align: center; }
    .mm-steps-horizontal .mm-step::before { left: 50%; transform: translateX(-50%); }
    .mm-steps-horizontal .mm-step:not(:last-child)::after { left: calc(50% + 1.4rem); right: calc(-50% + 1.4rem); top: 1.2rem; bottom: auto; width: auto; height: 2px; }
}

/* ---------- Alertas ---------- */
.alert { border-radius: 14px; border-width: 1px; }

.mm-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    box-shadow: 0 6px 18px -12px rgba(17, 24, 39, .35);
}

.mm-alert > .bi { font-size: 1.2rem; line-height: 1.35; flex: none; }
.mm-alert .mm-alert-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.alert-success { --bs-alert-bg: #ecfbf1; --bs-alert-border-color: #bfe9cf; --bs-alert-color: #14532d; }
.alert-danger { --bs-alert-bg: #fdf0f0; --bs-alert-border-color: #f7c9c9; --bs-alert-color: #7f1d1d; }
.alert-warning { --bs-alert-bg: #fff8e8; --bs-alert-border-color: #fde3b0; --bs-alert-color: #78350f; }
.alert-info { --bs-alert-bg: #eef3ff; --bs-alert-border-color: #c9d8ff; --bs-alert-color: #1e3a8a; }

/* ==========================================================================
   Sitio público
   ========================================================================== */
body.mm-public {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--mm-bg);
    background-image: url("../img/bg-page.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* En celulares y tabletas la imagen de fondo queda como una franja detrás de los títulos y sus rayas diagonales
   tapan el texto (además iOS no soporta background-attachment: fixed): se usa un degradé suave de la marca. */
@media (max-width: 991.98px), (hover: none) {
    body.mm-public {
        background-attachment: scroll;
        background-size: auto;
        background-image: linear-gradient(180deg, #e7ecfd 0, #eef1fd 240px, var(--mm-bg) 560px);
    }
}

.mm-public main { flex: 1 0 auto; }

/* ---------- Navbar ---------- */
.mm-navbar {
    min-height: var(--mm-navbar-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid rgba(229, 232, 242, .9);
    box-shadow: 0 4px 20px -16px rgba(17, 24, 39, .5);
    padding-top: .35rem;
    padding-bottom: .35rem;
    z-index: 1030;
}

.mm-navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--mm-gradient);
    opacity: .75;
}

.mm-brand { display: inline-flex; align-items: center; padding: 0; margin-right: 1rem; }
.mm-brand img { height: 52px; width: auto; display: block; transition: transform .2s ease; }
.mm-brand:hover img { transform: rotate(-2deg) scale(1.03); }

.mm-navbar .navbar-toggler {
    border: 0;
    padding: .45rem .6rem;
    border-radius: .7rem;
    color: var(--mm-ink);
    font-size: 1.5rem;
    line-height: 1;
}

.mm-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(31, 94, 255, .2); }

.mm-nav-links .nav-link {
    position: relative;
    font-weight: 500;
    font-size: .95rem;
    color: #1f2937;
    padding: .55rem .9rem !important;
    border-radius: .6rem;
}

.mm-nav-links .nav-link:hover { color: var(--mm-blue); }

.mm-nav-links .nav-link.active { color: var(--mm-blue); font-weight: 600; }

@media (min-width: 992px) {
    .mm-nav-links .nav-link::after {
        content: "";
        position: absolute;
        left: .9rem;
        right: .9rem;
        bottom: .2rem;
        height: 2px;
        border-radius: 2px;
        background: var(--mm-gradient);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .2s ease;
    }

    .mm-nav-links .nav-link:hover::after, .mm-nav-links .nav-link.active::after { transform: scaleX(1); }
}

@media (max-width: 991.98px) {
    .mm-navbar .navbar-collapse { padding: .75rem 0 1rem; }
    .mm-nav-links .nav-link { padding: .7rem .5rem !important; border-bottom: 1px solid #f0f2f8; }
    .mm-navbar .btn-mm { width: 100%; margin-top: .75rem; }
    .mm-brand img { height: 44px; }
}

/* ---------- Pie de página ---------- */
.mm-footer {
    position: relative;
    flex-shrink: 0;
    background: var(--mm-navy);
    background-image: radial-gradient(1200px 300px at 100% 0, rgba(123, 47, 247, .35), transparent 60%),
                      radial-gradient(900px 260px at 0 100%, rgba(31, 94, 255, .35), transparent 60%);
    color: #c9cff5;
    padding: 3rem 0 1.5rem;
    font-size: .93rem;
}

.mm-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--mm-gradient);
}

.mm-footer a { color: #fff; }
.mm-footer a:hover { color: #b9c8ff; }
.mm-footer h2, .mm-footer h3, .mm-footer h4, .mm-footer h5 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 700; margin-bottom: 1rem; }
.mm-footer-logo { height: 70px; width: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
.mm-footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.mm-footer-list .bi { color: #8fa6ff; margin-right: .45rem; }
.mm-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2rem; padding-top: 1.25rem; font-size: .82rem; color: #9aa3d9; }
.mm-footer-bottom a { color: #9aa3d9; }
.mm-footer-bottom a:hover { color: #fff; }
.mm-footer .mm-staff-link { opacity: .6; font-size: .8rem; }
.mm-footer .mm-staff-link:hover { opacity: 1; }

/* ---------- Hero ---------- */
.mm-hero { padding: 1.25rem 0 0; }

@media (min-width: 992px) {
    .mm-hero { padding-top: 2rem; }
}

.mm-hero-figure {
    position: relative;
    margin: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(18, 56, 184, .55), 0 8px 20px -10px rgba(17, 24, 39, .25);
    background: #eef2ff;
    aspect-ratio: 1672 / 941;
}

.mm-hero-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 575.98px) {
    .mm-hero { padding-top: 0; }
    .mm-hero > .container { padding-left: 0; padding-right: 0; }
    .mm-hero-figure { border-radius: 0; box-shadow: none; }
}

.mm-cta-bar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    background: #fff;
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow-lg);
    border: 1px solid rgba(229, 232, 242, .9);
    padding: 1.1rem 1.25rem;
    margin: -2.25rem 1.25rem 0;
}

.mm-cta-bar .mm-cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.mm-cta-bar .mm-chips { justify-content: flex-start; }

@media (max-width: 767.98px) {
    .mm-cta-bar { margin: 1rem .75rem 0; flex-direction: column; align-items: stretch; text-align: center; }
    .mm-cta-bar .mm-cta-actions { flex-direction: column; }
    .mm-cta-bar .mm-cta-actions .btn { width: 100%; }
    .mm-cta-bar .mm-chips { justify-content: center; }
}

/* ---------- Secciones del landing ---------- */
.mm-section-head { max-width: 760px; margin-bottom: 2.25rem; }
.mm-section-head.text-center { margin-left: auto; margin-right: auto; }

.mm-new-media { position: relative; max-width: 420px; margin: 0 auto; }
.mm-new-media img { aspect-ratio: 664 / 960; }
.mm-new-media .mm-skew-badge { position: absolute; top: 1.25rem; left: -.6rem; z-index: 2; font-size: 1rem; }

.mm-artist-name {
    font-weight: 800;
    font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem);
    line-height: 1.15;
    text-transform: uppercase;
}

.mm-feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.mm-feature-list li { display: flex; gap: .7rem; align-items: flex-start; }
.mm-feature-list .bi { color: var(--mm-violet); font-size: 1.15rem; line-height: 1.4; flex: none; }

/* Experiencias */
.mm-exp-card { text-align: center; height: 100%; }

.mm-exp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    font-size: 2rem;
    color: #fff;
    background: var(--mm-gradient-diag);
    box-shadow: 0 14px 26px -12px rgba(31, 94, 255, .8), inset 0 0 0 5px rgba(255, 255, 255, .25);
    margin-bottom: 1rem;
}

.mm-exp-card h3 { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; margin-bottom: .5rem; }
.mm-exp-card p { color: var(--mm-muted); margin-bottom: 0; font-size: .95rem; }

.mm-iconos-strip { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto; }

.mm-stat {
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
    font-weight: 800;
    font-size: clamp(2rem, 1.4rem + 2.5vw, 3.2rem);
    line-height: 1;
}

.mm-stat small { font-size: .95rem; font-weight: 600; color: var(--mm-muted); text-transform: uppercase; letter-spacing: .1em; }

.mm-photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mm-photo-pair img { aspect-ratio: 1 / 1; }
.mm-photo-pair img:nth-child(2) { margin-top: 2rem; }

/* Tarjetas de boletas */
.mm-ticket-card {
    --tt-color: var(--mm-blue);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: var(--mm-radius);
    border: 1px solid rgba(229, 232, 242, .9);
    box-shadow: var(--mm-shadow);
    padding: 1.5rem 1.35rem 1.35rem;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.mm-ticket-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--tt-color);
    background-image: linear-gradient(90deg, var(--tt-color), var(--mm-violet));
}

.mm-ticket-card:hover { transform: translateY(-5px); box-shadow: var(--mm-shadow-lg); }
.mm-ticket-card.is-soldout { opacity: .78; }
.mm-ticket-card.is-soldout:hover { transform: none; box-shadow: var(--mm-shadow); }

.mm-ticket-card-name {
    font-size: 1.08rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.25;
    margin: .2rem 0 .6rem;
    color: var(--mm-ink);
}

.mm-ticket-card-price {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--tt-color);
    margin-bottom: .2rem;
    font-variant-numeric: tabular-nums;
}

.mm-ticket-card-price small { font-size: .8rem; font-weight: 500; color: var(--mm-muted); margin-left: .25rem; }
.mm-ticket-card-desc { color: #4b5563; font-size: .92rem; margin: .75rem 0 1rem; }

.mm-ticket-card-meta { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .45rem; font-size: .88rem; }
.mm-ticket-card-meta li { display: flex; gap: .5rem; align-items: flex-start; }
.mm-ticket-card-meta .bi { color: var(--tt-color); flex: none; }
.mm-ticket-card .btn { margin-top: auto; width: 100%; }

.mm-ticket-flag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .25rem .6rem;
    border-radius: 999px;
    background: #fff4e5;
    color: #b45309;
}

.mm-ticket-flag.is-soldout { background: #f1f2f5; color: #4b5563; }

.mm-notice {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #fff;
    border-left: 5px solid var(--mm-violet);
    border-radius: var(--mm-radius-sm);
    box-shadow: var(--mm-shadow);
    padding: 1.1rem 1.25rem;
}

.mm-notice > .bi { font-size: 1.6rem; color: var(--mm-violet); line-height: 1; }

/* Palco VIP */
.mm-palco {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    color: #e6e9ff;
    background: var(--mm-navy);
    background-image: linear-gradient(120deg, #0b1446 0%, #17207a 50%, #5b1a8f 100%);
    box-shadow: 0 30px 60px -30px rgba(91, 26, 143, .8);
}

.mm-palco .mm-title { color: #fff; }
.mm-palco .mm-title .mm-accent { color: #c9b3ff; }
.mm-palco .mm-feature-list .bi { color: #8fd3ff; }
.mm-palco-media { height: 100%; min-height: 260px; }
.mm-palco-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-palco-body { padding: 2rem 1.5rem; }

@media (min-width: 992px) {
    .mm-palco-body { padding: 3rem; }
}

.mm-palco .mm-price-tag { font-size: 1.8rem; font-weight: 800; color: #fff; }

/* ¿Cómo comprar? */
.mm-howto-step {
    position: relative;
    height: 100%;
    padding-top: 2.2rem;
}

.mm-howto-num {
    position: absolute;
    top: -1.1rem;
    left: 1.35rem;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    background: var(--mm-gradient-diag);
    box-shadow: 0 10px 20px -10px rgba(31, 94, 255, .9);
}

.mm-howto-step .bi-lg { font-size: 1.9rem; color: var(--mm-blue); display: block; margin-bottom: .5rem; }
.mm-howto-step h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: .35rem; }
.mm-howto-step p { color: var(--mm-muted); font-size: .92rem; margin: 0; }

/* Ubicación */
.mm-map {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow);
    background: #e8ecfa;
    display: block;
}

.mm-day-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }

.mm-day {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .75rem .9rem;
    border-radius: var(--mm-radius-sm);
    background: #f7f8fe;
    border: 1px solid var(--mm-border);
}

.mm-day-date {
    flex: none;
    width: 3.4rem;
    text-align: center;
    border-radius: 10px;
    padding: .3rem 0;
    color: #fff;
    background: var(--mm-gradient-diag);
    line-height: 1.05;
}

.mm-day-date strong { display: block; font-size: 1.35rem; font-weight: 800; }
.mm-day-date span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; }

/* FAQ */
.mm-faq .accordion-item {
    border: 1px solid var(--mm-border);
    border-radius: 14px !important;
    overflow: hidden;
    margin-bottom: .75rem;
    box-shadow: 0 4px 14px -12px rgba(17, 24, 39, .4);
}

.mm-faq .accordion-button {
    font-weight: 600;
    font-size: .98rem;
    padding: 1.05rem 1.2rem;
    color: var(--mm-ink);
    background: #fff;
}

.mm-faq .accordion-button:not(.collapsed) {
    color: var(--mm-blue-dark);
    background: linear-gradient(90deg, rgba(31, 94, 255, .07), rgba(123, 47, 247, .05));
    box-shadow: none;
}

.mm-faq .accordion-body { color: #4b5563; padding: .25rem 1.2rem 1.15rem; background: linear-gradient(90deg, rgba(31, 94, 255, .03), rgba(123, 47, 247, .02)); }

/* Contacto */
.mm-contact {
    border-radius: 24px;
    padding: 2.25rem 1.5rem;
    color: #fff;
    background: var(--mm-gradient-diag);
    box-shadow: var(--mm-shadow-lg);
}

.mm-contact h2 { color: #fff; }
.mm-contact p { color: rgba(255, 255, 255, .88); }

/* Próximamente */
.mm-coming-soon { text-align: center; max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem; }
.mm-coming-soon img { max-width: 360px; width: 100%; filter: drop-shadow(0 16px 30px rgba(31, 94, 255, .3)); }

/* Páginas legales */
.mm-legal { max-width: 860px; margin: 0 auto; }
.mm-legal h2 { font-size: 1.12rem; font-weight: 700; margin-top: 1.75rem; }
.mm-legal p, .mm-legal li { color: #374151; line-height: 1.75; }

/* Animación de entrada (se activa con site.js) */
/* site.js sólo oculta (mm-reveal-hidden) lo que está debajo del primer pantallazo: sin JavaScript todo queda visible. */
.mm-reveal { transition: opacity .6s ease, transform .6s ease; }
.mm-reveal.mm-reveal-hidden { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .mm-reveal, .mm-reveal.mm-reveal-hidden { opacity: 1; transform: none; transition: none; }
    .btn-mm, .btn-mm-outline, .mm-ticket-card, .mm-card-hover { transition: none; }
}

/* ==========================================================================
   Backoffice
   ========================================================================== */
body.mm-admin { background: var(--mm-bg); min-height: 100vh; }

.mm-sidebar {
    --bs-offcanvas-width: 280px;
    --bs-offcanvas-bg: var(--mm-navy);
    width: var(--mm-sidebar-w);
    display: flex;
    flex-direction: column;
    color: #c7cdf5;
    background-color: var(--mm-navy);
    background-image: var(--mm-gradient-sidebar);
    border-right: 0;
}

@media (min-width: 992px) {
    .mm-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1035;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, .2) transparent;
    }

    .mm-main { margin-left: var(--mm-sidebar-w); }
}

@media (max-width: 991.98px) {
    .mm-sidebar.offcanvas-lg { width: var(--bs-offcanvas-width); }
}

/* Franjas decorativas en la esquina inferior del menú */
.mm-sidebar::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 140px;
    height: 140px;
    pointer-events: none;
    background: linear-gradient(135deg, transparent 0 62%, rgba(31, 94, 255, .45) 62% 66%, transparent 66% 71%, rgba(123, 47, 247, .55) 71% 79%, transparent 79%);
}

.mm-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 1.1rem 1.1rem .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mm-sidebar-brand img { height: 58px; width: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.mm-sidebar-brand .btn-close { filter: invert(1) grayscale(1) brightness(2); opacity: .8; }

.mm-sidebar-event {
    margin: .9rem 1rem 0;
    padding: .6rem .8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: .78rem;
    line-height: 1.35;
}

.mm-sidebar-event strong { display: block; color: #fff; font-size: .84rem; }

.mm-sidebar-nav { display: flex; flex-direction: column; gap: .15rem; padding: .75rem .75rem 1.5rem; flex: 1 0 auto; position: relative; z-index: 1; }

.mm-nav-label {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(199, 205, 245, .55);
    padding: 1rem .75rem .35rem;
}

.mm-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .62rem .8rem;
    border-radius: 12px;
    color: #cfd5fb;
    font-size: .93rem;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}

.mm-nav-link > .bi { font-size: 1.1rem; width: 1.3rem; text-align: center; opacity: .9; }
.mm-nav-link:hover, .mm-nav-link:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }

.mm-nav-link.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(31, 94, 255, .9), rgba(123, 47, 247, .85));
    box-shadow: 0 10px 22px -12px rgba(31, 94, 255, .9);
}

.mm-nav-link.active::before {
    content: "";
    position: absolute;
    left: -.75rem;
    top: 22%;
    bottom: 22%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--mm-cyan);
}

.mm-nav-link .mm-count { margin-left: auto; }

.mm-sidebar-foot {
    position: relative;
    z-index: 1;
    padding: .9rem 1.1rem 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .75rem;
    color: rgba(199, 205, 245, .6);
}

/* Contenido principal */
.mm-main { min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }

.mm-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 64px;
    padding: .55rem 1rem;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--mm-border);
}

@media (min-width: 768px) {
    .mm-topbar { padding: .55rem 1.75rem; }
}

.mm-topbar-toggle {
    border: 0;
    background: #f1f4ff;
    color: var(--mm-blue-dark);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.mm-topbar-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mm-topbar-logo { height: 34px; width: auto; }

.mm-user-btn {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 999px;
    padding: .25rem .5rem .25rem .25rem;
    color: var(--mm-ink);
    text-align: left;
}

.mm-user-btn:hover, .mm-user-btn[aria-expanded="true"] { background: #f4f6fd; border-color: var(--mm-border); }

.mm-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
    background: var(--mm-gradient-diag);
    flex: none;
    text-transform: uppercase;
}

.mm-user-name { display: block; font-size: .88rem; font-weight: 600; line-height: 1.2; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-user-role { display: block; font-size: .74rem; color: var(--mm-muted); line-height: 1.2; }

.mm-dropdown {
    border: 1px solid var(--mm-border);
    border-radius: 14px;
    box-shadow: var(--mm-shadow-lg);
    padding: .4rem;
    min-width: 230px;
}

.mm-dropdown .dropdown-item { border-radius: 10px; padding: .55rem .75rem; font-size: .92rem; display: flex; align-items: center; gap: .6rem; }
.mm-dropdown .dropdown-item .bi { color: var(--mm-muted); }
.mm-dropdown .dropdown-item:active { background: var(--mm-blue); color: #fff; }
.mm-dropdown .dropdown-item:active .bi { color: #fff; }
.mm-dropdown .dropdown-item.text-danger .bi { color: var(--mm-danger); }

.mm-content { flex: 1 0 auto; padding: 1.25rem 1rem 2rem; width: 100%; }

@media (min-width: 768px) {
    .mm-content { padding: 1.75rem 1.75rem 2.5rem; }
}

@media (min-width: 1600px) {
    .mm-content { max-width: 1480px; }
}

.mm-admin-footer {
    padding: 1rem 1.75rem 1.25rem;
    font-size: .78rem;
    color: var(--mm-muted);
    border-top: 1px solid var(--mm-border);
    background: #fff;
}

/* Franjas de estado (AdminStatus) */
.mm-banners:empty { display: none; }
.mm-banners { display: grid; gap: 0; }

.mm-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .85rem;
    padding: .7rem 1rem;
    font-size: .9rem;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

@media (min-width: 768px) {
    .mm-banner { padding: .7rem 1.75rem; }
}

.mm-banner > .bi { font-size: 1.2rem; flex: none; }
.mm-banner-text { flex: 1 1 260px; min-width: 0; }
.mm-banner-text strong { font-weight: 700; }
.mm-banner .btn { flex: none; }

.mm-banner-test {
    color: #3b2500;
    background-color: #fcd34d;
    background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 14px, transparent 14px 28px);
    border-bottom-color: #f59e0b;
}

.mm-banner-test .btn { background: #111827; color: #fff; border: 0; }
.mm-banner-test .btn:hover { background: #000; color: #fcd34d; }
.mm-banner-warning { background: #fff7e6; color: #78350f; }
.mm-banner-warning > .bi { color: var(--mm-warning); }
.mm-banner-danger { background: #fdecec; color: #7f1d1d; }
.mm-banner-danger > .bi { color: var(--mm-danger); }
.mm-banner-info { background: #eef3ff; color: #1e3a8a; }
.mm-banner-info > .bi { color: var(--mm-blue); }

/* ==========================================================================
   Login
   ========================================================================== */
body.mm-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background-color: var(--mm-bg);
    background-image: url("../img/bg-page.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mm-login-wrap { width: 100%; max-width: 440px; }

.mm-login-card {
    position: relative;
    background: rgba(255, 255, 255, .96);
    border-radius: 24px;
    box-shadow: 0 30px 70px -30px rgba(18, 56, 184, .5), 0 8px 20px -12px rgba(17, 24, 39, .25);
    border: 1px solid rgba(229, 232, 242, .9);
    padding: 2rem 1.5rem 1.75rem;
    overflow: hidden;
}

@media (min-width: 576px) {
    .mm-login-card { padding: 2.5rem 2.25rem 2rem; }
}

.mm-login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--mm-gradient);
}

.mm-login-logo { display: block; width: 210px; max-width: 70%; height: auto; margin: 0 auto 1rem; }
.mm-login-foot { text-align: center; font-size: .82rem; color: var(--mm-muted); margin-top: 1.25rem; }

/* ==========================================================================
   Boleta (páginas públicas de boletas)
   ========================================================================== */
.mm-ticket {
    --mm-notch-bg: var(--mm-bg);
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 50px -24px rgba(18, 56, 184, .45), 0 4px 12px -6px rgba(17, 24, 39, .15);
    color: var(--mm-ink);
}

.mm-ticket-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.1rem 1.25rem;
    border-radius: 22px 22px 0 0;
    color: #fff;
    background: var(--mm-gradient-diag);
    overflow: hidden;
}

.mm-ticket-head::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 140px;
    height: 140px;
    background: linear-gradient(225deg, rgba(255, 255, 255, .25) 0 18%, transparent 18% 26%, rgba(255, 255, 255, .15) 26% 34%, transparent 34%);
    pointer-events: none;
}

.mm-ticket-head img { height: 54px; width: auto; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); }
.mm-ticket-head h2, .mm-ticket-head h3, .mm-ticket-head .mm-ticket-event { color: #fff; font-size: 1rem; font-weight: 800; text-transform: uppercase; margin: 0; line-height: 1.2; }
.mm-ticket-head small, .mm-ticket-head .mm-ticket-type { display: block; color: rgba(255, 255, 255, .88); font-size: .82rem; font-weight: 500; }

.mm-ticket-body { padding: 1.35rem 1.25rem 1.1rem; text-align: center; }

.mm-ticket-qr {
    display: inline-block;
    padding: 12px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--mm-border);
    box-shadow: 0 10px 24px -16px rgba(17, 24, 39, .45);
    line-height: 0;
}

.mm-ticket-qr img, .mm-ticket-qr canvas, .mm-ticket-qr svg { width: 220px; max-width: 100%; height: auto; image-rendering: pixelated; }

.mm-ticket-code {
    display: block;
    margin-top: .9rem;
    font-family: var(--mm-mono);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--mm-ink);
    word-break: break-all;
}

.mm-ticket-stub {
    position: relative;
    padding: 1.1rem 1.25rem 1.25rem;
    border-top: 2px dashed #cfd6ea;
    font-size: .9rem;
}

/* Muescas laterales a la altura de la línea punteada */
.mm-ticket-stub::before, .mm-ticket-stub::after {
    content: "";
    position: absolute;
    top: -15px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mm-notch-bg);
    box-shadow: inset 0 3px 6px -3px rgba(17, 24, 39, .25);
}

.mm-ticket-stub::before { left: -14px; }
.mm-ticket-stub::after { right: -14px; }

.mm-ticket-stub dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; text-align: left; }
.mm-ticket-stub dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--mm-muted); padding-top: .15rem; }
.mm-ticket-stub dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Sello de anulada / usada */
.mm-ticket.is-cancelled .mm-ticket-qr, .mm-ticket.is-used .mm-ticket-qr { filter: grayscale(1); opacity: .35; }
.mm-ticket.is-cancelled .mm-ticket-head { background: linear-gradient(135deg, #6b7280, #374151); }

.mm-ticket.is-cancelled::after, .mm-ticket.is-used::after {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-14deg);
    padding: .35rem 1.2rem;
    border: 4px solid currentColor;
    border-radius: 10px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .85);
    pointer-events: none;
    z-index: 3;
    white-space: nowrap;
}

.mm-ticket.is-cancelled::after { content: "Anulada"; color: var(--mm-danger); }
.mm-ticket.is-used::after { content: "Usada"; color: var(--mm-purple); }
.mm-ticket[data-stamp].is-cancelled::after, .mm-ticket[data-stamp].is-used::after { content: attr(data-stamp); }

.mm-ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.75rem; }

/* ==========================================================================
   Páginas de estado / error
   ========================================================================== */
.mm-status-page { text-align: center; max-width: 620px; margin: 0 auto; padding: 3rem 1.25rem 4rem; }

.mm-status-code {
    font-size: clamp(4.5rem, 3rem + 8vw, 8rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    margin-bottom: .5rem;
}

.mm-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    font-size: 2.4rem;
    color: #fff;
    background: var(--mm-gradient-diag);
    box-shadow: 0 16px 30px -14px rgba(31, 94, 255, .9);
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   Utilidades varias
   ========================================================================== */
.mm-divider { height: 1px; background: var(--mm-border); margin: 1.25rem 0; border: 0; }
.mm-print-only { display: none !important; }
.mm-sticky-top { position: sticky; top: calc(var(--mm-navbar-h) + 1rem); }
.mm-copy { cursor: pointer; }
.mm-copy.copied { color: var(--mm-success) !important; }
.mm-dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .5rem 1rem; margin: 0; }
.mm-dl dt { font-weight: 500; color: var(--mm-muted); font-size: .88rem; }
.mm-dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

@media (max-width: 575.98px) {
    .mm-dl { grid-template-columns: 1fr; gap: .1rem; }
    .mm-dl dd { margin-bottom: .55rem; }
}

.mm-color-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: middle; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--mm-border); }

.mm-back-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1040;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    color: #fff;
    background: var(--mm-gradient-diag);
    box-shadow: var(--mm-shadow-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.mm-back-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ==========================================================================
   Impresión
   ========================================================================== */
@media print {
    @page { margin: 12mm; }

    html, body { font-size: 12pt; }

    body, body.mm-public, body.mm-admin, body.mm-login {
        background: #fff !important;
        background-image: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .mm-navbar, .mm-footer, .mm-sidebar, .mm-topbar, .mm-banners, .mm-admin-footer, .mm-back-top,
    .btn, .btn-mm, .btn-mm-outline, .mm-no-print, .d-print-none, .alert-dismissible .btn-close,
    .mm-filters, .mm-chips, .pagination, form button, .offcanvas-backdrop {
        display: none !important;
    }

    .mm-print-only { display: block !important; }
    .mm-main { margin-left: 0 !important; }
    .mm-content, .mm-section { padding: 0 !important; }
    .container, .container-fluid, .container-lg, .container-xl { max-width: 100% !important; padding: 0 !important; }
    .mm-card, .mm-kpi, .mm-filters { box-shadow: none !important; border: 1px solid #d7dcea !important; }
    a[href]::after { content: none !important; }

    .mm-ticket {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
        box-shadow: none !important;
        border: 1px solid #c9d0e4;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .mm-ticket-qr img, .mm-ticket-qr canvas, .mm-ticket-qr svg { width: 70mm !important; }

    /* Una boleta por página */
    .mm-ticket-grid { display: block !important; }
    .mm-ticket-grid > *, .row:has(> * > .mm-ticket) > * { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; margin: 0 !important; break-after: page; page-break-after: always; }
    .mm-ticket-grid > *:last-child, .row:has(> * > .mm-ticket) > *:last-child { break-after: auto; page-break-after: auto; }
    .mm-ticket + .mm-ticket { break-before: page; page-break-before: always; }

    .mm-reveal, .mm-reveal-hidden { opacity: 1 !important; transform: none !important; }
}
