/* Emoji reactions picker — position:fixed para no ser cortado por overflow */
.reaction-picker {
    display: flex; gap: 6px; position: fixed;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 24px; padding: 6px 12px; z-index: 9000;
    box-shadow: var(--shadow-lg);
}
.reaction-btn {
    background: none; border: none; font-size: 22px; cursor: pointer;
    padding: 4px 6px; border-radius: 8px; transition: var(--transition);
    line-height: 1;
    font-family: var(--font-emoji);
}
.reaction-btn:hover { background: var(--primary-100); transform: scale(1.3); }

/* Emoji Picker (WhatsApp-style) */
.emoji-picker {
    display: none; position: absolute; bottom: calc(100% + 8px); left: 0;
    width: 320px; height: 380px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); z-index: 100;
    flex-direction: column; overflow: hidden;
}
.emoji-picker.show { display: flex; }
.emoji-picker-tabs {
    display: flex; border-bottom: 1px solid var(--border-light);
    padding: 0 4px; flex-shrink: 0;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -ms-overflow-style: none;
}
.emoji-picker-tabs::-webkit-scrollbar { display: none; }
.emoji-picker-tab {
    flex: 0 0 auto; padding: 8px 8px; background: none; border: none;
    font-size: 18px; cursor: pointer; text-align: center;
    border-bottom: 2px solid transparent; transition: var(--transition);
    opacity: 0.5; min-width: 36px;
    font-family: var(--font-emoji);
}
.emoji-picker-tab:hover { opacity: 0.8; }
.emoji-picker-tab.active { opacity: 1; border-bottom-color: var(--primary-500); }
.emoji-picker-search {
    padding: 8px; flex-shrink: 0;
}
.emoji-picker-search input {
    width: 100%; padding: 6px 12px; font-size: 13px;
    background: var(--bg-body); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: 20px;
    font-family: var(--font-display), var(--font-emoji);
}
.emoji-picker-search input:focus { outline: none; border-color: var(--primary-500); }
.emoji-picker-grid {
    flex: 1; overflow-y: auto; padding: 4px 8px;
    display: grid; grid-template-columns: repeat(8, 1fr);
    gap: 2px; align-content: start;
}
.emoji-picker-grid::-webkit-scrollbar { width: 4px; }
.emoji-picker-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.emoji-pick {
    font-size: 22px; padding: 4px; border: none; background: none;
    cursor: pointer; border-radius: 6px; transition: var(--transition);
    text-align: center; line-height: 1.2;
    font-family: var(--font-emoji);
}
.emoji-pick:hover { background: var(--primary-100); transform: scale(1.15); }
.emoji-picker-cat-label {
    grid-column: 1 / -1; font-size: 11px; font-weight: 600;
    color: var(--text-dim); padding: 8px 4px 4px;
    text-transform: uppercase; letter-spacing: 0.05em;
}

/* Reaction customizer */
.reaction-customizer {
    display: none; position: absolute; bottom: calc(100% + 8px);
    right: 0; width: 280px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); z-index: 25; padding: 12px;
}
.reaction-customizer.show { display: block; }
.reaction-customizer-title { font-size: 12px; font-weight: 700; margin-bottom: 8px; color: var(--text-secondary); }
.reaction-customizer-grid {
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
}
.reaction-customizer-btn {
    font-size: 18px; padding: 4px; border: 2px solid transparent;
    background: none; cursor: pointer; border-radius: 6px;
    text-align: center; transition: var(--transition);
    font-family: var(--font-emoji);
}
.reaction-customizer-btn:hover { background: var(--primary-100); }
.reaction-customizer-btn.selected { border-color: var(--primary-500); background: var(--primary-100); }
/* Reactions — WhatsApp floating bubble style */
.reaction-bar {
    display: flex; gap: 2px;
    position: absolute;
    bottom: -10px; right: 8px;
    z-index: 2;
}
.msg-theirs .reaction-bar { right: auto; left: 8px; }
.reaction-chip {
    display: inline-flex; align-items: center; justify-content: center; gap: 2px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 14px; padding: 2px 6px; cursor: default;
    min-height: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.reaction-emoji {
    font-family: var(--font-emoji);
    font-size: 15px; line-height: 1;
}
.reaction-count {
    font-family: var(--font-display), var(--font-emoji); font-size: 10px; font-weight: 600;
    color: var(--text-secondary); line-height: 1;
}
.reaction-chip.mine { border-color: var(--primary-500); background: var(--primary-100); }
.msg-mine .reaction-bar { right: 8px; left: auto; }
.msg-mine .reaction-chip { background: var(--bg-elevated); border-color: var(--border); }
.msg-mine .reaction-chip.mine { border-color: var(--primary-500); background: var(--primary-100); }
.msg-mine .reaction-count { color: var(--text-secondary); }
/* Espacio extra abajo cuando hay reacciones para que no se solapen con el siguiente mensaje */
.msg:has(.reaction-bar) { margin-bottom: 18px; }
.msg.has-reactions { margin-bottom: 18px; }

/* Pinned messages bar */
.pinned-bar {
    display: none; align-items: center; gap: 10px;
    padding: 8px 20px; background: var(--accent-100);
    border-bottom: 1px solid var(--accent-100);
    font-size: 13px; color: var(--accent-light);
}
.pinned-icon { display: flex; align-items: center; color: var(--accent); flex-shrink: 0; }
.pinned-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinned-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px; display: flex; align-items: center; border-radius: 50%; transition: var(--transition); }
.pinned-close:hover { color: var(--text-primary); background: var(--overlay-light); }

/* Trust levels badge */
.trust-badge { font-size: 12px; letter-spacing: 2px; font-weight: 600; }

/* Message timer */
.msg-timer {
    display: inline-block; font-size: 10px; color: var(--accent);
    margin-left: 4px; font-family: var(--font-mono); font-weight: 600;
}
.msg-mine .msg-timer { color: var(--accent-light); }

/* View Once message */
.msg-view-once .msg-content {
    background: repeating-linear-gradient(45deg, transparent, transparent 4px, var(--primary-100) 4px, var(--primary-100) 8px);
    cursor: pointer; border-radius: 8px; padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    border: 1px dashed var(--border-focus);
    transition: all var(--transition);
    -webkit-user-select: none; user-select: none;
}
.msg-view-once .msg-content:hover { border-color: var(--primary-500); background: var(--primary-100); }
.msg-view-once-opened .msg-content {
    opacity: 0.4; cursor: default; border-style: solid;
    border-color: var(--border-light); background: transparent;
}

/* Stego image in message — looks like a normal photo */
.msg-stego-container {
    position: relative; display: inline-block; margin-top: 6px; max-width: 280px;
    min-height: 120px;
}
.msg-stego-img {
    width: 100%; border-radius: 8px; display: block; cursor: pointer;
    transition: opacity 0.2s ease;
    min-height: 120px;
    object-fit: cover;
}
.msg-stego-img:hover { opacity: 0.85; }
.msg-stego-lock {
    position: absolute; bottom: 8px; right: 8px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
    border: 1.5px solid var(--border-focus);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.25s ease;
    z-index: 2;
}
.msg-stego-lock:hover {
    background: var(--border-focus); border-color: var(--primary-500);
    transform: scale(1.12);
}
.msg-stego-lock:active { transform: scale(0.95); }
.msg-stego-lock svg { width: 16px; height: 16px; color: var(--primary-400); }
.msg-stego-lock.has-pwd { border-color: var(--accent); }
.msg-stego-lock.has-pwd svg { color: var(--accent-light); }
.msg-stego-lock.has-pwd:hover { background: var(--accent-100); }

/* View Once — borde animado sutil en imagenes stego protegidas */
.msg-stego-container.stego-view-once {
    border-radius: 10px;
}
.msg-stego-container.stego-view-once::after {
    content: '';
    position: absolute; inset: -1.5px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    pointer-events: none; z-index: 1;
    animation: stegoShimmer 3s ease-in-out infinite;
}
@keyframes stegoShimmer {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--primary-400); }
}
.msg-stego-container.stego-view-once-opened::after {
    animation: none;
    border-color: var(--text-dim);
    opacity: 0.3;
}

/* Reveal overlay on image */
.msg-stego-reveal {
    position: absolute; inset: 0; z-index: 3;
    background: rgba(0,0,0,0.92); backdrop-filter: blur(8px);
    border-radius: 8px; display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    padding: 16px; gap: 8px; opacity: 0;
    animation: stegoRevealIn 0.3s ease forwards;
}
@keyframes stegoRevealIn { to { opacity: 1; } }
.msg-stego-reveal.hiding {
    animation: stegoRevealOut 0.5s ease forwards;
}
@keyframes stegoRevealOut { to { opacity: 0; } }
.msg-stego-reveal-text {
    color: var(--text-primary); font-size: 14px; line-height: 1.5;
    text-align: center; word-break: break-word; white-space: pre-wrap;
    max-height: 200px; overflow-y: auto;
}
.msg-stego-reveal-timer {
    font-family: var(--font-mono); font-size: 11px;
    color: var(--accent); font-weight: 600;
}
.msg-stego-reveal-label {
    font-family: var(--font-mono); font-size: 9px;
    color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase;
}

/* Lightbox overlay */
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 90000;
    background: rgba(0,0,0,0.95); backdrop-filter: blur(12px);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 16px; padding: 24px;
    animation: lockFadeIn 0.25s ease;
    overflow-y: auto;
}
.lightbox-overlay.show { display: flex; }
.lightbox-content {
    max-width: 560px; width: 100%; padding: 24px;
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    color: var(--text-primary); font-size: 15px; line-height: 1.7;
    word-wrap: break-word; white-space: pre-wrap;
    box-shadow: var(--shadow-lg);
    max-height: 60vh; overflow-y: auto;
    scrollbar-width: thin;
}
.lightbox-content::-webkit-scrollbar { width: 4px; }
.lightbox-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.lightbox-timer {
    font-family: var(--font-mono); font-size: 22px; font-weight: 700;
    color: var(--danger); text-align: center;
}
.lightbox-close-btn {
    padding: 10px 28px; border-radius: var(--radius);
    background: var(--danger); color: var(--text-primary); border: none;
    font-family: var(--font-display), var(--font-emoji); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
}
.lightbox-close-btn:hover { opacity: 0.85; }

