/* ============================================================
   NOBLIX AI — Premium Dark Theme
   ============================================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a27;
    --bg-hover: #22222f;
    --bg-card: #16161f;
    --text-primary: #e8e8ed;
    --text-secondary: #9494a8;
    --text-muted: #5c5c72;
    --accent: #0078D4;
    --accent-light: #00BCF2;
    --accent-glow: rgba(0, 120, 212, 0.15);
    --success: #00cec9;
    --warning: #fdcb6e;
    --danger: #ff7675;
    --border: #2a2a3a;
    --border-light: #1e1e2e;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --font: 'DM Sans', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --sidebar-w: 280px;
    --panel-w: 340px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* ---- SCREENS ---- */
.screen { display: none; height: 100vh; }
.screen.active { display: flex; }

/* ===== FUTURISTIC LOGIN ===== */
.login-container {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; position: relative; overflow: hidden;
    background: #05060f;
}

/* Animated background */
.login-bg {
    position: absolute; inset: 0; overflow: hidden;
}
.grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,120,212,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,120,212,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.glow-orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    animation: orbFloat 15s ease-in-out infinite;
}
.orb-1 {
    width: 400px; height: 400px; top: -100px; left: -100px;
    background: radial-gradient(circle, rgba(0,120,212,0.35), transparent 70%);
    animation-delay: 0s;
}
.orb-2 {
    width: 350px; height: 350px; bottom: -80px; right: -80px;
    background: radial-gradient(circle, rgba(0,188,242,0.28), transparent 70%);
    animation-delay: -5s;
}
.orb-3 {
    width: 300px; height: 300px; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0,120,212,0.15), transparent 70%);
    animation-delay: -10s;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(20px, 20px) scale(1.02); }
}

.particles {
    position: absolute; inset: 0; overflow: hidden;
}

/* Login Card - Glass morphism */
.login-card {
    position: relative; z-index: 2;
    width: 420px; max-width: 90vw;
    padding: 48px 40px 36px;
    background: rgba(15, 17, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 188, 242, 0.15);
    border-radius: 24px;
    box-shadow:
        0 0 40px rgba(0, 120, 212, 0.08),
        0 25px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
    animation: cardAppear 0.8s ease-out;
}
@keyframes cardAppear {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: none; }
}

.login-logo-wrap {
    margin-bottom: 20px;
}
.login-brand-logo {
    height: 56px; width: auto;
    filter: drop-shadow(0 0 20px rgba(0, 188, 242, 0.35));
}

