/* ═══════════════════════════════════════════════════════════════════
   METARO Chatbot AI - style.css v3.1.0
   Modal oculto por defecto · Colores via --accent-r/g/b del sitio
═══════════════════════════════════════════════════════════════════ */

/* ── BOTÓN DE APERTURA ───────────────────────────────────────────── */
#metaro-open-btn {
    cursor: pointer;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 900;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    /* Igual que .sh-personalize-trigger del sitio */
    border: 1px solid var(--accent-color, #c9ff00);
    background: transparent;
    color: var(--accent-color, #c9ff00);
    padding: 20px 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
#metaro-open-btn:hover {
    background: var(--accent-color, #c9ff00);
    color: #000;
    box-shadow: 0 0 15px var(--accent-color, #c9ff00);
}

/* ── MODAL FULLSCREEN ────────────────────────────────────────────── */
#metaro-fullscreen-modal {
    /* OCULTO POR DEFECTO — JS lo muestra con fadeIn */
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    /* Fondo sólido — no transparente */
    background-color: #04020a;
    font-family: 'Segoe UI', Arial, sans-serif;
}

#metaro-modal-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ── BOTÓN CERRAR MODAL ──────────────────────────────────────────── */
.metaro-modal-close {
    background: none;
    border: none;
    color: #555;
    font-size: 1.2em;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}
.metaro-modal-close:hover {
    color: var(--accent-color, #c9ff00);
    background: rgba(var(--accent-r, 201), var(--accent-g, 255), var(--accent-b, 0), 0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════════════════════════ */
#metaro-login-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: #04020a;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(70, 30, 180, 0.15) 0%, transparent 50%);
}

.metaro-login-brand {
    text-align: center;
    margin-bottom: 36px;
}
.metaro-login-logo {
    font-size: 3em;
    display: block;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 20px var(--accent-color, #c9ff00));
}
.metaro-login-brand h1 {
    font-size: 2em;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 6px;
}
.metaro-login-brand h1 span { color: var(--accent-color, #c9ff00); }
.metaro-login-brand p {
    color: #555;
    font-size: 0.88em;
    margin: 0;
    letter-spacing: 0.5px;
}

#metaro-login-form {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
}

.metaro-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}
.metaro-field label {
    font-size: 0.75em;
    color: #555;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.metaro-field input {
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(100, 40, 220, 0.3);
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 0.95em;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.metaro-field input:focus {
    border-color: var(--accent-color, #c9ff00);
    background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.04);
}
.metaro-field input::placeholder { color: #333; }

.metaro-login-msg {
    background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.06);
    border: 1px dashed var(--accent-color, #c9ff00);
    color: var(--accent-color, #c9ff00);
    font-size: 0.82em;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    opacity: 0.85;
}

#metaro-login-form .metaro-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    font-size: 0.92em;
    border-radius: 10px;
    margin-top: 4px;
}
#metaro-login-form .metaro-btn svg { width: 18px; height: 18px; }

.metaro-login-footer {
    margin-top: 20px;
    color: #333;
    font-size: 0.78em;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   QUIZ SCREEN
═══════════════════════════════════════════════════════════════════ */
#metaro-quiz-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    background: #04020a;
}
#metaro-close-quiz { position: absolute; top: 16px; right: 16px; }

/* ═══════════════════════════════════════════════════════════════════
   CHAT SCREEN FULLSCREEN
═══════════════════════════════════════════════════════════════════ */
#metaro-chat-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #04020a;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(70, 30, 180, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 85% 75%, rgba(100, 40, 220, 0.07) 0%, transparent 55%);
}

/* ── HEADER ──────────────────────────────────────────────────────── */
.metaro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(4, 2, 10, 0.98);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
    gap: 12px;
}

.metaro-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.1em;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-color, #c9ff00);
    flex: 1;
    justify-content: center;
}
.metaro-header-icon { font-size: 1.1em; }

/* ── BODY ────────────────────────────────────────────────────────── */
.metaro-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────── */
.metaro-sidebar {
    width: 56px;
    flex-shrink: 0;
    background: rgba(4, 2, 10, 0.95);
    border-right: 1px solid rgba(255,255,255,0.04);
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.metaro-sb-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #444;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: background 0.18s, color 0.18s;
    padding: 0;
}
.metaro-sb-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.metaro-sb-btn span { font-size: 0.55em; letter-spacing: 0.3px; line-height: 1; }
.metaro-sb-btn:hover {
    background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.08);
    color: var(--accent-color, #c9ff00);
}
.metaro-sb-btn.metaro-sb-active {
    background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.1);
    color: var(--accent-color, #c9ff00);
}
.metaro-sb-btn.metaro-sb-danger:hover {
    background: rgba(220, 50, 50, 0.1);
    color: #e05555;
}
.metaro-sb-divider {
    width: 28px; height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 4px 0;
}
.metaro-sb-spacer { flex: 1; }

/* ── PANEL LATERAL ───────────────────────────────────────────────── */
.metaro-panel {
    width: 0;
    overflow: hidden;
    background: rgba(6, 3, 14, 0.99);
    border-right: 1px solid transparent;
    transition: width 0.25s ease, border-color 0.25s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    max-width: 520px;
}
.metaro-panel.metaro-panel-open {
    width: 280px;
    border-right-color: rgba(255,255,255,0.05);
    resize: horizontal;
    overflow: auto;
}
.metaro-panel-resize-handle {
    position: absolute;
    top: 0; right: 0;
    width: 5px; height: 100%;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    transition: background .2s;
}
.metaro-panel-resize-handle:hover {
    background: rgba(198,255,0,.25);
}

.metaro-panel-section {
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow: hidden;
}
.metaro-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #555;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
}
.metaro-panel-close {
    background: none; border: none; color: #333;
    cursor: pointer; font-size: 0.9em; padding: 2px 5px;
    border-radius: 4px; transition: color 0.15s;
}
.metaro-panel-close:hover { color: var(--accent-color, #c9ff00); }

.metaro-panel-loading,
.metaro-panel-empty {
    color: #333;
    font-size: 0.78em;
    text-align: center;
    padding: 24px 8px;
    line-height: 1.6;
}

/* ── LISTA SESIONES ──────────────────────────────────────────────── */
#metaro-sessions-list {
    overflow-y: auto; flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.3) transparent;
}

/* ── ESTATUS CONTENT (plan semanal, medidas, etc.) ───────────────── */
#metaro-estatus-content {
    overflow-y: auto; flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.3) transparent;
}
#metaro-estatus-content::-webkit-scrollbar       { width: 4px; }
#metaro-estatus-content::-webkit-scrollbar-track { background: transparent; }
#metaro-estatus-content::-webkit-scrollbar-thumb { background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.3); border-radius: 3px; }

/* ── RESULTADOS BÚSQUEDA ─────────────────────────────────────────── */
#metaro-search-results {
    overflow-y: auto; flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.3) transparent;
}
.metaro-session-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 4px; padding: 10px 8px; border-radius: 8px; cursor: pointer;
    transition: background 0.15s; border: 1px solid transparent;
}
.metaro-session-item:hover { background: rgba(255,255,255,0.03); }
.metaro-session-item.activa {
    background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.06);
    border-color: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.2);
}
.metaro-ses-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.metaro-ses-title {
    font-size: 0.8em; color: #888;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.metaro-session-item.activa .metaro-ses-title { color: var(--accent-color, #c9ff00); }
.metaro-ses-meta { font-size: 0.68em; color: #333; white-space: nowrap; }
.metaro-ses-delete {
    background: none; border: none; color: #2a2a2a; cursor: pointer;
    font-size: 0.7em; padding: 3px 6px; border-radius: 4px; flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}
.metaro-ses-delete:hover { color: #e05555; background: rgba(220, 50, 50, 0.1); }

/* ── BÚSQUEDA ────────────────────────────────────────────────────── */
.metaro-search-box { padding: 4px 0; }
.metaro-search-box input {
    width: 100%; padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; color: #bbb; font-size: 0.84em;
    outline: none; box-sizing: border-box; transition: border-color 0.15s;
}
.metaro-search-box input:focus { border-color: var(--accent-color, #c9ff00); }
.metaro-search-box input::placeholder { color: #2a2a2a; }

#metaro-search-results {
    overflow-y: auto; flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.3) transparent;
}
.metaro-search-result {
    padding: 10px 8px; border-radius: 8px; cursor: pointer;
    border: 1px solid transparent; transition: background 0.15s; margin-bottom: 4px;
}
.metaro-search-result:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}
.metaro-sr-header {
    font-size: 0.72em; color: #555; margin-bottom: 4px;
    display: flex; align-items: center; gap: 4px;
}
.metaro-sr-header strong { color: #777; }
.metaro-sr-header span { margin-left: auto; }
.metaro-sr-extracto {
    font-size: 0.75em; color: #444;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.metaro-sr-extracto mark {
    background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.2);
    color: var(--accent-color, #c9ff00);
    border-radius: 2px; padding: 0 1px;
}

/* ── ÁREA DE MENSAJES ────────────────────────────────────────────── */
.metaro-messages-area {
    flex: 1; overflow-y: auto;
    display: flex; flex-direction: column;
    padding: 24px 20px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color, #c9ff00) transparent;
    min-width: 0;
}
.metaro-messages-area::-webkit-scrollbar       { width: 4px; }
.metaro-messages-area::-webkit-scrollbar-track { background: transparent; }
.metaro-messages-area::-webkit-scrollbar-thumb { background: var(--accent-color, #c9ff00); border-radius: 3px; }

#metaro-messages {
    display: flex; flex-direction: column; gap: 12px;
    flex: 1; max-width: 820px; width: 100%; margin: 0 auto;
}

/* ── MENSAJES ────────────────────────────────────────────────────── */
.message {
    max-width: 78%; padding: 12px 16px; border-radius: 14px;
    line-height: 1.6; word-wrap: break-word; font-size: 0.93em;
    animation: metaro-fadein 0.2s ease;
}
@keyframes metaro-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.user-message {
    align-self: flex-end;
    background: var(--accent-color, #c9ff00);
    color: #000;
    border-bottom-right-radius: 4px;
    font-weight: 600;
}
.bot-message {
    align-self: flex-start;
    background: rgba(255,255,255,0.04);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.07);
    border-bottom-left-radius: 4px;
}
.bot-message p          { margin: 0 0 6px; }
.bot-message p:last-child { margin-bottom: 0; }
.bot-message ul         { margin: 4px 0 4px 16px; }
.bot-message li         { margin-bottom: 3px; }
.bot-message strong     { color: var(--accent-color, #c9ff00); }
.bot-message code       {
    background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.1);
    padding: 1px 5px; border-radius: 4px; font-size: 0.9em;
}

.metaro-error {
    background: rgba(255, 80, 80, 0.06) !important;
    border: 1px dashed rgba(255,80,80,0.4) !important;
    color: #ff8080 !important;
    font-size: 0.84em; text-align: center;
}

/* Loader */
.loader-dots::after {
    content: '.';
    animation: metaro-dots 1.4s steps(3, end) infinite;
}
@keyframes metaro-dots {
    0%   { content: '.';   }
    33%  { content: '..';  }
    66%  { content: '...'; }
    100% { content: '.';   }
}

/* Separador de sesión */
.metaro-session-divider {
    text-align: center; font-size: 0.7em; color: #333;
    margin: 12px 0; letter-spacing: 0.5px; align-self: center;
    background: #06030e; padding: 3px 14px;
    border-radius: 20px; border: 1px solid rgba(255,255,255,0.05);
}

/* Timestamp */
.metaro-msg-time {
    display: block; font-size: 0.64em;
    color: rgba(0,0,0,0.35); margin-top: 4px; text-align: right;
}
.bot-message .metaro-msg-time { color: rgba(255,255,255,0.15); }

/* ── FOOTER / INPUT ──────────────────────────────────────────────── */
.metaro-footer {
    flex-shrink: 0;
    background: rgba(4, 2, 10, 0.98);
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 12px 16px 10px;
}
.metaro-input-group {
    display: flex; align-items: flex-end; gap: 10px;
    max-width: 820px; margin: 0 auto;
}
#metaro-userInput {
    flex: 1; padding: 11px 16px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #e0e0e0; font-size: 0.93em;
    font-family: 'Segoe UI', Arial, sans-serif;
    outline: none; resize: none; transition: border-color 0.2s;
    max-height: 120px; line-height: 1.5; scrollbar-width: thin;
}
#metaro-userInput:focus { border-color: var(--accent-color, #c9ff00); }
#metaro-userInput::placeholder { color: #2a2a2a; }

#metaro-send-btn {
    width: 46px; height: 46px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; flex-shrink: 0;
}
#metaro-send-btn svg { width: 18px; height: 18px; }

.metaro-footer-note {
    text-align: center; font-size: 0.66em; color: #1e1e1e; margin: 8px 0 0;
}

/* ── MODO OFFLINE ────────────────────────────────────────────────── */
#metaro-offline-banner {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 14px;
    background: rgba(255, 180, 0, 0.08);
    border-bottom: 1px solid rgba(255, 180, 0, 0.25);
    font-size: 0.78em; color: rgba(255, 200, 80, 0.9);
    flex-shrink: 0; animation: metaro-offline-slide-in 0.3s ease;
}
.metaro-offline-icon { font-size: 1.1em; flex-shrink: 0; }
.metaro-offline-text { line-height: 1.4; }

/* Estado offline: atenúa botones que requieren red */
body.metaro-is-offline .metaro-action-btn:not(#mac-suplementos):not([data-offline-ok]) {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}
body.metaro-is-offline .metaro-action-btn:not(#mac-suplementos):not([data-offline-ok])::after {
    content: ''; display: block;
    position: absolute; inset: 0;
}
body.metaro-is-offline .metaro-action-btn {
    position: relative;
}

@keyframes metaro-offline-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── CACHÉ IA — badge en botones y barra de info en mensajes ─────── */

/* Punto verde en el ícono del botón cuando hay caché fresca */
.mac-cache-dot {
    position: absolute;
    top: 4px; right: 4px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #c6ff00;
    box-shadow: 0 0 5px rgba(198, 255, 0, 0.7);
    pointer-events: none;
}
/* El .mac-icon ya tiene position:relative por el CSS de acción */

/* Barra de info debajo del contenido del mensaje cacheado */
.mac-cache-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 10px;
    background: rgba(198, 255, 0, 0.05);
    border: 1px solid rgba(198, 255, 0, 0.15);
    border-radius: 8px;
}
.mac-cache-age {
    font-size: 0.72em;
    color: rgba(198, 255, 0, 0.5);
    letter-spacing: 0.3px;
}
.mac-cache-refresh {
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #c6ff00;
    background: rgba(198, 255, 0, 0.1);
    border: 1px solid rgba(198, 255, 0, 0.3);
    border-radius: 6px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.mac-cache-refresh:hover:not(:disabled) {
    background: rgba(198, 255, 0, 0.2);
}
.mac-cache-refresh:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Barra de caché en mensajes libres del chat */
.mac-chat-bar {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 5px 10px;
    background: rgba(198, 255, 0, 0.04);
    border: 1px solid rgba(198, 255, 0, 0.12);
    border-radius: 8px;
}
.mac-chat-refresh {
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #c6ff00;
    background: rgba(198, 255, 0, 0.1);
    border: 1px solid rgba(198, 255, 0, 0.3);
    border-radius: 6px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    margin-left: auto;
}
.mac-chat-refresh:hover:not(:disabled) {
    background: rgba(198, 255, 0, 0.2);
}
.mac-chat-refresh:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
/* Aviso respuesta incompleta */
.mac-incomplete-warn {
    font-size: 0.70em;
    color: #ffaa00;
    font-weight: 600;
    letter-spacing: 0.3px;
}
/* Mensajes restaurados desde IDB */
.mac-restored .metaro-msg-content {
    opacity: 0.92;
}

/* Estado vacío — sin respuesta guardada */
.mac-empty-slot .metaro-msg-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: rgba(255,255,255,0.45);
    font-style: italic;
    font-size: 0.88em;
}
.mac-empty-icon {
    font-size: 1.3em;
    opacity: 0.6;
}
.mac-empty-text {
    flex: 1;
}
/* Botón "Obtener respuesta" — mismo estilo que mac-cache-refresh pero más destacado */
.mac-cache-get {
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #06000f;
    background: #c6ff00;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.mac-cache-get:hover {
    opacity: 0.85;
}
.mac-cache-get:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Flash cuando el slot ya está visible y se vuelve a tocar el botón */
@keyframes mac-slot-flash {
    0%   { box-shadow: 0 0 0 0 rgba(198,255,0,0); }
    40%  { box-shadow: 0 0 0 6px rgba(198,255,0,0.25); }
    100% { box-shadow: 0 0 0 0 rgba(198,255,0,0); }
}
.mac-slot-flash {
    animation: mac-slot-flash 0.6s ease;
}


/* ── BOTÓN GENERAL ───────────────────────────────────────────────── */
.metaro-btn {
    background: var(--accent-color, #c9ff00);
    color: #000;
    border: none; border-radius: 10px; cursor: pointer;
    font-weight: 800; font-size: 0.9em;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap; padding: 10px 20px;
}
.metaro-btn:hover    { opacity: 0.85; }
.metaro-btn:active   { transform: scale(0.97); }
.metaro-btn:disabled { opacity: 0.3; cursor: default; }

/* ── QUIZ ────────────────────────────────────────────────────────── */
.metaro-quiz-container {
    max-width: 440px; width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; padding: 30px 26px;
    text-align: center; color: #e0e0e0;
}
.metaro-quiz-container h3 {
    color: var(--accent-color, #c9ff00);
    margin: 0 0 8px; font-size: 1.1em; letter-spacing: 1.5px; text-transform: uppercase;
}
.metaro-quiz-sub { color: #444; font-size: 0.83em; margin: 0 0 20px; }
.metaro-quiz-container label {
    display: block; text-align: left; font-size: 0.76em; color: #444;
    margin-bottom: 5px; letter-spacing: 0.3px; text-transform: uppercase;
}
.metaro-quiz-container select,
.metaro-quiz-container input[type="text"] {
    width: 100%; padding: 10px 14px; margin-bottom: 16px;
    border-radius: 9px; border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04); color: #e0e0e0; font-size: 0.9em;
    box-sizing: border-box; outline: none; transition: border-color 0.2s;
}
.metaro-quiz-container select:focus,
.metaro-quiz-container input:focus { border-color: var(--accent-color, #c9ff00); }

.metaro-quiz-msg {
    background: rgba(var(--accent-r,201),var(--accent-g,255),var(--accent-b,0),0.06);
    border: 1px dashed var(--accent-color, #c9ff00);
    color: var(--accent-color, #c9ff00); opacity: 0.85;
    font-size: 0.8em; padding: 8px 12px; border-radius: 7px; margin-bottom: 12px;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════════════════════════
   METARO — MOBILE-FIRST LAYOUT  v4.0
   Arquitectura móvil nativa: bottom nav + bottom sheets + pantallas full
   Breakpoint principal: ≤ 768px
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* ── 1. ESTRUCTURA BASE ────────────────────────────────────────────────── */

    /* El modal ocupa 100% de pantalla con safe areas para notch/home bar */
    #metaro-fullscreen-modal {
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* ── 2. SIDEBAR LATERAL → OCULTAR COMPLETAMENTE ───────────────────────── */
    /* En móvil la sidebar de íconos lateral NO existe.
       La navegación se mueve al bottom nav */
    .metaro-sidebar {
        display: none !important;
    }

    /* ── 3. CHAT SCREEN — OCUPA TODO EL ANCHO ─────────────────────────────── */
    #metaro-chat-screen {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Reordenar elementos del chat-screen en móvil:
       1. header (order: 0, default)
       2. action-bar (order: 1) ← sub-header strip
       3. body / mensajes (order: 2)
       4. footer / input (order: 3)
    */
    .metaro-header         { order: 0; }
    .metaro-footer         { order: 3; }
    .metaro-body           { order: 2; }

    .metaro-body {
        flex-direction: column;
        position: relative;
        overflow: visible;
    }

    /* El área de mensajes ocupa el espacio disponible entre header y footer */
    .metaro-messages-area {
        padding: 12px 10px 8px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #metaro-messages {
        max-width: 100%;
        width: 100%;
    }

    /* Mensajes más anchos y font más legible en móvil */
    .message {
        max-width: 88%;
        font-size: 0.95em;
        padding: 10px 14px;
        line-height: 1.55;
    }

    .user-message {
        max-width: 82%;
    }

    /* ── 4. HEADER MÓVIL ──────────────────────────────────────────────────── */
    .metaro-header {
        padding: 10px 14px;
        min-height: 52px;
    }

    .metaro-header-title {
        font-size: 0.95em;
        letter-spacing: 2.5px;
    }

    /* Botón de cerrar más grande para táctil */
    .metaro-modal-close {
        width: 42px;
        height: 42px;
        font-size: 1.3em;
    }

    /* ── 5. PANEL LATERAL → BOTTOM SHEET ─────────────────────────────────── */
    /* El panel lateral se convierte en un bottom sheet que sube desde abajo */
    .metaro-panel {
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 0;
        max-height: 72vh;
        border-right: none !important;
        border-top: 1px solid rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),0.2) !important;
        border-radius: 18px 18px 0 0;
        z-index: 10000;
        overflow: hidden;
        transition: height 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                    opacity 0.25s ease !important;
        resize: none !important;
        opacity: 0;
        /* Sombra dramática hacia arriba */
        box-shadow: 0 -8px 32px rgba(0,0,0,0.6), 0 -2px 8px rgba(0,0,0,0.4);
    }

    .metaro-panel.metaro-panel-open {
        height: 65vh !important;
        opacity: 1;
    }

    /* Handle de arrastre en la parte superior del sheet */
    .metaro-panel::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(255,255,255,0.2);
        border-radius: 2px;
        margin: 10px auto 6px;
        flex-shrink: 0;
    }

    /* Cancelar el resize handle del desktop */
    .metaro-panel-resize-handle {
        display: none !important;
    }

    /* Overlay oscuro detrás del sheet */
    .metaro-panel-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 9999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .metaro-panel-overlay.activo {
        opacity: 1;
        pointer-events: auto;
    }

    .metaro-panel-section {
        padding: 4px 14px 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        height: calc(100% - 24px); /* descontar el handle */
    }

    /* ── 6. FOOTER / BARRA DE INPUT ──────────────────────────────────────── */
    .metaro-footer {
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(4,2,10,0.99);
        border-top: 1px solid rgba(255,255,255,0.05);
    }

    .metaro-footer-acciones {
        padding: 0;
    }

    #metaro-chips-wrap {
        padding: 8px 10px 0;
    }

    #metaro-chips {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    #metaro-chips::-webkit-scrollbar { display: none; }

    /* Chips más grandes y cómodos al tacto */
    .metaro-chip {
        font-size: 12.5px;
        padding: 8px 14px;
        border-radius: 22px;
        flex-shrink: 0;
        min-height: 36px;
    }

    .metaro-input-group {
        max-width: 100%;
        gap: 8px;
    }

    #metaro-userInput {
        font-size: 16px; /* Evita zoom en iOS al enfocar */
        padding: 10px 14px;
        border-radius: 14px;
        max-height: 100px;
    }

    #metaro-send-btn {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        flex-shrink: 0;
    }

    /* ── 7. BARRA DE ACCIONES → BOTTOM NAV ───────────────────────────────── */
    /* La barra de acciones existente se adapta a bottom navigation */
    /* ── ACTION BAR: STRIP HORIZONTAL BAJO EL HEADER ─────────────────────
       Sale del footer y vive pegado debajo del header.
       Scroll horizontal infinito sin scrollbar visible.
    ───────────────────────────────────────────────────────────────────── */
    .metaro-action-bar {
        /* Sacar del footer — ahora es el sub-header strip DEBAJO del header */
        order: 1;                        /* header=0, action-bar=1, body=2, footer=3 */
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
        padding: 10px 14px 10px;
        background: rgba(4, 2, 10, 0.97);
        border-bottom: 1px solid rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0), 0.10);
        box-shadow: 0 4px 16px rgba(0,0,0,0.35);
        /* Scroll horizontal sin barra */
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* NO position sticky ni bottom — vive en el flujo normal */
        position: relative;
        z-index: 10;
        flex-shrink: 0;
    }
    .metaro-action-bar::-webkit-scrollbar { display: none; }

    /* Fade-out derecho para indicar que hay más items */
    .metaro-action-bar::after {
        content: '';
        position: sticky;
        right: 0;
        top: 0;
        bottom: 0;
        width: 32px;
        height: 100%;
        flex-shrink: 0;
        background: linear-gradient(to right, transparent, rgba(4,2,10,0.95));
        pointer-events: none;
        align-self: stretch;
        display: block;
    }

    .metaro-action-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;          /* no shrink — ancho propio */
        min-width: 68px;
        padding: 8px 6px 7px;
        border-radius: 12px;
        scroll-snap-align: start;
        transition: background 0.18s, transform 0.12s;
    }

    /* Íconos grandes y respirable */
    .mac-icon {
        width: 48px;
        height: 48px;
        border-radius: 13px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.08);
        position: relative; /* para el .mac-cache-dot */
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.18s, border-color 0.18s;
    }

    .mac-icon svg {
        width: 24px;
        height: 24px;
    }

    .mac-label {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.4px;
        text-align: center;
        white-space: nowrap;
        color: rgba(232,224,255,0.5);
        line-height: 1.2;
    }

    .metaro-action-btn:hover .mac-icon,
    .metaro-action-btn:active .mac-icon {
        background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),0.13);
        border-color: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),0.35);
    }

    .metaro-action-btn:hover .mac-label,
    .metaro-action-btn:active .mac-label {
        color: var(--accent-color, #c6ff00);
    }

    /* Estado activo */
    .metaro-action-btn.mac-active .mac-icon {
        background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),0.16);
        border-color: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),0.5);
    }
    .metaro-action-btn.mac-active .mac-label {
        color: var(--accent-color, #c6ff00);
    }

    /* Badge cámara — reposicionado para íconos grandes */
    .mac-cam-badge {
        width: 18px;
        height: 18px;
        font-size: 9px;
        top: -4px;
        right: -4px;
    }

    /* El footer en móvil ya NO lleva la action-bar — solo input + chips */
    .metaro-footer-acciones {
        display: flex;
        flex-direction: column;
        border-top: 1px solid rgba(255,255,255,0.05);
        background: rgba(4,2,10,0.98);
        padding: 0;
    }
    /* Aseguramos que la action-bar NO aparezca en el footer en móvil */
    .metaro-footer-acciones .metaro-action-bar {
        display: none;
    }

    /* ── 8. LOGIN SCREEN ─────────────────────────────────────────────────── */
    #metaro-login-screen {
        padding: 20px 18px;
        padding-top: calc(20px + env(safe-area-inset-top, 0px));
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .metaro-login-brand {
        margin-bottom: 28px;
        margin-top: 20px;
    }

    .metaro-login-brand h1 {
        font-size: 2.2em;
    }

    .metaro-login-logo {
        font-size: 3.5em;
    }

    #metaro-login-form {
        max-width: 100%;
    }

    .metaro-field input {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 14px 16px;
        border-radius: 12px;
    }

    #metaro-login-form .metaro-btn {
        padding: 15px 20px;
        font-size: 1em;
        border-radius: 12px;
        min-height: 52px; /* Zona táctil */
    }

    /* ── 9. QUIZ SCREEN ──────────────────────────────────────────────────── */
    #metaro-quiz-screen {
        padding: 16px;
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-top: 48px;
    }

    .metaro-quiz-container {
        max-width: 100%;
        padding: 22px 18px;
        border-radius: 16px;
    }

    .metaro-quiz-container select,
    .metaro-quiz-container input[type="text"] {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 12px 16px;
        border-radius: 10px;
        min-height: 48px;
    }

    #metaro-close-quiz {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    /* ── 10. WIDGET RUTINA HORIZONTAL ─────────────────────────────────────── */
    /* Las columnas de días se vuelven scroll horizontal nativo */
    .metaro-rutina-h {
        margin: 8px 0;
        border-radius: 8px;
    }

    .metaro-rutina-h-scroll {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
    }
    .metaro-rutina-h-scroll::-webkit-scrollbar { display: none; }

    .metaro-rutina-h-dia {
        min-width: calc(100vw - 60px);
        max-width: calc(100vw - 60px);
        scroll-snap-align: start;
        border-right: 1px solid rgba(255,255,255,0.06);
        padding: 12px 14px;
        flex-shrink: 0;
    }

    .metaro-rutina-h-ej {
        font-size: 12px;
        padding: 3px 0;
    }

    .metaro-rutina-h-ej-n {
        font-size: 12px;
    }

    /* Resize handles no aplican en móvil */
    .metaro-rutina-h-resize-handle {
        display: none !important;
    }

    /* ── 11. PLAN SEMANAL — CARDS MÁS CÓMODAS ───────────────────────────── */
    .met-dia-card {
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .met-dia-header {
        padding: 12px 14px 10px;
    }

    .met-dia-nombre {
        font-size: 15px;
        letter-spacing: 1.5px;
    }

    /* Ejercicios con zona táctil amplia */
    .met-ejercicio {
        padding: 12px 14px;
        min-height: 52px;
    }

    .met-ej-check-wrap {
        width: 24px;
        height: 24px;
    }

    .met-ej-nombre {
        font-size: 14px;
    }

    .met-ej-meta span {
        font-size: 12px;
    }

    .met-ej-video {
        width: 40px;
        height: 40px;
        border-radius: 6px;
    }

    /* ── 12. ESTATUS HERO Y MEDIDAS ──────────────────────────────────────── */
    .met-hero {
        padding: 12px 14px;
        border-radius: 8px;
        margin-bottom: 14px;
    }

    .met-avatar {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .met-name {
        font-size: 20px;
    }

    .met-tabla {
        font-size: 13px;
    }

    .met-tabla td {
        padding: 10px 4px;
    }

    /* ── 13. CATÁLOGO SUPLEMENTOS ────────────────────────────────────────── */
    .metaro-supl-card {
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 12px;
    }

    .metaro-supl-nombre {
        font-size: 16px;
    }

    .metaro-supl-ask-btn {
        min-height: 44px;
        font-size: 13px;
        border-radius: 10px;
        padding: 10px 14px;
    }

    /* ── 14. CATÁLOGO EJERCICIOS ─────────────────────────────────────────── */
    .mej-item {
        padding: 10px 12px;
        min-height: 64px;
    }

    .mej-thumb,
    .mej-thumb-placeholder {
        width: 56px;
        height: 56px;
        border-radius: 8px;
    }

    .mej-nombre {
        font-size: 14px;
    }

    .mej-play-btn {
        width: 36px;
        height: 36px;
    }

    /* ── 15. MODAL DE VIDEO ──────────────────────────────────────────────── */
    #mh-video-modal,
    #met-video-modal {
        background: rgba(0,0,0,0.96);
        padding: 0;
        align-items: flex-end;
    }

    #met-video-iframe {
        max-width: 100vw;
        width: 100vw;
        border-radius: 0;
    }

    #met-video-close {
        top: 14px;
        right: 14px;
        font-size: 32px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,0.5);
        border-radius: 50%;
    }

    /* ── 16. MODAL MEDIDAS/CÁMARA — ya es mobile-first, sin override necesario ── */

    /* ── 17. ZONA DE SESIONES ────────────────────────────────────────────── */
    .metaro-session-item {
        padding: 12px 10px;
        min-height: 52px;
    }

    .metaro-ses-title {
        font-size: 0.85em;
    }

    .metaro-ses-delete {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    /* ── 18. PANEL HEADER DENTRO DEL SHEET ──────────────────────────────── */
    .metaro-panel-header {
        font-size: 0.75em;
        padding-bottom: 12px;
        margin-bottom: 4px;
    }

    /* ── 19. SEARCH BOX ──────────────────────────────────────────────────── */
    .metaro-search-box input {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 10px 14px;
        border-radius: 10px;
        min-height: 44px;
    }

    /* ── 20. BOTONES GENERALES MÁS GRANDES ──────────────────────────────── */
    .metaro-btn {
        min-height: 48px;
        border-radius: 12px;
        font-size: 0.95em;
        padding: 13px 22px;
    }

    .met-actualizar-btn {
        font-size: 13px;
        padding: 13px 16px;
        min-height: 48px;
    }

    /* ── 21. FILTROS ─────────────────────────────────────────────────────── */
    .mej-filtro {
        font-size: 12px;
        padding: 6px 12px;
        min-height: 36px;
        flex-shrink: 0;
    }

    /* ── 22. ZONA DE ACCIONES — BOTÓN ACTUALIZAR ─────────────────────────── */
    .metaro-zona-btn {
        padding: 12px 8px;
        font-size: 12px;
        min-height: 60px;
        border-radius: 10px;
    }

    /* ── 23. ALERTAS ─────────────────────────────────────────────────────── */
    #metaro-alerta-medicion {
        bottom: 80px; /* Sobre el bottom nav */
        left: 12px;
        right: 12px;
        transform: none;
        max-width: 100%;
        border-radius: 12px;
    }

    /* ── 24. FOOTER NOTE ─────────────────────────────────────────────────── */
    .metaro-footer-note {
        font-size: 0.6em;
        margin: 5px 0 0;
    }

    /* ── 25. WIDGET PROGRESO HORIZONTAL ─────────────────────────────────── */
    .metaro-rutina-h-header {
        padding: 8px 12px;
    }

    .metaro-rutina-h-prog-track {
        width: 60px;
    }

    /* ── 26. SCROLLBAR GLOBAL ────────────────────────────────────────────── */
    * {
        scrollbar-width: thin;
        scrollbar-color: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),0.2) transparent;
    }

} /* fin @media 768px */


