:root {
    --bg-main: #0B0E14;
    --bg-secondary: #151A23;
    --accent-primary: #00F0FF;
    --accent-secondary: #7000FF;
    --text-primary: #FFFFFF;
    --text-secondary: #8B949E;
    --text-muted: #57606A;
    --glass-bg: rgba(21, 26, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --danger: #FF4D4D;
    --success: #00E676;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.08) 0%, transparent 50%);
}

#app {
    width: 100%;
    height: 100vh;
    position: relative;
}

.view {
    display: none;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.4s ease-out forwards;
}

.view.active {
    display: flex;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* --- LANDING PAGE VIEW --- */
.landing-page {
    flex-direction: column;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at 0% 50%, rgba(0, 240, 255, 0.12) 0%, transparent 40%),
                var(--bg-main);
    overflow-y: auto;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    width: 100%;
    z-index: 10;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.landing-logo .logo-small {
    width: 32px;
    height: 32px;
}

.landing-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 80px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: slideInLeft 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.badge {
    align-self: flex-start;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.hero-text h1 {
    font-size: 48px;
    line-height: 1.15;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-text h1 .highlight {
    background: linear-gradient(90deg, #FFFFFF, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-login-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    backdrop-filter: blur(12px);
}

.hero-subtext {
    font-size: 14px !important;
    color: var(--text-muted) !important;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    background: var(--glass-bg);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
}

.auth-tab:not(.active):hover {
    color: var(--text-primary);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 600px;
    perspective: 1200px;
    animation: slideInRight 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mockup-phone {
    position: absolute;
    width: 260px;
    height: 540px;
    background: #000;
    border-radius: 36px;
    border: 8px solid #222;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), z-index 0s;
}

.phone-portfolio {
    left: 50%;
    margin-left: -180px;
    top: 50px;
    transform: rotateY(15deg) rotateX(5deg) rotateZ(-5deg);
    z-index: 1;
    box-shadow: -20px 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(0, 240, 255, 0.15);
}

.phone-chat {
    left: 50%;
    margin-left: -40px;
    top: 0px;
    transform: rotateY(-15deg) rotateX(5deg) rotateZ(5deg);
    z-index: 2;
    box-shadow: 20px 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(112, 0, 255, 0.2);
}

.phone-portfolio:hover {
    transform: rotateY(0) rotateX(0) rotateZ(0) translateZ(40px);
    z-index: 3;
}

.phone-chat:hover {
    transform: rotateY(0) rotateX(0) rotateZ(0) translateZ(40px);
    z-index: 3;
}

.mockup-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #111, #151A23);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    border-radius: 28px;
}

.mockup-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

.mockup-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 30px solid #222;
    border-top-color: var(--accent-primary);
    border-right-color: var(--success);
    border-bottom-color: var(--accent-secondary);
    animation: spin 8s linear infinite;
}

.mockup-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.m-stat {
    height: 40px;
    width: 100%;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.m-stat::after {
    content: '';
    position: absolute;
    top: 0; left: 0; height: 100%;
    width: 60%;
    background: var(--accent-primary);
    opacity: 0.5;
}

.m-stat:nth-child(2)::after { width: 40%; background: var(--success); }
.m-stat:nth-child(3)::after { width: 80%; background: var(--accent-secondary); }

.floating-badge {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.ai-badge-float {
    bottom: 80px;
    left: -30px;
    animation: float 4s ease-in-out infinite;
    z-index: 4;
}

.ai-badge-float i { color: var(--accent-primary); }

.chart-badge-float {
    bottom: 150px;
    right: -30px;
    animation: float 5s ease-in-out infinite reverse;
    z-index: 4;
}

.chart-badge-float i { color: var(--success); }

/* Chat Mockup Styles */
.mockup-inner-chat {
    padding: 0;
    background: #0B0E14;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 28px;
    width: 100%;
    height: 100%;
}

.m-chat-header {
    background: var(--glass-bg);
    padding: 24px 16px 16px;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #fff;
}

.m-chat-header i {
    color: var(--accent-secondary);
    font-size: 20px;
}

.m-chat-messages {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.m-chat-msg {
    max-width: 85%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #fff;
}

.m-chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent-secondary), #9D4EDD);
    border-bottom-right-radius: 4px;
}

.m-chat-msg.ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-top-left-radius: 4px;
}

.typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    margin-right: 4px;
    animation: typing 1s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; margin-right: 0; }

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

.m-chat-input {
    padding: 16px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    background: var(--bg-main);
}

.m-input-box {
    flex: 1;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.m-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

/* CTA Box */
.hero-cta-box {
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 420px;
}

.cta-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.cta-price .value {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
}

.cta-price .period {
    color: var(--text-secondary);
    font-size: 16px;
}

.cta-benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cta-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 15px;
}

.cta-benefits li i {
    color: var(--success);
    font-size: 18px;
}

.btn-hero-subscribe {
    text-decoration: none;
    font-size: 18px;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-secondary), #9D4EDD);
    border-radius: var(--radius-md);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-hero-subscribe:hover {
    box-shadow: 0 8px 25px rgba(112, 0, 255, 0.4);
    transform: translateY(-2px);
}

.cta-secure {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.landing-features {
    display: flex;
    justify-content: space-around;
    padding: 30px 80px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
}

.feature {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.feature:hover {
    color: var(--text-primary);
}

.feature i {
    font-size: 32px;
    color: var(--accent-primary);
}

.btn-glow {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
.btn-glow:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1000px) {
    .landing-content {
        flex-direction: column;
        padding: 40px;
        gap: 60px;
        text-align: center;
    }
    .badge { align-self: center; }
    .hero-visual { display: none; }
    .landing-features { flex-wrap: wrap; gap: 20px; }
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 20px;
}

input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 16px 14px 48px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.1);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary), #00A3FF);
    color: #000;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.3);
}

.btn-primary i {
    font-size: 20px;
}

/* --- DASHBOARD VIEW --- */
#dashboard-view {
    display: none;
    flex-direction: row;
    padding: 20px;
    gap: 20px;
    height: 100vh;
}

