/* ===== BASE & RESET ===== */
:root {
    --app-font-size: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: var(--app-font-size);
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
    position: relative;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

body.reduce-motion * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
}

/* Specific overrides for common animations */
body.reduce-motion .splash-loader,
body.reduce-motion .loading-spinner,
body.reduce-motion .pulse-animation {
    animation: none !important;
    display: none !important;
}

/* ===== THEME VARIABLES ===== */
/* ===== THEME VARIABLES (ONLY ONE :root) ===== */
/* SweetAlert2 Overrides to match theme and stay on top */
.swal2-container {
    z-index: 15000 !important;
    backdrop-filter: blur(8px);
}
.swal2-popup {
    border-radius: 28px !important;
    border: 1px solid var(--border) !important;
    font-family: 'Sora', sans-serif !important;
    padding: 30px !important;
    width: 420px !important;
    background: var(--surface) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
}
.swal2-title {
    font-family: 'Sora', sans-serif !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
    margin-bottom: 20px !important;
}
.swal2-html-container {
    color: var(--text-secondary) !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}
.swal2-confirm, .swal2-cancel {
    border-radius: 16px !important;
    padding: 12px 30px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    transition: all 0.2s !important;
}
.swal2-confirm {
    background-color: var(--primary) !important;
    color: var(--btn-text) !important;
    box-shadow: 0 4px 15px var(--shadow) !important;
}
.swal2-confirm:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
.swal2-cancel {
    background: var(--hover) !important;
    color: var(--text) !important;
}
.swal2-input, .swal2-textarea, .swal2-select {
    background: var(--input-bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    padding: 15px !important;
    margin: 15px auto !important;
    box-shadow: none !important;
}
.swal2-input:focus, .swal2-textarea:focus, .swal2-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--shadow) !important;
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}
#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}
.splash-logo {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    object-fit: cover;
    margin-bottom: 30px;
    animation: splashPulse 2s infinite ease-in-out;
    box-shadow: 0 0 40px rgba(255,255,255,0.1);
}
.splash-loader {
    width: 40px;
    height: 4px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.splash-loader::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: splashLoad 1.5s infinite linear;
}
/* Voice Message Player */
.voice-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--input-bg);
    border-radius: 24px;
    min-width: 240px;
    max-width: 300px;
    margin: 8px 0;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.voice-play-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--btn-text) !important;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 16px;
}

.voice-play-btn:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.voice-playback-wave {
    flex: 1;
    height: 36px;
    cursor: pointer;
    opacity: 0.8;
}

