:root {
    /* --- Modern Palette (Ultra Modern & Vibrant) --- */
    --primary: #6366f1;       /* Indigo 500 */
    --primary-hover: #4f46e5; /* Indigo 600 */
    --primary-light: #e0e7ff; /* Indigo 100 */
    --primary-fade: rgba(99, 102, 241, 0.15); /* Aumentado ligeramente */

    --secondary: #ec4899;     /* Pink 500 */

    --success: #10b981;       /* Emerald 500 */
    --danger: #ef4444;        /* Red 500 */
    --warning: #f59e0b;       /* Amber 500 */

    /* --- Neutrals (Refined for depth) --- */
    --bg-body: #f1f5f9;       /* Slate 100 - Un poco más de contraste */
    --bg-card: rgba(255, 255, 255, 0.75); /* Más transparencia para efecto glass */
    --bg-glass: rgba(255, 255, 255, 0.60);

    --text-main: #0f172a;     /* Slate 900 */
    --text-muted: #64748b;    /* Slate 500 */
    --text-light: #94a3b8;    /* Slate 400 */

    --border: rgba(148, 163, 184, 0.3); /* Un poco más visible */
    --border-light: rgba(255, 255, 255, 0.6);

    /* --- Chat Bubbles (Gradient Pop) --- */
    --bubble-sent-bg: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --bubble-sent-text: #ffffff;
    --bubble-rcv-bg: rgba(255, 255, 255, 0.9);
    --bubble-rcv-text: #1e293b;

    /* --- Shadows (Modern Diffused Shadows) --- */
    --shadow-xs: 0 1px 2px rgba(99, 102, 241, 0.05);
    --shadow-sm: 0 4px 6px -1px rgba(99, 102, 241, 0.05), 0 2px 4px -1px rgba(99, 102, 241, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    /* Sombra con color (Glow) */
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.3);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03);

    /* --- Radius --- */
    --radius-sm: 8px;
    --radius-md: 14px; /* Más redondeado */
    --radius-lg: 20px; /* Más moderno */
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* --- Transitions --- */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- RESET & BASE --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    /* Subtle Mesh Gradient mejorado */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--text-main);
    /* Adaptación móvil crítica */
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height para móviles modernos */
    overflow: hidden;
    margin: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

#app {
    width: 100%;
    height: 100%;
}

/* --- LAYOUT UTILITIES --- */
.hidden { display: none !important; }
.view { width: 100%; height: 100%; position: relative; }

#auth-view {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    z-index: 50;
}

/* Modern Slim Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.6); }


/* --- MAIN APP CONTAINER --- */
.app-container {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(25px) saturate(180%); /* Efecto vidrio esmerilado premium */
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: none;
    border-radius: 0;
    display: flex;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 380px;
    height: 100%;
    background: rgba(255, 255, 255, 0.45);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 20;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

/* Sidebar Header */
.sidebar header {
    padding: 1.5rem;
    padding-top: max(1.5rem, env(safe-area-inset-top));
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.brand {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(99,102,241,0.2));
}

/* Profile Snippet */
.my-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
    cursor: default;
}
.my-profile:hover { 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-md); 
    background: #ffffff;
}

.avatar-container {
    position: relative;
    width: 50px; height: 50px;
    flex-shrink: 0;
}
.avatar-img {
    width: 100%; height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid white;
    box-shadow: var(--shadow-md);
}
.status-indicator {
    position: absolute; bottom: 2px; right: 2px;
    width: 14px; height: 14px;
    background: var(--success);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-info { flex: 1; min-width: 0; }
.profile-name { font-weight: 700; font-size: 1rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-status { font-size: 0.8rem; color: var(--success); font-weight: 600; margin-top: 2px; }

.profile-actions { display: flex; gap: 0.5rem; }
.icon-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.icon-btn:hover { 
    background: var(--primary-light); 
    color: var(--primary); 
    transform: rotate(5deg);
}

/* Search & Tabs */
.search-wrapper {
    position: relative;
    margin-top: 0.25rem;
}
.search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}
.search-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-fade);
}
.search-icon {
    position: absolute; left: 1rem; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    font-size: 1.1rem;
}

.sidebar-tabs {
    display: flex;
    padding: 0 1.5rem 0.75rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.tab-btn {
    flex: 1;
    padding: 0.7rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}
.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: scale(1.02);
}
.tab-btn:hover:not(.active) { background: rgba(255,255,255,0.5); color: var(--text-main); }