#dashboard-view.active {
    display: flex;
}

.sidebar {
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0 8px;
}

.logo-small {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.nav-item i {
    font-size: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--danger);
    background: rgba(255, 77, 77, 0.1);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.tab-content {
    display: none;
    flex-direction: column;
    height: 100%;
}

.tab-content.active {
    display: flex;
    animation: fadeIn 0.3s ease-out forwards;
}

/* --- CHAT TAB --- */
.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.chat-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header i {
    color: var(--accent-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
}

.message.ai {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message.ai .avatar {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
}

.message.user .avatar {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.message .bubble {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.6;
    max-width: 100%;
    word-break: break-word;
}

.message.ai .bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-top-left-radius: 4px;
}

.message.user .bubble {
    background: var(--accent-secondary);
    color: #fff;
    border-top-right-radius: 4px;
}

/* --- MARKDOWN INSIDE BUBBLE --- */
.bubble p { margin: 0 0 10px; }
.bubble p:last-child { margin-bottom: 0; }

.bubble h2, .bubble h3, .bubble h4 {
    font-weight: 600;
    margin: 14px 0 6px;
    line-height: 1.3;
}
.bubble h2 { font-size: 17px; color: var(--accent-primary); }
.bubble h3 { font-size: 16px; }
.bubble h4 { font-size: 15px; color: var(--accent-primary); }

.bubble strong { font-weight: 700; color: var(--text-primary); }
.bubble em { font-style: italic; opacity: 0.88; }

.bubble ul, .bubble ol {
    padding-left: 20px;
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bubble li { line-height: 1.55; }

.bubble code {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.18);
    padding: 1px 6px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--accent-primary);
}

.bubble hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 12px 0;
}

/* --- SUGGESTION CHIPS (polls) --- */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    padding-left: 48px;
    align-self: flex-start;
    max-width: 80%;
    animation: fadeIn 0.3s ease-out;
}