/* Lightbox modo media: sin card, imagen adaptable al viewport */
.lightbox-content.lightbox-media-mode {
    max-width: 94vw;
    max-height: 88vh;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content.lightbox-media-mode img {
    max-width: 94vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}
.lightbox-content.lightbox-media-mode video {
    max-width: 94vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
/* Botones de accion dentro del lightbox media */
.lightbox-media-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}
.lightbox-media-actions button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 12px;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.15s;
    backdrop-filter: blur(4px);
}
.lightbox-media-actions button:hover {
    background: rgba(255,255,255,0.15);
}

/* ============================================================
   MEDIA VIEWER — Visor profesional de imagenes y video
   ============================================================ */
.mv-viewer {
    position: fixed; inset: 0; z-index: 95000;
    background: rgba(0,0,0,0.96);
    display: none; flex-direction: column;
    animation: mvViewerFadeIn 0.2s ease;
    user-select: none; -webkit-user-select: none;
}
.mv-viewer.open { display: flex; }

@keyframes mvViewerFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Toolbar */
.mv-viewer-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; min-height: 48px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    position: relative; z-index: 2;
    flex-shrink: 0;
}
.mv-viewer-left,
.mv-viewer-right { display: flex; align-items: center; gap: 4px; }
.mv-viewer-center {
    font-family: var(--font-display), sans-serif;
    font-size: 13px; color: rgba(255,255,255,0.7);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 200px; text-align: center;
}
.mv-viewer-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    border: none; background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85); cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.mv-viewer-btn:hover { background: rgba(255,255,255,0.16); }
.mv-viewer-btn:active { transform: scale(0.92); }
.mv-viewer-zoom-label {
    font-family: var(--font-mono), monospace;
    font-size: 11px; color: rgba(255,255,255,0.5);
    min-width: 40px; text-align: center;
}
.mv-viewer-sep {
    width: 1px; height: 24px; background: rgba(255,255,255,0.12); margin: 0 4px;
}

/* Canvas area */
.mv-viewer-canvas {
    flex: 1; overflow: hidden; position: relative;
    display: flex; align-items: center; justify-content: center;
    cursor: grab; touch-action: none;
}
.mv-viewer-canvas.dragging { cursor: grabbing; }

/* Media container (transforms applied here) */
.mv-viewer-media {
    position: absolute;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    display: flex; align-items: center; justify-content: center;
}
.mv-viewer-media.no-transition { transition: none; }
.mv-viewer-media img {
    max-width: 94vw; max-height: calc(100vh - 72px);
    width: auto; height: auto; object-fit: contain;
    border-radius: 6px; pointer-events: none;
    box-shadow: 0 4px 40px rgba(0,0,0,0.6);
}
.mv-viewer-media video {
    max-width: 94vw; max-height: calc(100vh - 72px);
    width: auto; height: auto; object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.6);
}
.mv-viewer-media.zoomed img {
    max-width: none; max-height: none;
    border-radius: 4px; cursor: grab;
}
.mv-viewer-media.zoomed { cursor: grab; }
.mv-viewer-media.zoomed.dragging { cursor: grabbing; }

/* Hint */
.mv-viewer-hint {
    position: absolute; bottom: 20px; left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display), sans-serif;
    font-size: 12px; color: rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
    padding: 6px 16px; border-radius: 20px;
    pointer-events: none; z-index: 3;
    transition: opacity 0.3s;
}
.mv-viewer-hint.hidden { opacity: 0; }

/* Mobile tweaks */
@media (max-width: 768px) {
    .mv-viewer-toolbar { padding: 6px 8px; }
    .mv-viewer-btn { width: 36px; height: 36px; border-radius: 8px; }
    .mv-viewer-zoom-label { display: none; }
    .mv-viewer-sep { display: none; }
    .mv-viewer-center { font-size: 12px; max-width: 120px; }
    .mv-viewer-hint { font-size: 11px; bottom: 16px; }
    #mvViewerZoomOut, #mvViewerZoomIn, #mvViewerZoomFit { display: none; }
}

/* System messages */
.msg-system {
    max-width: 100%; text-align: center; background: transparent;
    border: none; margin: 8px 0; padding: 4px 0;
}

/* Poll cards */
.poll-card { min-width: 220px; }
.poll-question { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.poll-option {
    position: relative; padding: 8px 12px; margin-bottom: 4px;
    border-radius: var(--radius-sm); cursor: pointer;
    border: 1px solid var(--border); overflow: hidden;
    transition: var(--transition); font-size: 13px;
}
.poll-option:hover { border-color: var(--primary-500); }
.poll-option.voted { border-color: var(--primary-500); background: var(--primary-100); }
.poll-bar {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: var(--primary-100); transition: width 0.4s ease;
}
.poll-opt-text { position: relative; z-index: 1; }
.poll-opt-pct { position: relative; z-index: 1; float: right; font-weight: 600; color: var(--primary-400); font-size: 12px; }
.poll-total { font-size: 11px; color: var(--text-dim); margin-top: 6px; }
.msg-theirs .poll-option { border-color: var(--overlay-medium); }
.msg-theirs .poll-option:hover { border-color: var(--primary-400); }
.msg-theirs .poll-bar { background: var(--primary-100); }

/* Poll creator panel */
.poll-creator {
    padding: 16px 24px; border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}
.poll-creator-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; font-size: 14px;
}

/* Link preview */
.link-preview {
    display: flex; gap: 12px; margin-top: 8px; padding: 10px;
    background: var(--overlay-subtle); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden; max-width: 320px;
    flex-shrink: 0; cursor: pointer; transition: background 0.15s;
    text-decoration: none; color: inherit;
}
.link-preview:hover { background: var(--overlay-light); }
.link-preview-loading {
    min-height: 58px;
    pointer-events: none;
}
.msg-mine .link-preview { border-color: var(--overlay-medium); background: rgba(0,0,0,0.15); }
.link-preview-img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.link-preview-info { flex: 1; min-width: 0; }
.link-preview-title { font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-preview-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-preview-url { font-size: 10px; color: var(--text-dim); margin-top: 4px; }
/* ============================================================
   LOCK SCREEN — Inactivity Protection
   ============================================================ */
.lock-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--bg-body);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 24px;
    animation: lockFadeIn 0.3s ease;
}
.lock-overlay.show { display: flex; }
@keyframes lockFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lockPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes lockShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}
.lock-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600), var(--primary));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 40px var(--border-focus);
    animation: lockPulse 3s ease-in-out infinite;
}
.lock-icon svg { color: var(--text-primary); width: 36px; height: 36px; }
.lock-title {
    font-family: var(--font-display), var(--font-emoji); font-size: 22px; font-weight: 700;
    color: var(--text-primary); letter-spacing: -0.5px;
}
.lock-subtitle {
    font-family: var(--font-mono); font-size: 12px;
    color: var(--text-muted); margin-top: -12px;
}
.lock-pin-box {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    width: 280px;
}
.lock-pin-dots {
    display: flex; gap: 12px; height: 20px;
}
.lock-dot {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--primary-500);
    background: transparent;
    transition: all 0.2s ease;
}
.lock-dot.filled { background: var(--primary-500); box-shadow: 0 0 8px var(--border-focus); }
.lock-dot.error { border-color: var(--danger); background: var(--danger); }
.lock-numpad {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; width: 100%;
}
.lock-numpad-btn {
    height: 56px; border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-display), var(--font-emoji); font-size: 22px; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.lock-numpad-btn:hover { background: var(--bg-elevated); border-color: var(--primary-500); }
