/* Soporte: panel de la burbuja (soporte.js), tablero de casos (soporte_casos.js) y recordatorio de avisos (pwa_push.js).
   Todo con clases .sop-*: no usa .btn de Bootstrap (el CSS global estira cada .btn al ancho completo en el celular). Los
   colores salen de las variables de abajo; el acento sigue el color primario de la instancia (--primary). */

.sop, .sop-page, .sop-recordatorio {
    --sop-ink: #0f172a;
    --sop-muted: #64748b;
    --sop-line: #e2e8f0;
    --sop-soft: #f8fafc;
    --sop-accent: var(--primary, #4361ee);
    --sop-accent-dark: var(--primary-dark, #3a56d4);
    --sop-planta: #b45309;
    --sop-planta-bg: #fffbeb;
    --sop-planta-line: #fde68a;
    --sop-sistema: #4338ca;
    --sop-sistema-bg: #eef2ff;
    --sop-sistema-line: #c7d2fe;
    --sop-fribytes: #0f766e;
    --sop-fribytes-bg: #f0fdfa;
    --sop-fribytes-line: #99f6e4;
    --sop-ok: #047857;
    --sop-ok-bg: #ecfdf5;
    --sop-ok-line: #a7f3d0;
    --sop-bad: #b91c1c;
    --sop-bad-bg: #fef2f2;
    --sop-bad-line: #fecaca;
    color: var(--sop-ink);
}

.sop button, .sop-page button, .sop-recordatorio button { font: inherit; }

/* ---------- Piezas comunes ---------- */
.sop-seg { display: flex; gap: 4px; padding: 4px; background: #f1f5f9; border-radius: 12px; }
.sop-seg-btn { flex: 1 1 auto; border: 0; background: transparent; color: var(--sop-muted); padding: 8px 8px; border-radius: 9px;
    font-size: .82rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    white-space: nowrap; transition: background .15s, color .15s; }
.sop-seg-btn:hover { color: var(--sop-ink); }
.sop-seg-btn.on { background: #fff; color: var(--sop-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

.sop-ico { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; flex: 0 0 auto; }
.sop-ico-sm { width: 34px; height: 34px; border-radius: 11px; font-size: .95rem; }
.sop-planta .sop-ico, .sop-ico.planta { background: var(--sop-planta-bg); color: var(--sop-planta); }
.sop-sistema .sop-ico, .sop-ico.sistema { background: var(--sop-sistema-bg); color: var(--sop-sistema); }
.sop-fribytes .sop-ico, .sop-ico.fribytes { background: var(--sop-fribytes-bg); color: var(--sop-fribytes); }
.sop-ico.neutro { background: #f1f5f9; color: var(--sop-muted); }

.sop-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.sop-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sop-pill.abierto { background: var(--sop-bad-bg); color: var(--sop-bad); }
.sop-pill.en_curso { background: var(--sop-planta-bg); color: var(--sop-planta); }
.sop-pill.resuelto { background: var(--sop-ok-bg); color: var(--sop-ok); }
.sop-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: #f1f5f9; color: var(--sop-muted); }
.sop-chip.planta { background: var(--sop-planta-bg); color: var(--sop-planta); }
.sop-chip.sistema { background: var(--sop-sistema-bg); color: var(--sop-sistema); }
.sop-chip.fribytes { background: var(--sop-fribytes-bg); color: var(--sop-fribytes); }

.sop-input { width: 100%; border: 1px solid var(--sop-line); border-radius: 12px; padding: 10px 12px; font-size: .9rem; background: #fff; color: var(--sop-ink);
    resize: vertical; transition: border-color .15s, box-shadow .15s; }
.sop-input:focus { outline: none; border-color: var(--sop-accent); box-shadow: 0 0 0 3px rgba(67, 97, 238, .15); }
.sop-primario { border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--sop-accent), var(--sop-accent-dark)); color: #fff; font-weight: 700;
    padding: 12px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: filter .15s, transform .1s; }
.sop-primario:hover { filter: brightness(1.06); }
.sop-primario:active { transform: scale(.985); }
.sop-primario:disabled { opacity: .55; cursor: default; }
.sop-error { background: var(--sop-bad-bg); border: 1px solid var(--sop-bad-line); color: var(--sop-bad); border-radius: 12px; padding: 8px 12px; font-size: .82rem; margin-bottom: 10px; }
.sop-nota { font-size: .76rem; color: var(--sop-muted); }
.sop-vacio { text-align: center; padding: 34px 16px; color: var(--sop-muted); font-size: .88rem; }
.sop-vacio .sop-ico { width: 56px; height: 56px; border-radius: 18px; font-size: 1.4rem; margin-bottom: 10px; }
.sop-cargando { text-align: center; padding: 28px 0; color: var(--sop-muted); }

/* ---------- Panel de la burbuja ---------- */
.sop-hero { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; }
.sop-hero b { display: block; font-size: 1rem; line-height: 1.2; }
.sop-hero span { font-size: .78rem; color: var(--sop-muted); }
.sop-hero .sop-ico { background: linear-gradient(135deg, var(--sop-accent), var(--sop-accent-dark)); color: #fff; }

.sop-pasos { display: flex; gap: 5px; margin: 0 0 12px; }
.sop-pasos i { flex: 1; height: 4px; border-radius: 4px; background: var(--sop-line); }
.sop-pasos i.hecho { background: var(--sop-accent); }

.sop-dest { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 74px; padding: 12px 14px; margin: 0 0 10px;
    background: #fff; border: 1px solid var(--sop-line); border-radius: 16px; cursor: pointer; color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .1s; }
.sop-dest:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, .08); }
.sop-dest.sop-planta:hover { border-color: var(--sop-planta-line); }
.sop-dest.sop-sistema:hover { border-color: var(--sop-sistema-line); }
.sop-dest.sop-fribytes:hover { border-color: var(--sop-fribytes-line); }
.sop-dest-txt { flex: 1; min-width: 0; }
.sop-dest-txt b { display: block; font-size: .95rem; }
.sop-dest-txt small { display: block; color: var(--sop-muted); font-size: .76rem; line-height: 1.35; margin-top: 2px; }
.sop-go { color: #cbd5e1; font-size: .85rem; }

/* Separador entre lo de planta y el soporte de FRIBYTES en el primer paso. */
.sop-aparte { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--sop-muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sop-aparte::before, .sop-aparte::after { content: ''; flex: 1; height: 1px; background: var(--sop-line); }
/* Selector de tablero (planta | FRIBYTES) del tablero de administración. */
.sop-tableros { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.sop-tablero { flex: 1 1 220px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border: 1px solid var(--sop-line); border-radius: 16px;
    cursor: pointer; text-align: left; color: inherit; font-weight: 700; transition: border-color .15s, box-shadow .15s; }
.sop-tablero:hover { border-color: #cbd5e1; }
.sop-tablero.on { border-color: var(--sop-accent); box-shadow: 0 0 0 3px rgba(67, 97, 238, .14); }
.sop-tablero.fribytes.on { border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .16); }
.sop-tablero small { display: block; font-weight: 400; color: var(--sop-muted); font-size: .74rem; }
.sop-tablero .sop-n { margin-left: auto; background: #dc2626; color: #fff; border-radius: 10px; font-size: .74rem; padding: 1px 8px; }
.sop-crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sop-back { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--sop-line); background: #fff; color: var(--sop-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.sop-back:hover { color: var(--sop-ink); border-color: #cbd5e1; }
.sop-crumb .sop-chip { max-width: 100%; }
.sop-titulo { font-weight: 700; font-size: .95rem; margin: 0 0 8px; }

.sop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sop-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; min-height: 88px; padding: 12px 8px;
    background: #fff; border: 1px solid var(--sop-line); border-radius: 14px; cursor: pointer; color: var(--sop-ink); font-size: .82rem; font-weight: 600; line-height: 1.25;
    transition: border-color .15s, box-shadow .15s, transform .1s; }
.sop-tile:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, .08); }
.sop-planta .sop-tile:hover { border-color: var(--sop-planta-line); }
.sop-sistema .sop-tile:hover { border-color: var(--sop-sistema-line); }
.sop-fribytes .sop-tile:hover { border-color: var(--sop-fribytes-line); }
.sop-tile.ancho { grid-column: span 2; flex-direction: row; min-height: 54px; }

.sop-elegido { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; margin-bottom: 12px; font-weight: 700; font-size: .9rem; }
.sop-planta .sop-elegido { background: var(--sop-planta-bg); border: 1px solid var(--sop-planta-line); }
.sop-sistema .sop-elegido { background: var(--sop-sistema-bg); border: 1px solid var(--sop-sistema-line); }
.sop-fribytes .sop-elegido { background: var(--sop-fribytes-bg); border: 1px solid var(--sop-fribytes-line); }
.sop-elegido .sop-ico { background: #fff; }
.sop-label { display: block; font-size: .78rem; font-weight: 600; color: var(--sop-muted); margin: 0 0 5px; }

.sop-flash { background: var(--sop-ok-bg); border: 1px solid var(--sop-ok-line); color: var(--sop-ok); border-radius: 12px; padding: 9px 12px; font-size: .82rem; font-weight: 600;
    margin: 12px 0 0; display: flex; gap: 8px; align-items: center; animation: sop-entra .3s ease; }
@keyframes sop-entra { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.sop-casos { margin-top: 12px; }
.sop-caso { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--sop-line); border-left: 4px solid #cbd5e1; border-radius: 12px;
    padding: 10px 12px; margin: 0 0 8px; cursor: pointer; color: inherit; transition: box-shadow .15s; }
.sop-caso:hover { box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.sop-caso.abierto { border-left-color: #ef4444; }
.sop-caso.en_curso { border-left-color: #f59e0b; }
.sop-caso.resuelto { border-left-color: #10b981; }
.sop-caso.nueva { background: var(--sop-ok-bg); border-color: var(--sop-ok-line); border-left-color: #10b981; }
.sop-caso-top { display: flex; align-items: flex-start; gap: 10px; }
.sop-caso-top .sop-ico { margin-top: 1px; }
.sop-caso-t { flex: 1; min-width: 0; font-size: .86rem; font-weight: 700; overflow-wrap: anywhere; }
.sop-caso-meta { font-size: .72rem; color: var(--sop-muted); margin-top: 2px; font-weight: 400; }
.sop-caso-resp { margin-top: 8px; font-size: .8rem; color: var(--sop-ok); display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.sop-nuevo-tag { display: inline-block; background: #ef4444; color: #fff; border-radius: 999px; font-size: .66rem; padding: 1px 7px; margin-right: 6px; vertical-align: 1px; }

.sop-volver { border: 0; background: transparent; color: var(--sop-accent); font-weight: 600; font-size: .82rem; padding: 0; margin: 12px 0 10px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }

.sop-tira { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--sop-planta-bg);
    border: 1px solid var(--sop-planta-line); font-size: .78rem; color: #78350f; }
.sop-tira > i { font-size: 1rem; color: var(--sop-planta); }
.sop-tira > span { flex: 1; min-width: 0; line-height: 1.35; }
.sop-tira .sop-secundario { padding: 6px 12px; font-size: .78rem; }

/* ---------- Conversación (caso de quien reporta y respuesta) ---------- */
.sop-chat { display: flex; flex-direction: column; gap: 10px; }
.sop-msg { max-width: 94%; padding: 10px 12px; border-radius: 16px; font-size: .88rem; overflow-wrap: anywhere; }
.sop-msg.out { align-self: flex-end; background: var(--sop-sistema-bg); border: 1px solid var(--sop-sistema-line); border-bottom-right-radius: 5px; }
.sop-msg.in { align-self: flex-start; background: var(--sop-ok-bg); border: 1px solid var(--sop-ok-line); border-bottom-left-radius: 5px; }
/* En el tablero la conversación se ve desde quien atiende: lo suyo (la respuesta, en verde) a la derecha y lo que reportó
   el operario (en azul) a la izquierda. En la burbuja del operario es al revés. */
.sop-chat.admin .sop-msg.out { align-self: flex-start; border-bottom-right-radius: 16px; border-bottom-left-radius: 5px; }
.sop-chat.admin .sop-msg.in { align-self: flex-end; border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
.sop-msg-quien { font-size: .72rem; font-weight: 700; color: var(--sop-muted); margin-bottom: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.sop-msg-quien span { font-weight: 400; }
.sop-msg-pie { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; }
.sop-checks { font-size: .8rem; color: #94a3b8; line-height: 1; }
.sop-checks.leido { color: #34b7f1; }
.sop-visto { text-align: right; font-size: .72rem; color: var(--sop-muted); margin-top: 8px; }
.sop-visto i { color: #34b7f1; margin-right: 2px; }
.sop-msg-tit { font-weight: 700; }
.sop-msg-txt { white-space: pre-wrap; }
.sop-espera { border: 1px dashed #cbd5e1; border-radius: 14px; padding: 12px; text-align: center; color: var(--sop-muted); font-size: .8rem; }

/* ---------- Tablero ---------- */
.sop-page { padding-bottom: 24px; }
.sop-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sop-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; background: #fff; border: 1px solid var(--sop-line); border-radius: 16px;
    cursor: pointer; color: inherit; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .15s, box-shadow .15s, transform .1s; }
.sop-card:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, .08); }
.sop-card .num { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.sop-card .lbl { font-size: .78rem; color: var(--sop-muted); font-weight: 600; margin-top: 3px; }
.sop-card .sop-ico { background: #f1f5f9; color: var(--sop-muted); }
.sop-card.mios .sop-ico { background: #e0e7ff; color: var(--sop-accent); }
.sop-card.planta .sop-ico { background: var(--sop-planta-bg); color: var(--sop-planta); }
.sop-card.sistema .sop-ico { background: var(--sop-sistema-bg); color: var(--sop-sistema); }
.sop-card.fribytes .sop-ico { background: var(--sop-fribytes-bg); color: var(--sop-fribytes); }
.sop-card.on { border-color: var(--sop-accent); box-shadow: 0 0 0 3px rgba(67, 97, 238, .14); }
.sop-card.planta.on { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.sop-card.sistema.on { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .16); }
.sop-card.fribytes.on { border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .16); }
.sop-card.pide .num { color: var(--sop-bad); }

.sop-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.sop-toolbar .sop-seg { display: inline-flex; }
.sop-buscar { position: relative; flex: 1 1 220px; max-width: 340px; }
.sop-buscar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .85rem; pointer-events: none; }
/* Más específico que la regla móvil de mobile-ux.css (input:not([type=...]) { padding: 12px 15px }): sin esto el ícono pisa el texto. */
.sop-page .sop-buscar input.sop-input { padding-left: 36px !important; border-radius: 12px; height: 40px; }
@media (max-width: 576px) {
    .sop-cards { gap: 8px; }
    .sop-card { padding: 10px 12px; gap: 10px; }
    .sop-card .num { font-size: 1.4rem; }
    .sop-card .sop-ico { width: 38px; height: 38px; border-radius: 12px; }
    .sop-panel { padding: 14px; }
}

.sop-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; margin: 0 0 8px;
    background: #fff; border: 1px solid var(--sop-line); border-radius: 14px; cursor: pointer; color: inherit; transition: border-color .15s, box-shadow .15s; }
.sop-item:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(15, 23, 42, .06); }
.sop-item.on { border-color: var(--sop-accent); box-shadow: 0 0 0 3px rgba(67, 97, 238, .12); background: #fbfcff; }
.sop-av { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; background: #e2e8f0; color: #475569; }
.sop-av.planta { background: var(--sop-planta-bg); color: var(--sop-planta); }
.sop-av.sistema { background: var(--sop-sistema-bg); color: var(--sop-sistema); }
.sop-av.fribytes { background: var(--sop-fribytes-bg); color: var(--sop-fribytes); }
.sop-item-t { font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; display: flex; align-items: center; gap: 7px; }
.sop-punto { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; flex: 0 0 auto; }
.sop-item-s { font-size: .76rem; color: var(--sop-muted); }
.sop-item-p { font-size: .8rem; color: #475569; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sop-item-d { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sop-item-d time { font-size: .72rem; color: #94a3b8; white-space: nowrap; }

.sop-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: .8rem; color: var(--sop-muted); }
.sop-pager button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--sop-line); background: #fff; cursor: pointer; }
.sop-pager button:disabled { opacity: .4; cursor: default; }

.sop-panel { background: #fff; border: 1px solid var(--sop-line); border-radius: 18px; padding: 18px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
@media (min-width: 992px) { .sop-panel { position: sticky; top: 12px; } }
.sop-panel-cab { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.sop-panel-cab h2 { font-size: 1.08rem; font-weight: 800; margin: 0 0 3px; overflow-wrap: anywhere; }
.sop-panel-cab .sop-av { width: 44px; height: 44px; flex: 0 0 auto; }
.sop-panel-meta { font-size: .78rem; color: var(--sop-muted); }
.sop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.sop-rapidas { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; }
.sop-rapida { border: 1px solid var(--sop-line); background: var(--sop-soft); color: #334155; border-radius: 999px; padding: 5px 11px; font-size: .76rem; cursor: pointer; }
.sop-rapida:hover { background: #fff; border-color: #cbd5e1; }
.sop-pie { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.sop-pie .sop-seg { flex: 0 1 auto; }
.sop-pie .sop-primario { flex: 1 1 180px; }
.sop-primario.verde { background: linear-gradient(135deg, #10b981, #059669); }
.sop-pie .sop-secundario { flex: 0 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 14px; }
.sop-pie .sop-secundario:disabled, .sop-pie .sop-primario:disabled { opacity: .55; cursor: default; }
.sop-redactar { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sop-line); }

.sop-avisos { background: #fff; border: 1px solid var(--sop-line); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; }
.sop-avisos h3 { font-size: .95rem; font-weight: 700; margin: 0 0 2px; }
.sop-aviso-fila { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #f1f5f9; font-size: .85rem; }
.sop-aviso-fila:first-of-type { border-top: 0; }
.sop-aviso-fila .nom { flex: 1; min-width: 0; font-weight: 600; }
.sop-aviso-fila .rol { color: var(--sop-muted); font-size: .74rem; font-weight: 400; display: block; }
.sop-si { color: var(--sop-ok); font-weight: 700; font-size: .78rem; }
.sop-no { color: var(--sop-bad); font-weight: 700; font-size: .78rem; }

/* ---------- Recordatorio de avisos (pwa_push.js) ---------- */
.sop-recordatorio { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2000; width: min(540px, calc(100vw - 24px)); display: flex; gap: 14px;
    background: #fff; border: 1px solid var(--sop-line); border-radius: 18px; padding: 16px; box-shadow: 0 18px 40px rgba(15, 23, 42, .25); animation: sop-baja .35s ease; }
@keyframes sop-baja { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sop-recordatorio .sop-ico { background: var(--sop-planta-bg); color: var(--sop-planta); width: 46px; height: 46px; }
.sop-recordatorio-txt { flex: 1; min-width: 0; }
.sop-recordatorio-txt b { display: block; margin-bottom: 2px; font-size: .95rem; }
.sop-recordatorio-txt p { margin: 0 0 12px; font-size: .84rem; color: #475569; line-height: 1.45; }
.sop-recordatorio-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.sop-secundario { border: 1px solid var(--sop-line); background: #fff; color: #475569; border-radius: 12px; padding: 9px 14px; font-weight: 600; cursor: pointer; font-size: .85rem; }
.sop-secundario:hover { background: var(--sop-soft); }
.sop-recordatorio .sop-primario { padding: 9px 16px; border-radius: 12px; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
    .sop-flash, .sop-recordatorio { animation: none; }
    .sop-dest, .sop-tile, .sop-card, .sop-primario { transition: none; }
}

/* ---------- Fotos y capturas adjuntas ---------- */
.sop-adjuntar { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: var(--sop-soft);
    color: #475569; font-size: .84rem; font-weight: 600; cursor: pointer; width: 100%; justify-content: center; transition: background .15s, border-color .15s; }
.sop-adjuntar:hover { background: #fff; border-color: var(--sop-accent); color: var(--sop-accent); }
.sop-preview:empty { display: none; }
.sop-miniatura { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 6px; border: 1px solid var(--sop-line); border-radius: 12px; background: #fff; }
.sop-miniatura img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.sop-quitar { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--sop-line); background: #fff; color: var(--sop-muted); cursor: pointer; }
.sop-quitar:hover { color: var(--sop-bad); border-color: var(--sop-bad-line); }
.sop-fotos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sop-foto { max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid rgba(15, 23, 42, .12); cursor: zoom-in; background: #e2e8f0; object-fit: contain; }
.sop-foto:not([src]) { width: 160px; height: 110px; animation: sop-pulso 1.2s ease-in-out infinite; }
@keyframes sop-pulso { 50% { opacity: .55; } }
.sop-visor { position: fixed; inset: 0; z-index: 2100; background: rgba(15, 23, 42, .88); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.sop-visor img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: reduce) { .sop-foto:not([src]) { animation: none; } }