.suggestion-chip {
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.28);
    color: var(--accent-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    line-height: 1.3;
}

.suggestion-chip:hover {
    background: rgba(0, 240, 255, 0.14);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 240, 255, 0.18);
}

.suggestion-chip:active {
    transform: translateY(0);
    background: rgba(0, 240, 255, 0.2);
}

.chat-input-area {
    padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
}

#chat-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 14px 20px;
}

.btn-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent-primary);
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-send i {
    font-size: 20px;
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

/* --- PORTFOLIO TAB --- */
.portfolio-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.portfolio-grid {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    overflow-y: auto;
}

.portfolio-grid h4 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.chart-container {
    padding: 20px;
    grid-column: 1 / 2;
}

.stats-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
}

.stat-value.positive {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-insight {
    grid-column: 1 / -1;
    padding: 20px;
    background: linear-gradient(to right, rgba(112, 0, 255, 0.1), rgba(0, 240, 255, 0.1));
    border-left: 4px solid var(--accent-primary);
}

.ai-insight h4 {
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-insight p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* --- SIDEBAR FOOTER --- */
.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon span {
    font-size: 13px;
}

/* --- ANIMATIONS --- */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseAvatar {
    0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 240, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

@keyframes staggerFade {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Chat enhancements */
.message {
    animation: slideUpFade 0.3s ease-out forwards;
}

.message.ai .avatar {
    animation: pulseAvatar 2s infinite;
}

/* Portfolio enhancements */
.stat-card {
    animation: staggerFade 0.4s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

.stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* --- LOGO IMPROVEMENTS --- */
.logo {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    object-fit: contain;
    box-shadow: 0 0 32px rgba(0, 136, 255, 0.25), 0 0 64px rgba(85, 0, 238, 0.15);
    transition: var(--transition);
}

.logo:hover {
    box-shadow: 0 0 40px rgba(0, 216, 255, 0.35), 0 0 80px rgba(85, 0, 238, 0.2);
    transform: scale(1.03);
}

/* --- LANDING PAGE ADDITIONS --- */

/* ---- SAVINGS COMPARISON ---- */
.landing-savings {
    padding: 70px 20px;
    display: flex;
    justify-content: center;
}

.savings-container {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.savings-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.savings-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.savings-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

.savings-comparison {
    display: flex;
    align-items: stretch;
}

.savings-col {
    flex: 1;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 20px;
}

.savings-col-pro {
    border: 1px solid rgba(255, 77, 77, 0.18) !important;
    background: rgba(255, 77, 77, 0.03) !important;
}

.savings-col-fund {
    border: 1px solid rgba(0, 230, 118, 0.22) !important;
    background: rgba(0, 230, 118, 0.03) !important;
}

.savings-col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.savings-col-header > i { font-size: 22px; color: var(--danger); }
.fund-header { color: var(--text-primary); }

.savings-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
}

.savings-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
    padding: 0;
    flex: 1;
}

.savings-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.savings-item-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.savings-item-name strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.savings-item-name span {
    font-size: 12px;
    color: var(--text-muted);
}

.savings-price {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.savings-price small {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}

.danger-price { color: var(--danger); }
.green-price { color: var(--success); }

.savings-total {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: auto;
}

.savings-total span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.savings-total strong { font-size: 20px; font-weight: 700; }
.danger-total { background: rgba(255, 77, 77, 0.07); }
.danger-total strong { color: var(--danger); }
.fund-total { background: rgba(0, 230, 118, 0.07); }
.fund-total strong { color: var(--success); }

.savings-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    flex-shrink: 0;
}

.savings-vs span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.savings-badge-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.savings-economy-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 16px;
    padding: 16px 24px;
    min-width: 190px;
}

.savings-economy-badge > i {
    font-size: 28px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.savings-economy-badge div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.savings-economy-badge span {
    font-size: 12px;
    color: var(--text-muted);
}

.savings-economy-badge strong {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .savings-comparison { flex-direction: column; gap: 0; }
    .savings-vs { padding: 12px 0; }
    .savings-col { padding: 20px 16px; }
    .savings-header h2 { font-size: 24px; }
    .savings-badge-row { flex-direction: column; align-items: stretch; }
    .savings-economy-badge { min-width: unset; }
}

.landing-ai-info {
    padding: 60px 20px;
    background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.05), transparent);
    display: flex;
    justify-content: center;
}

.ai-info-container {
    max-width: 800px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ai-info-container .ai-icon {
    font-size: 48px;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.ai-info-container h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.ai-info-container p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ai-info-container p strong {
    color: var(--text-primary);
}

.landing-testimonials {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.landing-testimonials h2 {
    font-size: 32px;
    margin-bottom: 40px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.testimonial-card {
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.testimonial-card .stars {
    color: #FADB14;
    font-size: 20px;
    display: flex;
    gap: 4px;
}

.testimonial-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
    flex: 1;
}

.testimonial-card .author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.landing-footer {
    padding: 60px 20px 40px;
    border-top: 1px solid var(--glass-border);
    background: #05070a;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-support {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-support h3 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.footer-support h3 i {
    color: var(--accent-primary);
}

.footer-support p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

.btn-support-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-support-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    background: #20BA56;
}

.btn-support-whatsapp i {
    font-size: 24px;
}

.support-number {
    font-size: 14px;
    color: var(--text-muted);
}

.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 90;
    text-decoration: none;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .ai-info-container { padding: 30px 20px; }
    .ai-info-container h2 { font-size: 24px; }
    .landing-testimonials h2 { font-size: 26px; }
    .floating-whatsapp { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 28px; }
}

/* --- MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-hint strong {
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn-primary {
    flex: 1;
}

/* Extra right padding for input with visibility toggle */
#api-key-input {
    padding-right: 48px;
}

/* Toggle key visibility inside input-group */
.input-group .toggle-key-visibility {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.input-group .toggle-key-visibility:hover {
    color: var(--text-primary);
}

/* --- TYPING DOTS ANIMATION --- */
.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0.4;
    animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* --- TOAST NOTIFICATIONS --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease-out;
    max-width: 320px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success { border-left: 3px solid var(--success); color: var(--success); }
.toast-error   { border-left: 3px solid var(--danger);  color: var(--danger); }
.toast-info    { border-left: 3px solid var(--accent-primary); color: var(--accent-primary); }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    body {
        overflow: auto;
        align-items: flex-start;
    }

    #dashboard-view {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        padding: 10px 14px;
        gap: 10px;
        min-height: auto;
        border-radius: var(--radius-md);
        align-items: center;
    }

    .sidebar-header {
        margin-bottom: 0;
        gap: 8px;
    }

    .sidebar-header h2 {
        font-size: 15px;
    }

    .sidebar-nav {
        flex-direction: row;
        flex: 1;
        justify-content: center;
        gap: 6px;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 13px;
    }

    .sidebar-footer {
        padding-top: 0;
        border-top: none;
        border-left: 1px solid var(--glass-border);
        padding-left: 10px;
        gap: 4px;
    }

    .sidebar-action span {
        display: none;
    }

    .main-content {
        border-radius: var(--radius-md);
        height: calc(100vh - 80px);
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .chart-container,
    .stats-container,
    .ai-insight {
        grid-column: 1 / -1;
    }

    .chat-header h3 {
        font-size: 15px;
    }

    .login-panel {
        margin: 16px;
        padding: 32px 20px;
    }

    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .nav-item span {
        display: none;
    }

    .message {
        max-width: 92%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

/* --- PORTFOLIO ACTIONS --- */
.portfolio-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-small {
    padding: 8px 14px !important;
    font-size: 14px !important;
    width: auto !important;
}

/* --- ASSETS LIST --- */
.assets-list-panel {
    grid-column: 1 / -1;
    padding: 20px;
}

.assets-list-header {
    margin-bottom: 16px;
}

.assets-list-header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

.assets-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.assets-list::-webkit-scrollbar { width: 6px; }
.assets-list::-webkit-scrollbar-track { background: transparent; }
.assets-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.asset-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-left: 3px solid transparent;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: var(--transition);
}

.asset-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(0, 240, 255, 0.15);
    border-left-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.asset-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.ticker-badge {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sector-tag {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
}

.asset-details {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.detail-price { color: var(--text-muted); font-size: 13px; }

.asset-total-val {
    color: var(--text-primary);
    font-weight: 600;
}

.remove-asset { color: var(--text-muted); flex-shrink: 0; }
.remove-asset:hover { color: var(--danger); background: rgba(255, 77, 77, 0.1); }

.empty-assets {
    text-align: center;
    padding: 36px 20px;
    color: var(--text-muted);
}

.empty-assets i { font-size: 44px; margin-bottom: 12px; display: block; opacity: 0.5; }
.empty-assets p { font-size: 14px; line-height: 1.6; }

/* --- ADD ASSET FORM --- */
.asset-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.input-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 16px 14px 48px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.input-group select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.1);
}

.input-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .asset-form-grid { grid-template-columns: 1fr; }
    .asset-details { gap: 10px; }
    .asset-left { min-width: unset; }
    .portfolio-actions { gap: 6px; }
    .btn-small { padding: 7px 10px !important; font-size: 13px !important; }
}

/* === PORTFOLIO SUB-TABS === */
.portfolio-subtabs {
    display: flex;
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.ptab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    margin-bottom: -1px;
    white-space: nowrap;
}

.ptab i { font-size: 16px; }

.ptab:hover { color: var(--text-primary); }

.ptab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.ptab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.ptab-content.active { display: block; }

/* === AI INSIGHT HEADER === */
.ai-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.insight-content {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
}

/* === P&L BADGES === */
.pnl-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.pnl-positive {
    color: var(--success);
    background: rgba(0, 230, 118, 0.08);
}

.pnl-negative {
    color: var(--danger);
    background: rgba(255, 77, 77, 0.08);
}

.stat-value.negative { color: var(--danger); }

/* === ASSET TYPE & LIVE PRICE BADGES === */
.type-badge {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.fixed-badge {
    background: rgba(250, 219, 20, 0.1) !important;
    color: #FADB14 !important;
    border-color: rgba(250, 219, 20, 0.2) !important;
}

.live-price {
    color: var(--success);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* === PRICE COMPARISON LAYOUT (variável assets) === */
.asset-ident {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 130px;
}

.qty-info {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.price-compare {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}

.pc-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pc-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pc-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.pc-arrow {
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.pc-up  { color: var(--success); }
.pc-down { color: var(--danger); }

.pc-result {
    gap: 4px;
}

.pc-result .pnl-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 13px;
    line-height: 1.3;
}

.pc-result .pnl-badge small {
    font-size: 11px;
    opacity: 0.85;
}

.asset-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.asset-actions .asset-total-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    margin-left: 0;
}

.btn-fetch-price {
    white-space: nowrap;
    font-size: 13px !important;
    padding: 7px 12px !important;
    width: auto !important;
}

@media (max-width: 768px) {
    .asset-ident { min-width: unset; }
    .price-compare { gap: 8px; }
    .pc-val { font-size: 13px; }
    .asset-actions { flex-wrap: wrap; gap: 4px; }
}

.pnl-pending {
    color: var(--text-muted) !important;
    background: rgba(255,255,255,0.03) !important;
    border: 1px dashed rgba(255,255,255,0.1);
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pnl-pending i { font-size: 11px; }

.pm-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
}

.pm-tag {
    font-size: 10px;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.cagr-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
}

.asset-name-label {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === ASSET CATEGORY TABS IN MODAL === */
.asset-category-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    padding: 6px;
    border-radius: var(--radius-md);
}

.asset-cat-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.asset-cat-tab:hover { color: var(--text-primary); }

.asset-cat-tab.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.asset-form-section { margin-top: 4px; }

/* Date input dark mode */
input[type="date"] {
    color-scheme: dark;
}

/* Range slider override (no left padding, no icon) */
input[type="range"].range-slider {
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    border: none !important;
    box-shadow: none !important;
}

input[type="range"].range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
    transition: box-shadow 0.2s;
}

input[type="range"].range-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
}

input[type="range"].range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: none;
}

/* === PLANNING CALCULATOR === */
.planning-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.planning-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.planning-form h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.planning-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: -8px;
}

.planning-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.planning-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.planning-input-group.full-width {
    grid-column: 1 / -1;
}

.planning-input-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.planning-input-group label strong {
    color: var(--accent-primary);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* === PLANNING RESULTS === */
.planning-result {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.planning-result h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.planning-result h4 i { color: var(--success); }

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.result-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.result-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.highlight-value { color: var(--accent-primary); }

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-pct { color: var(--accent-primary); font-weight: 700; }

.progress-bar-track {
    height: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: 4px;
}

.planning-note {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.planning-note i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

@media (max-width: 768px) {
    .planning-grid { grid-template-columns: 1fr; }
    .result-grid { grid-template-columns: 1fr; }
    .planning-container { padding: 16px; }
    .planning-form { padding: 16px; }
    .planning-result { padding: 16px; }
    .portfolio-subtabs { padding: 0 16px; }
    .ptab { padding: 12px 14px; font-size: 13px; }
    .ai-insight-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================================================
   GEMINI-STYLE DASHBOARD — sidebar + chat layout
   ============================================================ */

#dashboard-view {
    flex-direction: row !important;
    padding: 0 !important;
    gap: 0 !important;
    height: 100vh;
    overflow: hidden;
}

#dashboard-view.active {
    display: flex !important;
}

/* ---- SIDEBAR ---- */
.chat-sidebar {
    width: 240px;
    min-width: 240px;
    background: #0d1017;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-top {
    height: 60px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.hamburger-btn {
    font-size: 22px;
    color: var(--text-secondary);
}

.sidebar-menu {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    user-select: none;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.new-context-btn {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.2) !important;
    color: var(--accent-primary) !important;
    font-weight: 500;
}

.new-context-btn:hover {
    background: rgba(0, 240, 255, 0.10) !important;
}

.sidebar-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.sidebar-section > span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 0 8px 10px;
    font-weight: 600;
}

/* ---- AI MODE TOGGLE ---- */
.ai-mode-toggle {
    padding: 4px 2px 10px;
}

.mode-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0 4px 8px;
}

.mode-btns {
    display: flex;
    gap: 6px;
}

.mode-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.mode-btn.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.35);
    color: var(--accent-primary);
}