.voice-duration {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* Broadcast Tool Styles */
.broadcast-target-item:hover {
    background: var(--hover) !important;
}
.broadcast-target-item.selected {
    border-color: var(--primary) !important;
}
.broadcast-container {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Broadcast Tool Workspace Styles */
.broadcast-workspace {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.broadcast-workspace .notes-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    padding-left: 8px;
}

.broadcast-workspace .notes-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.broadcast-workspace .notes-filter-item:hover {
    background: var(--hover);
    color: var(--text);
}

.broadcast-workspace .notes-filter-item.active {
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.broadcast-workspace .notes-filter-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.broadcast-target-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.broadcast-target-item:hover {
    background: var(--hover);
    transform: translateX(4px);
}

.broadcast-target-item.selected {
    background: rgba(var(--primary-rgb), 0.1) !important;
    border-color: var(--primary) !important;
}

/* Analytics Dashboard Styles - Premium Update */
.analytics-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 32px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    animation: analyticsPop 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes analyticsPop {
    0% { opacity: 0; transform: scale(0.98) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

[data-theme='dark'] .stat-card {
    background: rgba(var(--surface-rgb, 10, 10, 10), 0.6);
    backdrop-filter: blur(20px);
}

[data-theme='light'] .stat-card {
    background: #ffffff;
    border-color: #f0f0f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

[data-theme='dark'] .stat-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(var(--primary-rgb), 0.1);
    background: rgba(var(--surface-rgb, 10, 10, 10), 0.8);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

[data-theme='light'] .stat-icon {
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
}

.stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 32px;
    transition: all 0.4s ease;
}

[data-theme='dark'] .chart-container {
    background: rgba(var(--surface-rgb, 10, 10, 10), 0.6);
    backdrop-filter: blur(20px);
}

[data-theme='light'] .chart-container {
    background: #ffffff;
    border-color: #f0f0f0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}

.chart-container:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.chart-title {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.chart-title i {
    color: var(--primary);
}

.analytics-row {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .analytics-row {
        grid-template-columns: 1fr;
    }
}

.progress-bar-container {
    height: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

[data-theme='dark'] .progress-bar-container {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.02);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 10px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

[data-theme='dark'] .activity-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.activity-item:hover {
    background: rgba(var(--primary-rgb), 0.05);
    transform: translateX(8px);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.activity-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.analytics-back-btn {
    padding: 12px 24px;
    border-radius: 16px;
    background: var(--hover);
    color: var(--text);
    border: 1.5px solid var(--border);
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.analytics-back-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.3);
}

/* ===== SETTINGS DETAIL STYLES ===== */
.settings-group {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 16px;
}

.settings-divider {
    height: 1px;
    background: var(--border);
    margin: 0 16px;
    opacity: 0.5;
}

.settings-detail-header {
    margin-bottom: 32px;
}

.settings-detail-content {
    max-width: 800px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 12px;
    margin: 2px 8px;
}

.settings-item:hover {
    background: var(--hover);
}

.settings-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.settings-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-sublabel {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.toggle {
    width: 44px;
    height: 24px;
    background: #4b5563;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle.on {
    background: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle.on::after {
    transform: translateX(20px);
}

/* Smooth SVG Path Animation */
@keyframes svgDash {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

svg path {
    animation: svgDash 1.5s ease-out;
}

@keyframes svgDash {
    from { stroke-dasharray: 1000; stroke-dashoffset: 1000; opacity: 0; }
    to { stroke-dashoffset: 0; opacity: 1; }
}

#broadcast-attachment-preview {
    animation: fadeIn 0.3s ease;
}

/* Camera Modal Enhancements */
.camera-recording-indicator {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes splashPulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.2); }
    100% { transform: scale(1); filter: brightness(1); }
}
@keyframes splashLoad {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Existing styles... */
:root {
    --light-bg: #fdfcfb;
    --light-surface: #fcf9f5;
    --light-text: #1a1a1a;
    --light-text-secondary: #5a5a5a;
    --light-border: #e8e2d9;
    --light-accent: #2d2d2d;
    --light-accent-hover: #1a1a1a;
    --light-shadow: rgba(45, 45, 45, 0.05);
    
    --dark-bg: #000000;
    --dark-surface: #0a0a0a;
    --dark-text: #ffffff;
    --dark-text-secondary: #a3a3a3;
    --dark-border: #1f1f1f;
    --dark-accent: #ffffff;
    --dark-accent-hover: #e5e5e5;
    --dark-shadow: rgba(255, 255, 255, 0.05);
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --amoled-red: #ff0000;
    --amoled-green: #00ff00;
    --amoled-blue: #00aaff;
    
    --border-radius: 28px;
    --border-radius-sm: 20px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='light'] {
    --bg: #fffbf7;
    --surface: #fcf9f5;
    --text: #2d2d2d;
    --text2: #5a5a5a;
    --border: #f0e9e2;
    --accent: #3d3935;
    --accent-h: #2d2d2d;
    --shadow: rgba(61, 57, 53, 0.08);
    --input-bg: #f7f2ed;
    --toggle-bg: #f0e9e2;
    --user-bg: #3d3935;
    --user-text: #fff;
    --ai-bg: #fcf9f5;
    --ai-text: #2d2d2d;
    --ai-border: #f0e9e2;
    --hover: rgba(61, 57, 53, 0.05);
    --card: #fcf9f5;
    --primary: #3d3935;
    --primary-dim: #5a5a5a;
    --on-primary: #ffffff;
    --secondary: #f7f2ed;
    --text-primary: #2d2d2d;
    --text-secondary: #5a5a5a;
    --btn: #3d3935;
    --btn-hover: #2d2d2d;
    --btn-text: #ffffff;
    --sidebar-bg: #fcf9f5;
    --msg-out: #3d3935;
    --msg-in: #f7f2ed;
    --msg-out-text: #fff;
    --msg-in-text: #2d2d2d;
}

[data-theme='dark'] {
    --bg: #000000;
    --surface: #0a0a0a;
    --text: #ffffff;
    --text2: #a3a3a3;
    --border: #1f1f1f;
    --accent: #ffffff;
    --accent-h: #e5e5e5;
    --shadow: rgba(255, 255, 255, 0.05);
    --input-bg: #121212;
    --toggle-bg: #1a1a1a;
    --user-bg: #262626;
    --user-text: #ffffff;
    --ai-bg: #111111;
    --ai-text: #ffffff;
    --ai-border: #1f1f1f;
    --hover: rgba(255, 255, 255, 0.1);
    --card: #0d0d0d;
    --primary: #ffffff;
    --primary-dim: #e5e5e5;
    --on-primary: #000000;
    --secondary: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --btn: #ffffff; /* Dark mode buttons should be white background */
    --btn-hover: #e5e5e5;
    --btn-text: #000000; /* Dark mode button text should be black */
    --sidebar-bg: #0a0a0a;
    --msg-out: #262626;
    --msg-in: #111111;
    --msg-out-text: #ffffff;
    --msg-in-text: #ffffff;
}

/* ===== STARFIELD CANVAS (Dark Mode Only) ===== */
[data-theme='dark'] #starCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

[data-theme='light'] #starCanvas {
    display: none;
}

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
    position: relative;
    z-index: 2;
}

/* ===== GLOSSY CARD EFFECT ===== */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
}

[data-theme='light'] .glass-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px -12px rgba(45, 45, 45, 0.15);
}

[data-theme='dark'] .glass-card:hover {
    border-color: var(--accent);
    box-shadow: 0 20px 35px -12px var(--shadow);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 20px;
}

/* ===== BUTTON STYLES ===== */
.btn-neon {
    background: var(--btn);
    color: var(--btn-text);
    font-weight: 700;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    border-radius: 9999px;
    cursor: pointer;
}

.btn-neon:hover {
    background: var(--btn-hover);
    transform: scale(1.02);
    box-shadow: 0 0 18px var(--shadow);
}

.btn-outline-neon {
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    transition: var(--transition);
    border-radius: 9999px;
    cursor: pointer;
}

.btn-outline-neon:hover {
    background: var(--accent);
    color: var(--on-primary) !important;
    box-shadow: 0 0 12px var(--shadow);
}

.btn-outline-red {
    border: 1.5px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-weight: 600;
    transition: 0.2s;
    border-radius: 9999px;
    cursor: pointer;
}

.btn-outline-red:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.btn-red-accent {
    background: #ef4444;
    color: white;
    transition: 0.2s;
    border-radius: 9999px;
    cursor: pointer;
}

.btn-red-accent:hover {
    background: #dc2626;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* ===== FEATURE ICON ===== */
.feature-icon {
    background: var(--hover);
    border-radius: var(--border-radius-sm);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: var(--accent);
    border: 1px solid var(--border);
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

@keyframes modalPop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes chatPop {
    0% { transform: translateY(20px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.modal {
    animation: modalPop 0.3s ease-out;
}

#chat-window {
    animation: chatPop 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* ===== TOP NEON BAR ===== */
.top-neon-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent), 0 0 24px var(--shadow);
}

/* ===== GLOSSY NAVIGATION ===== */
nav {
    background: var(--surface) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--border) !important;
}

/* ===== INPUT & TEXTAREA STYLES ===== */
input, textarea, select {
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--shadow);
}

select option {
    background: var(--surface);
    color: var(--text);
    padding: 12px;
}

.profile-input {
    width: 100%;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    transition: var(--transition);
}

.profile-input:focus {
    border-color: var(--primary);
    outline: none;
}

/* ===== NOTES & TASK MANAGER ===== */
.notes-layout {
    display: flex;
    height: 100%;
    background: var(--bg);
    overflow: hidden;
}

.notes-sidebar {
    width: 260px;
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: var(--surface);
}

.notes-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px;
    overflow-y: auto;
    background: var(--bg);
}

.notes-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.notes-filter-item:hover {
    background: var(--hover);
    color: var(--text);
}

.notes-filter-item.active {
    background: var(--primary);
    color: var(--on-primary);
}

.notes-filter-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.notes-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 12px;
}

.task-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.task-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.task-priority-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.priority-high { background: var(--error); }
.priority-medium { background: var(--warning); }
.priority-low { background: var(--success); }

.task-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 2px;
}

.task-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.task-card.completed .task-title {
    text-decoration: line-through;
    opacity: 0.6;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.task-card:hover .task-actions {
    opacity: 1;
}

.task-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.task-action-btn:hover {
    background: var(--primary);
    color: var(--on-primary);
}

.add-task-container {
    background: var(--surface);
    border: 1.5px dashed var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 32px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.add-task-container:hover {
    border-color: var(--primary);
    background: var(--hover);
}

.task-input-wrapper {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.task-input-wrapper.active {
    display: block;
    animation: modalPop 0.3s ease-out;
}

/* ===== TRANSLATOR STYLES ===== */
.translator-container {
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.translator-select {
    background: var(--input-bg) !important;
    color: var(--text) !important;
    border: 1.5px solid var(--border) !important;
    transition: all 0.2s ease;
}

.translator-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--shadow) !important;
}

.translator-select option {
    background: var(--surface);
    color: var(--text);
}

.icon-btn-small {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.icon-btn-small:hover {
    background: var(--primary);
    color: var(--on-primary);
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
}

#translate-result-area::-webkit-scrollbar {
    width: 6px;
}

#translate-result-area::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

#translate-result-area::-webkit-scrollbar-track {
    background: transparent;
}

/* ===== CHAT WINDOW ===== */
#chat-window {
    background: var(--surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
}

/* ===== UTILITY CLASSES ===== */
.bg-green-premium {
    background: var(--accent);
}

.text-green-premium {
    color: var(--accent);
}

/* ===== FLOATING BUTTONS CONTAINER ===== */
#floating-buttons {
    z-index: 99999;
}

#go-to-top-btn {
    transition: var(--transition);
}

/* ===== FIREBASE LIVE USER COUNT ===== */
#live-user-count {
    font-weight: 800;
}

/* ===== ACCESSIBILITY & FOCUS ===== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== COLORED AVATAR STYLES ===== */
.color-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    color: var(--btn-text) !important;
    background: var(--accent);
}

.avatar-colors {
    --color-1: #2563eb;
    --color-2: #10b981;
    --color-3: #f59e0b;
    --color-4: #8b5cf6;
    --color-5: #ec489a;
    --color-6: #06b6d4;
    --color-7: #ef4444;
    --color-8: #84cc16;
    --color-9: #d946ef;
    --color-10: #f97316;
}

/* ===== VOICE MESSAGE STYLES ===== */
.voice-message {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--input-bg);
    border-radius: 24px;
    padding: 8px 16px;
    min-width: 200px;
}

.voice-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: var(--btn-text) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.voice-play-btn:hover {
    transform: scale(1.05);
}

.voice-waveform {
    flex: 1;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.voice-waveform span {
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.voice-duration {
    font-size: 12px;
    color: var(--text2);
    font-family: monospace;
}

/* ===== DOCUMENT FILE STYLES ===== */
.document-message {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--input-bg);
    border-radius: 16px;
    padding: 12px 16px;
    min-width: 220px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

.document-message:hover {
    background: var(--hover);
    transform: translateX(2px);
}

.doc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--btn-text) !important;
}

.doc-info {
    flex: 1;
}

.doc-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-all;
}

.doc-size {
    font-size: 10px;
    color: var(--text2);
}

.doc-download {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hover);
    border: none;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.doc-download:hover {
    background: var(--accent);
    color: #000 !important;
}

/* ===== ZIP FILE STYLES ===== */
.zip-message {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--input-bg);
    border-radius: 16px;
    padding: 12px 16px;
    min-width: 220px;
    border-left: 4px solid #f59e0b;
}

.zip-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f59e0b20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #f59e0b;
}

.zip-info {
    flex: 1;
}