/* Sidebar Lists */
.list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scroll-behavior: smooth;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    background: transparent;
    border: 1px solid transparent;
}
.user-item:hover {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-light);
    transform: translateY(-1px) scale(1.01);
}
.user-item .avatar-small {
    width: 48px; height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--bg-body);
    border: 2px solid white;
    box-shadow: var(--shadow-xs);
}

.item-content { flex: 1; min-width: 0; }
.item-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.item-title { font-weight: 700; font-size: 1rem; color: var(--text-main); letter-spacing: -0.01em; }
.item-time { font-size: 0.75rem; color: var(--text-light); font-weight: 500; }
.item-subtitle { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* --- CHAT AREA --- */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.5);
    position: relative;
    /* Patrón de fondo más sutil */
    background-image: radial-gradient(rgba(203, 213, 225, 0.6) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

/* Chat Header */
.chat-header {
    height: 80px;
    padding: 0 1.75rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    box-shadow: var(--shadow-xs);
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.back-btn { 
    display: none; 
    font-size: 1.5rem; 
    color: var(--text-main); 
    cursor: pointer; 
    padding: 0.6rem; 
    margin-left: -0.8rem; 
    border-radius: 50%; 
    transition: background 0.2s;
}
.back-btn:hover { background: rgba(0,0,0,0.05); }

.chat-info h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 2px; color: var(--text-main); }
.chat-info p { font-size: 0.8rem; color: var(--success); font-weight: 600; display: flex; align-items: center; gap: 6px; letter-spacing: 0.02em; }
.chat-info p::before { content: ''; width: 8px; height: 8px; background: currentColor; border-radius: 50%; box-shadow: 0 0 6px var(--success); }

/* Chat Messages */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
}

.message-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 70%;
    position: relative;
    animation: slideUpFade 0.4s var(--ease-out);
}
@keyframes slideUpFade { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.message-group.received { align-self: flex-start; }
.message-group.sent { align-self: flex-end; align-items: flex-end; }

.message-bubble {
    padding: 0.85rem 1.25rem;
    font-size: 0.98rem;
    line-height: 1.6;
    position: relative;
    box-shadow: var(--shadow-sm);
    word-wrap: break-word;
    backdrop-filter: blur(5px);
}

.received .message-bubble {
    background: var(--bubble-rcv-bg);
    color: var(--bubble-rcv-text);
    border-radius: 4px 20px 20px 20px;
    border: 1px solid white;
}
.received .message-bubble:first-child { border-top-left-radius: 20px; }

.sent .message-bubble {
    background: var(--bubble-sent-bg);
    color: var(--bubble-sent-text);
    border-radius: 20px 4px 20px 20px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35); /* Sombra de color */
    border: 1px solid rgba(255,255,255,0.1);
}

.message-meta {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 4px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-weight: 500;
}
.sent .message-meta { color: rgba(255,255,255,0.9); }

.message-media {
    margin-top: 10px;
    border-radius: 16px;
    overflow: hidden;
    max-width: 100%;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: var(--shadow-md);
}
.message-media img, .message-media video {
    display: block;
    max-width: 100%;
    max-height: 350px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}
.message-media img:hover { transform: scale(1.02); }


/* Input Area */
.input-area {
    padding: 1.25rem 2rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    position: relative;
    z-index: 15;
    flex-shrink: 0; /* Important: Prevent collapsing */
}

.input-wrapper {
    flex: 1;
    background: white;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.input-wrapper:focus-within { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px var(--primary-fade), var(--shadow-md); 
    transform: translateY(-1px);
}

.text-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    max-height: 120px;
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
}

.attach-btn {
    width: 44px; height: 44px;
    border: none; background: transparent;
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center;
}
.attach-btn:hover { color: var(--primary); background: var(--bg-body); }

.action-btn {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.2s var(--ease-elastic);
    flex-shrink: 0;
}

.btn-record {
    background: white;
    color: var(--text-muted);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-record:hover { 
    color: var(--danger); 
    border-color: var(--danger); 
    transform: scale(1.1);
}
.btn-record.recording {
    background: var(--danger);
    color: white;
    animation: pulse 1.5s infinite;
    border: none;
}

.btn-send {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.btn-send:hover { 
    transform: scale(1.1); 
    background: var(--primary-hover); 
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* --- EMPTY STATE --- */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    background: rgba(255,255,255,0.3);
}
.empty-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 10px rgba(99, 102, 241, 0.2));
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

/* --- AUTH VIEW --- */
.auth-wrapper {
    width: 100%; max-width: 440px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.4) inset;
    text-align: center;
    animation: zoomIn 0.5s var(--ease-out);
}
@keyframes zoomIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