/* ---- SIDEBAR SUPPORT ---- */
.sidebar-support {
    flex-shrink: 0;
    margin: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(37, 211, 102, 0.06);
    border: 1px solid rgba(37, 211, 102, 0.18);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-support-icon {
    font-size: 20px;
    color: #25D366;
    flex-shrink: 0;
}

.sidebar-support-text {
    flex: 1;
    min-width: 0;
}

.sidebar-support-text strong {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.sidebar-support-text p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 0;
    line-height: 1.3;
}

.btn-sidebar-whatsapp {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-sidebar-whatsapp:hover {
    background: #20BA56;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
}

.context-files-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.context-file-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    border: 1px solid var(--glass-border);
    gap: 6px;
}

.context-file-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    color: var(--text-secondary);
}

/* ---- MAIN WRAPPER ---- */
.chat-main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* ---- TOPBAR ---- */
.app-topbar {
    height: 60px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    z-index: 10;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-support-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    text-decoration: none;
    flex-shrink: 0;
}

.btn-support-icon:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.topbar-logout {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-secondary);
}

.topbar-logout:hover {
    background: rgba(255, 77, 77, 0.1);
    color: var(--danger);
}

/* ---- CHAT MAIN AREA ---- */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
}

.chat-main .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 28px 16px 8px;
}