.lock-numpad-btn:active { transform: scale(0.95); background: var(--primary-100); }
.lock-numpad-btn.action {
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.lock-numpad-btn.action.danger:hover { color: var(--danger); border-color: var(--danger); }
.lock-error-msg {
    font-family: var(--font-mono); font-size: 11px;
    color: var(--danger); height: 16px; text-align: center;
}
.lock-pin-box.shake { animation: lockShake 0.4s ease; }
.lock-timer-label {
    position: absolute; bottom: 24px;
    font-family: var(--font-mono); font-size: 10px;
    color: var(--text-dim);
}
.lock-delay-msg {
    font-family: var(--font-mono); font-size: 12px; font-weight: 600;
    color: var(--warning); text-align: center; min-height: 18px;
}
.lock-content { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; }

/* Pattern grid */
.lock-pattern-box { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lock-pattern-box.shake { animation: lockShake 0.4s ease; }
.lock-pattern-grid {
    position: relative; width: 240px; height: 240px;
    touch-action: none; user-select: none; -webkit-user-select: none;
}
.lock-pattern-svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1;
}
.lock-pattern-line {
    stroke: var(--primary-500); stroke-width: 3; stroke-linecap: round; opacity: 0.7;
}
.lock-pattern-line.live { opacity: 0.3; stroke-dasharray: 6 4; }
.lock-pattern-node {
    position: absolute; width: 44px; height: 44px; border-radius: 50%;
    border: 2.5px solid var(--primary-500); background: transparent;
    z-index: 2; cursor: pointer; transition: all 0.15s ease;
    display: flex; align-items: center; justify-content: center;
}
.lock-pattern-node::after {
    content: ''; width: 12px; height: 12px; border-radius: 50%;
    background: transparent; transition: all 0.15s ease;
}
.lock-pattern-node.active { border-color: var(--primary-400); background: var(--primary-100); }
.lock-pattern-node.active::after { background: var(--primary-500); box-shadow: 0 0 10px var(--border-focus); }
.lock-pattern-node.error { border-color: var(--danger); background: rgba(248,113,113,0.1); }
.lock-pattern-node.error::after { background: var(--danger); }
.lock-pattern-hint {
    font-size: 11px; color: var(--text-dim); text-align: center; margin-top: 4px;
}
.lock-pattern-confirm {
    display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 12px;
}
.lock-pattern-confirm-count {
    font-size: 12px; font-weight: 600; color: var(--primary-400);
    font-family: var(--font-mono);
}
.lock-pattern-confirm-btns {
    display: flex; gap: 8px; width: 100%;
}
.lock-pattern-confirm-btns .lock-action-btn { flex: 1; padding: 8px; font-size: 13px; }

/* Mode selector */
.lock-mode-selector {
    display: flex; gap: 12px; justify-content: center; margin: 16px 0;
}
.lock-mode-btn {
    flex: 1; padding: 20px 12px; border-radius: var(--radius);
    border: 1.5px solid var(--border); background: var(--bg-card);
    cursor: pointer; text-align: center; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.lock-mode-btn:hover { border-color: var(--primary-500); background: var(--bg-elevated); }
.lock-mode-icon { color: var(--primary-400); }
.lock-mode-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.lock-mode-desc { font-size: 11px; color: var(--text-muted); }
.lock-cancel-btn {
    display: block; margin: 12px auto 0; padding: 8px 24px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: transparent; color: var(--text-secondary);
    font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.lock-cancel-btn:hover { border-color: var(--danger); color: var(--danger); }

/* Shapes setup grid */
.lock-shapes-setup { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lock-shapes-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 100%; }
.lock-shape-cell {
    width: 100%; aspect-ratio: 1; border: 1.5px solid var(--border);
    border-radius: 6px; background: var(--bg-card); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    position: relative; transition: all 0.15s; padding: 0;
}
.lock-shape-cell:hover { border-color: var(--primary-500); background: var(--bg-elevated); }
.lock-shape-cell.selected { border-color: var(--primary-500); background: var(--primary-100); }
.lock-shape-cell-num {
    position: absolute; top: -4px; right: -4px; width: 16px; height: 16px;
    border-radius: 50%; background: var(--primary-500); color: var(--text-primary);
    font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}

/* Shapes unlock arena */
.lock-shapes-unlock { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lock-shapes-arena {
    position: relative; width: 100%; height: 420px;
    border: 1px dashed var(--border); border-radius: var(--radius-lg, 12px);
    overflow: hidden; touch-action: manipulation;
}
.lock-shape-float {
    position: absolute; width: 36px; height: 36px; cursor: pointer;
    transition: opacity 0.15s; display: flex; align-items: center; justify-content: center;
    will-change: transform;
}
.lock-shape-float:hover { opacity: 0.8; }
.lock-shape-float.picked { outline: 2px solid var(--primary-400); outline-offset: 2px; border-radius: 50%; }
.lock-shape-float-num {
    position: absolute; top: -6px; right: -6px; width: 16px; height: 16px;
    border-radius: 50%; background: var(--primary-500); color: var(--text-primary);
    font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center;
    z-index: 2; pointer-events: none;
}

/* Selected shapes bar (shared setup + unlock) */
.lock-shapes-selected { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 28px; }
.lock-shape-badge {
    display: flex; align-items: center; gap: 2px; padding: 2px 6px;
    border-radius: 12px; background: var(--primary-100); border: 1px solid var(--primary-500);
}
.lock-shape-badge-num { font-size: 9px; font-weight: 700; color: var(--primary-400); }

.lock-shapes-actions { display: flex; gap: 6px; width: 100%; }
.lock-shapes-actions .lock-action-btn { flex: 1; font-size: 12px; padding: 8px 6px; }
.lock-shapes-setup-actions { width: 100%; margin-top: 8px; }
.lock-shapes-arena.shake { animation: lockShake 0.4s ease; }
.lock-shapes-grid.shake { animation: lockShake 0.4s ease; }

/* Lock screen mobile responsive */
@media (max-width: 768px) {
    .lock-overlay {
        gap: 14px; padding: 16px;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .lock-icon { width: 56px; height: 56px; }
    .lock-icon svg { width: 26px; height: 26px; }
    .lock-title { font-size: 18px; }
    .lock-subtitle { font-size: 11px; margin-top: -6px; }
    .lock-content { max-width: 100%; padding: 0 8px; }
    .lock-pin-box { width: 100%; max-width: 280px; }
    .lock-numpad-btn { height: 48px; font-size: 20px; }
    .lock-numpad { gap: 8px; }
    .lock-pattern-grid { transform: scale(0.92); transform-origin: top center; width: 240px; height: 240px; }
    .lock-pattern-node { width: 44px; height: 44px; }
    .lock-shapes-arena { height: 340px; }
    .lock-shapes-grid { gap: 4px; }
    .lock-shape-cell svg { width: 24px !important; height: 24px !important; }
    .lock-mode-selector { gap: 8px; flex-wrap: wrap; }
    .lock-mode-btn { padding: 14px 8px; gap: 6px; min-width: 0; }
    .lock-mode-label { font-size: 12px; }
    .lock-mode-desc { font-size: 10px; }
    .lock-timer-label { bottom: 12px; }
    .lock-setup-msg { font-size: 12px; padding: 0 4px; }
    .lock-action-btn { padding: 8px 12px; font-size: 12px; }
}
@media (max-width: 380px) {
    .lock-overlay { gap: 10px; padding: 12px; }
    .lock-icon { width: 44px; height: 44px; }
    .lock-icon svg { width: 22px; height: 22px; }
    .lock-title { font-size: 16px; }
    .lock-pin-box { max-width: 260px; }
    .lock-numpad-btn { height: 42px; font-size: 18px; }
    .lock-shapes-arena { height: 280px; }
    .lock-shapes-grid { gap: 3px; }
    .lock-shape-cell svg { width: 20px !important; height: 20px !important; }
    .lock-pattern-grid { transform: scale(0.83); transform-origin: top center; width: 240px; height: 240px; }
    .lock-pattern-node { width: 44px; height: 44px; }
}
@media (max-width: 768px) and (orientation: landscape) {
    .lock-overlay { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 12px; }
    .lock-icon { width: 40px; height: 40px; }
    .lock-icon svg { width: 20px; height: 20px; }
    .lock-title { font-size: 16px; }
    .lock-subtitle { display: none; }
    .lock-content { max-width: 320px; }
    .lock-shapes-arena { height: 220px; }
    .lock-numpad-btn { height: 40px; font-size: 18px; }
}

/* Setup messages */
.lock-setup-msg {
    text-align: center; font-size: 13px; color: var(--text-secondary);
    line-height: 1.6; padding: 0 12px; margin-bottom: 16px;
}
.lock-setup-msg b { color: var(--danger); font-weight: 600; }
.lock-setup-actions { display: flex; flex-direction: column; gap: 8px; }
.lock-action-btn {
    padding: 10px 20px; border-radius: var(--radius); font-size: 13px;
    font-weight: 600; cursor: pointer; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-primary); transition: all 0.2s;
    text-align: center;
}
.lock-action-btn.primary { background: var(--primary-500); color: var(--text-primary); border-color: var(--primary-500); }
.lock-action-btn.primary:hover { background: var(--primary-600); }
.lock-action-btn.ghost { background: transparent; color: var(--text-secondary); }
.lock-action-btn.ghost:hover { border-color: var(--text-secondary); }


/* Typing indicator */
.typing-indicator {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: 11px; color: var(--success); font-weight: 500;
    font-style: italic;
}
.typing-dots span {
    animation: typingDot 1.4s ease-in-out infinite;
    opacity: 0.3;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot { 0%,60%,100%{opacity:0.3} 30%{opacity:1} }

/* Reply bar */
.reply-bar {
    display: none; align-items: center; gap: 10px;
    padding: 10px 24px; border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}
.reply-bar-content {
    flex: 1; min-width: 0; padding-left: 10px;
    border-left: 3px solid var(--primary-500);
}
.reply-bar-name {
    font-size: 12px; font-weight: 600; color: var(--primary-400);
}
.reply-bar-text {
    font-size: 12px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reply-bar-close {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 20px; padding: 4px 8px;
}
.reply-bar-close:hover { color: var(--text-primary); }

/* Reply quote inside message */
.msg-reply-quote {
    padding: 6px 10px; margin-bottom: 6px;
    border-left: 3px solid var(--primary-500);
    background: var(--primary-100);
    border-radius: 0 6px 6px 0;
    cursor: pointer; font-size: 12px;
}
.msg-reply-quote:hover { background: var(--primary-100); }
.msg-reply-name { font-weight: 600; color: var(--primary-400); margin-bottom: 1px; }
.msg-reply-text { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-mine .msg-reply-quote {
    background: var(--overlay-medium);
    border-left-color: var(--overlay-text);
}
.msg-mine .msg-reply-name { color: var(--overlay-text-bright); }
.msg-mine .msg-reply-text { color: var(--overlay-text-strong); }

/* File attachment in message */
.msg-file-attach {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; margin-top: 6px;
    background: var(--overlay-subtle); border: 1px solid var(--border-light);
    border-radius: 10px; min-width: 200px;
    transition: var(--transition);
}
.msg-file-attach:hover { border-color: var(--border); }
.msg-file-icon {
    width: 40px; height: 40px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: var(--overlay-light);
}
.msg-file-info { flex: 1; min-width: 0; }
.msg-file-name {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-file-size { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.msg-file-download {
    color: var(--primary-400); padding: 8px;
    border-radius: 8px; transition: var(--transition);
    background: none; border: none; cursor: pointer;
}
.msg-file-download:hover { background: var(--primary-100); }
.msg-mine .msg-file-attach {
    background: var(--overlay-invert-medium); border-color: var(--overlay-medium);
}
.msg-mine .msg-file-icon { background: var(--overlay-medium); }
.msg-mine .msg-file-name { color: var(--text-primary); }
.msg-mine .msg-file-size { color: var(--overlay-text-strong); }
.msg-mine .msg-file-download { color: var(--overlay-text-bright); }

/* File preview bar (before sending) */
.file-preview-bar {
    display: none; flex-direction: column; gap: 6px;
    padding: 10px 16px; border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}
.file-preview-info {
    flex: 1; display: flex; align-items: center; gap: 8px;
}
.file-preview-icon { color: var(--primary-400); }
.file-preview-name { font-size: 13px; font-weight: 600; }
.file-preview-size { font-size: 11px; color: var(--text-muted); }
.file-preview-remove {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 20px; padding: 4px 8px;
}
.file-preview-remove:hover { color: var(--danger); }

/* File preview thumbnail (image files) */
.file-preview-thumb {
    width: 40px; height: 40px; border-radius: 6px;
    object-fit: cover; flex-shrink: 0;
}

/* Media preview (images, audio, video) */
.msg-media-preview { margin-top: 6px; max-width: 340px; }
.msg-media-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 28px 16px; cursor: pointer;
    background: linear-gradient(135deg, var(--primary-100) 0%, rgba(129,140,248,0.05) 100%);
    border: 1px dashed var(--border);
    border-radius: 12px; transition: var(--transition);
    position: relative; overflow: hidden;
    min-height: 100px;
}
.msg-media-placeholder:hover { background: linear-gradient(135deg, var(--primary-100) 0%, rgba(129,140,248,0.1) 100%); border-color: var(--primary-500); }
.msg-media-play-icon { color: var(--primary-400); opacity: 0.6; }
.msg-media-placeholder:hover .msg-media-play-icon { opacity: 1; transform: scale(1.1); transition: var(--transition); }
.msg-media-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.msg-media-meta { font-size: 11px; color: var(--text-dim); }

/* Type-specific placeholder sizing */
.msg-media-ph-image { min-height: 140px; min-width: 180px; }
.msg-media-ph-audio { min-height: 70px; min-width: 200px; }
.msg-media-ph-video { min-height: 120px; min-width: 200px; }

.msg-media-loading {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 24px 16px;
}
.msg-media-spinner {
    width: 24px; height: 24px; border: 2px solid var(--border);
    border-top-color: var(--primary-400); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.msg-media-error {
    padding: 16px; text-align: center; font-size: 12px;
    color: var(--danger); background: rgba(248,113,113,0.06);
    border-radius: 8px;
}

/* Loaded media */
/* Media placeholders: altura reservada igual a la del contenido cargado */
.msg-media-preview {
    min-height: 140px;
}
.msg-media-preview[data-type="image"] { min-height: 180px; }
.msg-media-preview[data-type="video"] { min-height: 180px; }
.msg-media-preview[data-type="audio"] { min-height: 70px; }

.msg-media-loaded { overflow: hidden; border-radius: 10px; }
.msg-media-img {
    display: block; max-width: 100%; max-height: 300px;
    border-radius: 10px; cursor: pointer;
    transition: var(--transition);
}
.msg-media-img:hover { opacity: 0.9; }
.msg-media-video {
    display: block; max-width: 100%; max-height: 300px;
    border-radius: 10px; background: #000;
}
.msg-media-audio { width: 100%; max-width: 320px; height: 40px; }
.msg-media-audio-wrap { padding: 8px 12px; background: var(--overlay-light); border-radius: 10px; }
.msg-media-actions {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 8px; font-size: 11px; color: var(--text-dim);
}
.msg-media-filename {
    flex: 1; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; min-width: 0;
}
.msg-media-dl-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 4px; border-radius: 50%;
    transition: var(--transition);
}
.msg-media-dl-btn:hover { color: var(--primary-400); background: var(--primary-100); }

/* Mine variants */
.msg-mine .msg-media-placeholder { background: rgba(0,0,0,0.12); border-color: var(--overlay-strong); }
.msg-mine .msg-media-placeholder:hover { background: var(--overlay-medium); border-color: var(--overlay-text); }
.msg-mine .msg-media-label { color: var(--overlay-text-strong); }
.msg-mine .msg-media-meta { color: var(--overlay-text); }
.msg-mine .msg-media-play-icon { color: var(--overlay-text-strong); }
.msg-mine .msg-media-audio-wrap { background: rgba(0,0,0,0.2); }
.msg-mine .msg-media-actions { color: var(--overlay-text); }
.msg-mine .msg-media-dl-btn { color: var(--overlay-text-strong); }
.msg-mine .msg-media-dl-btn:hover { color: var(--text-primary); background: var(--overlay-strong); }

/* Skeleton placeholder while media loads (adapts to theme and bubble) */
.msg-media-skeleton-wrap {
    margin-top: 6px; max-width: 340px; min-height: 160px; min-width: 200px;
    border-radius: 10px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px dashed rgba(255,255,255,0.15);
    animation: shimmer 1.4s ease-in-out infinite;
    background-size: 400px 100%;
    background-image: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.04) 50%, transparent 75%);
}
.msg-skel-icon { opacity: 0.5; color: var(--text-secondary); }
.msg-skel-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.msg-skel-meta { font-size: 10px; color: var(--text-muted); }

/* Skeleton en burbujas propias (fondo de color) */
.msg-mine .msg-media-skeleton-wrap {
    background: rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.2);
    background-image: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.08) 50%, transparent 75%);
    background-size: 400px 100%;
}
.msg-mine .msg-skel-icon { color: rgba(255,255,255,0.7); opacity: 1; }
.msg-mine .msg-skel-label { color: rgba(255,255,255,0.85); }
.msg-mine .msg-skel-meta { color: rgba(255,255,255,0.6); }

/* Retry button when media fails to load after 3 attempts */
.msg-media-retry-wrap {
    margin-top: 6px; max-width: 340px; min-height: 120px; min-width: 200px;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: rgba(248,113,113,0.06);
    border: 1px dashed rgba(248,113,113,0.3);
}
.msg-media-retry {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px; text-align: center;
}
.msg-media-retry svg { color: var(--danger); }
.msg-media-retry-label { font-size: 12px; color: var(--text-secondary); }
.msg-media-retry-btn {
    background: var(--primary-500); color: #fff; border: none;
    padding: 6px 16px; border-radius: 6px; font-size: 12px;
    cursor: pointer; font-weight: 500; transition: background 0.2s;
}
.msg-media-retry-btn:hover { background: var(--primary-600); }

/* Retry en burbujas propias */
.msg-mine .msg-media-retry-wrap {
    background: rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.2);
}
.msg-mine .msg-media-retry svg { color: rgba(255,200,200,0.8); }
.msg-mine .msg-media-retry-label { color: rgba(255,255,255,0.8); }
.msg-mine .msg-media-retry-btn { background: rgba(255,255,255,0.2); }
.msg-mine .msg-media-retry-btn:hover { background: rgba(255,255,255,0.3); }

/* File preview lock button (custom password) */
.file-preview-lock {
    background: none; border: 1px solid var(--border); color: var(--text-muted);
    cursor: pointer; padding: 4px 8px; border-radius: 6px;
    transition: var(--transition); display: flex; align-items: center;
}
.file-preview-lock:hover { border-color: var(--warning); color: var(--warning); }
.file-preview-lock.active { border-color: var(--warning); color: var(--warning); background: var(--accent-100); }

/* File queue container */
.file-queue-container { width: 100%; }
.file-queue-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px;
}
.file-queue-count { font-size: 12px; font-weight: 600; color: var(--primary-400); }
.file-queue-actions { display: flex; align-items: center; gap: 4px; }
.file-queue-add-btn {
    background: none; border: 1px solid var(--border); color: var(--text-muted);
    cursor: pointer; padding: 4px 8px; border-radius: 6px;
    transition: var(--transition); display: flex; align-items: center;
}
.file-queue-add-btn:hover { border-color: var(--primary-400); color: var(--primary-400); }
.file-queue-list {
    display: flex; flex-direction: column; gap: 4px;
    max-height: 160px; overflow-y: auto;
    scrollbar-width: thin;
}
.file-queue-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px; border-radius: 8px;
    background: var(--overlay-light);
    transition: var(--transition);
}
.file-queue-item:hover { background: var(--overlay-medium); }
.file-queue-order {
    font-size: 10px; font-weight: 700; color: var(--primary-400);
    background: var(--primary-100); width: 20px; height: 20px;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.file-queue-icon { color: var(--text-muted); flex-shrink: 0; display: flex; }
.file-queue-thumb {
    width: 32px; height: 32px; border-radius: 4px;
    object-fit: cover; flex-shrink: 0;
}
.file-queue-info { flex: 1; min-width: 0; }
.file-queue-name {
    font-size: 12px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-queue-size { font-size: 10px; color: var(--text-muted); }
.file-queue-remove {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 16px; padding: 2px 6px;
    border-radius: 4px; transition: var(--transition); flex-shrink: 0;
}
.file-queue-remove:hover { color: var(--danger); background: rgba(248,113,113,0.1); }
.file-queue-edit {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; padding: 4px 6px;
    border-radius: 4px; transition: var(--transition); flex-shrink: 0;
    display: flex; align-items: center;
}
.file-queue-edit:hover { color: var(--primary-400); background: rgba(129,140,248,0.1); }
.file-queue-hint {
    font-size: 10px; color: var(--text-dim); text-align: center;
    margin-top: 4px; font-style: italic;
}
.file-queue-progress {
    font-size: 11px; color: var(--primary-400); font-weight: 600;
    text-align: center; padding: 4px 0;
}
.file-queue-sending {
    background: var(--primary-100);
    border: 1px solid var(--primary-glow);
}
.file-queue-order.sending {
    background: var(--primary-400); color: var(--text-primary);
}
.file-queue-spinner {
    width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--text-primary); border-radius: 50%;
    animation: spin 0.8s linear infinite; display: inline-block;
}

/* Media re-lock button */
.msg-media-lock-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 4px; border-radius: 50%;
    transition: var(--transition);
}
.msg-media-lock-btn:hover { color: var(--warning); background: var(--accent-100); }
.msg-mine .msg-media-lock-btn { color: var(--overlay-text-strong); }
.msg-mine .msg-media-lock-btn:hover { color: var(--warning); background: var(--accent-100); }

