/* ============================================================================
   /Admin/Resumen — pantalla de monitoreo en movimiento, y la barra de tabs
   que la conecta con Órdenes y Eventos.

   Construida sobre los mismos tokens que admin-dashboard.css (terminal
   financiera: IBM Plex Mono para cifras, acentos saturados en marcas chicas)
   para que el gráfico de GMV se sienta igual que en /Admin/Dashboard — es la
   misma serie, solo que a tamaño de bolsillo.
   ============================================================================ */

.m-page {
    font-family: var(--fn-ui, 'DM Sans', system-ui, sans-serif);
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 90px;
    color: #e8e8f4;
}

.m-section { padding: 0 20px; margin-bottom: 26px; }
.m-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.m-section-title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; text-transform: uppercase; color: #ece9f7; }
.m-section-link { font-size: 12px; font-weight: 600; color: #9589F0; text-decoration: none; }

.m-top { padding: 20px 20px 4px; display: flex; justify-content: space-between; align-items: flex-end; }
.m-top-kicker { font-family: var(--fn-mono, 'IBM Plex Mono', monospace); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #6b6b80; display: flex; align-items: center; }
.m-top-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; text-transform: uppercase; color: #fff; }
.m-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #18c964; margin-right: 7px; animation: m-pulse 2s ease-in-out infinite; }
@keyframes m-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.m-tile { background: #12111b; border: 1px solid #211f2c; border-radius: 14px; padding: 16px; }
.m-tile-label { font-size: 11px; color: #8d8aa3; margin-bottom: 8px; }
.m-tile-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; }
.m-tile-value.is-ice { color: #9589F0; }
.m-tile-value.is-warn { color: #ffc453; }
.m-tile-sub { font-size: 11px; color: #504d66; margin-top: 4px; }
.m-tile.is-wide { display: flex; align-items: center; justify-content: space-between; }
.m-stat-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-stat-strip.is-3 { grid-template-columns: 1fr 1fr 1fr; }

.m-spark { width: 90px; height: 32px; }

.m-alert-list { display: flex; flex-direction: column; gap: 8px; }
.m-alert { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; background: rgba(250,173,20,0.07); border: 1px solid rgba(250,173,20,0.28); text-decoration: none; color: inherit; }
.m-alert.is-ice { background: rgba(123,110,232,0.14); border-color: #3B3380; }
.m-alert.is-danger { background: rgba(255,77,79,0.08); border-color: rgba(255,77,79,0.3); }
.m-alert-icon { width: 30px; height: 30px; border-radius: 9px; background: rgba(250,173,20,0.16); color: #ffc453; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.m-alert.is-ice .m-alert-icon { background: rgba(123,110,232,0.22); color: #9589F0; }
.m-alert.is-danger .m-alert-icon { background: rgba(255,77,79,0.18); color: #ff8080; }
.m-alert-icon svg { width: 16px; height: 16px; }
.m-alert-body { flex: 1; min-width: 0; }
.m-alert-title { font-size: 13px; font-weight: 600; color: #ece9f7; }
.m-alert-sub { font-size: 11.5px; color: #8d8aa3; margin-top: 2px; }
.m-alert-chevron { color: #504d66; flex-shrink: 0; }

.m-empty-ok { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: rgba(24,201,100,0.07); border: 1px solid rgba(24,201,100,0.22); color: #8d8aa3; font-size: 12.5px; }
.m-empty-ok svg { width: 17px; height: 17px; color: #34d97e; flex-shrink: 0; }

.m-card-list { display: flex; flex-direction: column; gap: 10px; }
.m-card { display: block; background: #12111b; border: 1px solid #211f2c; border-radius: 14px; padding: 14px 15px; text-decoration: none; color: inherit; }
.m-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.m-card-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.m-avatar { width: 34px; height: 34px; border-radius: 50%; background: #171622; border: 1px solid #312e42; display: flex; align-items: center; justify-content: center; font-family: var(--fn-mono, monospace); font-size: 11px; color: #8d8aa3; flex-shrink: 0; }
.m-avatar.is-event { border-radius: 9px; }
.m-card-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-card-sub { font-size: 11.5px; color: #8d8aa3; margin-top: 2px; }
.m-card-amount { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.m-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-card-meta { font-size: 11px; color: #504d66; }

.m-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 7px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.m-pill-photos { background: rgba(141,138,163,0.18); color: #cbd5e1; }
.m-pill-presale { background: rgba(123,110,232,0.22); color: #9589F0; }
.m-pill-redeem { background: rgba(45,212,191,0.18); color: #5eead4; }
.m-pill-paid { background: rgba(24,201,100,0.14); color: #34d97e; }
.m-pill-pending { background: rgba(250,173,20,0.16); color: #ffc453; }

.sw { width: 7px; height: 7px; border-radius: 2px; display: inline-block; flex-shrink: 0; }

/* ---------- Hero del mes: GMV + ingreso neto + pagadas ----------
   Reemplaza la tarjeta "Ingresos de hoy": el resto del panel ya lee en mes
   a la fecha, y mezclar "hoy" con el resto confundía más de lo que ayudaba
   a quien mira de pasada, caminando. */
.m-hero { background: #12111b; border: 1px solid #211f2c; border-radius: 14px; padding: 16px; }
.m-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-hero-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: #fff; margin-top: 2px; }
.m-hero-delta { font-size: 11px; margin-top: 4px; }
.m-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #211f2c;
}
.m-hero-stat-label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #8d8aa3; margin-bottom: 5px; }
.m-hero-stat-value { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: #fff; }

/* ---------- Estado de órdenes · este mes (anillo) ---------- */
.m-ring-card { background: #0e0d16; border: 1px solid #1c1b28; border-radius: 16px; padding: 16px; }
.m-ring-row { display: flex; align-items: center; gap: 18px; }
.m-ring-wrap { position: relative; width: 118px; height: 118px; flex-shrink: 0; }
.m-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.m-ring-total { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: #fff; }
.m-ring-total-label { font-family: var(--fn-mono, 'IBM Plex Mono', monospace); font-size: 8.5px; color: #6b6b80; text-transform: uppercase; letter-spacing: .06em; }
.m-ring-legend { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.m-ring-legend-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: #cfcbe0; }
.m-ring-legend-row span { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-ring-legend-row strong { font-family: var(--font-display); font-size: 13px; color: #fff; flex-shrink: 0; }
.m-ring-pct { font-family: var(--fn-mono, 'IBM Plex Mono', monospace); font-size: 9.5px; font-weight: 400; color: #6b6b80; margin-left: 5px; }
.m-ring-legend-row.is-zero > span { color: #5c5a72; }
.m-ring-legend-row.is-zero strong { color: #4a4860; }

/* Color por estado, en hoja y no inline: Resumen.cshtml usaba var(--c-earn) y
   var(--c-warn), que sólo define admin-dashboard.css. Acá no cargan, así que
   Pagadas y Pendientes salían transparentes sin ningún error. El arco usa el
   verde de relleno (área grande); el punto, el de marca. */
.m-ring-arc--paid    { stroke: #12a855; }
.m-ring-arc--pending { stroke: #faad14; }
.m-ring-arc--refund  { stroke: #ff6b6b; }
.m-ring-arc--cancel  { stroke: #504d66; }
.m-ring-sw--paid    { background: #18c964; }
.m-ring-sw--pending { background: #faad14; }
.m-ring-sw--refund  { background: #ff6b6b; }
.m-ring-sw--cancel  { background: #504d66; }
.m-ring-legend-row.is-zero .sw { background: #2a2838; }

/* ---------- Chips del monitor de últimas órdenes ----------
   Filtran en el navegador las filas que ya vinieron en el HTML — ver
   admin-order-filters.js, compartido con /Admin/Dashboard. */
.m-chip-row { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.m-chip-row::-webkit-scrollbar { display: none; }
.m-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid #211f2c;
    background: #15141f;
    color: #8d8aa3;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
    flex-shrink: 0;
}
.m-chip.is-active { border-color: #9589F0; background: rgba(123,110,232,.2); color: #fff; }
.m-chip-count { background: rgba(255,255,255,.1); border-radius: 5px; padding: 1px 6px; font-size: 10px; }

/* Pendiente fuera de la ventana de 2h: mismo filete rojo que .m-alert.is-danger. */
.m-card.is-flagged { border-left: 2px solid #ff4d4f; }
.m-card-flag { display: block; margin-top: 2px; color: #ff8a8a; }

/* ---------- Composición del GMV: la misma serie que Dashboard.cshtml ---------- */
.m-gmv-card { background: #0b0b1c; border: 1px solid #14142a; border-radius: 16px; padding: 16px 15px 14px; position: relative; overflow: hidden; }
.m-gmv-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: #8b5cf6; }
.m-gmv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.m-gmv-title { font-family: var(--fn-mono, 'IBM Plex Mono', monospace); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #504d66; line-height: 1.3; }
.m-gmv-total { font-family: var(--font-serif, serif); font-style: italic; font-size: 1.05rem; color: #c9c2ff; flex-shrink: 0; }
.m-gmv-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0 14px; font-family: var(--fn-mono, monospace); font-size: 8.5px; letter-spacing: .05em; text-transform: uppercase; color: #5c5a72; }
.m-gmv-legend span { display: inline-flex; align-items: center; gap: 5px; }
.m-gmv-legend .sw { width: 7px; height: 7px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.m-gmv-bars { display: flex; align-items: flex-end; gap: 4px; height: 108px; }
.m-gmv-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.m-gmv-bar { width: 100%; max-width: 20px; margin: 0 auto; display: flex; flex-direction: column-reverse; border-radius: 3px 3px 0 0; overflow: hidden; transform-origin: bottom; animation: dn-grow-y .7s cubic-bezier(.34,1.32,.64,1) backwards; }
.m-gmv-seg--earn { background: #12a855; border-radius: 0 0 2px 2px; }
.m-gmv-seg--earn.is-now { background: #18c964; }
.m-gmv-seg--tbk { background: #d97706; }
.m-gmv-seg--rem { background: linear-gradient(180deg, #7c6bff, #3d2fc4); border-radius: 2px 2px 0 0; }
.m-gmv-seg--rem.is-now { background: linear-gradient(180deg, #8b7cff, #4a3ad4); }
.m-gmv-label { font-family: var(--fn-mono, monospace); font-size: 8.5px; color: #33334a; margin-top: 7px; text-transform: uppercase; height: 10px; }
.m-gmv-label.is-now { color: #9589f0; font-weight: 700; }
.m-gmv-foot { font-family: var(--fn-mono, monospace); font-size: 9px; color: #33334a; text-transform: uppercase; letter-spacing: .04em; line-height: 1.5; margin-top: 12px; padding-top: 12px; border-top: 1px solid #14142a; }

@keyframes dn-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ============================================================================
   Barra inferior — Resumen / Órdenes / Eventos. Solo en pantallas angostas:
   el admin de escritorio ya tiene su navegación de siempre.
   ============================================================================ */
.m-tabbar { display: none; }
@media (max-width: 760px) {
    .m-tabbar {
        display: flex; justify-content: center;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
    }
    .m-tabbar-inner {
        width: 100%; max-width: 480px; display: flex;
        background: rgba(15,14,22,0.94); backdrop-filter: blur(14px);
        border-top: 1px solid #211f2c;
        padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 10px));
    }
    .m-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; color: #504d66; text-decoration: none; }
    .m-tab svg { width: 21px; height: 21px; }
    .m-tab span { font-size: 10.5px; font-weight: 600; }
    .m-tab.is-active { color: #9589F0; }
    /* Deja aire para que la barra fija no tape el último elemento de la página. */
    body:has(.m-tabbar) { padding-bottom: 72px; }
}
