/* ==========================================================
   Zeo Chat - Premium Blue & White Theme
   Modern, ultra-fast, responsive messaging interface
   ========================================================== */

:root {
    --primary: #0088cc;
    --primary-dark: #0077b6;
    --primary-light: #29b6f6;
    --accent: #00a8ff;
    --bg-page: #f0f4f8;
    --bg-app: #ffffff;
    --sidebar-bg: #ffffff;
    --chat-bg: #eaf1f8;
    --header-bg: #ffffff;
    --bubble-in: #ffffff;
    --bubble-out: linear-gradient(135deg, #0088cc, #0077b6);
    --bubble-out-text: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --hover-bg: #f1f5f9;
    --active-bg: #e2e8f0;
    --badge-unread: #0088cc;
    --tick-sent: #94a3b8;
    --tick-delivered: #64748b;
    --tick-read: #38bdf8;
    --danger: #ef4444;
    --success: #10b981;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-full: 9999px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-page: #0f172a;
    --bg-app: #1e293b;
    --sidebar-bg: #1e293b;
    --chat-bg: #0f172a;
    --header-bg: #1e293b;
    --bubble-in: #334155;
    --bubble-out: linear-gradient(135deg, #0284c7, #0369a1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border: #334155;
    --hover-bg: #273549;
    --active-bg: #334155;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================
   Auth Screens (Login / Signup)
   ========================================================== */
.auth-body {
    background: linear-gradient(135deg, #0088cc 0%, #005f8d 100%);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    padding: 20px 16px;
}

.auth-header-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px auto 20px auto;
    color: #ffffff;
    text-align: center;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    font-size: 2.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.auth-brand h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.auth-container {
    margin: 0 auto 40px auto;
    width: 100%;
    max-width: 460px;
}

.auth-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.auth-card h2 {
    font-size: 1.6rem;
    color: #0f172a;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.input-prefix-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-prefix-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

.input-prefix {
    padding: 10px 0 10px 12px;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    user-select: none;
}

.input-prefix-wrapper input {
    border: none;
    outline: none;
    padding: 10px 12px;
    width: 100%;
    font-size: 0.95rem;
    font-family: inherit;
    background: transparent;
}

.form-group input:not([type="checkbox"]),
.form-group textarea,
.filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

.form-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 5px;
}

.live-status-tag {
    font-size: 0.8rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.live-status-tag.available { color: var(--success); }
.live-status-tag.taken { color: var(--danger); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #0088cc, #0077b6);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0077b6, #005f8d);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: rgba(0, 136, 204, 0.08);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
}

.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background-color: #f0f9ff;
    color: #075985;
    border: 1px solid #bae6fd;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* ==========================================================
   Main Application Layout (Desktop & Mobile)
   ========================================================== */
.app-wrapper {
    height: 100vh;
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    background-color: var(--bg-app);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Sidebar */
.sidebar {
    width: 420px;
    min-width: 320px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background-color: var(--sidebar-bg);
    height: 100%;
}

.sidebar-header {
    background-color: var(--header-bg);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    height: 64px;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.avatar-img-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.user-info-text {
    overflow: hidden;
}

.user-display-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-username-badge {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    position: relative;
    font-size: 1.15rem;
}

.icon-btn:hover {
    background-color: var(--hover-bg);
    color: var(--primary);
}

.badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--badge-unread);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
}

/* Tabs */
.sidebar-tabs {
    display: flex;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Search Bar */
.search-container {
    padding: 10px 14px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border);
}

.search-input-wrapper {
    position: relative;
    background-color: var(--hover-bg);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.search-input-wrapper:focus-within {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

.search-input-wrapper input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 0.9rem;
    outline: none;
    color: var(--text-main);
}

.search-clear-btn {
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin-left: 6px;
    line-height: 1;
}

.search-clear-btn:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.08);
}

.search-section-divider {
    padding: 8px 16px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color, #0088cc);
    background: rgba(0, 136, 204, 0.06);
    border-bottom: 1px solid var(--border);
    margin-top: 4px;
}

/* Lists */
.sidebar-content-area {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.15s;
    position: relative;
}

.contact-item:hover {
    background-color: var(--hover-bg);
}

.contact-item.active {
    background-color: #e0f2fe;
    border-left: 4px solid var(--primary);
}

.contact-avatar-box {
    position: relative;
    margin-right: 14px;
    flex-shrink: 0;
}

.contact-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 13px;
    height: 13px;
    background-color: var(--success);
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.contact-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.contact-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 8px;
}

.unread-pill {
    background: var(--primary);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 2px 7px;
    min-width: 18px;
    text-align: center;
}

/* ==========================================================
   Right Chat Pane
   ========================================================== */
.chat-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--chat-bg);
    position: relative;
    height: 100%;
}

/* Empty Placeholder */
.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #ffffff 0%, #e2e8f0 100%);
    text-align: center;
    padding: 30px;
}