.zip-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.zip-size {
    font-size: 10px;
    color: var(--text2);
}

/* ===== BOOLI MAIN APP STYLES ===== */
#app {
    display: flex;
    height: 100vh;
}

/* Auth Screen */
#auth-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 48px 40px;
    width: 420px;
    max-width: 95vw;
    box-shadow: 0 8px 32px var(--shadow);
}
.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}
.auth-logo img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}
.auth-logo span {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
}
.auth-input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
    margin-bottom: 14px;
}
.auth-input:focus {
    border-color: var(--accent);
}
.auth-btn {
    width: 100%;
    background: var(--btn);
    color: var(--btn-text);
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.auth-btn:hover {
    background: var(--btn-hover);
}
.auth-btn:active {
    transform: scale(0.98);
}
.auth-tab {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border);
}
.auth-tab button {
    flex: 1;
    padding: 9px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text2);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.auth-tab button.active {
    background: var(--primary);
    color: var(--on-primary) !important;
}

/* Password Strength */
.password-strength-container {
    margin: -8px 0 12px 0;
}
.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-top: 8px;
    transition: all 0.3s;
    overflow: hidden;
}
.password-strength-bar.weak {
    width: 33%;
    background: #ef4444;
}
.password-strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}
.password-strength-bar.strong {
    width: 100%;
    background: #10b981;
}
.password-strength-text {
    font-size: 11px;
    margin-top: 6px;
    color: var(--text2);
}
.password-suggestions {
    font-size: 11px;
    color: var(--text2);
    margin-top: 6px;
}
.password-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text2);
    padding: 0;
    font-size: 14px;
}
.password-toggle:hover {
    color: var(--accent);
}

/* Left Icon Sidebar */
#icon-sidebar {
    width: 68px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 4px;
    z-index: 10;
    flex-shrink: 0;
    transition: var(--transition);
}
.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    margin-bottom: 16px;
    object-fit: cover;
}
.sidebar-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    font-size: 18px;
    position: relative;
}
.sidebar-icon-btn:hover {
    background: var(--hover);
    color: var(--accent);
}
.sidebar-icon-btn.active {
    background: var(--hover);
    color: var(--accent);
}
.sidebar-icon-btn .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid var(--sidebar-bg);
}
.sidebar-spacer {
    flex: 1;
}
.avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}
.avatar-btn:hover {
    border-color: var(--accent);
}
.avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Secondary Sidebar */
#secondary-sidebar {
    width: 320px;
    min-width: 280px;
    max-width: 600px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0;
}
#secondary-sidebar.collapsed {
    width: 0;
}

/* Top bar */
.sec-topbar {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}
.sec-topbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sec-title {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
    white-space: nowrap;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    font-size: 16px;
}
.icon-btn:hover {
    background: var(--hover);
    color: var(--accent);
}
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
}
.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}
.search-bar input::placeholder {
    color: var(--text2);
}
.search-bar i {
    color: var(--text2);
    font-size: 14px;
}
.filter-tabs {
    display: flex;
    gap: 6px;
}
.filter-tab {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text2);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

/* Chat List */
#chat-list {
    flex: 1;
    overflow-y: auto;
}
.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.chat-item:hover {
    background: var(--hover);
}
.chat-item.active {
    background: var(--hover);
}
.chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--surface);
    border: 1.5px solid var(--border);
    overflow: hidden;
}
.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-info {
    flex: 1;
    min-width: 0;
}
.chat-name {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-last-msg {
    font-size: 13px;
    color: var(--text2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.chat-time {
    font-size: 11.5px;
    color: var(--text2);
}
.unread-badge {
    background: var(--primary);
    color: var(--on-primary) !important;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Chat Area */
#main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg);
    transition: var(--transition);
}
#welcome-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
#welcome-screen img {
    width: 80px;
    opacity: 0.7;
    border-radius: 20px;
}
#welcome-screen h2 {
    font-family: 'Sora', sans-serif;
    font-size: 26px;
    color: var(--text2);
    font-weight: 600;
}
#welcome-screen p {
    color: var(--text2);
    font-size: 15px;
}

/* Chat Header */
#chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}
#chat-header .chat-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
}
#chat-header .info h3 {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
}
#chat-header .info p {
    font-size: 12px;
    color: #10b981;
}
#chat-header .actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.call-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--hover);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    font-size: 16px;
}
.call-btn:hover {
    background: var(--accent);
    color: #000 !important;
}

/* Messages Area */
#messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg);
    position: relative;
}

/* Message Wrap */
.msg-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: msgIn 0.2s ease;
    max-width: 100%;
    clear: both;
}
.msg-wrap.out {
    flex-direction: row-reverse;
    justify-content: flex-start;
}
.msg-wrap.in {
    flex-direction: row;
    justify-content: flex-start;
}

/* Avatar */
.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    align-self: flex-end;
    margin-bottom: 4px;
}
.msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Message Bubble Container */
.msg-wrap > div {
    max-width: 65%;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Message Bubble */
.msg-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    position: relative;
}
.msg-wrap.in .msg-bubble {
    background: var(--msg-in);
    color: var(--msg-in-text);
    border-bottom-left-radius: 4px;
}
.msg-wrap.out .msg-bubble {
    background: var(--msg-out);
    color: var(--msg-out-text);
    border-bottom-right-radius: 4px;
}

/* Message Text */
.msg-text {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

.chat-link {
    color: #C00000; /* Rich Red */
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
    font-weight: 600;
}

.chat-link:hover {
    color: #900000;
    text-decoration-thickness: 2px;
}

/* Link Preview Styles */
.link-preview-card {
    margin-top: 8px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
    max-width: 300px;
    cursor: pointer;
    transition: transform 0.2s;
}
.link-preview-card:hover {
    transform: translateY(-2px);
}
.link-preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: var(--secondary);
}
.link-preview-content {
    padding: 10px;
}
.link-preview-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.link-preview-desc {
    font-size: 11px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.link-preview-url {
    font-size: 10px;
    color: var(--primary);
    margin-top: 4px;
    text-transform: lowercase;
}

/* Input Link Preview */
#input-link-preview {
    padding: 10px;
    background: var(--card);
    border-top: 1px solid var(--border);
    display: none;
    position: relative;
}
#input-link-preview .close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
}

/* Message Time */
.msg-time {
    font-size: 10px;
    opacity: 0.65;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.msg-wrap.in .msg-time {
    justify-content: flex-start;
}
.msg-wrap.out .msg-time {
    justify-content: flex-end;
}

/* Date Divider */
.msg-date-divider {
    text-align: center;
    margin: 16px 0;
}
.msg-date-divider span {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 20px;
}

/* Message Reaction */
.msg-reaction {
    position: absolute;
    bottom: -14px;
    right: 8px;
    font-size: 14px;
    background: var(--bg);
    border-radius: 20px;
    padding: 2px 6px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border);
    z-index: 5;
}
.msg-wrap.out .msg-reaction {
    right: auto;
    left: 8px;
}

/* Reply Preview */
.reply-preview {
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}
.reply-preview i {
    font-size: 10px;
    color: var(--accent);
}

/* Highlight Effect */
.highlight {
    animation: highlightPulse 0.5s ease;
}
@keyframes highlightPulse {
    0% { background: rgba(37, 99, 235, 0.5); }
    100% { background: rgba(37, 99, 235, 0.1); }
}

/* Selected Message */
.msg-wrap.selected {
    position: relative;
}
.msg-wrap.selected::before {
    content: '✓';
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: var(--btn-text) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}
.msg-wrap.out.selected::before {
    left: auto;
    right: -28px;
}

/* Attachments */
.msg-attachment {
    margin-top: 8px;
}
.msg-image {
    max-width: 220px;
    max-height: 220px;
    border-radius: 12px;
    cursor: pointer;
    object-fit: cover;
}
.msg-video {
    max-width: 250px;
    max-height: 200px;
    border-radius: 12px;
}
.msg-audio {
    width: 200px;
}

/* Poll Container */
.poll-container {
    background: var(--input-bg);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}