/* ─── Breakpoint muy pequeño: pantallas de 360px o menos ─────────────────── */
@media (max-width: 380px) {

    .metaro-header-title {
        font-size: 0.85em;
        letter-spacing: 2px;
    }

    .message {
        max-width: 93%;
        font-size: 0.9em;
    }

    .metaro-chip {
        font-size: 11.5px;
        padding: 7px 12px;
    }

    .mac-label {
        font-size: 8.5px;
    }

    .mac-icon {
        width: 30px;
        height: 30px;
    }

    .metaro-action-btn {
        min-height: 48px;
    }

    .metaro-rutina-h-dia {
        min-width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
    }

    .met-name {
        font-size: 18px;
    }

} /* fin @media 380px */


/* ─── Landscape mode en móvil ─────────────────────────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {

    .metaro-panel.metaro-panel-open {
        height: 80vh !important;
        max-height: 80vh;
    }

    #metaro-login-screen {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px;
        align-items: flex-start;
        justify-content: center;
        padding: 16px;
    }

    .metaro-login-brand {
        margin-bottom: 0;
        width: auto;
    }

    #metaro-login-form {
        max-width: 320px;
    }

    .metaro-messages-area {
        padding: 8px 10px;
    }

    #metaro-userInput {
        max-height: 70px;
    }

} /* fin landscape */
/* ── ESTATUS: botones de acción ──────────────────────────────────────────── */
.met-actualizar-btn {
    display: block; width: 100%; margin-top: 10px;
    background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.08);
    border: 1px solid rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.3);
    color: var(--accent-color,#c6ff00); font-family: 'Bebas Neue',sans-serif;
    font-size: 14px; letter-spacing: 2px; padding: 11px 16px; cursor: pointer;
    border-radius: 2px; text-align: center; transition: background .15s;
}
.met-actualizar-btn:hover { background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.16); }
.met-onboarding-btn {
    background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.13);
    border-color: var(--accent-color,#c6ff00);
}
.met-onboarding-btn:hover { background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.22); }