/* ---- CHAT INPUT CONTAINER ---- */
.chat-input-container {
    flex-shrink: 0;
    padding: 8px 16px 14px;
}

.gemini-input-area {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 6px 8px 6px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s, background 0.2s;
}

.gemini-input-area:focus-within {
    border-color: rgba(0, 240, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

.chat-input-area {
    flex-direction: column !important;
    gap: 6px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input-row #chat-input {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 8px 4px !important;
    font-size: 15px;
    box-shadow: none !important;
    outline: none;
}

.input-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 0 2px;
}

/* ---- ATTACH BUTTON ---- */
.btn-attach {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: var(--transition);
}

.btn-attach:hover {
    background: rgba(0, 240, 255, 0.08);
    color: var(--accent-primary);
    border-color: rgba(0, 240, 255, 0.3);
}

/* ---- SEND BUTTON ---- */
.btn-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- ATTACHMENT PREVIEWS ---- */
.attachments-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 4px 0;
}

.attachments-preview:empty {
    display: none;
}

.attachment-chip {
    background: rgba(0, 240, 255, 0.07);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--accent-primary);
    max-width: 200px;
}

.attachment-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-chip .remove-att {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

.attachment-chip .remove-att:hover {
    color: var(--danger);
}

/* ---- MESSAGE ATTACHMENTS ---- */
.msg-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.msg-img-preview {
    max-width: 240px;
    max-height: 160px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--glass-border);
    display: block;
}