.poll-question {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}
.poll-options {
    margin: 8px 0;
}
.poll-option {
    position: relative;
    background: var(--bg);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid var(--border);
    overflow: hidden;
}
.poll-option-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--shadow);
    transition: width 0.3s ease;
    pointer-events: none;
}
.poll-option-text {
    position: relative;
    z-index: 1;
}
.poll-option-count {
    position: relative;
    z-index: 1;
    font-size: 11px;
    color: var(--text2);
    margin-top: 4px;
}
.poll-check {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 16px;
}
.poll-total {
    font-size: 11px;
    color: var(--text2);
    margin-top: 8px;
    text-align: right;
}

/* Event Container */
.event-container {
    display: flex;
    gap: 12px;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}
.event-icon {
    font-size: 28px;
    color: var(--accent);
}
.event-details {
    flex: 1;
}
.event-title {
    font-weight: 600;
    margin-bottom: 6px;
}
.event-date, .event-time, .event-location, .event-attendees {
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 3px;
}
.event-attend-btn {
    margin-top: 8px;
    padding: 5px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
}

/* Contact Card */
.contact-card {
    background: var(--bg);
    border-radius: 10px;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-card i {
    font-size: 24px;
    color: var(--accent);
}
.contact-card strong {
    font-size: 13px;
}
.contact-card-id {
    font-size: 10px;
    color: var(--text2);
    display: block;
}

/* Input Bar */
#input-bar {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: var(--bg);
    flex-shrink: 0;
    position: relative;
}
#msg-input {
    flex: 1;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: 14px;
    padding: 11px 16px;
    font-size: 14.5px;
    font-family: 'Inter', sans-serif;
    outline: none;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    transition: var(--transition);
    line-height: 1.5;
}
#msg-input:focus {
    border-color: var(--accent);
}
#msg-input::placeholder {
    color: var(--text2);
}
.send-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: var(--btn);
    color: var(--btn-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    font-size: 16px;
    flex-shrink: 0;
}
.send-btn:hover {
    background: var(--btn-hover);
    transform: scale(1.06);
}
.input-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    font-size: 17px;
}
.input-action-btn:hover {
    background: var(--hover);
    color: var(--accent);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    z-index: 100;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px var(--shadow);
    padding: 6px;
    min-width: 190px;
    animation: dropIn 0.15s ease;
}
@keyframes dropIn {
    from { opacity:0; transform: translateY(-6px) scale(0.97); }
    to { opacity:1; transform:none; }
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    transition: background 0.15s;
    white-space: nowrap;
}
.dropdown-item:hover {
    background: var(--hover);
    color: var(--accent);
}
.dropdown-item i {
    width: 18px;
    color: var(--text2);
}
.dropdown-item:hover i {
    color: var(--accent);
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Plus Menu */
#plus-menu {
    position: absolute;
    bottom: 70px;
    left: 70px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow);
    padding: 8px;
    z-index: 1000;
    min-width: 180px;
}
@media (max-width: 600px) {
    #plus-menu {
        left: 60px;
        bottom: 65px;
    }
}

/* Emoji Picker */
#emoji-picker {
    position: absolute;
    bottom: 70px;
    left: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 32px var(--shadow);
    width: 280px;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.emoji-btn {
    font-size: 22px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 4px;
    transition: background 0.1s;
}
.emoji-btn:hover {
    background: var(--hover);
    transform: scale(1.1);
}

/* Context Menu */
#ctx-menu {
    position: fixed;
    z-index: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px var(--shadow);
    padding: 6px;
    min-width: 170px;
    animation: dropIn 0.15s ease;
}
.reaction-row {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
    justify-content: space-around;
}
.reaction-btn-small {
    font-size: 24px;
    cursor: pointer;
    padding: 6px;
    border-radius: 12px;
    transition: all 0.2s;
    border: none;
    background: transparent;
}
.reaction-btn-small:hover {
    background: var(--hover);
    transform: scale(1.2);
}

/* Tools Panel */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.2s;
}
.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}
.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--hover);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}

/* Settings */
.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
}
.settings-item:hover {
    background: var(--hover);
}
.settings-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--hover);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.settings-label {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}
.settings-sublabel {
    font-size: 12.5px;
    color: var(--text2);
}
.toggle {
    width: 44px;
    height: 24px;
    background: var(--toggle-bg);
    border-radius: 99px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
}
.toggle.on {
    background: #10b981;
}
.toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle.on::after {
    transform: translateX(20px);
}

/* Profile UI - New Design */
.profile-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--accent), var(--accent-h));
    position: relative;
    overflow: hidden;
}
.profile-avatar-wrap {
    position: absolute;
    bottom: -50px;
    left: 24px;
    z-index: 10;
}
.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px solid var(--bg);
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.avatar-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    opacity: 0.3;
    filter: blur(8px);
    z-index: -1;
}

.profile-field-group {
    margin-bottom: 24px;
}
.profile-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    margin-left: 4px;
}
.profile-field-input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}
.profile-field-input:focus {
    border-color: var(--primary);
    background: var(--hover);
}

.profile-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-verified {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}
.badge-unverified {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.profile-link-wrap {
    display: flex;
    gap: 8px;
}
.profile-link-input {
    flex: 1;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-link-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.profile-link-btn:hover {
    background: var(--hover);
    border-color: var(--primary);
    color: var(--primary);
}

.profile-bio-textarea {
    width: 100%;
    min-height: 100px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
}

.profile-action-btn {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.profile-save-btn {
    background: var(--primary);
    color: var(--on-primary);
    margin-bottom: 12px;
}
.profile-logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.profile-field-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.verify-btn {
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.verify-btn:hover {
    filter: brightness(1.1);
}
.verify-btn.verified {
    background: #10b981;
    cursor: default;
}

.tfa-container {
    background: var(--hover);
    border-radius: 14px;
    padding: 16px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tfa-info {
    flex: 1;
}
.tfa-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.tfa-desc {
    font-size: 12px;
    color: var(--text-secondary);
}
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #10b981;
}
input:checked + .slider:before {
    transform: translateX(20px);
}

/* Contact Info Modal */
.contact-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.contact-info-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    width: 320px;
    max-width: 90vw;
    text-align: center;
    padding: 32px;
    border: 1px solid var(--border);
}
.contact-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
}
.contact-info-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}
.contact-info-actions button {
    padding: 10px 16px;
    border-radius: 20px;
    border: none;
    background: var(--hover);
    color: var(--accent);
    cursor: pointer;
}
.close-modal {
    width: 100%;
    padding: 10px;
    border-radius: 20px;
    border: none;
    background: var(--border);
    cursor: pointer;
}

/* Forward Modal */
.forward-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}
.forward-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    width: 340px;
    max-width: 90vw;
    border: 1px solid var(--border);
    overflow: hidden;
}
.forward-card h3 {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
.forward-list {
    max-height: 400px;
    overflow-y: auto;
}
.forward-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.forward-item:hover {
    background: var(--hover);
}
.forward-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: white;
}
.forward-name {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
}

/* Bulk Action Bar */
.bulk-action-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--accent);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 30;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.bulk-info {
    font-size: 14px;
    font-weight: 500;
}
.bulk-actions {
    display: flex;
    gap: 12px;
}
.bulk-actions button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.bulk-actions button:hover {
    background: rgba(255,255,255,0.3);
}

/* Reply Indicator */
.reply-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--surface);
    border-left: 3px solid var(--accent);
    margin: 0 16px 8px 16px;
    border-radius: 12px;
    font-size: 13px;
}
.reply-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text2);
}
.reply-info i {
    color: var(--accent);
}
.cancel-reply {
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}
.cancel-reply:hover {
    background: var(--hover);
    color: #ef4444;
}

/* Incoming Call Modal */
.incoming-call-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.incoming-call-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    width: 320px;
    max-width: 85vw;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.incoming-call-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin: 0 auto 20px;
}
.incoming-call-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
}
.incoming-call-card p {
    color: var(--text2);
    margin-bottom: 24px;
}
.incoming-call-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.incoming-call-btn {
    width: 100px;
    padding: 12px 0;
    border-radius: 50px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}
.incoming-call-btn.accept {
    background: #10b981;
    color: white;
}
.incoming-call-btn.reject {
    background: #ef4444;
    color: white;
}
.incoming-call-btn:hover {
    transform: scale(1.05);
}