.login-title {
    font-size: 32px; font-weight: 800; color: #fff;
    letter-spacing: 3px; margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(0, 120, 212, 0.3);
}
.ai-glow {
    background: linear-gradient(135deg, #0078D4, #00BCF2, #38bdf8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: aiGlowPulse 3s ease-in-out infinite;
}
@keyframes aiGlowPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.login-subtitle {
    color: #64748b; font-size: 14px; margin-bottom: 32px;
    letter-spacing: 1px; text-transform: uppercase;
}

/* Error message */
.login-error {
    display: none; color: #f87171; font-size: 13px;
    margin-bottom: 16px; padding: 10px 14px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 10px; text-align: left;
}
.login-error.show { display: block; }

/* Form */
.login-form {
    display: flex; flex-direction: column; gap: 14px;
}

.input-group {
    position: relative; display: flex; align-items: center;
}
.input-icon {
    position: absolute; left: 16px; color: #4a5568;
    display: flex; align-items: center; pointer-events: none;
    transition: color 0.2s;
}
.input-group input {
    width: 100%; padding: 14px 16px 14px 48px;
    background: rgba(15, 17, 30, 0.6);
    border: 1px solid rgba(0, 188, 242, 0.12);
    border-radius: 12px; color: #e2e8f0;
    font-size: 14px; font-family: var(--font);
    outline: none; transition: all 0.3s;
}
.input-group input:focus {
    border-color: rgba(0, 188, 242, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1), 0 0 20px rgba(0, 188, 242, 0.08);
    background: rgba(15, 17, 30, 0.8);
}
.input-group input:focus + .input-icon,
.input-group:focus-within .input-icon { color: #00BCF2; }
.input-group input::placeholder { color: #3a3f55; }

/* Submit button */
.login-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 15px;
    background: linear-gradient(135deg, #0078D4, #00BCF2);
    color: white; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 600; font-family: var(--font);
    cursor: pointer; transition: all 0.3s;
    position: relative; overflow: hidden;
    margin-top: 4px;
}
.login-submit::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}
.login-submit:hover::before { transform: translateX(100%); }
.login-submit:hover {
    box-shadow: 0 0 30px rgba(0, 188, 242, 0.4), 0 8px 25px rgba(0, 120, 212, 0.3);
    transform: translateY(-1px);
}
.login-submit:active { transform: translateY(0); }
.login-submit:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none;
    box-shadow: none;
}

.forgot-link {
    background: none; border: none; color: #4a5568;
    font-size: 12px; cursor: pointer; margin-top: 16px;
    font-family: var(--font); transition: color 0.2s;
}
.forgot-link:hover { color: #00BCF2; }

.login-footer-links {
    margin-top: 24px; padding-top: 20px;
    border-top: 1px solid rgba(0, 188, 242, 0.08);
    display: flex; justify-content: center; gap: 8px;
    font-size: 11px;
}
.login-footer-links a { color: #4a5568; text-decoration: none; transition: color 0.2s; }
.login-footer-links a:hover { color: #00BCF2; }
.login-footer-links span { color: #2a2d3a; }

/* ---- SIDEBAR ---- */
#sidebar {
    width: var(--sidebar-w); height: 100vh; display: flex; flex-direction: column;
    background: var(--bg-secondary); border-right: 1px solid var(--border);
    flex-shrink: 0; transition: var(--transition);
}
.sidebar-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 16px 12px; border-bottom: 1px solid var(--border-light);
}
.sidebar-logo { width: 32px; height: 32px; display: block; filter: drop-shadow(0 0 8px rgba(0, 188, 242, 0.4)); }
.sidebar-title { font-weight: 600; font-size: 15px; flex: 1; }
.sidebar-search { padding: 12px 16px; }
.sidebar-search input {
    width: 100%; padding: 8px 12px; border-radius: var(--radius-sm);
    background: var(--bg-tertiary); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 13px; outline: none;
    transition: var(--transition);
}
.sidebar-search input:focus { border-color: var(--accent); }
.sidebar-conversations {
    flex: 1; overflow-y: auto; padding: 4px 8px;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.conv-item {
    padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 13px; color: var(--text-secondary); transition: var(--transition);
    display: flex; align-items: center; gap: 8px; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.conv-item.active { background: var(--accent-glow); color: var(--accent-light); }
.conv-item .conv-icon { opacity: 0.5; font-size: 14px; flex-shrink: 0; }
.conv-item .conv-title { overflow: hidden; text-overflow: ellipsis; }
.conv-item .conv-delete {
    margin-left: auto; opacity: 0; font-size: 12px; padding: 2px 6px;
    border-radius: 4px; border: none; background: transparent; color: var(--danger);
    cursor: pointer; flex-shrink: 0;
}
.conv-item:hover .conv-delete { opacity: 0.6; }
.conv-item .conv-delete:hover { opacity: 1; background: rgba(255,118,117,0.1); }

.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border-light); }
.user-info {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; margin-bottom: 8px;
}
.user-avatar { width: 32px; height: 32px; border-radius: 50%; }
#user-name { font-size: 13px; font-weight: 500; }
.sidebar-nav { display: flex; gap: 4px; }
.nav-btn {
    flex: 1; padding: 8px; border: none; border-radius: var(--radius-sm);
    background: var(--bg-tertiary); cursor: pointer; font-size: 16px;
    transition: var(--transition);
}
.nav-btn:hover { background: var(--bg-hover); transform: scale(1.05); }

/* ---- CHAT AREA ---- */
#chat-area {
    flex: 1; display: flex; flex-direction: column;
    height: 100vh; min-width: 0;
}
/* ===== WELCOME SCREEN ===== */
.chat-welcome {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.welcome-content {
    text-align: center; max-width: 680px; width: 100%;
    animation: welcomeFadeIn 0.6s ease-out;
}
@keyframes welcomeFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: none; }
}
.welcome-logo-wrap { margin-bottom: 24px; }
.welcome-logo {
    width: 64px; height: 64px;
    filter: drop-shadow(0 0 30px rgba(0, 120, 212, 0.4));
    animation: welcomeLogoPulse 4s ease-in-out infinite;
}
@keyframes welcomeLogoPulse {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(0, 120, 212, 0.4)); }
    50% { filter: drop-shadow(0 0 45px rgba(0, 188, 242, 0.6)); }
}
.welcome-title {
    font-size: 28px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 8px; letter-spacing: -0.3px;
}
.welcome-sub {
    color: var(--text-secondary); font-size: 16px; margin-bottom: 36px;
}