/* Upload progress bar */
.msg-upload-progress {
    padding: 6px 0; margin-top: 4px;
}
.msg-upload-label {
    font-size: 11px; color: var(--text-muted); margin-bottom: 4px;
    font-weight: 500;
}
.msg-upload-bar {
    width: 100%; height: 4px; background: var(--overlay-medium);
    border-radius: 2px; overflow: hidden;
}
.msg-upload-fill {
    height: 100%; width: 0%; border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
    transition: width 0.3s ease;
}
.msg-mine .msg-upload-label { color: var(--overlay-text-strong); }
.msg-mine .msg-upload-bar { background: rgba(0,0,0,0.2); }
.msg-mine .msg-upload-fill { background: linear-gradient(90deg, var(--overlay-text), var(--overlay-text-bright)); }

/* Download progress bar (inside messages) */
.msg-download-progress {
    padding: 4px 12px 6px; margin-top: 4px;
}

/* ============================================================
   NEW CONTACT INDICATORS
   ============================================================ */

/* Contacto nuevo en la lista — glow de entrada */
.contact-new {
    animation: contactNewSlide 0.5s ease-out;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-100)) !important;
    border-left: 3px solid var(--success) !important;
}
@keyframes contactNewSlide {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Avatar con glow pulsante */
.contact-new-avatar {
    animation: avatarGlow 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 3px var(--border-focus);
}
@keyframes avatarGlow {
    0%, 100% { box-shadow: 0 0 0 3px var(--primary-glow); }
    50%      { box-shadow: 0 0 0 6px var(--border-focus); }
}

/* Badge "NUEVO" junto al nombre del contacto */
.contact-new-badge {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    background: linear-gradient(135deg, var(--success), var(--primary-400));
    color: var(--bg-body);
    border-radius: 8px;
    animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    vertical-align: middle;
    margin-left: 4px;
    box-shadow: 0 2px 8px var(--border-focus);
}

/* Badge de conteo en el tab Contactos */
.contact-tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--success); color: var(--bg-body);
    border-radius: 9px; font-size: 10px; font-weight: 700;
    font-family: var(--font-display), var(--font-emoji);
    margin-left: 4px;
    animation: badgePop 0.3s ease-out;
    box-shadow: 0 2px 6px var(--border-focus);
}