/* Toast */
#toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast-msg {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow);
    color: var(--text);
    font-size: 14px;
    animation: toastIn 0.3s ease, fadeOut 0.3s ease 3s forwards;
    pointer-events: all;
    max-width: 300px;
    word-wrap: break-word;
}
@keyframes toastIn {
    from { opacity:0; transform: translateX(60px); }
    to { opacity:1; transform:none; }
}
@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}
.toast-msg.error {
    border-left-color: #ef4444;
}
.toast-msg.success {
    border-left-color: #10b981;
}
.toast-msg.info {
    border-left-color: #f59e0b;
}

/* Status */
.status-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    padding: 2px;
    cursor: pointer;
}
.status-avatar img, .status-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}
.status-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
}
.status-item:hover {
    background: var(--hover);
}

/* Camera Modal */
.camera-modal {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.camera-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}
.camera-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Flip for front camera by default, script will handle switch */
}
.camera-controls {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 20px;
    z-index: 10;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}
.capture-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}
.capture-btn i {
    font-size: 28px;
    color: #fff;
}
.capture-btn:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.5);
}
.capture-btn:active {
    transform: scale(0.9);
}
.capture-btn::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: cameraPulse 2s infinite;
}
@keyframes cameraPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.switch-camera-btn, .close-camera-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.switch-camera-btn:hover, .close-camera-btn:hover {
    background: rgba(255,255,255,0.2);
}

#camera-recording-indicator {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

#media-preview-container {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

#media-preview-container .preview-content {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#media-preview-container video, #media-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#media-preview-container .camera-controls {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.confirm-btn {
    background: var(--success) !important;
    border-color: var(--success) !important;
}

.delete-btn {
    background: var(--error) !important;
    border-color: var(--error) !important;
}

/* Image Preview */
.image-preview-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-preview-container {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}
.image-preview-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}
.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

/* Voice Recording UI */
.voice-recording-ui {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: slideUp 0.2s ease;
}
.recording-wave {
    display: flex;
    align-items: center;
    gap: 3px;
}
.recording-wave span {
    width: 3px;
    height: 20px;
    background: white;
    border-radius: 2px;
    animation: wave 0.5s ease infinite alternate;
}
.recording-wave span:nth-child(2) { animation-delay: 0.1s; height: 30px; }
.recording-wave span:nth-child(3) { animation-delay: 0.2s; height: 25px; }
.recording-wave span:nth-child(4) { animation-delay: 0.3s; height: 35px; }
.recording-wave span:nth-child(5) { animation-delay: 0.4s; height: 20px; }
@keyframes wave {
    from { height: 8px; }
    to { height: 25px; }
}
.cancel-recording {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-left: 8px;
}

/* Sticker Grid */
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
}
.sticker-item {
    font-size: 48px;
    cursor: pointer;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    transition: transform 0.2s;
}
.sticker-item:hover {
    transform: scale(1.1);
    background: var(--hover);
}

/* OTP Inputs */
#otp-input-1, #otp-input-2, #otp-input-3, 
#otp-input-4, #otp-input-5, #otp-input-6 {
    width: 48px !important;
    height: 52px !important;
    text-align: center !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    padding: 0 !important;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
#otp-input-1:focus, #otp-input-2:focus, #otp-input-3:focus,
#otp-input-4:focus, #otp-input-5:focus, #otp-input-6:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--shadow);
    outline: none;
}

.avatar-btn .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--sidebar-bg);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Color Fixes for Tabs and Buttons */
.auth-tab button {
    background: var(--hover);
    color: var(--text-secondary);
}

.auth-tab button.active {
    background: var(--primary);
    color: var(--on-primary) !important;
}

.filter-tab {
    background: var(--secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.btn-neon {
    background: var(--btn);
    color: var(--btn-text);
}

.btn-neon:hover {
    background: var(--btn-hover);
}

/* Typing Indicator Styling */
.typing-status {
    font-style: italic;
    font-size: 12px;
    color: var(--success);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Task Manager Styles */
.task-card {
    transition: all 0.2s ease;
}
.task-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 32px var(--shadow);
    border-color: var(--accent);
}
.task-card.completed {
    opacity: 0.7;
}
.task-card.completed .task-text {
    text-decoration: line-through;
}
.task-card.overdue-task {
    border-left: 4px solid #ef4444;
}
.task-filter-btn.active {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: white !important;
}
.task-filter-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
    color: var(--accent);
}
.task-stats {
    background: var(--surface);
    border-radius: 12px;
    font-size: 13px;
}
.task-stats div {
    display: flex;
    align-items: center;
    gap: 4px;
}
@keyframes taskAppear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.task-card {
    animation: taskAppear 0.2s ease;
}

/* Upload Progress UI */
.upload-progress-ui {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 24px;
    z-index: 10000;
    box-shadow: 0 8px 32px var(--shadow);
    animation: slideUp 0.3s ease;
    min-width: 280px;
}
.upload-progress-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
.upload-spinner {
    font-size: 24px;
    color: var(--accent);
}
.upload-message {
    font-size: 14px;
    color: var(--text);
    text-align: center;
}
.upload-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.upload-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 900px) {
    #secondary-sidebar {
        width: 100%;
        position: absolute;
        z-index: 20;
        height: 100%;
    }
    #secondary-sidebar.collapsed {
        width: 0;
    }
    #main-area {
        position: absolute;
        left: 68px;
        right: 0;
        top: 0;
        bottom: 0;
    }
}
@media (max-width: 600px) {
    #icon-sidebar {
        width: 56px;
    }
    .sidebar-icon-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    #main-area {
        left: 56px;
    }
    .msg-wrap > div {
        max-width: 85%;
    }
    .msg-bubble {
        font-size: 13.5px;
        padding: 8px 12px;
    }
    .msg-image {
        max-width: 180px;
        max-height: 180px;
    }
    .msg-wrap.selected::before {
        width: 18px;
        height: 18px;
        font-size: 10px;
        left: -22px;
    }
    .msg-wrap.out.selected::before {
        right: -22px;
        left: auto;
    }
}

/* Message appear animation */
@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Suggestion chips hover effect */
.suggestion-chips button:hover {
    background: var(--accent) !important;
    color: white !important;
    transform: translateY(-1px);
}

.suggestion-chips button:active {
    transform: translateY(0);
}








/* Profile Link Styles */
.profile-link-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hover);
    border-radius: 12px;
    padding: 4px;
}

.profile-link-input {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: monospace;
    font-size: 13px;
    cursor: pointer;
}

.profile-link-input:hover {
    text-decoration: underline;
}

/* Location Map Button */
.location-map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    margin-top: 6px;
}

.location-map-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Portfolio Link */
.portfolio-link {
    display: block;
    padding: 8px 12px;
    background: var(--hover);
    border-radius: 10px;
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
    text-align: center;
    margin-top: 6px;
    transition: all 0.2s;
}

.portfolio-link:hover {
    background: var(--accent);
    color: white;
}

/* Contact Info Location Row */
.contact-row[onclick*="openLocation"]:hover {
    background: rgba(34, 197, 94, 0.1);
}










































































/* ============================================ */
/*         CONTACT INFO MODAL - EXACT DESIGN    */
/* ============================================ */

.contact-info-modal {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.contact-info-modal .mobile-frame {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    height: 720px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 0 4px var(--border), 0 20px 60px rgba(37, 99, 235, 0.12);
}

.contact-info-modal .top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(to bottom, var(--surface) 60%, transparent);
}

.contact-info-modal .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-modal .icon-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
}

.contact-info-modal .icon-btn:active {
    transform: scale(0.94);
}

.contact-info-modal .dropdown-menu {
    position: absolute;
    top: 58px;
    right: 12px;
    z-index: 11000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 6px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    transform-origin: top right;
    transform: scale(0.88);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.contact-info-modal .dropdown-menu.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

.contact-info-modal .sheet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.contact-info-modal .sheet-item:hover {
    background: var(--hover);
}

.contact-info-modal .sheet-item.danger {
    color: #ef4444;
}

.contact-info-modal .sheet-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.contact-info-modal .scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-top: 68px;
    padding-bottom: 24px;
    scrollbar-width: none;
}