.metaro-estatus-vacio {
    text-align: center; padding: 24px 16px; color: rgba(232,224,255,.5); font-size: 14px; line-height: 1.7;
}
.metaro-estatus-vacio p { margin: 0 0 8px; }

/* ══════════════════════════════════════════════════════════════════════════
   ESTATUS: Hero, Medidas, Plan Semanal, Videos
   ══════════════════════════════════════════════════════════════════════════ */

/* Hero */
.metaro-estatus-wrap { padding: 4px 2px 20px; }
.met-hero { background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.06); border: 1px solid rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.18); border-radius: 6px; padding: 14px 16px; margin-bottom: 18px; }
.met-hero-inner { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.met-avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.18); border: 2px solid rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.5); display: flex; align-items: center; justify-content: center; font-family: 'Bebas Neue',sans-serif; font-size: 20px; color: var(--accent-color,#c6ff00); flex-shrink: 0; }
.met-name { font-family: 'Bebas Neue',sans-serif; font-size: 18px; letter-spacing: 2px; color: #e8e0ff; }
.met-goal { font-size: 12px; color: rgba(232,224,255,.6); margin-top: 2px; }
.met-fecha { font-size: 11px; color: rgba(232,224,255,.35); }
.met-imc-lbl { font-size: 10px; background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.15); color: var(--accent-color,#c6ff00); padding: 1px 6px; border-radius: 2px; margin-left: 4px; }

/* Section title */
.met-section-title { font-family: 'Bebas Neue',sans-serif; font-size: 13px; letter-spacing: 3px; color: var(--accent-color,#c6ff00); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.met-semana-label { font-size: 11px; letter-spacing: 1px; color: rgba(232,224,255,.4); font-family: inherit; margin-left: auto; }

/* Tabla medidas */
.met-tabla { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 4px; }
.met-tabla thead tr { border-bottom: 1px solid rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.2); }
.met-tabla th { font-family: 'Bebas Neue',sans-serif; font-size: 11px; letter-spacing: 2px; color: rgba(232,224,255,.45); padding: 6px 4px; text-align: left; font-weight: normal; }
.met-tabla td { padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.04); color: rgba(232,224,255,.85); }
.met-tabla tr:last-child td { border-bottom: none; }
.meta-up { color: #f87060; font-size: 11px; font-weight: 600; }
.meta-dn { color: #4ade80; font-size: 11px; font-weight: 600; }
.meta-eq { color: rgba(232,224,255,.3); font-size: 11px; }

/* Historial barras */
.met-hist-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.met-hist-item { display: grid; grid-template-columns: 36px 1fr 52px; align-items: center; gap: 8px; }
.met-hist-fecha { font-size: 11px; color: rgba(232,224,255,.4); }
.met-hist-bar-wrap { background: rgba(255,255,255,.07); border-radius: 2px; height: 6px; overflow: hidden; }
.met-hist-bar { height: 100%; border-radius: 2px; background: var(--accent-color,#c6ff00); opacity: .7; transition: width .4s; }
.met-hist-val { font-size: 11px; color: rgba(232,224,255,.55); text-align: right; }

/* Plan semanal */
.met-plan-vacio { background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.1); border-radius: 6px; padding: 20px 16px; text-align: center; font-size: 13px; color: rgba(232,224,255,.45); }
.met-plan-vacio p { margin: 0 0 14px; }

/* Progreso global */
.met-progress-wrap { margin-bottom: 14px; }
.met-progress-header { display: flex; justify-content: space-between; font-size: 12px; color: rgba(232,224,255,.5); margin-bottom: 6px; }
.met-pct { color: var(--accent-color,#c6ff00); font-family: 'Bebas Neue',sans-serif; font-size: 14px; }
.met-progress-track { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.met-progress-bar-fill { height: 100%; background: var(--accent-color,#c6ff00); border-radius: 3px; transition: width .5s ease; }

/* Día card */
.met-dia-card { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.met-dia-card.met-dia-hoy { border-color: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.35); background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.04); }
.met-dia-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
.met-dia-nombre { font-family: 'Bebas Neue',sans-serif; font-size: 14px; letter-spacing: 2px; color: #e8e0ff; display: flex; align-items: center; gap: 8px; }
.met-hoy-badge { background: var(--accent-color,#c6ff00); color: #06000f; font-size: 9px; letter-spacing: 1.5px; padding: 2px 6px; border-radius: 2px; font-family: 'Bebas Neue',sans-serif; }
.met-dia-prog { font-size: 11px; color: rgba(232,224,255,.35); }

/* Ejercicio row */
.met-ejercicio { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.04); transition: background .15s; }
.met-ejercicio:last-child { border-bottom: none; }
.met-ejercicio:hover { background: rgba(255,255,255,.02); }
.met-ejercicio.completado .met-ej-nombre { text-decoration: line-through; opacity: .4; }

/* Custom checkbox */
.met-ej-check-wrap { position: relative; width: 20px; height: 20px; flex-shrink: 0; cursor: pointer; }
.met-ej-check-wrap input { opacity: 0; position: absolute; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.met-ej-checkmark { position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.2); border-radius: 3px; transition: all .15s; }
.met-ej-check-wrap input:checked ~ .met-ej-checkmark { background: var(--accent-color,#c6ff00); border-color: var(--accent-color,#c6ff00); }
.met-ej-check-wrap input:checked ~ .met-ej-checkmark::after { content: ''; position: absolute; left: 4px; top: 1px; width: 6px; height: 10px; border: 2px solid #06000f; border-top: none; border-left: none; transform: rotate(45deg); }

.met-ej-info { flex: 1; min-width: 0; }
.met-ej-nombre { font-size: 13px; color: rgba(232,224,255,.9); margin-bottom: 3px; white-space: normal; overflow: visible; word-break: break-word; }
.met-ej-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.met-ej-meta span { font-size: 11px; color: rgba(232,224,255,.4); }

/* Video button */
.met-ej-video { flex-shrink: 0; background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.1); border: 1px solid rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.3); color: var(--accent-color,#c6ff00); border-radius: 4px; width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, transform .1s; }
.met-ej-video:hover { background: rgba(var(--accent-r,198),var(--accent-g,255),var(--accent-b,0),.22); transform: scale(1.08); }

/* Video modal (triggered by JS) */
#met-video-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 99999; align-items: center; justify-content: center; }
#met-video-modal.activo { display: flex !important; }
#met-video-iframe { max-width: 95vw; border-radius: 4px; }
#met-video-close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; z-index: 100001; line-height: 1; }
#met-video-close-overlay { position: absolute; inset: 0; z-index: 99999; cursor: pointer; }

/* Typing indicator in plan loader */
.loader-dots::after { content: ''; animation: ldots 1.2s infinite; }
@keyframes ldots { 0%{content:'.'} 33%{content:'..'} 66%{content:'...'} 100%{content:''} }

/* Plan msg in chat */
.metaro-plan-msg { border-left: 3px solid var(--accent-color,#c6ff00); padding-left: 12px; }
.metaro-plan-titulo { font-family: 'Bebas Neue',sans-serif; font-size: 16px; letter-spacing: 2px; color: var(--accent-color,#c6ff00); margin-bottom: 8px; }
.metaro-plan-consejo { font-size: 13px; color: rgba(232,224,255,.8); margin-bottom: 8px; font-style: italic; }
.metaro-plan-hint { font-size: 12px; color: rgba(232,224,255,.5); background: rgba(255,255,255,.04); border-radius: 4px; padding: 8px 10px; }

/* ── Widget Resumen Rutina ── */
.metaro-rutina-widget {
    margin-top: 14px;
    background: #111118;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(198,255,0,.12);
    font-family: 'Inter', 'Barlow', sans-serif;
}
.metaro-rutina-header {
    background: #0e0e14;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(198,255,0,.1);
}
.metaro-rutina-brand {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-color,#c6ff00);
    text-transform: uppercase;
}
.metaro-rutina-dia {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.metaro-rutina-dia:last-child { border-bottom: none; }
.metaro-rutina-dia-nombre {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-color,#c6ff00);
    margin-bottom: 8px;
    font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif;
    font-size: 14px;
}
.metaro-rutina-ejercicios { display: flex; flex-direction: column; gap: 5px; }
.metaro-rutina-ej {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: rgba(232,224,255,.85);
}
.metaro-rutina-ej-nombre {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}
.metaro-rutina-ej-det {
    font-weight: 700;
    color: var(--accent-color,#c6ff00);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════
   BOTÓN TOGGLE + RESUMEN TABLA PLAN
══════════════════════════════════════════════════════ */
.met-toggle-resumen-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(198,255,0,.08);
    border: 1px solid rgba(198,255,0,.22);
    border-radius: 5px;
    color: rgba(198,255,0,.8);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}
.met-toggle-resumen-btn:hover,
.met-toggle-resumen-btn--active {
    background: rgba(198,255,0,.18);
    color: #c6ff00;
}

/* Tarjeta resumen */
.met-resumen-tabla {
    margin-bottom: 14px;
}
.met-resumen-inner {
    background: #0e0e14;
    border: 1px solid rgba(198,255,0,.14);
    border-radius: 10px;
    overflow: hidden;
}
.met-resumen-brand {
    padding: 10px 16px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #c6ff00;
    border-bottom: 1px solid rgba(198,255,0,.1);
    background: #0a0a10;
}
.met-resumen-dia {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.met-resumen-dia:last-of-type { border-bottom: none; }
.met-resumen-dia-nombre {
    font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    color: #c6ff00;
    margin-bottom: 6px;
}
.met-resumen-ejs { display: flex; flex-direction: column; gap: 4px; }
.met-resumen-ej {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(232,224,255,.82);
    gap: 8px;
}
.met-resumen-ej-done .met-resumen-ej-nombre {
    text-decoration: line-through;
    opacity: .4;
}
.met-resumen-ej-nombre {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.met-resumen-ej-det {
    font-weight: 700;
    color: #c6ff00;
    font-size: 11.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.met-resumen-prog {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 11px;
    color: rgba(232,224,255,.45);
    border-top: 1px solid rgba(255,255,255,.05);
    background: #0a0a10;
}
.met-resumen-prog-track {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,.08);
    border-radius: 2px;
    overflow: hidden;
}
.met-resumen-prog-fill {
    height: 100%;
    background: #c6ff00;
    border-radius: 2px;
    transition: width .4s ease;
}
.met-resumen-pct {
    font-weight: 700;
    color: #c6ff00;
    min-width: 30px;
    text-align: right;
}


/* ══════════════════════════════════════════════════════════════════════
   FOOTER DE ACCIONES (reemplaza textarea)
══════════════════════════════════════════════════════════════════════ */
.metaro-footer-acciones {
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,.06);
    background: var(--bg-color, #0d0d18);
}

/* Chips de respuesta rápida */
#metaro-chips-wrap {
    padding: 10px 14px 0;
    display: none;
}
#metaro-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.metaro-chip {
    display: inline-flex;
    align-items: center;
    background: rgba(198,255,0,.07);
    border: 1px solid rgba(198,255,0,.28);
    border-radius: 20px;
    color: rgba(232,224,255,.9);
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
    transition: background .18s, color .18s, transform .12s;
    white-space: nowrap;
}
.metaro-chip:hover {
    background: rgba(198,255,0,.18);
    color: #c6ff00;
    transform: translateY(-1px);
}
.metaro-chip:active { transform: scale(.97); }

/* Chips generados por IA — ligera diferencia visual */
.metaro-chip--ia {
    background: rgba(198,255,0,.04);
    border-style: dashed;
    border-color: rgba(198,255,0,.22);
    color: rgba(198,255,0,.8);
    font-style: italic;
}
.metaro-chip--ia::before {
    content: '✦ ';
    font-style: normal;
    font-size: 9px;
    opacity: .6;
    margin-right: 3px;
}
.metaro-chip--ia:hover {
    background: rgba(198,255,0,.14);
    color: #c6ff00;
    border-style: solid;
}

/* Skeleton loader para chips IA */
.metaro-chip-skeleton {
    display: inline-block;
    height: 32px;
    width: 110px;
    border-radius: 20px;
    background: linear-gradient(90deg, rgba(198,255,0,.04) 25%, rgba(198,255,0,.10) 50%, rgba(198,255,0,.04) 75%);
    background-size: 200% 100%;
    animation: chipSkeleton 1.4s ease-in-out infinite;
}
.metaro-chip-skeleton:nth-child(2) { width: 140px; animation-delay: .2s; }
.metaro-chip-skeleton:nth-child(3) { width: 95px;  animation-delay: .4s; }
@keyframes chipSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* Barra de botones de acción */
.metaro-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 10px 8px 8px;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.metaro-action-bar::-webkit-scrollbar { display: none; }

.metaro-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: rgba(232,224,255,.45);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background .18s, color .18s, transform .12s;
    min-width: 56px;
    flex-shrink: 0;
}
.metaro-action-btn:hover {
    background: rgba(198,255,0,.08);
    color: #c6ff00;
}
.metaro-action-btn:active { transform: scale(.93); }
.metaro-action-btn.mac-active {
    color: #c6ff00;
    background: rgba(198,255,0,.1);
}
.mac-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.07);
    transition: background .18s, border-color .18s;
}
.metaro-action-btn:hover .mac-icon {
    background: rgba(198,255,0,.12);
    border-color: rgba(198,255,0,.3);
}
.mac-icon svg { width: 18px; height: 18px; }
.mac-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════
   WIDGET RUTINA HORIZONTAL
══════════════════════════════════════════════════════════════════════ */
.metaro-rutina-h {
    margin: 12px 0 4px;
    background: #0c0c14;
    border: 1px solid rgba(198,255,0,.12);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.metaro-rutina-h-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #080810;
    border-bottom: 1px solid rgba(198,255,0,.09);
    gap: 12px;
}
.metaro-rutina-h-brand {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #c6ff00;
    text-transform: uppercase;
    white-space: nowrap;
}
.metaro-rutina-h-prog {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}
.metaro-rutina-h-prog-track {
    width: 80px;
    height: 3px;
    background: rgba(255,255,255,.08);
    border-radius: 2px;
    overflow: hidden;
}
.metaro-rutina-h-prog-fill {
    height: 100%;
    background: #c6ff00;
    border-radius: 2px;
    transition: width .4s ease;
}
.metaro-rutina-h-pct {
    font-size: 10px;
    font-weight: 700;
    color: #c6ff00;
    min-width: 28px;
    text-align: right;
}

/* Scroll horizontal de días */
.metaro-rutina-h-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0;
}
.metaro-rutina-h-scroll::-webkit-scrollbar { display: none; }

.metaro-rutina-h-dia {
    min-width: 150px;
    max-width: 175px;
    flex-shrink: 0;
    padding: 10px 13px;
    border-right: 1px solid rgba(255,255,255,.04);
    background: transparent;
    transition: background .18s;
}
.metaro-rutina-h-dia:last-child { border-right: none; }

/* ── ANIMACIONES DÍA HOY ─────────────────────────────────────────── */
@keyframes metaro-hoy-pulse {
    0%   { box-shadow: 0 0 0px 0px rgba(198,255,0,0); background: rgba(198,255,0,.04); }
    50%  { box-shadow: 0 0 14px 3px rgba(198,255,0,.22); background: rgba(198,255,0,.10); }
    100% { box-shadow: 0 0 0px 0px rgba(198,255,0,0); background: rgba(198,255,0,.04); }
}
@keyframes metaro-hoy-border {
    0%, 100% { border-color: rgba(198,255,0,.12); }
    50%       { border-color: rgba(198,255,0,.60); }
}

.metaro-rutina-h-dia--hoy {
    background: rgba(198,255,0,.04);
    border-right-color: rgba(198,255,0,.08);
    border-radius: 8px;
    outline: 1.5px solid rgba(198,255,0,.3);
    outline-offset: -1px;
    animation: metaro-hoy-pulse 2.4s ease-in-out infinite,
               metaro-hoy-border 2.4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.metaro-rutina-h-dia-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.metaro-rutina-h-dia-nombre {
    font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif;
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #c6ff00;
    flex: 1;
}
.metaro-rutina-h-hoy {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
    background: #c6ff00;
    color: #060010;
    border-radius: 3px;
    padding: 1px 5px;
}
.metaro-rutina-h-prog-d {
    font-size: 9px;
    color: rgba(198,255,0,.5);
    font-weight: 700;
    white-space: nowrap;
}

.metaro-rutina-h-ejs { display: flex; flex-direction: column; gap: 4px; }
.metaro-rutina-h-ej {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    font-size: 11px;
}
.metaro-rutina-h-ej.done .metaro-rutina-h-ej-n {
    text-decoration: line-through;
    opacity: .35;
}
.metaro-rutina-h-ej-n {
    color: rgba(232,224,255,.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-size: 10.5px;
}
.metaro-rutina-h-ej-d {
    font-weight: 700;
    color: #c6ff00;
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   WIDGET RUTINA — VIDEO CLICK + RESIZE
══════════════════════════════════════════════════════════════════════ */

/* Resize handle entre columnas */
.metaro-rutina-h-resize-handle {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.metaro-rutina-h-resize-handle::after {
    content: '';
    display: block;
    width: 2px;
    height: 60%;
    background: rgba(198,255,0,.18);
    border-radius: 2px;
    transition: background .15s;
}
.metaro-rutina-h-resize-handle:hover::after {
    background: rgba(198,255,0,.55);
}
.metaro-rutina-h-dia {
    position: relative; /* needed for handle positioning */
}
body.metaro-resizing * { cursor: col-resize !important; user-select: none; }

/* Ejercicio con video — cursor pointer y hover */
.metaro-rutina-h-ej.has-video {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 4px;
    margin: 0 -4px;
    transition: background .15s;
}
.metaro-rutina-h-ej.has-video:hover {
    background: rgba(198,255,0,.08);
}
.metaro-rutina-h-ej.has-video:hover .metaro-rutina-h-ej-n {
    color: #e8e0ff;
}

/* Ícono play inline */
.metaro-rutina-h-ej-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: rgba(198,255,0,.15);
    border-radius: 50%;
    font-size: 7px;
    color: #c6ff00;
    margin-left: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}
.metaro-rutina-h-ej.has-video:hover .metaro-rutina-h-ej-play {
    background: rgba(198,255,0,.35);
}

/* Modal video */
#mh-video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(4,0,18,.96);
    backdrop-filter: blur(14px);
    align-items: center;
    justify-content: center;
}

/* ══════════════════════════════════════════════════════════════════════
   HISTORIAL DE RUTINAS — Panel, items, botón guardar
══════════════════════════════════════════════════════════════════════ */

.metaro-rutina-h-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(198,255,0,.1);
    border: 1px solid rgba(198,255,0,.35);
    color: #c6ff00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    white-space: nowrap;
    text-transform: uppercase;
}
.metaro-rutina-h-save-btn:hover {
    background: rgba(198,255,0,.22);
    transform: translateY(-1px);
}
.metaro-rutina-h-save-btn svg {
    width: 12px;
    height: 12px;
}

.metaro-rutina-guardada-item {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(198,255,0,.06);
    cursor: pointer;
    transition: background .15s;
    position: relative;
}
.metaro-rutina-guardada-item:hover {
    background: rgba(198,255,0,.04);
}
.metaro-rutina-guardada-nombre {
    font-size: 13px;
    font-weight: 700;
    color: #e8e0ff;
    margin-bottom: 3px;
    padding-right: 28px;
}
.metaro-rutina-guardada-meta {
    font-size: 10px;
    color: rgba(232,224,255,.4);
    letter-spacing: .5px;
    line-height: 1.5;
}
.metaro-rutina-guardada-del {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255,80,80,.35);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.metaro-rutina-guardada-del:hover {
    color: rgba(255,80,80,.9);
    background: rgba(255,80,80,.1);
}

/* ══════════════════════════════════════════════════════════════════════
   MODAL MEDIDAS CON CÁMARA
══════════════════════════════════════════════════════════════════════ */

#metaro-medidas-cam-modal {
    z-index: 9999998;
    font-family: 'Barlow', 'Segoe UI', sans-serif;
    box-sizing: border-box;
}
/* Forzar box-sizing en todos los hijos del modal */
#metaro-medidas-cam-modal * {
    box-sizing: border-box;
}
/* Grid de zonas: 3 cols en móvil, 4 en escritorio */
#metaro-zonas-grid {
    grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 480px) {
    #metaro-zonas-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.metaro-zona-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: rgba(255,255,255,.04);
    border: 1.5px solid rgba(198,255,0,.18);
    border-radius: 8px;
    color: #e8e0ff;
    cursor: pointer;
    transition: all .15s;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.metaro-zona-btn:hover {
    border-color: rgba(198,255,0,.5);
    background: rgba(198,255,0,.07);
}
.metaro-zona-btn.selected {
    border-color: #c6ff00 !important;
    background: rgba(198,255,0,.14) !important;
    color: #c6ff00 !important;
}

.metaro-foto-mini {
    width: 58px;
    height: 58px;
    border-radius: 6px;
    object-fit: cover;
    border: 1.5px solid rgba(198,255,0,.2);
    cursor: pointer;
    transition: border-color .15s, transform .1s;
}
.metaro-foto-mini:hover {
    border-color: #c6ff00;
    transform: scale(1.05);
}

/* Badge cámara en botón medidas */
#mac-medidas { position: relative; }
.mac-cam-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    background: #c6ff00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    animation: metCamPulse 2s infinite;
    pointer-events: none;
}
@keyframes metCamPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(198,255,0,.4); }
    50%      { box-shadow: 0 0 0 6px rgba(198,255,0,0); }
}

/* ══════════════════════════════════════════════════════════════════════
   ALERTA 2x AL DÍA
══════════════════════════════════════════════════════════════════════ */
#metaro-alerta-medicion {
    animation: metAlertaSlide .4s ease;
}
@keyframes metAlertaSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Análisis personalizado de rutina ─────────────────────────────────────── */
.metaro-plan-analisis {
    margin-top: 14px;
    background: rgba(198, 255, 0, .04);
    border: 1px solid rgba(198, 255, 0, .18);
    border-radius: 8px;
    padding: 14px 16px;
}
.metaro-plan-analisis-titulo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: 1.5px;
    color: var(--accent-color, #c6ff00);
    margin-bottom: 10px;
}
.metaro-plan-analisis-texto {
    font-size: 13px;
    color: rgba(232, 224, 255, .85);
    line-height: 1.7;
    white-space: pre-wrap;
}
.metaro-plan-analisis-footer {
    font-size: 10px;
    color: rgba(198, 255, 0, .45);
    margin-top: 10px;
    text-align: right;
    font-style: italic;
}

/* ── Catálogo de Ejercicios ── */
.mej-filtro {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(198,255,0,.2);
    border-radius: 20px;
    color: rgba(232,224,255,.6);
    font-size: 11px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.mej-filtro.active,
.mej-filtro:hover {
    background: rgba(198,255,0,.15);
    border-color: rgba(198,255,0,.6);
    color: #c6ff00;
}
.mej-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    cursor: pointer;
    transition: background .15s;
}
.mej-item:hover { background: rgba(198,255,0,.05); }
.mej-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(198,255,0,.15);
}
.mej-thumb-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(198,255,0,.08);
    border: 1px solid rgba(198,255,0,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.mej-info { flex: 1; min-width: 0; }
.mej-nombre {
    font-size: 13px;
    color: rgba(232,224,255,.9);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mej-musculo {
    font-size: 11px;
    color: rgba(198,255,0,.6);
}
.mej-play-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(198,255,0,.12);
    border: 1px solid rgba(198,255,0,.3);
    color: #c6ff00;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all .15s;
}
.mej-play-btn:hover { background: rgba(198,255,0,.25); }
.mej-no-video {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}
#metaro-ejercicios-search:focus {
    border-color: rgba(198,255,0,.5);
    box-shadow: 0 0 0 2px rgba(198,255,0,.1);
}

/* ══════════════════════════════════════════════════
   CATÁLOGO DE SUPLEMENTOS SH FITNESS
══════════════════════════════════════════════════ */
#metaro-panel-suplementos {
    flex-direction: column;
    height: 100%;
}
.metaro-supl-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(198,255,0,.15);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    transition: border-color .2s;
}
.metaro-supl-card:hover {
    border-color: rgba(198,255,0,.4);
}
.metaro-supl-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.metaro-supl-emoji {
    font-size: 20px;
    flex-shrink: 0;
}
.metaro-supl-nombre {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: 1.5px;
    color: #c6ff00;
}
.metaro-supl-bens {
    margin: 0 0 8px 0;
    padding: 0 0 0 14px;
    list-style: disc;
}
.metaro-supl-bens li {
    font-size: 11.5px;
    color: rgba(232,224,255,.75);
    margin-bottom: 2px;
    line-height: 1.4;
}
.metaro-supl-dosis {
    font-size: 11px;
    color: rgba(198,255,0,.85);
    margin-bottom: 10px;
    background: rgba(198,255,0,.06);
    border-radius: 6px;
    padding: 5px 8px;
}
.metaro-supl-ask-btn {
    width: 100%;
    padding: 7px 10px;
    background: rgba(198,255,0,.1);
    border: 1px solid rgba(198,255,0,.3);
    border-radius: 8px;
    color: #c6ff00;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .5px;
    transition: all .15s;
    text-align: center;
}
.metaro-supl-ask-btn:hover {
    background: rgba(198,255,0,.22);
    border-color: rgba(198,255,0,.6);
}
#metaro-suplementos-search:focus {
    border-color: rgba(198,255,0,.5);
    box-shadow: 0 0 0 2px rgba(198,255,0,.1);
}

/* ══════════════════════════════════════════════════════════════════════
   GRUPOS MUSCULARES HOY — estilos inyectados inline en metaroykyra.php
══════════════════════════════════════════════════════════════════════ */