.placeholder-art {
    font-size: 5rem;
    margin-bottom: 16px;
    animation: floatAnim 3s ease-in-out infinite;
}

@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.placeholder-desc {
    color: var(--text-muted);
    max-width: 480px;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Active Chat */
.active-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    height: 64px;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.chat-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.btn-back {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--primary);
    padding: 4px;
    cursor: pointer;
}

.chat-header-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.chat-header-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.chat-header-status.online {
    color: var(--primary);
    font-weight: 600;
}

/* Messages Area */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--chat-bg);
}

.message-bubble-wrapper {
    display: flex;
    width: 100%;
}

.message-bubble-wrapper.outgoing {
    justify-content: flex-end;
}

.message-bubble-wrapper.incoming {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 68%;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    position: relative;
    word-break: break-word;
    font-size: 0.94rem;
    line-height: 1.45;
}

.message-bubble.incoming {
    background-color: var(--bubble-in);
    color: var(--text-main);
    border-top-left-radius: 2px;
    border: 1px solid var(--border);
}

.message-bubble.outgoing {
    background: var(--bubble-out);
    color: var(--bubble-out-text);
    border-top-right-radius: 2px;
}

.message-bubble.deleted {
    font-style: italic;
    opacity: 0.85;
}

.message-meta {
    float: right;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
    margin-top: 4px;
    font-size: 0.72rem;
    opacity: 0.85;
    user-select: none;
}

.message-bubble.outgoing .message-meta {
    color: rgba(255, 255, 255, 0.9);
}

.message-edited-badge {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Premium Blue Ticks */
.message-ticks {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -1.5px;
}
.message-ticks.sent { color: var(--tick-sent); }
.message-ticks.delivered { color: var(--tick-delivered); }
.message-ticks.read { color: var(--tick-read); }

/* Voice Message Bubble Player */
.voice-bubble-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    padding: 6px 4px;
}

.voice-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.2s;
}

.message-bubble.incoming .voice-play-btn {
    background: #e0f2fe;
    color: var(--primary);
}

.voice-waveform-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.message-bubble.incoming .voice-waveform-track {
    background: #e2e8f0;
}

.voice-progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    border-radius: 3px;
}

.message-bubble.incoming .voice-progress-fill {
    background: var(--primary);
}

.voice-duration-label {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

/* Live Voice Recording Bar */
.voice-recording-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    background: #ffffff;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    animation: pulseBorder 1.5s infinite;
}

@keyframes pulseBorder {
    0%, 100% { border-color: var(--danger); }
    50% { border-color: rgba(239, 68, 68, 0.3); }
}

.recording-pulse-dot {
    width: 12px;
    height: 12px;
    background-color: var(--danger);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.recording-timer {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--danger);
    font-family: monospace;
}

/* Attachment Menu */
.attachment-popup {
    position: absolute;
    bottom: 70px;
    left: 16px;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 100;
    min-width: 180px;
}

.attachment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    transition: background 0.15s;
}

.attachment-option:hover {
    background-color: var(--hover-bg);
}

.attachment-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
}