.contact-info-modal .scroll-area::-webkit-scrollbar {
    display: none;
}

.contact-info-modal .cover {
    height: 220px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.contact-info-modal .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contact-info-modal .cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--surface) 0%, transparent 60%);
}

.contact-info-modal .cover-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-modal .cover:hover .cover-hover {
    background: rgba(0, 0, 0, 0.25);
}

.contact-info-modal .cover-hint {
    opacity: 0;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-info-modal .cover:hover .cover-hint {
    opacity: 1;
}

.contact-info-modal .profile-header {
    padding: 0 20px;
    margin-top: -60px;
    position: relative;
    z-index: 20;
    text-align: center;
}

.contact-info-modal .avatar-wrap {
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.contact-info-modal .avatar-glow {
    position: absolute;
    inset: -5px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border-radius: 50%;
    opacity: 0.45;
    filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-modal .avatar-wrap:hover .avatar-glow {
    opacity: 0.85;
}

.contact-info-modal .avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    border: 3px solid var(--surface);
    display: block;
}

.contact-info-modal .status-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--surface);
    transition: background 0.3s ease;
}

.contact-info-modal .status-dot.online {
    background: #22c55e;
}

.contact-info-modal .status-dot.offline {
    background: #6b7280;
}

.contact-info-modal .status-dot.blocked {
    background: #ef4444;
}

.contact-info-modal .status-dot.online::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    animation: statusPulse 1.6s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

.contact-info-modal .profile-name {
    margin-top: 14px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.contact-info-modal .profile-handle {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-top: 2px;
}

.contact-info-modal .profile-seen {
    font-size: 12px;
    color: var(--text2);
    margin-top: 3px;
}

.contact-info-modal .quick-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.contact-info-modal .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 50px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 4px;
}

.contact-info-modal .action-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
    color: var(--accent);
}

.contact-info-modal .action-btn:active {
    transform: scale(0.93);
}

.contact-info-modal .action-btn svg {
    width: 18px;
    height: 18px;
}

.contact-info-modal .action-btn span {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text2);
}

.contact-info-modal .action-btn:hover span {
    color: var(--accent);
}

.contact-info-modal .action-btn-primary {
    flex: 1;
    max-width: 150px;
    height: 50px;
    background: var(--btn);
    border: none;
    border-radius: 16px;
    color: var(--btn-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px var(--shadow);
}

.contact-info-modal .action-btn-primary:hover {
    background: var(--btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 12px 32px var(--shadow);
}

.contact-info-modal .action-btn-primary:active {
    transform: scale(0.95);
}

.contact-info-modal .action-btn-primary svg {
    width: 16px;
    height: 16px;
}

.contact-info-modal .action-btn-primary small {
    font-size: 8px;
    opacity: 0.75;
    display: block;
    font-weight: 500;
}

.contact-info-modal .content {
    padding: 0 16px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info-modal .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.contact-info-modal .card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text2);
}

.contact-info-modal .card-header svg {
    width: 13px;
    height: 13px;
}

.contact-info-modal .card-body {
    padding: 0 16px 14px;
}

.contact-info-modal .bio-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.contact-info-modal .contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
}

.contact-info-modal .contact-row:hover {
    background: var(--hover);
}

.contact-info-modal .contact-row:active {
    background: var(--hover);
}

.contact-info-modal .contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-modal .contact-icon svg {
    width: 18px;
    height: 18px;
}

.contact-info-modal .contact-icon.blue {
    background: var(--hover);
    color: var(--primary);
}

.contact-info-modal .contact-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.contact-info-modal .contact-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.contact-info-modal .contact-label {
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 2px;
}

.contact-info-modal .contact-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.contact-info-modal .contact-copy {
    font-size: 11px;
    font-weight: 600;
    color: #22c55e;
    margin-left: auto;
}

.contact-info-modal .divider {
    height: 1px;
    background: var(--border);
    margin: 0 16px;
}

.contact-info-modal .media-section {
    padding: 0 16px 8px;
}

.contact-info-modal .media-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    padding: 0 2px;
}

.contact-info-modal .tabs {
    display: flex;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 14px;
}

.contact-info-modal .tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: none;
}

.contact-info-modal .tab svg {
    width: 13px;
    height: 13px;
}

.contact-info-modal .tab.active {
    background: var(--btn);
    color: #fff;
    box-shadow: 0 4px 12px var(--shadow);
}

.contact-info-modal .tab:not(.active):hover {
    color: var(--text);
    background: var(--hover);
}

.contact-info-modal .tab-content {
    display: none;
}

.contact-info-modal .tab-content.active {
    display: block;
}

.contact-info-modal .media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.contact-info-modal .media-item {
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--secondary);
}

.contact-info-modal .media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.contact-info-modal .media-item:hover img {
    transform: scale(1.05);
}

.contact-info-modal .media-item:active img {
    transform: scale(1.1);
}

.contact-info-modal .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
}

.contact-info-modal .play-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border-radius: 10px;
    padding: 8px;
}

.contact-info-modal .play-btn svg {
    width: 18px;
    height: 18px;
}

.contact-info-modal .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text2);
    gap: 8px;
}

.contact-info-modal .empty-state svg {
    width: 36px;
    height: 36px;
    opacity: 0.3;
}

.contact-info-modal .empty-state p {
    font-size: 13px;
    font-weight: 500;
}

.contact-info-modal .lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    align-items: center;
    justify-content: center;
}

.contact-info-modal .lightbox.open {
    display: flex;
}

.contact-info-modal .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-modal .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.contact-info-modal .lightbox-close svg {
    width: 20px;
    height: 20px;
}

.contact-info-modal .lightbox-img {
    max-height: 88vh;
    max-width: 90vw;
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8);
}

.contact-info-modal .secret-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
}

.contact-info-modal .secret-modal.open {
    display: flex;
}

.contact-info-modal .secret-box {
    background: linear-gradient(135deg, var(--btn) 0%, #4f46e5 100%);
    border-radius: 28px;
    max-width: 280px;
    width: 100%;
    margin: 16px;
    padding: 32px 24px;
    text-align: center;
    color: #fff;
}

.contact-info-modal .secret-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.contact-info-modal .secret-icon svg {
    width: 36px;
    height: 36px;
}

.contact-info-modal .secret-title {
    font-size: 22px;
    font-weight: 700;
}

.contact-info-modal .secret-sub {
    font-size: 13px;
    opacity: 0.75;
    margin-top: 6px;
    line-height: 1.5;
}

.contact-info-modal .secret-start-btn {
    background: #fff;
    color: var(--btn);
    border: none;
    border-radius: 14px;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-modal .secret-start-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.contact-info-modal .secret-note {
    font-size: 11px;
    opacity: 0.5;
    margin-top: 12px;
}
































/* ===== GROUP INFO MODAL - COMPLETE FIXED CSS ===== */
.group-info-modal {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.group-info-modal .mobile-frame {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    height: 720px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 0 4px var(--border), 0 20px 60px rgba(37, 99, 235, 0.12);
}

.group-info-modal .top-bar {
    position: relative; /* Fixed: changed from absolute to relative to stay inside the frame */
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.group-info-modal .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.group-info-modal .icon-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
}

.group-info-modal .dropdown-menu {
    position: absolute;
    top: 58px;
    right: 12px;
    z-index: 11000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 6px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    transform-origin: top right;
    transform: scale(0.88);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s, opacity 0.2s;
}

.group-info-modal .dropdown-menu.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

.group-info-modal .sheet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.group-info-modal .sheet-item:hover {
    background: var(--hover);
}

.group-info-modal .sheet-item.danger {
    color: #ef4444;
}

.group-info-modal .sheet-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.group-info-modal .scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-top: 68px;
    padding-bottom: 24px;
    scrollbar-width: none;
}

.group-info-modal .scroll-area::-webkit-scrollbar {
    display: none;
}

.group-info-modal .cover {
    height: 220px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.group-info-modal .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.group-info-modal .cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--surface) 0%, transparent 60%);
}

.group-info-modal .cover-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.group-info-modal .cover:hover .cover-hover {
    background: rgba(0, 0, 0, 0.25);
}