.msg-file-chip {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   ONBOARDING MODAL
   ============================================================ */
.onboarding-content {
    max-width: 520px;
    width: 100%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Progress dots */
.onboard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.onboard-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.onboard-dot.active {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.onboard-dot.done {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
}

.onboard-line {
    flex: 1;
    max-width: 80px;
    height: 2px;
    background: var(--glass-border);
}

/* Step pages */
.onboard-page {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.onboard-page.active {
    display: flex;
}

.onboard-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.onboard-tag {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-primary);
}

.onboard-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.onboard-header p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Financial fields */
.onboard-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.onboard-check-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.onboard-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.check-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.check-opt:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.25);
}

.check-opt input[type=checkbox] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: var(--accent-primary);
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
}

.check-opt span {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.check-opt span i {
    font-size: 16px;
    color: var(--accent-primary);
}

.check-opt:has(input:checked) {
    background: rgba(0, 240, 255, 0.07);
    border-color: rgba(0, 240, 255, 0.35);
}

.check-opt:has(input:checked) span {
    color: var(--text-primary);
}

/* Investor questions */
.onboard-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.onboard-questions::-webkit-scrollbar { width: 4px; }
.onboard-questions::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.investor-q {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.q-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.q-opts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.q-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.q-opt:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.2);
}