.icon-camera { background: linear-gradient(135deg, #ec4899, #db2777); }
.icon-gallery { background: linear-gradient(135deg, #0284c7, #0369a1); }
.icon-document { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* Chat Input Bar */
.chat-footer {
    background-color: var(--header-bg);
    padding: 10px 16px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border);
    position: relative;
}

.chat-input-box {
    flex: 1;
    background-color: var(--hover-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-end;
    padding: 8px 14px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.chat-input-box:focus-within {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

.chat-textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.4;
    max-height: 120px;
    background: transparent;
    color: var(--text-main);
}

.btn-circle {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    border: none;
    transition: all 0.2s;
}

.btn-send {
    background: linear-gradient(135deg, #0088cc, #0077b6);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.btn-send:hover {
    background: linear-gradient(135deg, #0077b6, #005f8d);
}

.btn-mic {
    background-color: var(--hover-bg);
    color: var(--primary);
    font-size: 1.25rem;
}

.btn-mic:hover {
    background-color: #e0f2fe;
}

/* In-App Toast Banner */
.toast-banner {
    position: fixed;
    top: 16px;
    right: 16px;
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 12px 18px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    cursor: pointer;
    max-width: 360px;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.modal-header {
    background-color: #f8fafc;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    padding: 14px 22px;
    background-color: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border);
}

/* Public Profile Modal Styles */
.profile-modal-avatar-box {
    text-align: center;
    margin-bottom: 16px;
}

.profile-modal-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: var(--shadow-md);
}

.profile-modal-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
}

.profile-modal-username {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
}

.profile-bio-box {
    background: var(--hover-bg);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-main);
    margin-bottom: 16px;
}

.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.chip-pill {
    background: #e0f2fe;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.social-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--hover-bg);
    color: var(--text-main);
    transition: all 0.2s;
}

.social-link-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* QR Code Display */
.qr-modal-canvas-box {
    background: #ffffff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px auto;
    width: fit-content;
}

/* ==========================================================
   Ultra-Premium Zeo Chat QR ID Card Styles
   ========================================================== */
.zeo-qr-card {
    background: #ffffff !important;
    border-radius: 28px !important;
    width: 100% !important;
    max-width: 390px !important;
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 136, 204, 0.15) !important;
    overflow: hidden !important;
    position: relative !important;
    text-align: center !important;
    animation: zeoCardPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: none !important;
}

@keyframes zeoCardPopIn {
    0% { transform: scale(0.92) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.zeo-qr-header {
    background: linear-gradient(135deg, #0088cc 0%, #0072aa 50%, #005580 100%) !important;
    padding: 24px 20px 52px 20px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.zeo-qr-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.zeo-qr-brand-icon {
    font-size: 0.9rem !important;
}

.zeo-qr-brand-text {
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
}

.zeo-qr-close {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(8px) !important;
    transition: all 0.2s ease !important;
}

.zeo-qr-close:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.08) !important;
}

.zeo-qr-avatar-wrap {
    position: relative !important;
    width: 84px !important;
    height: 84px !important;
    margin: -42px auto 10px auto !important;
    z-index: 5 !important;
}

.zeo-qr-avatar {
    width: 84px !important;
    height: 84px !important;
    border-radius: 50% !important;
    border: 4px solid #ffffff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16) !important;
    object-fit: cover !important;
    background: #ffffff !important;
    display: block !important;
}

.zeo-qr-verified-check {
    position: absolute !important;
    bottom: 2px !important;
    right: 2px !important;
    width: 22px !important;
    height: 22px !important;
    background: #0088cc !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18) !important;
}

.zeo-qr-body {
    padding: 0 24px 26px 24px !important;
    background: #ffffff !important;
}

.zeo-qr-name {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
}

.zeo-qr-handle-badge {
    display: inline-flex !important;
    align-items: center !important;
    background: #e0f2fe !important;
    color: #0088cc !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    padding: 4px 14px !important;
    border-radius: 999px !important;
    border: 1px solid #bae6fd !important;
    margin-bottom: 8px !important;
}

.zeo-qr-subtitle {
    font-size: 0.82rem !important;
    color: #64748b !important;
    margin: 0 0 16px 0 !important;
    line-height: 1.4 !important;
}

.zeo-qr-frame {
    background: #f8fafc !important;
    border: 2px dashed #38bdf8 !important;
    border-radius: 22px !important;
    padding: 16px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    margin-bottom: 16px !important;
}

.zeo-qr-canvas-holder {
    background: #ffffff !important;
    padding: 8px !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.zeo-qr-canvas-holder canvas {
    display: block !important;
    border-radius: 8px !important;
    width: 190px !important;
    height: 190px !important;
}

.zeo-qr-scan-hint {
    margin-top: 8px !important;
    font-size: 0.72rem !important;
    color: #0284c7 !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.zeo-qr-link-box {
    display: flex !important;
    align-items: center !important;
    background: #f1f5f9 !important;
    border-radius: 12px !important;
    padding: 4px 6px !important;
    border: 1px solid #cbd5e1 !important;
    margin-bottom: 14px !important;
    transition: border-color 0.2s ease !important;
}

.zeo-qr-link-box:focus-within {
    border-color: #0088cc !important;
    background: #ffffff !important;
}

.zeo-qr-link-icon {
    font-size: 0.88rem !important;
    padding: 0 6px !important;
    color: #64748b !important;
}

.zeo-qr-input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    padding: 7px 4px !important;
    font-size: 0.82rem !important;
    color: #334155 !important;
    font-weight: 500 !important;
    outline: none !important;
    min-width: 0 !important;
    text-overflow: ellipsis !important;
}

.zeo-qr-copy-btn {
    background: #0088cc !important;
    color: #ffffff !important;
    border: none !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
}

.zeo-qr-copy-btn:hover {
    background: #0077b5 !important;
}

.zeo-qr-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

.zeo-btn-download-badge {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3) !important;
    transition: all 0.2s ease !important;
}

.zeo-btn-download-badge:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(0, 136, 204, 0.4) !important;
}

.zeo-btn-share-badge {
    background: #f0f9ff !important;
    color: #0088cc !important;
    border: 1px solid #bae6fd !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
}

.zeo-btn-share-badge:hover {
    background: #e0f2fe !important;
    border-color: #7dd3fc !important;
}

/* Sidebar Header with Left Settings Button */
.sidebar-header {
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.header-left-zone {
    display: flex !important;
    align-items: center !important;
}

.settings-trigger-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    background: #e0f2fe !important;
    color: #0088cc !important;
    border: 1px solid #bae6fd !important;
    border-radius: 999px !important;
    padding: 7px 15px !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 136, 204, 0.08) !important;
}

.settings-trigger-btn:hover {
    background: #0088cc !important;
    color: #ffffff !important;
    border-color: #0088cc !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(0, 136, 204, 0.25) !important;
}

.dark-theme .settings-trigger-btn {
    background: #1e293b !important;
    color: #38bdf8 !important;
    border-color: #334155 !important;
}

.dark-theme .settings-trigger-btn:hover {
    background: #0088cc !important;
    color: #ffffff !important;
}

.settings-gear-icon {
    font-size: 1.05rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.settings-trigger-btn:hover .settings-gear-icon {
    transform: rotate(45deg);
}

.user-profile-summary {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    transition: background 0.2s ease !important;
}

.user-profile-summary:hover {
    background: var(--hover-bg) !important;
}

.avatar-header-wrap {
    position: relative !important;
    flex-shrink: 0 !important;
}

.avatar-online-dot {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 10px !important;
    height: 10px !important;
    background: #22c55e !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
}

/* Settings Modal Custom Styles */
.zeo-settings-card {
    max-width: 540px !important;
    max-height: 90vh !important;
    border-radius: 24px !important;
    overflow-y: auto !important;
    background: #ffffff !important;
}

.zeo-settings-header {
    background: #f8fafc !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 16px 22px !important;
}

.dark-theme .zeo-settings-header {
    background: #1e293b !important;
}

.zeo-settings-body {
    padding: 22px !important;
}

.settings-profile-banner {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
    background: #f8fafc !important;
    border-radius: 18px !important;
    padding: 16px 20px !important;
    border: 1px solid var(--border) !important;
    margin-bottom: 16px !important;
}

.dark-theme .settings-profile-banner {
    background: #1e293b !important;
}

.avatar-uploader-wrap {
    position: relative !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.settings-avatar-img {
    width: 74px !important;
    height: 74px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #0088cc !important;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.15) !important;
    background: #ffffff !important;
    display: block !important;
}

.settings-avatar-cam-badge {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 26px !important;
    height: 26px !important;
    background: #0088cc !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}

.settings-quick-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
}

.settings-quick-btn {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
}

.dark-theme .settings-quick-btn {
    background: #1e293b !important;
}

.settings-quick-btn:hover {
    border-color: #0088cc !important;
    background: #f0f9ff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.08) !important;
}

.dark-theme .settings-quick-btn:hover {
    background: #0f172a !important;
}

.settings-section {
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 18px !important;
    padding: 18px !important;
    margin-bottom: 16px !important;
}

.dark-theme .settings-section {
    background: #1e293b !important;
}

.settings-section-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin: 0 0 14px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid var(--border) !important;
}

/* Camera Live Viewfinder */
.camera-video-preview {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: #000000;
}

.hidden {
    display: none !important;
}

/* ==========================================================
   Mobile Responsive Rules
   ========================================================== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        border-right: none;
    }

    .app-wrapper.in-chat .sidebar {
        display: none;
    }

    .app-wrapper:not(.in-chat) .chat-pane {
        display: none;
    }

    .btn-back {
        display: block;
    }

    .message-bubble {
        max-width: 84%;
    }
}