.group-info-modal .cover-hint {
    opacity: 0;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.group-info-modal .cover:hover .cover-hint {
    opacity: 1;
}

.group-info-modal .profile-header {
    padding: 0 20px;
    margin-top: -60px;
    position: relative;
    z-index: 20;
    text-align: center;
}

.group-info-modal .avatar-wrap {
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.group-info-modal .avatar-glow {
    position: absolute;
    inset: -5px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border-radius: 50%;
    opacity: 0.45;
    filter: blur(10px);
    transition: all 0.3s;
}

.group-info-modal .avatar-wrap:hover .avatar-glow {
    opacity: 0.85;
}

.group-info-modal .avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    border: 3px solid var(--surface);
    display: block;
}

.group-info-modal .profile-name {
    margin-top: 14px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.group-info-modal .profile-handle {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-top: 2px;
}

.group-info-modal .profile-seen {
    font-size: 12px;
    color: var(--text2);
    margin-top: 3px;
}

.group-info-modal .quick-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.group-info-modal .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 50px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    gap: 4px;
}

.group-info-modal .action-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
    color: var(--accent);
}

.group-info-modal .action-btn svg {
    width: 18px;
    height: 18px;
}

.group-info-modal .action-btn span {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text2);
}

.group-info-modal .action-btn-primary {
    flex: 1;
    max-width: 150px;
    height: 50px;
    background: var(--btn);
    border: none;
    border-radius: 16px;
    color: var(--btn-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s;
    box-shadow: 0 8px 24px var(--shadow);
}

.group-info-modal .action-btn-primary:hover {
    background: var(--btn-hover);
    transform: translateY(-1px);
}

.group-info-modal .action-btn-primary svg {
    width: 16px;
    height: 16px;
}

.group-info-modal .action-btn-primary small {
    font-size: 8px;
    opacity: 0.75;
    display: block;
    font-weight: 500;
}

.group-info-modal .content {
    padding: 0 16px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-info-modal .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.group-info-modal .card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text2);
}

.group-info-modal .card-header svg {
    width: 13px;
    height: 13px;
}

.group-info-modal .card-body {
    padding: 0 16px 14px;
}

.group-info-modal .bio-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.group-info-modal .group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 12px;
}

.group-info-modal .group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.group-info-modal .group-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.group-info-modal .group-badge {
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.group-info-modal .group-list {
    padding: 0 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.group-info-modal .group-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.group-info-modal .group-item:hover {
    background: var(--hover);
}

.group-info-modal .group-item img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
}

.group-info-modal .group-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.group-info-modal .group-item-sub {
    font-size: 11px;
    color: var(--text2);
}

.group-info-modal .media-section {
    padding: 0 16px 8px;
}

.group-info-modal .media-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    padding: 0 2px;
}

.group-info-modal .tabs {
    display: flex;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 14px;
}

.group-info-modal .tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: none;
}

.group-info-modal .tab svg {
    width: 13px;
    height: 13px;
}

.group-info-modal .tab.active {
    background: var(--btn);
    color: #fff;
    box-shadow: 0 4px 12px var(--shadow);
}

.group-info-modal .tab:not(.active):hover {
    color: var(--text);
    background: var(--hover);
}

.group-info-modal .tab-content {
    display: none;
}

.group-info-modal .tab-content.active {
    display: block;
}

.group-info-modal .media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.group-info-modal .media-item {
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--secondary);
}

.group-info-modal .media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.group-info-modal .media-item:hover img {
    transform: scale(1.05);
}

.group-info-modal .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
}

.group-info-modal .play-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border-radius: 10px;
    padding: 8px;
}

.group-info-modal .play-btn svg {
    width: 18px;
    height: 18px;
}

.group-info-modal .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text2);
    gap: 8px;
}

.group-info-modal .empty-state svg {
    width: 36px;
    height: 36px;
    opacity: 0.3;
}

.group-info-modal .empty-state p {
    font-size: 13px;
    font-weight: 500;
}

/* Member item styles */
.group-info-modal .member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.group-info-modal .member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000 !important;
    font-weight: bold;
    overflow: hidden;
    flex-shrink: 0;
}

.group-info-modal .member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-info-modal .member-info {
    flex: 1;
    min-width: 0;
}

.group-info-modal .member-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    flex-wrap: wrap;
}

.group-info-modal .member-meta {
    font-size: 11px;
    color: var(--text2);
    margin-top: 2px;
}

.group-info-modal .badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.group-info-modal .badge.super-admin {
    background: #E11D48;
    color: white;
}

.group-info-modal .badge.admin {
    background: var(--primary);
    color: #000 !important;
}

/* Links and Docs */
.group-info-modal .links-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.group-info-modal .link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--hover);
    cursor: pointer;
    transition: all 0.2s;
}

.group-info-modal .link-item:hover {
    background: var(--primary);
    color: #000 !important;
}

.group-info-modal .link-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000 !important;
    font-size: 12px;
}

.group-info-modal .link-url {
    flex: 1;
    font-size: 12px;
    word-break: break-all;
}

.group-info-modal .docs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
}

.group-info-modal .doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--hover);
    cursor: pointer;
    transition: all 0.2s;
}

.group-info-modal .doc-item:hover {
    background: var(--primary);
    color: white;
}

.group-info-modal .doc-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.group-info-modal .doc-info {
    flex: 1;
}

.group-info-modal .doc-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.group-info-modal .doc-meta {
    font-size: 10px;
    opacity: 0.7;
}




























/* ===== GROUP DROPDOWN MENU - ABSOLUTE POSITION FIX ===== */
.group-info-modal {
    position: fixed !important;
    inset: 0 !important;
    background: var(--bg) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2000 !important;
    padding: 16px !important;
}

.group-info-modal .mobile-frame {
    position: relative !important;
    width: 100% !important;
    max-width: 400px !important;
    height: 720px !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 28px !important;
    overflow: hidden !important;           /* hidden রাখো */
    box-shadow: 0 0 0 6px var(--border), 
                0 25px 70px rgba(37, 99, 235, 0.25) !important;
    display: flex !important;
    flex-direction: column !important;
}

.group-info-modal .top-bar {
    position: relative !important;  /* IMPORTANT: relative for absolute positioning */
    z-index: 50 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 14px 16px !important;
    background: linear-gradient(to bottom, var(--surface) 60%, transparent) !important;
    flex-shrink: 0 !important;
}

.group-info-modal .scroll-area {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-top: 0 !important;
    padding-bottom: 24px !important;
    scrollbar-width: none !important;
}

.group-info-modal .scroll-area::-webkit-scrollbar {
    display: none !important;
}

/* DROPDOWN MENU - FIXED ON TOP */
.group-info-modal #group-dropdown-menu,
.group-info-modal .dropdown-menu {
    position: fixed !important;  /* IMPORTANT: fixed positioning */
    z-index: 5000 !important;   /* High but below SweetAlert2 */
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 18px !important;
    padding: 6px !important;
    min-width: 220px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    transform-origin: top right !important;
    transform: scale(0.88) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
    backdrop-filter: blur(20px) !important;
    top: auto !important;
    right: auto !important;
}

.group-info-modal #group-dropdown-menu.open,
.group-info-modal .dropdown-menu.open {
    transform: scale(1) !important;
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Sheet Item Styles */
.group-info-modal .sheet-item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 12px !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: var(--text) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: transparent !important;
}

.group-info-modal .sheet-item:hover {
    background: var(--hover) !important;
}

.group-info-modal .sheet-item.danger {
    color: var(--error) !important;
}

.group-info-modal .sheet-item.danger:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

.group-info-modal .sheet-icon {
    font-size: 18px !important;
    width: 24px !important;
    text-align: center !important;
}




























/* ===== STATUS STYLES ===== */

.status-add-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.status-my-item {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.2s;
}

.status-my-item:hover {
  background: var(--hover);
}

.status-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.status-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-avatar-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  flex-shrink: 0;
}

.status-avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
}

.status-info {
  flex: 1;
}

.status-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.status-time {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.status-divider {
  padding: 12px 16px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-item {
  display: flex;
  align-items: center;
}

/* ===== FILE VAULT STYLES ===== */
.vault-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: var(--bg);
    position: relative; /* Ensure absolute children stay inside */
}

.vault-auth-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Perfectly center */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background: var(--bg);
    z-index: 100;
    width: 100%;
    max-width: 400px; /* Keep it compact */
}