.auth-logo {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2.5rem;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.auth-tabs {
    display: flex;
    background: rgba(241, 245, 249, 0.8);
    padding: 5px;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}
.auth-tab {
    flex: 1;
    padding: 0.85rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.auth-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.auth-input {
    width: 100%;
    padding: 1.1rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: rgba(255,255,255,0.6);
    transition: 0.2s;
    backdrop-filter: blur(4px);
}
.auth-input:focus {
    background: white;
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-fade);
    transform: translateY(-1px);
}

.btn-primary {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    margin-top: 0.5rem;
}
.btn-primary:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45); 
}


/* --- RESPONSIVE (Corrected & Polished) --- */
@media (max-width: 900px) {
    .sidebar { width: 340px; }
}

@media (max-width: 768px) {
    /* Full width sidebar on mobile */
    .sidebar { 
        width: 100%; 
        border-right: none; 
        background: rgba(255,255,255,0.7); /* Slightly more opaque on mobile */
    }

    /* Mobile Chat Transition */
    .chat-area {
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        z-index: 100; /* Asegurar que cubra todo */
        background: #f8fafc; /* Fallback solido */
        display: flex;
        flex-direction: column;
        overflow: hidden; /* Importante para que el scroll sea interno */
    }
    .chat-area.active { transform: translateX(0); }

    .back-btn { display: block; }
    .message-group { max-width: 88%; }

    /* Mobile Header & Input Adjustments */
    .chat-header {
        padding-top: max(0.5rem, env(safe-area-inset-top)); 
        height: auto;
        min-height: 70px;
        padding-bottom: 0.5rem;
        flex-shrink: 0;
    }

    .messages-container {
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain; /* Evita scroll del body */
    }

    .input-area {
        padding: 0.75rem 1rem;
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
        gap: 0.5rem;
        flex-shrink: 0; /* Prevent squashing */
        background: white; /* Ensure visibility */
        z-index: 1001; /* Ensure on top */
        position: relative; /* Flexbox lo coloca al final */
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        bottom: auto;
    }
    
    .action-btn { width: 44px; height: 44px; font-size: 1.2rem; }
    .attach-btn { width: 36px; height: 36px; }
    
    .my-profile { padding: 0.6rem; margin: 0.5rem 0; }
    .avatar-container { width: 42px; height: 42px; }
    
    /* Better touch targets */
    .user-item { padding: 1rem 0.75rem; }
}


/* --- MODALS --- */
.modal {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.65); /* Darker overlay */
    backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal:not(.hidden) { opacity: 1; pointer-events: auto; }

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    width: 90%; max-width: 500px;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.5);
    transform: scale(0.9); transition: transform 0.3s var(--ease-elastic);
    max-height: 85vh; overflow-y: auto;
}
.modal:not(.hidden) .modal-content { transform: scale(1); }

.modal h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--text-main); text-align: center; }

/* --- HELPERS --- */
.toast-notification {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px);
    background: var(--text-main); color: white;
    padding: 14px 28px; border-radius: 50px;
    box-shadow: var(--shadow-lg); opacity: 0; transition: all 0.4s var(--ease-elastic);
    z-index: 300; font-weight: 600; font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px;
}
.toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(20px); }

/* Recording Pulse */
@keyframes pulse { 
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); transform: scale(1); } 
    50% { transform: scale(1.05); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); transform: scale(1); } 
}

/* Media Preview */
.media-preview-container {
    position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%);
    width: 92%; max-width: 400px;
    background: white; padding: 1.25rem; border-radius: 20px;
    box-shadow: var(--shadow-lg); z-index: 30;
    border: 1px solid var(--border);
    animation: slideUpFade 0.3s var(--ease-elastic);
}
.preview-content {
    background: var(--bg-body); border-radius: 12px; overflow: hidden;
    margin-bottom: 1.25rem; display: flex; justify-content: center;
    border: 1px solid var(--border);
}
.preview-actions { display: flex; gap: 0.75rem; }
.btn-preview { flex: 1; padding: 0.85rem; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; transition: transform 0.2s; }
.btn-preview:active { transform: scale(0.96); }
.btn-cancel { background: #fee2e2; color: #dc2626; }
.btn-confirm { background: var(--primary); color: white; box-shadow: 0 4px 10px rgba(99,102,241,0.3); }

/* Group Select */
.user-select-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border: 1px solid var(--border);
    border-radius: 14px; margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.user-select-item:hover { background: white; border-color: var(--primary); box-shadow: var(--shadow-sm); }