.q-opt input[type=radio] {
    accent-color: var(--accent-primary);
    width: 15px;
    height: 15px;
    min-width: 15px;
    cursor: pointer;
    padding: 0;
}

.q-opt span {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.q-opt:has(input:checked) {
    background: rgba(0, 240, 255, 0.07);
    border-color: rgba(0, 240, 255, 0.35);
}

.q-opt:has(input:checked) span {
    color: var(--text-primary);
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    .onboarding-content {
        padding: 24px 20px;
        max-height: 95vh;
    }
    .onboard-header h3 { font-size: 20px; }
}

/* ---- LOADING BAR ---- */
.loading-bar {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, var(--accent-primary) 50%, transparent 100%);
    background-size: 200% 100%;
    display: none;
    flex-shrink: 0;
}

.loading-bar.active {
    display: block;
    animation: loadingSlide 1.4s ease-in-out infinite;
}

@keyframes loadingSlide {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- AI LOGO AVATAR ---- */
.ai-logo-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

/* ---- PLANNING CHART ---- */
.chart-message-wrapper {
    max-width: 80%;
    align-self: flex-start;
    margin-left: 48px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    animation: slideUpFade 0.4s ease-out forwards;
}

/* ---- CONTEXT SIDEBAR IMPROVEMENTS ---- */
.context-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.chat-sidebar.drag-over {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.4);
    outline: 2px dashed rgba(0, 240, 255, 0.35);
    outline-offset: -4px;
}