/* Tab Contactos pulsante cuando hay nuevos */
.sidebar-tab.tab-has-new {
    color: var(--success) !important;
    animation: tabPulse 2s ease-in-out infinite;
}
@keyframes tabPulse {
    0%, 100% { color: var(--success); }
    50%      { color: var(--primary-300); }
}

/* ============================================================
   CHAT INDICATORS — Unread + New Chat
   ============================================================ */

/* Chat con mensajes no leidos — borde y fondo sutil */
.chat-has-unread {
    background: linear-gradient(135deg, var(--primary-100), var(--primary-100)) !important;
    border-left: 3px solid var(--primary-500) !important;
}
.chat-has-unread .chat-item-name {
    color: var(--text-primary);
    font-weight: 700;
}
.chat-has-unread .chat-item-preview {
    color: var(--text-secondary) !important;
    font-weight: 500;
}
.chat-has-unread .chat-item-time {
    color: var(--primary-400) !important;
    font-weight: 600;
}

/* Avatar con glow cuando tiene mensajes no leidos */
.chat-avatar-unread {
    box-shadow: 0 0 0 2px var(--border-focus);
    animation: chatAvatarPulse 2s ease-in-out infinite;
}
@keyframes chatAvatarPulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--border-focus); }
    50%      { box-shadow: 0 0 0 5px var(--primary-glow); }
}

/* Chat NUEVO — entrada animada y borde verde */
.chat-is-new {
    animation: chatNewSlide 0.5s ease-out;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-100)) !important;
    border-left: 3px solid var(--success) !important;
}
@keyframes chatNewSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Avatar glow para chat nuevo */
.chat-avatar-new {
    animation: avatarGlow 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 3px var(--border-focus);
}

/* Badge "NUEVO" junto al nombre del chat */
.chat-new-badge {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    background: linear-gradient(135deg, var(--success), var(--primary-400));
    color: var(--bg-body);
    border-radius: 8px;
    animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    vertical-align: middle;
    margin-left: 4px;
    box-shadow: 0 2px 8px var(--border-focus);
}

/* Badge de conteo en el tab Chats */
.chat-tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--primary-500); color: var(--bg-body);
    border-radius: 9px; font-size: 10px; font-weight: 700;
    font-family: var(--font-display), var(--font-emoji);
    margin-left: 4px;
    animation: badgePop 0.3s ease-out;
    box-shadow: 0 2px 6px var(--border-focus);
}

/* Tab Chats pulsante cuando hay no leidos */
.sidebar-tab.tab-has-unread {
    color: var(--primary-400) !important;
    animation: tabPulse 2s ease-in-out infinite;
}

/* ============================================================
   VOICE NOTES — Recording + Player
   ============================================================ */

/* Mic button recording state */
#btnMic.mic-recording { color: var(--danger) !important; animation: micPulse 1s ease-in-out infinite; }
@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Recording panel */
.voice-record-panel {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px;
    margin-bottom: 8px; animation: vnSlideIn 0.2s ease-out;
}
@keyframes vnSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.vn-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.vn-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.vn-close {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 18px; padding: 2px 6px; border-radius: 6px;
}
.vn-close:hover { color: var(--danger); background: rgba(248,113,113,0.1); }

.vn-controls {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.vn-distort-toggle {
    display: flex; align-items: center; gap: 6px; cursor: pointer;
    font-size: 12px; color: var(--text-muted);
}
.vn-distort-toggle input { accent-color: var(--accent); }
.vn-distort-label { font-weight: 500; }
.vn-preset-select {
    background: var(--bg-body); border: 1px solid var(--border); color: var(--text-muted);
    border-radius: 6px; padding: 3px 8px; font-size: 11px; font-family: var(--font-display), var(--font-emoji);
}

.vn-record-area {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}

/* Visualizer bars */
.vn-visualizer {
    display: flex; align-items: center; justify-content: center; gap: 2px;
    height: 44px; width: 100%;
}
.vn-bar {
    width: 4px; height: 3px; border-radius: 2px;
    background: var(--primary-400); transition: height 0.08s ease;
}
.recording .vn-bar { background: var(--danger); }

.vn-timer {
    font-family: var(--font-mono); font-size: 18px; font-weight: 600;
    color: var(--text-primary); letter-spacing: 0.05em;
}

.vn-buttons { display: flex; gap: 12px; align-items: center; }
.vn-btn {
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; font-family: var(--font-display), var(--font-emoji);
    font-size: 13px; font-weight: 600; transition: all 0.2s ease;
    border-radius: 50%;
}
.vn-btn-record {
    width: 52px; height: 52px; background: var(--primary-500); color: var(--text-primary);
    box-shadow: 0 4px 16px var(--border-focus);
}
.vn-btn-record:hover { transform: scale(1.08); box-shadow: 0 6px 20px var(--border-focus); }
.vn-btn-stop {
    width: 52px; height: 52px; background: var(--danger); color: var(--text-primary);
    animation: vnRecordPulse 1.2s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(248,113,113,0.3);
}
@keyframes vnRecordPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(248,113,113,0); }
}
.vn-btn-stop:hover { transform: scale(1.08); }

/* Preview */
.vn-preview { margin-top: 8px; }
.vn-preview audio {
    width: 100%; border-radius: 8px; height: 40px;
    background: var(--bg-body);
}
.vn-preview-actions {
    display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end;
}
.vn-btn-discard {
    padding: 8px 16px; border-radius: 8px; background: transparent;
    color: var(--text-muted); border: 1px solid var(--border);
    width: auto; height: auto;
}
.vn-btn-discard:hover { border-color: var(--danger); color: var(--danger); }
.vn-btn-lock {
    padding: 8px 12px; border-radius: 8px; font-size: 12px;
    border: 1px solid var(--border); background: var(--bg-surface);
    color: var(--text-dim); cursor: pointer; transition: var(--transition);
    display: flex; align-items: center;
}
.vn-btn-lock:hover { border-color: var(--primary-400); color: var(--primary-400); }
.vn-btn-lock.vn-lock-active {
    background: var(--primary-100); border-color: var(--primary-400);
    color: var(--primary-400);
}
.vn-btn-send {
    padding: 8px 20px; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    color: var(--text-primary); width: auto; height: auto;
    box-shadow: 0 4px 12px var(--border-focus);
}
.vn-btn-send:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--border-focus); }

/* ============================================================
   CUSTOM AUDIO PLAYER — PhantomMsg Style
   ============================================================ */
.phantom-audio-player {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 12px;
    background: var(--overlay-invert-medium); min-width: 180px;
}
.msg-mine .phantom-audio-player { background: rgba(0,0,0,0.2); }
.msg-theirs .phantom-audio-player { background: var(--bg-body); }
.pap-preview { background: var(--bg-body); }

.pap-play {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: var(--primary-500); color: var(--text-primary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--border-focus);
}
.pap-play:hover { transform: scale(1.08); background: var(--primary-400); }
.pap-play:active { transform: scale(0.95); }

.pap-waveform {
    flex: 1; height: 28px; position: relative; cursor: pointer;
    border-radius: 4px; overflow: hidden;
}
.pap-wave-bg {
    position: absolute; inset: 0;
    background: var(--overlay-medium); border-radius: 4px;
    /* Simula barras de waveform */
    background-image: repeating-linear-gradient(
        90deg,
        transparent, transparent 2px,
        var(--overlay-light) 2px, var(--overlay-light) 4px
    );
}
.msg-theirs .pap-wave-bg { background: var(--primary-100);
    background-image: repeating-linear-gradient(
        90deg,
        transparent, transparent 2px,
        var(--primary-100) 2px, var(--primary-100) 4px
    );
}
.pap-wave-fill {
    position: absolute; top: 0; left: 0; bottom: 0; width: 0%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    border-radius: 4px; transition: width 0.1s linear;
    opacity: 0.6;
}
.pap-waveform:hover .pap-wave-fill { opacity: 0.8; }