.welcome-cards {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-bottom: 32px; text-align: left;
}
@media (max-width: 600px) { .welcome-cards { grid-template-columns: 1fr; } }

.welcome-card {
    display: flex; align-items: start; gap: 14px;
    padding: 18px; border-radius: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    cursor: pointer; transition: all 0.25s;
}
.welcome-card:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.welcome-card-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.welcome-card-text strong {
    display: block; font-size: 14px; font-weight: 600;
    color: var(--text-primary); margin-bottom: 3px;
}
.welcome-card-text span {
    font-size: 12px; color: var(--text-muted); line-height: 1.4;
}

.welcome-model-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 20px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    font-size: 11px; color: var(--text-muted);
    font-family: var(--mono); letter-spacing: 0.3px;
}
.model-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* ===== MESSAGES — TIER 1 DESIGN ===== */
.messages-container {
    flex: 1; overflow-y: auto; padding: 24px 15%;
    scroll-behavior: smooth;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
@media (max-width: 1200px) { .messages-container { padding: 24px 8%; } }
@media (max-width: 768px) { .messages-container { padding: 16px; } }

.message {
    margin-bottom: 28px; animation: msgSlideIn 0.3s ease-out;
    position: relative;
}
@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.message .msg-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.message .msg-role {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.message.user .msg-role { color: var(--accent-light); }
.message.assistant .msg-role { color: #22c55e; }
.message .msg-time { font-size: 10px; color: var(--text-muted); }

.message .msg-body {
    font-size: 14.5px; line-height: 1.8; color: var(--text-primary);
    position: relative;
}
.message.user .msg-body {
    background: rgba(0, 120, 212, 0.08);
    border: 1px solid rgba(0, 120, 212, 0.15);
    padding: 14px 18px; border-radius: 18px 18px 4px 18px;
}
.message.assistant .msg-body { padding: 4px 0; }

.message .msg-actions {
    position: absolute; top: 0; right: 0;
    opacity: 0; transition: opacity 0.2s;
    display: flex; gap: 4px;
}
.message:hover .msg-actions { opacity: 1; }
.msg-copy-btn {
    padding: 4px 8px; border-radius: 6px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    color: var(--text-muted); cursor: pointer; font-size: 11px;
    transition: all 0.2s; font-family: var(--font);
}
.msg-copy-btn:hover { color: var(--text-primary); border-color: var(--accent); }

.message .msg-body pre {
    background: #0d1117; border: 1px solid #21262d;
    border-radius: 10px; padding: 16px; margin: 12px 0;
    overflow-x: auto; font-family: var(--mono); font-size: 13px;
    line-height: 1.5; position: relative;
}
.message .msg-body code {
    font-family: var(--mono); font-size: 13px;
    background: rgba(0, 120, 212, 0.1); padding: 2px 6px;
    border-radius: 4px; color: var(--accent-light);
}
.message .msg-body pre code {
    background: none; padding: 0; color: #e6edf3;
}

.message .msg-body ul, .message .msg-body ol {
    margin: 8px 0; padding-left: 20px;
}
.message .msg-body li { margin-bottom: 4px; }
.message .msg-body p { margin-bottom: 10px; }
.message .msg-body p:last-child { margin-bottom: 0; }
.message .msg-model {
    font-size: 11px; color: var(--text-muted); margin-top: 6px;
    font-family: var(--mono);
}

/* ===== INPUT AREA — PREMIUM ===== */
.chat-input-area {
    padding: 16px 15%; background: transparent;
    border-top: none;
}
@media (max-width: 1200px) { .chat-input-area { padding: 16px 8%; } }
@media (max-width: 768px) { .chat-input-area { padding: 12px; } }

.input-wrapper {
    display: flex; align-items: flex-end; gap: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px; padding: 6px 8px 6px 6px;
    transition: all 0.3s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.input-attach-wrap { position: relative; }
.input-attach-btn {
    width: 38px; height: 38px; border-radius: 10px;
    background: transparent; border: none;
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.input-attach-btn:hover { color: var(--accent-light); background: var(--accent-glow); }

.attach-menu {
    position: absolute; bottom: 100%; left: 0;
    margin-bottom: 8px; min-width: 200px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all 0.2s;
    z-index: 100;
}
.attach-menu.show {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.attach-menu-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; cursor: pointer;
    color: var(--text-secondary); font-size: 13px;
    transition: all 0.15s; border: none; background: none;
    width: 100%; text-align: left; font-family: var(--font);
}
.attach-menu-item:hover {
    background: var(--accent-glow); color: var(--text-primary);
}
.attach-menu-item svg { flex-shrink: 0; color: var(--text-muted); }
.attach-menu-item:hover svg { color: var(--accent-light); }

#chat-input {
    flex: 1; background: none; border: none; color: var(--text-primary);
    font-size: 14.5px; font-family: var(--font); resize: none;
    max-height: 150px; outline: none; line-height: 1.5;
    padding: 8px 8px 8px 4px; min-height: 24px;
}
#chat-input::placeholder { color: var(--text-muted); }

.btn-send {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: white; transition: all 0.2s; flex-shrink: 0;
}
.btn-send:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-send:not(:disabled):hover {
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.4);
    transform: scale(1.05);
}

.input-footer {
    display: flex; justify-content: center; align-items: center;
    padding: 8px 4px 4px; font-size: 11px; color: var(--text-muted);
    gap: 8px;
}
.typing-indicator { color: var(--accent-light); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== CONVERSATION LIST DATES ===== */
.conv-item .conv-date {
    font-size: 10px; color: var(--text-muted);
    margin-left: auto; flex-shrink: 0; padding-left: 8px;
}
.conv-item:hover .conv-date { display: none; }
.typing-indicator { color: var(--accent-light); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---- SIDE PANEL ---- */
.side-panel {
    width: var(--panel-w); height: 100vh; flex-shrink: 0;
    background: var(--bg-secondary); border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
    animation: slideIn 0.2s ease-out;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }
.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.panel-header h3 { font-size: 16px; font-weight: 600; }
.panel-content { flex: 1; overflow-y: auto; padding: 16px 20px; }

/* ---- MEMORY PANEL ---- */
.memory-category { margin-bottom: 20px; }
.memory-category h4 {
    font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); margin-bottom: 8px; padding-bottom: 4px;
    border-bottom: 1px solid var(--border-light);
}
.memory-item {
    display: flex; align-items: start; gap: 8px; padding: 8px;
    border-radius: var(--radius-sm); font-size: 13px;
    transition: var(--transition);
}
.memory-item:hover { background: var(--bg-hover); }
.memory-key { color: var(--accent-light); font-weight: 500; min-width: 80px; }
.memory-value { color: var(--text-secondary); flex: 1; }
.memory-actions { display: flex; gap: 4px; opacity: 0; transition: var(--transition); }
.memory-item:hover .memory-actions { opacity: 1; }
.memory-actions button {
    background: none; border: none; cursor: pointer; font-size: 12px;
    padding: 2px 4px; border-radius: 4px;
}
.memory-actions button:hover { background: var(--bg-tertiary); }

/* ---- BUTTONS ---- */
.btn-icon {
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    background: var(--bg-tertiary); border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ---- UTILITY ---- */
.hidden { display: none !important; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.login-links{margin-top:16px;font-size:12px}.login-links a{color:var(--text-muted);text-decoration:none;transition:var(--transition)}.login-links a:hover{color:var(--accent-light)}

/* ===== RESPONSIVE / MOBILE ===== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed; left: -280px; top: 0; bottom: 0; z-index: 1000;
        width: 280px; transition: left 0.3s ease;
    }
    .sidebar.open { left: 0; }
    .sidebar-overlay {
        display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
        z-index: 999;
    }
    .sidebar-overlay.active { display: block; }
    .main-content { margin-left: 0 !important; width: 100% !important; }
    .mobile-header {
        display: flex !important; align-items: center; gap: 12px;
        padding: 12px 16px; background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    }
    .mobile-menu-btn {
        background: none; border: none; color: var(--text-primary); font-size: 24px;
        cursor: pointer; padding: 4px; line-height: 1;
    }
    .mobile-header-title { font-size: 16px; font-weight: 600; }
    .welcome-actions { flex-wrap: wrap; gap: 8px; justify-content: center; }
    .welcome-actions button { font-size: 12px; padding: 8px 14px; }
    .welcome h2 { font-size: 22px; }
    .msg-content { max-width: 90%; }
    .chat-input-wrapper { padding: 0 8px; }
    .chat-input-area { padding: 12px 8px; }
    .chat-input-area textarea { font-size: 16px; } /* prevents iOS zoom */
    .quick-actions { flex-wrap: wrap; gap: 6px; }
    .bottom-bar { padding: 8px 12px; }
    .user-info span { font-size: 12px; }
    .user-info img { width: 28px; height: 28px; }
    /* Memory & Tasks panels */
    .memory-panel, .tasks-panel, .settings-panel {
        position: fixed; inset: 0; z-index: 1001; width: 100% !important;
        max-width: 100% !important; border-radius: 0 !important;
    }
}

@media (max-width: 480px) {
    .welcome h2 { font-size: 18px; }
    .welcome p { font-size: 13px; }
    .welcome-actions button { font-size: 11px; padding: 6px 10px; }
    .msg { padding: 6px 12px; }
    .login-card { padding: 32px 20px; }
    .login-title { font-size: 24px; letter-spacing: 2px; }
}

@media (min-width: 769px) {
    .mobile-header { display: none !important; }
    .sidebar-overlay { display: none !important; }
}

/* ===== LOGIN DIVIDER (legacy, retained) ===== */
.login-divider {
    display: flex; align-items: center; gap: 12px; margin: 16px 0; width: 100%;
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-divider span { color: var(--text-muted); font-size: 12px; text-transform: uppercase; }

/* ===== GOOGLE CONNECT BANNER (in profile/settings) ===== */
.google-connect-banner {
    background: linear-gradient(135deg, rgba(0,120,212,0.1), rgba(0,120,212,0.05));
    border: 1px solid var(--accent); border-radius: 12px; padding: 16px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 12px;
}
.google-connect-banner .icon { font-size: 24px; }
.google-connect-banner .text { flex: 1; }
.google-connect-banner .text h4 { font-size: 14px; margin-bottom: 2px; }
.google-connect-banner .text p { font-size: 12px; color: var(--text-muted); }
.google-connect-btn {
    padding: 8px 16px; background: white; color: #333; border: 1px solid #ddd;
    border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 6px; font-family: inherit;
}
.google-connect-btn:hover { background: #f5f5f5; }
.google-connect-btn img { width: 16px; height: 16px; }

/* Fix Google button */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; background: white; border: 1px solid #ddd; border-radius: 10px; font-size: 15px; font-weight: 500; color: #333; cursor: pointer; font-family: inherit; transition: var(--transition); }
.google-btn:hover { background: #f5f5f5; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.google-btn img { width: 20px; height: 20px; object-fit: contain; }

/* Avatar click-to-upload */
.user-avatar { cursor: pointer; transition: var(--transition); object-fit: cover; }
.user-avatar:hover { opacity: 0.7; box-shadow: 0 0 0 2px var(--accent); }