.chat-sidebar.drag-over .new-context-btn {
    background: rgba(0, 240, 255, 0.15) !important;
    border-color: var(--accent-primary) !important;
}

/* ---- SELECT INPUT IN PROFILE MODAL ---- */
.input-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 16px 14px 48px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Inter', sans-serif;
}

.input-group select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.1);
}

.input-group select option {
    background: #151A23;
    color: var(--text-primary);
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    .chart-message-wrapper {
        max-width: 95%;
        margin-left: 0;
        padding: 14px;
    }
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    .chat-sidebar {
        display: none;
    }

    .app-topbar {
        padding: 0 16px;
        height: 54px;
    }

    .chat-main .chat-messages {
        padding: 16px 10px 8px;
    }

    .chat-input-container {
        padding: 6px 10px 12px;
    }

    .msg-img-preview {
        max-width: 180px;
        max-height: 120px;
    }
}

/* ---- ACTIVATION MODAL ---- */
.activation-modal-content {
    max-width: 440px !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 36px 32px !important;
}

.activation-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,240,255,0.12), rgba(112,0,255,0.12));
    border: 2px solid rgba(0,240,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--accent-primary);
    animation: pulseAvatar 2.5s infinite;
    flex-shrink: 0;
}

.activation-texts h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.activation-texts p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.activation-texts p strong { color: var(--danger); }

.activation-status {
    font-size: 13px;
    font-weight: 500;
    min-height: 20px;
    line-height: 1.4;
}

.activation-error  { color: var(--danger); }
.activation-success { color: var(--success); }
.activation-info   { color: var(--accent-primary); }

.activation-divider {
    width: 100%;
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}

.activation-no-account {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-activation-retry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
}

.btn-activation-retry:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-primary);
}

.btn-activation-retry:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.activation-manual {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0;
    overflow: hidden;
}

.activation-manual summary {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.activation-manual summary:hover { color: var(--text-secondary); }

.activation-manual[open] summary {
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.activation-key-form {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
}

.btn-activation-buy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-primary), #00A3FF);
    color: #000;
    padding: 13px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.btn-activation-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.3);
}

#activation-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-top: 4px;
}

#activation-logout:hover {
    color: var(--danger);
    background: rgba(255, 77, 77, 0.08);
}

/* ---- GEMINI STYLE REDESIGN ---- */
#dashboard-view {
    background: #11141A;
}

.gemini-sidebar {
    background: #151A23; 
    border-right: none;
    padding: 16px 12px;
}

.gemini-sidebar .sidebar-top {
    margin-bottom: 24px;
    border-bottom: none;
    padding-left: 8px;
    height: auto;
}

.gemini-sidebar .hamburger-btn {
    font-size: 20px;
    color: var(--text-secondary);
}

.gemini-sidebar .sidebar-menu {
    gap: 16px;
}

.gemini-sidebar .menu-item.new-context-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 12px 16px;
    color: var(--text-primary) !important;
}

.gemini-sidebar .menu-item.new-context-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.gemini-sidebar .sidebar-section {
    border-top: none;
}

.gemini-sidebar .sidebar-section > span {
    text-transform: none;
    font-size: 13px;
    font-weight: 500;
}

.gemini-wrapper {
    background: #11141A;
}

.gemini-topbar {
    background: transparent;
    border-bottom: none;
    height: 64px;
}

.gemini-topbar .topbar-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

.gemini-main {
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.chat-input-container {
    background: transparent;
    padding: 24px;
}

.gemini-input-area {
    background: #1E232B;
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gemini-input-area .chat-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gemini-input-area #chat-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    flex: 1;
    outline: none;
}

.gemini-input-area .btn-attach {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.gemini-input-area .btn-attach:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.gemini-input-area .btn-send {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
    border-radius: 50%;
}

.gemini-input-area .btn-send:hover {
    color: var(--text-primary);
}

.input-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 12px;
}