.vault-pin-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center; /* Center children horizontally */
}

.vault-pin-display {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
    width: 100%;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    transition: all 0.2s;
}

.pin-dot.filled {
    background: var(--primary);
}

.vault-numpad {
    display: grid;
    grid-template-columns: repeat(3, 64px); /* Fixed width for columns to ensure symmetry */
    gap: 16px;
    margin-top: 20px;
    justify-content: center; /* Center grid columns */
    justify-items: center; /* Center items within grid cells */
}

.numpad-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.numpad-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.1);
}

.numpad-btn:active {
    transform: scale(0.95);
}

.vault-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
}

.vault-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.vault-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.vault-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

.vault-item-preview {
    width: 100%;
    aspect-ratio: 1;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vault-item-preview img, .vault-item-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vault-item-info {
    padding: 12px;
}

.vault-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vault-item-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.vault-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.vault-item:hover .vault-item-actions {
    opacity: 1;
}

.vault-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.vault-action-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.vault-action-btn.delete:hover {
    background: var(--error);
}

.vault-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
}

.vault-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px solid var(--border);
}

.status-item:hover {
  background: var(--hover);
}

.status-item.viewed .status-avatar-ring {
  background: var(--border);
}

.status-item.viewed .status-name,
.status-item.viewed .status-time {
  opacity: 0.7;
}

.no-status {
  text-align: center;
  padding: 40px 20px;
  color: var(--text2);
  font-size: 14px;
}

/* Status Viewer */
.status-viewer-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-viewer-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.status-viewer-content video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.status-progress-bar-container {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
}

.status-progress-bar {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 2px;
}

.status-progress-bar.completed {
  background: #fff;
}

/* Privacy Modal */
.privacy-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s;
}

.privacy-option:hover {
  background: var(--hover);
}

.privacy-option.selected {
  background: var(--primary);
  color: white;
}

.privacy-option .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Status Editor & Viewer */
.action-btn {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 4px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  font-size: 14px;
}

.action-btn:hover {
  background: var(--hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.action-btn i {
  font-size: 16px;
}

#status-progress-container .progress-bar {
  height: 2px;
  background: rgba(255,255,255,0.3);
  flex: 1;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

#status-progress-container .progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #fff;
  width: 0%;
}

.status-media-content {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Privacy option specific styles */
.privacy-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.privacy-option:hover {
  background: var(--hover);
}

.privacy-option i {
  font-size: 20px;
  color: var(--primary);
}

/* Contact Picker for Status */
.contact-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.contact-picker-item:hover {
  background: var(--hover);
}

.contact-picker-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

/* Status caption input */
.status-caption-input {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  font-size: 14px;
  outline: none;
  margin-top: 16px;
}

.status-caption-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.status-caption-input:focus {
  border-color: var(--primary);
}
/* ===== ChatGPT STYLE AI SIDEBAR ===== */
.ai-layout {
    display: flex;
    width: 100%;
    height: calc(100vh - 120px);
    background: var(--bg);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.ai-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
}

.ai-new-chat-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-new-chat-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
}

.ai-history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-history-item {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13.5px;
    transition: all 0.2s;
    position: relative;
}

.ai-history-item:hover {
    background: var(--hover);
    color: var(--text);
}

.ai-history-item.active {
    background: var(--hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.ai-history-item i {
    font-size: 14px;
    opacity: 0.6;
}

.ai-history-item .delete-session {
    position: absolute;
    right: 8px;
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--text-secondary);
}

.ai-history-item:hover .delete-session {
    opacity: 1;
}

.ai-history-item .delete-session:hover {
    color: #ef4444;
}

.ai-main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    position: relative;
}

.ai-chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Re-adding deleted message bubble styles */
.ai-message-bubble {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 24px;
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 12px;
    position: relative;
    animation: aiMessageSlide 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

@keyframes aiMessageSlide {
    0% { opacity: 0; transform: translateY(15px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-bubble-left {
    background: var(--msg-in);
    border: 1px solid var(--border);
    color: var(--msg-in-text);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.ai-bubble-right {
    background: var(--msg-out);
    color: var(--msg-out-text);
    border: 1px solid var(--border);
    border-bottom-right-radius: 4px;
    align-self: flex-end;
    margin-left: auto;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
}

.ai-chat-input-area {
    padding: 20px 24px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.ai-input-field {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px 22px;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-input-field:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--shadow);
}

.ai-send-btn {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    background: var(--accent);
    color: var(--on-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-send-btn:hover {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.1);
}

.ai-suggestion-chip {
    background: var(--hover);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 18px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ai-suggestion-chip:hover {
    background: var(--accent);
    color: var(--on-primary);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--msg-in);
    border: 1px solid var(--border);
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    margin-bottom: 12px;
    animation: aiMessageSlide 0.4s ease;
}

.ai-typing-dots {
    display: flex;
    gap: 4px;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: aiTypingAnim 1.4s infinite ease-in-out;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiTypingAnim {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .ai-sidebar {
        display: none;
    }
}

/* ===== INTEGRATIONS PREMIUM UI ===== */
.integrations-layout {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.integration-card {
    position: relative;
    background: var(--card);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.integration-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--primary) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12) !important;
    background: var(--surface) !important;
}

.integration-card.active {
    background: rgba(var(--primary-rgb), 0.03) !important;
}

.integration-card:hover .app-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.app-icon-wrapper {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.integrations-sidebar .notes-filter-item:hover {
    background: var(--hover);
    transform: translateX(6px);
}

.integrations-sidebar .notes-filter-item.active {
    background: var(--primary) !important;
    color: var(--on-primary) !important;
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.2);
}

/* Premium SweetAlert2 for Integrations */
.swal-premium-popup {
    border-radius: 40px !important;
    padding: 40px !important;
    border: 1.5px solid var(--border) !important;
    background: var(--surface) !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5) !important;
    max-width: 650px !important;
    width: 95% !important;
}

.swal-premium-confirm {
    border-radius: 20px !important;
    padding: 16px 40px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 14px !important;
}

.swal-premium-cancel {
    border-radius: 20px !important;
    padding: 16px 40px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 14px !important;
    background: var(--hover) !important;
    color: var(--text) !important;
}

/* Custom Scrollbar for Integrations Content */
.integrations-main::-webkit-scrollbar {
    width: 8px;
}

.integrations-main::-webkit-scrollbar-track {
    background: transparent;
}

.integrations-main::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.integrations-main::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}





/* Custom Scrollbar for Modals */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Note & Task Manager Premium UI */
.notes-layout { display: flex; height: 100%; background: var(--bg); overflow: hidden; }
.notes-sidebar { width: 280px; background: var(--card); border-right: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; gap: 32px; transition: all 0.3s ease; }
.notes-section-title { font-size: 11px; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; padding-left: 12px; }
.notes-filter-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; cursor: pointer; color: var(--text-secondary); font-weight: 600; transition: all 0.2s ease; margin-bottom: 4px; }
.notes-filter-item:hover { background: var(--hover); color: var(--text); transform: translateX(4px); }
.notes-filter-item.active { background: var(--primary)15; color: var(--primary); }
.notes-main { flex: 1; overflow-y: auto; padding: 40px; scroll-behavior: smooth; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.note-card { background: var(--card); border: 1.5px solid var(--border); border-radius: 24px; padding: 24px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; display: flex; flex-direction: column; gap: 16px; position: relative; }
.note-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.note-card .actions { opacity: 0; transition: opacity 0.2s ease; position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
.note-card:hover .actions { opacity: 1; }
.add-task-container { background: var(--card); border: 2px dashed var(--border); border-radius: 24px; padding: 32px; text-align: center; cursor: pointer; transition: all 0.3s ease; margin-bottom: 32px; }
.add-task-container:hover { border-color: var(--primary); background: var(--primary)05; }
.task-item { background: var(--card); border: 1.5px solid var(--border); border-radius: 20px; padding: 16px 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 16px; transition: all 0.2s ease; }
.task-item:hover { transform: scale(1.01); border-color: var(--primary); }
.task-checkbox { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.task-checkbox.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