.pap-time {
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    color: var(--overlay-text-strong); min-width: 32px; text-align: right;
    flex-shrink: 0;
}
.msg-theirs .pap-time { color: var(--text-muted); }
.pap-preview .pap-time { color: var(--text-muted); }

.vn-preview-player { margin-bottom: 10px; }

/* Effects bar */
.vn-effects-bar {
    margin-bottom: 12px;
}
.vn-effects-label {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    display: block; margin-bottom: 6px;
}
.vn-effects-list {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.vn-effect-btn {
    padding: 5px 12px; border-radius: 16px; border: 1px solid var(--border);
    background: transparent; color: var(--text-muted); cursor: pointer;
    font-family: var(--font-display), var(--font-emoji); font-size: 11px; font-weight: 500;
    transition: all 0.2s ease;
}
.vn-effect-btn:hover { border-color: var(--primary-500); color: var(--primary-400); }
.vn-effect-btn.vn-effect-active {
    background: var(--primary-500); color: var(--text-primary); border-color: var(--primary-500);
    box-shadow: 0 2px 8px var(--border-focus);
}

/* ============================================================
   PHANTOM PULSE — Reproductor de notas de voz unico
   Anillo progreso + waveform fantasma + escudo E2E
   ============================================================ */
.vnp-player {
    display: flex; align-items: center; gap: 0;
    min-width: 230px; max-width: 310px;
    border-radius: 22px; overflow: hidden; position: relative;
}
.msg-mine .vnp-player { background: var(--primary-500, #534AB7); }
.msg-theirs .vnp-player { background: var(--bg-elevated, var(--bg-body)); border: 1px solid var(--border); }

.vnp-play-zone {
    width: 52px; height: 52px; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0; position: relative; cursor: pointer;
}

.vnp-ring-svg { position: absolute; inset: 2px; width: 48px; height: 48px; }
.msg-mine .vnp-ring-bg { stroke: rgba(255,255,255,0.15); }
.msg-theirs .vnp-ring-bg { stroke: var(--primary-100, #CECBF6); }
.msg-mine .vnp-ring-fg { stroke: #fff; }
.msg-theirs .vnp-ring-fg { stroke: var(--primary-500, #534AB7); }

.vnp-play-icon {
    position: relative; z-index: 1; display: flex;
    align-items: center; justify-content: center;
}
.msg-mine .vnp-play-icon { color: #fff; }
.msg-theirs .vnp-play-icon { color: var(--primary-500, #534AB7); }

.vnp-center {
    flex: 1; padding: 8px 0 8px 4px;
    display: flex; flex-direction: column; gap: 4px; min-width: 0;
}

.vnp-wave {
    height: 28px; display: flex; align-items: center; gap: 1.5px;
    cursor: pointer; padding: 2px 0;
}

.vnp-bar {
    flex: 1; border-radius: 1.5px; min-height: 2px;
    height: var(--bar-h, 30%);
    transition: height 0.4s cubic-bezier(0.22,1,0.36,1);
}
.msg-mine .vnp-bar { background: rgba(255,255,255,0.3); }
.msg-theirs .vnp-bar { background: var(--primary-200, #AFA9EC); }

.vnp-bar.vnp-bar-played {
    transition: background 0.15s ease, height 0.4s cubic-bezier(0.22,1,0.36,1);
}
.msg-mine .vnp-bar.vnp-bar-played { background: rgba(255,255,255,0.85); }
.msg-theirs .vnp-bar.vnp-bar-played { background: var(--primary-500, #534AB7); }

.vnp-bar.vnp-bar-ghost { opacity: 0.45; }

.vnp-info {
    display: flex; align-items: center; gap: 6px; padding: 0 2px;
}

.vnp-time {
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}
.msg-mine .vnp-time { color: rgba(255,255,255,0.7); }
.msg-theirs .vnp-time { color: var(--text-muted); }

.vnp-dot { width: 3px; height: 3px; border-radius: 50%; }
.msg-mine .vnp-dot { background: rgba(255,255,255,0.3); }
.msg-theirs .vnp-dot { background: var(--border); }

.vnp-speed {
    font-family: var(--font-mono); font-size: 10px; font-weight: 600;
    padding: 1px 6px; border-radius: 6px; border: none; cursor: pointer;
    transition: all 0.2s ease; line-height: 1.4;
}
.msg-mine .vnp-speed { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.msg-theirs .vnp-speed { background: var(--primary-100, #CECBF6); color: var(--primary-600, #534AB7); }
.vnp-speed:hover { opacity: 0.8; }

.vnp-end-zone {
    width: 38px; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 4px; flex-shrink: 0; padding-right: 6px;
}

.vnp-shield { display: flex; align-items: center; justify-content: center; }
.msg-mine .vnp-shield { color: rgba(255,255,255,0.25); }
.msg-theirs .vnp-shield { color: var(--primary-200, #AFA9EC); }

.vnp-action-btn {
    width: 24px; height: 24px; border-radius: 50%; border: none;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: all 0.2s ease; padding: 0;
}
.msg-mine .vnp-action-btn { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.6); }
.msg-theirs .vnp-action-btn { background: var(--primary-100, #CECBF6); color: var(--primary-600, #534AB7); }
.vnp-action-btn:hover { transform: scale(1.1); }
.msg-mine .vnp-action-btn:hover { background: rgba(255,255,255,0.25); color: #fff; }
.msg-theirs .vnp-action-btn:hover { background: var(--primary-200, #AFA9EC); }

.vnp-playing .vnp-play-zone { animation: vnp-pulse 2s ease-in-out infinite; }
@keyframes vnp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.vnp-listened-icon {
    display: none; align-items: center; justify-content: center;
    margin-left: auto; flex-shrink: 0;
}
.vnp-listened .vnp-listened-icon { display: flex; }
.msg-mine .vnp-listened-icon { color: rgba(255,255,255,0.5); }
.msg-theirs .vnp-listened-icon { color: var(--primary-400, #7F77DD); }

.vnp-listened .vnp-ring-fg { stroke: var(--accent, #1D9E75) !important; }
.msg-mine .vnp-listened .vnp-ring-fg { stroke: rgba(255,255,255,0.6) !important; }

.msg-media-vn-wrap { background: transparent !important; padding: 0 !important; border: none !important; }
.msg-media-vn-wrap .msg-media-actions { display: none; }

.msg.msg-voice-note {
    background: transparent !important; border: none !important;
    padding: 2px 0 !important; box-shadow: none !important;
    border-radius: 0 !important;
}
.msg.msg-voice-note .msg-content:empty { display: none; }
.msg.msg-voice-note .msg-content { padding: 0; }
.msg.msg-voice-note .msg-meta { padding: 0 4px; }

/* Destruct badge */
.vnp-destruct-badge {
    font-size: 9px; font-family: var(--font-mono); font-weight: 600;
    padding: 1px 5px; border-radius: 6px;
    margin-left: auto; flex-shrink: 0; line-height: 1.4;
}
.msg-mine .vnp-destruct-badge { background: rgba(248,113,113,0.3); color: rgba(255,255,255,0.8); }
.msg-theirs .vnp-destruct-badge { background: rgba(248,113,113,0.12); color: #A32D2D; }

.vnp-destruct .vnp-ring-bg { stroke: rgba(248,113,113,0.25) !important; }
.vnp-destruct .vnp-ring-fg { stroke: #E24B4A !important; }

.vnp-destructing {
    animation: vnpDestruct 1.2s ease-in forwards;
}
@keyframes vnpDestruct {
    0% { opacity: 1; transform: scale(1); filter: none; }
    50% { opacity: 0.7; transform: scale(0.98); filter: blur(1px); }
    100% { opacity: 0; transform: scale(0.92); filter: blur(4px); }
}

/* Mini-player flotante */
.vnp-mini-player {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 0 0 12px 12px;
    background: var(--bg-elevated, var(--bg-card));
    border-bottom: 1px solid var(--border);
    position: relative; z-index: 10;
    opacity: 0; max-height: 0; overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.25s ease;
    pointer-events: none;
}
.vnp-mini-player.vnp-mini-visible {
    opacity: 1; max-height: 50px; pointer-events: auto;
}

.vnp-mini-play {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: var(--primary-500); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.vnp-mini-play:hover { background: var(--primary-400); }

.vnp-mini-bar {
    flex: 1; height: 4px; border-radius: 2px;
    background: var(--border); position: relative; overflow: hidden;
}
.vnp-mini-fill {
    position: absolute; top: 0; left: 0; bottom: 0; width: 0%;
    background: var(--primary-500); border-radius: 2px;
    transition: width 0.2s linear;
}

.vnp-mini-time {
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    color: var(--text-muted); min-width: 28px; flex-shrink: 0;
}

.vnp-mini-speed {
    font-family: var(--font-mono); font-size: 10px; font-weight: 600;
    padding: 1px 6px; border-radius: 6px; border: none; cursor: pointer;
    background: var(--primary-100, #CECBF6); color: var(--primary-600, #534AB7);
}
.vnp-mini-speed:hover { opacity: 0.8; }

.vnp-mini-goto {
    width: 24px; height: 24px; border-radius: 50%; border: none;
    background: transparent; color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.vnp-mini-goto:hover { color: var(--primary-500); }

.vnp-mini-close {
    width: 24px; height: 24px; border-radius: 50%; border: none;
    background: transparent; color: var(--text-dim); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; line-height: 1;
}
.vnp-mini-close:hover { color: var(--danger); }

/* ============================================================
   CONTACT CONTEXT MENU
   ============================================================ */
.contact-ctx-btn {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    padding: 6px; border-radius: 50%; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; flex-shrink: 0;
}
.contact-ctx-btn:hover { color: var(--text-primary); background: var(--overlay-light); }
.contact-ctx-menu {
    position: fixed; z-index: 10002;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 6px 0;
    box-shadow: var(--shadow-lg); min-width: 180px;
    animation: ctxMenuIn 0.15s ease-out;
}
@keyframes ctxMenuIn { from { opacity:0; transform: scale(0.95) translateY(-4px); } to { opacity:1; transform: scale(1) translateY(0); } }
.ctx-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 16px; background: none; border: none;
    color: var(--text-secondary); cursor: pointer;
    font-family: var(--font-display), var(--font-emoji); font-size: 13px; font-weight: 500;
    transition: background 0.15s ease; text-align: left;
}
.ctx-item:hover { background: var(--overlay-light); color: var(--text-primary); }
.ctx-item svg { flex-shrink: 0; }
.ctx-danger { color: var(--danger) !important; }
.ctx-danger:hover { background: rgba(248,113,113,0.08) !important; }
.ctx-sep { height: 1px; background: var(--border); margin: 4px 12px; }
.ctx-sep-label {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    padding: 6px 16px 4px; text-transform: uppercase; letter-spacing: 0.08em;
}

/* ============================================================
   IMPROVED OPTIONS MENU
   ============================================================ */
.options-section-label {
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    padding: 6px 16px 4px; text-transform: uppercase;
    letter-spacing: 0.06em;
}
.options-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; font-size: 13px;
}
.options-item svg { flex-shrink: 0; opacity: 0.6; }
.options-item:hover svg { opacity: 1; }
.options-warn { color: var(--accent) !important; }
.options-warn:hover { background: var(--accent-100) !important; }
.options-danger { color: var(--danger) !important; font-weight: 600; }
.options-danger:hover { background: rgba(248,113,113,0.08) !important; }

/* ============================================================
   SKELETON SCREENS — Loading States
   ============================================================ */
@keyframes skeletonPulse {
    0%, 100% { opacity: 0.06; }
    50% { opacity: 0.12; }
}
.skeleton {
    background: white; border-radius: var(--radius-sm);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}
.skeleton-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.skeleton-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: white; animation: skeletonPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line {
    height: 12px; border-radius: 6px;
    background: white; animation: skeletonPulse 1.5s ease-in-out infinite;
}
.skeleton-line-short { width: 60%; }
.skeleton-line-long { width: 85%; }
.skeleton-line-medium { width: 45%; }

/* Skeleton para mensajes del chat */
.skeleton-msg {
    display: flex; flex-direction: column; gap: 8px; padding: 16px;
}
.skeleton-bubble {
    border-radius: 16px; padding: 16px;
    background: white; animation: skeletonPulse 1.5s ease-in-out infinite;
}
.skeleton-bubble-mine { width: 55%; margin-left: auto; border-bottom-right-radius: 4px; height: 40px; }
.skeleton-bubble-theirs { width: 65%; margin-right: auto; border-bottom-left-radius: 4px; height: 48px; }
.skeleton-bubble-short { width: 35%; height: 36px; }

/* ============================================================
   INVITE PENDING BANNER
   ============================================================ */
.invite-pending-banner {
    padding: 16px; text-align: center;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-100));
    border: 1.5px solid var(--border-focus); border-radius: var(--radius);
    animation: invitePulse 2s ease-in-out infinite;
}
@keyframes invitePulse {
    0%, 100% { border-color: var(--border-focus); }
    50% { border-color: var(--primary-500); }
}
.invite-pending-icon {
    color: var(--primary-400); margin-bottom: 8px;
    display: flex; justify-content: center;
}
.invite-pending-title {
    font-size: 14px; font-weight: 700; color: var(--primary-400);
    margin-bottom: 4px;
}
.invite-pending-text {
    font-size: 12px; color: var(--text-secondary); line-height: 1.5;
}
.invite-pending-text strong { color: var(--primary-300); }

/* Upload Manager Widget — Floating */
.upload-mgr-widget {
    position: fixed; bottom: 16px; right: 16px; z-index: 9000;
    width: 320px; max-height: 400px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: none; flex-direction: column;
    font-family: var(--font-main);
    animation: umSlideIn 0.3s ease;
}
.upload-mgr-widget.minimized {
    width: auto; max-height: none; bottom: 16px; right: 16px;
    border-radius: 24px; cursor: pointer;
}
@keyframes umSlideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.upload-mgr-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.upload-mgr-title {
    font-size: 12px; font-weight: 600; color: var(--primary-400);
    display: flex; align-items: center; gap: 6px;
}
.upload-mgr-btns { display: flex; gap: 4px; }
.upload-mgr-btn {
    background: none; border: 1px solid var(--border); color: var(--text-muted);
    font-size: 10px; padding: 2px 8px; border-radius: 6px;
    cursor: pointer; transition: var(--transition);
}
.upload-mgr-btn:hover { color: var(--primary-400); border-color: var(--primary-400); }
.upload-mgr-btn.danger { color: var(--danger); border-color: var(--danger); }
.upload-mgr-btn.danger:hover { background: rgba(248,113,113,0.1); }
.upload-mgr-list {
    overflow-y: auto; max-height: 300px; padding: 6px;
    scrollbar-width: thin;
}
.upload-mgr-job {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 8px; border-radius: 8px; margin-bottom: 4px;
    transition: var(--transition);
}
.upload-mgr-job:last-child { margin-bottom: 0; }
.upload-job-uploading { background: var(--primary-100); }
.upload-job-done { opacity: 0.6; }
.upload-job-error { background: rgba(248,113,113,0.06); }
.upload-job-icon { flex-shrink: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.upload-job-check {
    font-size: 10px; font-weight: 700; color: var(--success);
    background: rgba(34,197,94,0.15); width: 22px; height: 22px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.upload-job-error {
    font-size: 12px; font-weight: 700; color: var(--danger);
    background: rgba(248,113,113,0.15); width: 22px; height: 22px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.upload-job-spinner {
    width: 18px; height: 18px; border: 2px solid var(--border);
    border-top-color: var(--primary-400); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.upload-job-pending {
    width: 10px; height: 10px; background: var(--text-dim);
    border-radius: 50%; opacity: 0.4;
}
.upload-job-info { flex: 1; min-width: 0; }
.upload-job-name {
    font-size: 12px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-job-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.upload-job-pwd {
    color: var(--warning); font-weight: 600;
    background: var(--accent-100); padding: 0 4px; border-radius: 3px;
}
.upload-job-bar {
    height: 3px; background: var(--overlay-light); border-radius: 2px;
    margin-top: 4px; overflow: hidden;
}
.upload-job-fill {
    height: 100%; background: var(--primary-400); border-radius: 2px;
    transition: width 0.3s ease;
}
.upload-job-err { font-size: 10px; color: var(--danger); margin-top: 2px; }
.upload-job-chunked {
    color: var(--primary-400); font-weight: 600; font-size: 10px;
    background: var(--primary-100); padding: 0 4px; border-radius: 3px;
}
.upload-job-chunk-label {
    font-size: 9px; color: var(--text-dim); float: right; margin-top: -2px;
}
.upload-job-bar { position: relative; }

/* Minimized state */
.upload-mgr-mini {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; white-space: nowrap;
}
.upload-mgr-mini-icon { color: var(--primary-400); display: flex; }
.upload-mgr-mini-label { font-size: 12px; font-weight: 600; color: var(--text); }
.upload-mgr-mini-spinner {
    width: 14px; height: 14px; border: 2px solid var(--border);
    border-top-color: var(--primary-400); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .upload-mgr-widget { width: calc(100vw - 24px); right: 12px; bottom: 70px; }
    .upload-mgr-widget.minimized { width: auto; right: 12px; bottom: 70px; }
}

/* File Bundle Card */
.msg-bundle {
    background: var(--overlay-subtle); border: 1px solid var(--border-light);
    border-radius: 12px; overflow: hidden; max-width: 280px;
    cursor: pointer; transition: var(--transition);
}
.msg-bundle:hover { border-color: var(--primary-500); background: var(--overlay-light); }
.bundle-mine { margin-left: auto; }
.bundle-header {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-bottom: 1px solid var(--border-light);
}
.bundle-icon { color: var(--primary-400); display: flex; flex-shrink: 0; }
.bundle-title { font-size: 11px; font-weight: 600; color: var(--text); flex: 1; display: flex; align-items: center; gap: 4px; }
.bundle-count { font-size: 10px; color: var(--text-secondary, #94A3B8); background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 10px; }
.bundle-pwd-tag { font-size: 9px; padding: 1px 5px; border-radius: 4px; background: var(--accent-100); color: var(--warning); font-weight: 600; }
.bundle-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; padding: 2px; }
.bundle-thumb { aspect-ratio: 1; background: var(--bg-body); position: relative; overflow: hidden; }
.bundle-thumb img, .bundle-thumb video { width: 100%; height: 100%; object-fit: cover; }
.bundle-thumb-placeholder { width: 100%; height: 100%; background: var(--overlay-light); }
.bundle-thumb-more {
    position: absolute; inset: 0; background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-primary); font-size: 14px; font-weight: 700;
}
.bundle-thumb-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); }
.bundle-locked-body {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 20px 16px; gap: 8px;
}
.bundle-lock-icon { color: var(--warning); opacity: 0.6; }
.bundle-lock-label { font-size: 11px; color: var(--text-secondary, #94A3B8); text-align: center; line-height: 1.4; }
.bundle-folder-body {
    display: flex; align-items: center; justify-content: center;
    padding: 20px; color: var(--text-dim);
}
.msg-mine .bundle-header { border-color: var(--border-light); }
.msg-mine .bundle-footer { border-color: var(--border-light); }

/* Bundle Gallery Overlay */
.bundle-gallery-overlay {
    position: fixed; inset: 0; z-index: 9500;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.bundle-gallery-box {
    width: 90vw; max-width: 420px; max-height: 85vh;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 16px; display: flex; flex-direction: column;
    overflow: hidden;
}
.bundle-gallery-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.bundle-gallery-title { font-size: 13px; font-weight: 600; color: var(--primary-400); display: flex; align-items: center; gap: 6px; }
.bundle-gallery-close { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; padding: 4px 8px; }
.bundle-gallery-actions {
    display: flex; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap;
}
.bg-btn {
    font-size: 10px; padding: 5px 10px; border-radius: 6px;
    border: 1px solid var(--border); background: none;
    color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 4px;
    transition: var(--transition);
}
.bg-btn:hover { border-color: var(--text-secondary); }
.bg-btn-primary { background: var(--primary-100); border-color: var(--border-focus); color: var(--primary-400); }
.bg-btn-primary:hover { background: var(--primary-glow); }
.bg-btn-warning { background: rgba(186,117,23,0.1); border-color: rgba(186,117,23,0.25); color: var(--warning); }
.bg-btn-warning:hover { background: rgba(186,117,23,0.2); }
.bundle-gallery-list {
    flex: 1; overflow-y: auto; padding: 8px; scrollbar-width: thin;
}
.bg-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px; border-radius: 10px; margin-bottom: 4px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
    transition: var(--transition);
}
.bg-item:hover { background: rgba(255,255,255,0.05); }
.bg-locked { opacity: 0.7; }
.bg-thumb {
    width: 48px; height: 48px; border-radius: 8px; background: var(--bg-body);
    flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.bg-thumb img, .bg-thumb video { width: 100%; height: 100%; object-fit: cover; }
.bg-thumb-blur img, .bg-thumb-blur video { filter: blur(8px); }
.bg-thumb-icon { color: var(--text-muted); display: flex; }
.bg-thumb-auto { width: 100%; height: 100%; background: var(--overlay-light); }
.bg-info { flex: 1; min-width: 0; }
.bg-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.bg-tag-pwd { font-size: 9px; padding: 1px 5px; border-radius: 3px; background: var(--accent-100); color: var(--warning); font-weight: 600; }
.bg-tag-open { font-size: 9px; padding: 1px 5px; border-radius: 3px; background: var(--primary-100); color: var(--primary-400); font-weight: 600; }
.bg-action {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: var(--transition);
}
.bg-unlock { background: rgba(16,185,129,0.15); color: var(--primary-400, #6EE7B7); }
.bg-unlock:hover { background: rgba(16,185,129,0.25); }
.bg-lock { background: rgba(245,158,11,0.15); color: var(--warning, #FCD34D); }
.bg-lock:hover { background: rgba(245,158,11,0.25); }
.bg-download { background: rgba(96,165,250,0.15); color: #93C5FD; }
.bg-download:hover { background: rgba(96,165,250,0.25); }

@media (max-width: 768px) {
    .bundle-gallery-box { width: 95vw; max-height: 90vh; }
}

/* Bundle footer with download button */
.bundle-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px; font-size: 10px; color: var(--text-secondary, #94A3B8);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.bundle-dl-btn {
    background: none; border: none; color: var(--text-secondary, #94A3B8);
    cursor: pointer; padding: 4px; border-radius: 50%;
    transition: var(--transition); display: flex; align-items: center;
}
.bundle-dl-btn:hover { color: #93C5FD; background: rgba(96,165,250,0.12); }

/* Gallery view toggle */
.bg-view-toggle { padding: 4px 6px !important; }
.bg-view-toggle.active {
    background: var(--primary-glow) !important;
    border-color: var(--border-focus) !important;
    color: var(--primary-400) !important;
}

/* Gallery grid view */
.bundle-gallery-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 4px; padding: 8px; overflow-y: auto; max-height: 60vh;
    scrollbar-width: thin;
}
.bg-grid-item {
    aspect-ratio: 1; border-radius: 8px; overflow: hidden;
    background: var(--bg-body); position: relative;
    cursor: pointer; transition: var(--transition);
    display: flex; flex-direction: column;
}
.bg-grid-item:hover { opacity: 0.85; transform: scale(0.97); }
.bg-grid-item img, .bg-grid-item video {
    width: 100%; flex: 1; object-fit: cover; min-height: 0;
}
.bg-grid-auto {
    width: 100%; flex: 1; background: var(--overlay-light); min-height: 0;
}
.bg-grid-lock {
    flex: 1; display: flex; align-items: center; justify-content: center;
    color: var(--warning); opacity: 0.5;
}
.bg-grid-locked { border: 1px dashed var(--accent-100); }
.bg-grid-icon {
    flex: 1; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 11px; font-weight: 600;
}
.bg-grid-play {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -60%);
    background: rgba(0,0,0,0.5); border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
}
.bg-grid-label {
    font-size: 9px; color: var(--text-dim);
    text-align: center; padding: 2px 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: rgba(0,0,0,0.4);
}

/* Grid item overlay actions — centered on image */
.bg-grid-item { position: relative; }
.bg-grid-media {
    flex: 1; display: flex; align-items: center; justify-content: center;
    overflow: hidden; min-height: 0; cursor: pointer;
}
.bg-grid-media img, .bg-grid-media video {
    width: 100%; height: 100%; object-fit: cover;
}
.bg-grid-overlay {
    position: absolute; inset: 0; bottom: 22px;
    display: flex; align-items: center; justify-content: center;
    gap: 8px; opacity: 0;
    background: rgba(0,0,0,0.55);
    transition: opacity 0.2s ease;
}
.bg-grid-item:hover .bg-grid-overlay { opacity: 1; }
.bg-grid-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); backdrop-filter: blur(4px);
}
.bg-grid-btn-dl {
    background: rgba(96,165,250,0.25); color: #93C5FD;
    border: 1px solid rgba(96,165,250,0.35);
}
.bg-grid-btn-dl:hover { background: rgba(96,165,250,0.45); color: #BFDBFE; }
.bg-grid-btn-lock {
    background: rgba(245,158,11,0.25); color: #FCD34D;
    border: 1px solid rgba(245,158,11,0.35);
}
.bg-grid-btn-lock:hover { background: rgba(245,158,11,0.45); color: #FDE68A; }
.bg-grid-btn-unlock {
    background: rgba(16,185,129,0.25); color: #6EE7B7;
    border: 1px solid rgba(16,185,129,0.35);
}
.bg-grid-btn-unlock:hover { background: rgba(16,185,129,0.45); color: #A7F3D0; }
.bg-grid-btn-del {
    background: rgba(226,75,74,0.25); color: #F09595;
    border: 1px solid rgba(226,75,74,0.35);
}
.bg-grid-btn-del:hover { background: rgba(226,75,74,0.45); color: #F7C1C1; }

/* Delete button in list view */
.bg-delete { background: rgba(226,75,74,0.15); color: #F09595; }
.bg-delete:hover { background: rgba(226,75,74,0.25); color: #F7C1C1; }

/* Mobile: grid overlay always slightly visible */
@media (max-width: 768px) {
    .bg-grid-overlay { opacity: 1; background: rgba(0,0,0,0.4); }
    .bg-grid-btn { width: 32px; height: 32px; }
    /* Emoji picker: full width, shorter */
    .emoji-picker {
        width: calc(100vw - 24px); left: -8px; right: -8px;
        height: 320px; max-width: 360px;
    }
    .emoji-picker-grid { grid-template-columns: repeat(7, 1fr); }
    .emoji-pick { font-size: 20px; padding: 3px; }
    .emoji-picker-tab { padding: 6px; min-width: 32px; font-size: 16px; }
    /* Bundle card: wider on mobile */
    .msg-bundle { max-width: calc(100% - 16px); }
    .bundle-grid { grid-template-columns: 1fr 1fr; }
    /* Upload widget: adjust for chat-open */
    body.mobile-chat-open .upload-mgr-widget { bottom: 16px; }
    body.mobile-chat-open .upload-mgr-widget.minimized { bottom: 16px; }
}

/* Retry hint during contact/request loading */
.sidebar-retry-hint {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    padding: 8px 16px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* 2FA Challenge Card */
.totp-challenge-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-focus);
    border-radius: 12px;
    padding: 16px;
    max-width: 300px;
}
.totp-challenge-card.totp-sent {
    display: flex; align-items: center; gap: 12px;
    border-color: var(--success); padding: 12px 16px;
}
.totp-card-icon { color: var(--success); display: flex; }
.totp-card-text { flex: 1; }
.totp-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.totp-card-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.totp-card-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: var(--primary-400);
    margin-bottom: 12px;
}
.totp-qr-wrap {
    display: flex; justify-content: center;
    background: #fff; border-radius: 8px; padding: 12px;
    margin-bottom: 12px;
}
.totp-qr-wrap img { display: block; }
.totp-qr-fallback { font-size: 12px; color: var(--text-dim); text-align: center; padding: 20px; }
.totp-secret-row {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px; flex-wrap: wrap;
}
.totp-secret-label { font-size: 11px; color: var(--text-dim); }
.totp-secret-code {
    font-family: var(--font-mono); font-size: 12px;
    background: var(--bg-secondary); padding: 4px 8px;
    border-radius: 4px; cursor: pointer; user-select: all;
    color: var(--primary-400); word-break: break-all;
    border: 1px solid var(--border-light);
    transition: background 0.2s;
}
.totp-secret-code:hover { background: var(--border-focus); }
.totp-instructions {
    font-size: 11px; color: var(--text-dim);
    line-height: 1.5; margin-bottom: 12px;
}
.totp-verify-row {
    display: flex; gap: 8px; align-items: center;
}
.totp-code-input {
    flex: 1; text-align: center;
    font-size: 18px; letter-spacing: 6px;
    font-weight: 600; font-family: var(--font-mono);
    padding: 8px 12px; border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    outline: none; transition: border-color 0.2s;
}
.totp-code-input:focus { border-color: var(--primary-400); }
.totp-code-input.input-error { border-color: var(--danger); animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* 2FA Protected message */
.msg-totp-locked .msg-content {
    cursor: pointer; border-radius: 8px; padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--primary-glow);
    transition: all var(--transition);
    -webkit-user-select: none; user-select: none;
}
.msg-totp-locked .msg-content:hover { border-color: var(--primary-400); }
.msg-totp-reveal { animation: totpReveal 0.6s ease; }
@keyframes totpReveal {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

/* Chat drag-and-drop overlay */
.chat-drop-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    border: 2px dashed var(--primary-400);
    border-radius: var(--radius-lg, 12px);
    pointer-events: none;
}
.chat-drop-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--primary-300);
    font-size: 14px;
    font-weight: 500;
}
.chat-drop-label svg {
    opacity: 0.8;
}
