/* Nao Traders Premium Purplish Dashboard & Landing Theme Override */

/* Main Custom Dashboard Wrapper */
#custom-dashboard {
    display: none;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    min-height: calc(100vh - 40px);
    background-color: #060212;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #f8fafc;
    overflow: hidden;
}

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

.db-simulation-panel {
    display: flex;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 32px;
    padding: 20px 24px;
    border: 1px solid rgba(96, 181, 255, 0.45);
    border-left: 4px solid #60b5ff;
    background: rgba(8, 28, 54, 0.8);
    box-sizing: border-box;
}

.db-simulation-panel[hidden] {
    display: none;
}

.db-simulation-badge {
    color: #60b5ff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.db-simulation-title {
    margin: 4px 0;
    color: #ffffff;
    font-size: 1.9rem;
}

.db-simulation-note,
.db-simulation-balance-label {
    margin: 0;
    color: #a9bfd6;
    font-size: 1.25rem;
}

.db-simulation-balance-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.db-simulation-balance {
    color: #ffffff;
    font-size: 2rem;
}

.db-simulation-reset {
    border: 1px solid #60b5ff;
    padding: 9px 14px;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 1.2rem;
}

.db-simulation-reset:hover:not(:disabled) {
    background: rgba(96, 181, 255, 0.16);
}

.db-simulation-reset:disabled {
    cursor: wait;
    opacity: 0.6;
}

.db-simulation-error {
    margin: 0;
    color: #ff7a90;
    font-size: 1.2rem;
}

/* Greeting Section */
.db-greeting-section {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInDown 0.6s ease-out;
}

.db-greeting-title {
    font-size: 3.6rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.db-greeting-title span.username {
    color: #a855f7;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.db-greeting-subtitle {
    font-size: 1.6rem;
    font-style: italic;
    color: #9d9db5;
    margin: 0;
    font-weight: 400;
}

/* Quick Actions Section */
.db-quick-actions-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    animation: fadeInUp 0.7s ease-out;
}

.db-quick-actions-label {
    display: block;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6d6d8c;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.db-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

/* Card Styling */
.db-action-card {
    background: rgba(22, 12, 45, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.06);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

/* Icon Containers & SVGs */
.db-card-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(168, 85, 247, 0.04);
    border: 1px solid rgba(168, 85, 247, 0.08);
    transition: transform 0.3s ease;
}

.db-action-card:hover .db-card-icon-container {
    transform: scale(1.1) rotate(2deg);
}

/* Top Right Arrow Indicator */
.db-card-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(168, 85, 247, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(168, 85, 247, 0.4);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.db-action-card:hover .db-card-arrow {
    border-color: currentColor;
    color: inherit;
    transform: translate(2px, -2px);
}

/* Card Content styling */
.db-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.db-card-desc {
    font-size: 1.35rem;
    line-height: 1.6;
    color: #a5a5c5;
    margin: 0 0 24px 0;
    flex-grow: 1;
}

.db-card-link {
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.db-action-card:hover .db-card-link {
    gap: 10px;
}

/* Purple Theme Action Cards */
/* Upload Bot (Purple-blue) */
.db-card-upload {
    --card-theme: #818cf8;
}
.db-card-upload .db-card-icon-container {
    color: #818cf8;
    background: rgba(129, 140, 248, 0.08);
}
.db-card-upload .db-card-link {
    color: #c084fc; 
}
.db-card-upload:hover {
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 12px 30px -10px rgba(129, 140, 248, 0.25);
    background: rgba(22, 12, 45, 0.55);
}

/* Free Bots (Lavender) */
.db-card-free {
    --card-theme: #c084fc;
}
.db-card-free .db-card-icon-container {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.08);
}
.db-card-free .db-card-link {
    color: #c084fc;
}
.db-card-free:hover {
    border-color: rgba(192, 132, 252, 0.3);
    box-shadow: 0 12px 30px -10px rgba(192, 132, 252, 0.25);
    background: rgba(22, 12, 45, 0.55);
}

/* Bot Editor (Deep Purple) */
.db-card-editor {
    --card-theme: #a855f7;
}
.db-card-editor .db-card-icon-container {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.08);
}
.db-card-editor .db-card-link {
    color: #a855f7;
}
.db-card-editor:hover {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 12px 30px -10px rgba(168, 85, 247, 0.25);
    background: rgba(22, 12, 45, 0.55);
}

/* Quick Strategy (Pink/Violet) */
.db-card-strategy {
    --card-theme: #bd0099;
}
.db-card-strategy .db-card-icon-container {
    color: #bd0099;
    background: rgba(189, 0, 153, 0.08);
}
.db-card-strategy .db-card-link {
    color: #bd0099;
}
.db-card-strategy:hover {
    border-color: rgba(189, 0, 153, 0.3);
    box-shadow: 0 12px 30px -10px rgba(189, 0, 153, 0.25);
    background: rgba(22, 12, 45, 0.55);
}

/* Partner Referral Card */
.db-partner-card {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto 0 auto;
    background: linear-gradient(90deg, rgba(26, 14, 52, 0.5) 0%, rgba(10, 5, 23, 0.3) 100%);
    border: 1px solid rgba(168, 85, 247, 0.08);
    border-radius: 20px;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out;
}

.db-partner-left-space {
    width: 80px;
    flex-shrink: 0;
}

.db-partner-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-left: 20px;
}

.db-partner-subtitle {
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #a855f7; 
    letter-spacing: 1px;
    margin: 0 0 6px 0;
}

.db-partner-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.db-partner-btn {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid #a855f7;
    color: #a855f7;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1.35rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}

.db-partner-btn:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.45);
}

/* ==========================================
    GLOBAL BRAND OVERRIDES (Nao Traders Purplish Theme)
   ========================================== */

/* 1. Logo Branding */
.landing-page__header-logo-db, 
.cl__logo-db {
    color: #a855f7 !important; /* Green -> Purple */
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.landing-page__header-logo-traders, 
.cl__logo-traders {
    color: #bd0099 !important; /* Red -> Pink/Violet */
    text-shadow: 0 0 10px rgba(189, 0, 153, 0.2);
}

.landing-page__hero-typewriter-title-db {
    color: #a855f7 !important;
}

.landing-page__hero-typewriter-title-traders {
    color: #bd0099 !important;
}

/* 2. Landing Page Buttons */
.landing-page__header-login-button,
.landing-page__hero-cta-button,
.landing-page__cta-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(168, 85, 247, 0.4) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35) !important;
    transition: all 0.3s ease !important;
}

.landing-page__header-login-button:hover,
.landing-page__hero-cta-button:hover,
.landing-page__cta-button:hover {
    background: linear-gradient(135deg, #a855f7 0%, #818cf8 100%) !important;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.55) !important;
    transform: translateY(-1px);
}

/* 3. Testimonial Cards */
.landing-page__testimonial-card {
    background: rgba(22, 12, 45, 0.35) !important;
    border: 1px solid rgba(168, 85, 247, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s ease !important;
}

.landing-page__testimonial-card:hover {
    border-color: rgba(168, 85, 247, 0.25) !important;
    box-shadow: 0 12px 30px -10px rgba(139, 92, 246, 0.2) !important;
    transform: translateY(-3px) !important;
}

/* 4. Landing Page backgrounds */
.landing-page {
    background-color: #060212 !important;
    background-image: radial-gradient(circle at top, rgba(139, 92, 246, 0.15) 0%, #060212 70%) !important;
}

.bot-dashboard {
    background-color: #060212 !important;
}

/* 5. Custom AI Scanner overrides */
.ai-scanner-button__radar-beam {
    background: conic-gradient(from 0deg, transparent 50%, rgba(139, 92, 246, 0.4) 100%) !important;
}
.ai-scanner-button__status-dot {
    background-color: #a855f7 !important;
    box-shadow: 0 0 8px #a855f7 !important;
}
.ai-scanner-button--pulsing {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4) !important;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Override rules for active/inactive view toggling via JS */
.bot-dashboard .main__run-strategy-wrapper {
    z-index: 10;
}

/* Hide workspace blockly div when dashboard is active */
.bot-dashboard.dashboard-active .bot-builder {
    display: none !important;
}

.bot-dashboard.dashboard-active .risk-disclaimer-icon,
.bot-dashboard.dashboard-active .risk-disclaimer-text {
    z-index: 10;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .db-quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .db-greeting-title {
        font-size: 3rem;
    }
}

@media (max-width: 640px) {
    #custom-dashboard {
        padding: 40px 16px;
    }
    .db-quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .db-partner-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px;
    }
    .db-partner-left-space {
        display: none;
    }
    .db-partner-content {
        margin-left: 0;
    }
    .db-partner-btn {
        width: 100%;
        text-align: center;
    }
    .db-greeting-title {
        font-size: 2.6rem;
    }
}

/* Header Navigation Styles (Pointers on the Header) */
.landing-page__header-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}
.landing-page__header-nav-link {
    color: #a5a5c5;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
}
.landing-page__header-nav-link:hover {
    color: #a855f7;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}
@media (max-width: 768px) {
    .landing-page__header-nav {
        display: none;
    }
}

/* ==========================================
   RISK DISCLAIMER REDESIGN
   ========================================== */

/* 1. Landing Page Disclaimer Card */
.landing-page__risk-disclaimer {
    border-top: none !important;
    width: 100% !important;
    max-width: 1100px !important;
    margin: 60px auto 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.landing-page__risk-disclaimer-content {
    background: rgba(22, 12, 45, 0.35) !important;
    border: 1px solid rgba(168, 85, 247, 0.08) !important;
    border-radius: 20px !important;
    padding: 32px !important;
    box-sizing: border-box;
    backdrop-filter: blur(10px) !important;
}

.landing-page__risk-icon {
    color: #a855f7 !important; /* Yellow/Red -> Lavender */
    margin-bottom: 12px !important;
    display: inline-block !important;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.3));
}

.landing-page__risk-disclaimer-title {
    color: #ffffff !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin: 0 0 16px 0 !important;
    text-shadow: none !important;
}

.landing-page__risk-disclaimer-text {
    font-size: 1.35rem !important;
    line-height: 1.65 !important;
    color: #9d9db5 !important;
}

.landing-page__risk-disclaimer-text p {
    margin: 0 0 16px 0 !important;
}

.landing-page__risk-disclaimer-list {
    margin: 16px 0 0 0 !important;
    padding-left: 20px !important;
    list-style-type: disc !important;
}

.landing-page__risk-disclaimer-list li {
    margin-bottom: 10px !important;
    color: #9d9db5 !important;
}

/* 2. App Workspace Disclaimer Footer Pill */
.risk-disclaimer-icon {
    background: rgba(168, 85, 247, 0.08) !important;
    border: 1px solid rgba(168, 85, 247, 0.15) !important;
    border-radius: 30px !important;
    padding: 8px 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #a855f7 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
}

.risk-disclaimer-icon:hover {
    background: rgba(168, 85, 247, 0.18) !important;
    border-color: rgba(168, 85, 247, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 15px rgba(168, 85, 247, 0.15) !important;
}

.risk-disclaimer-text {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: inherit !important;
}

/* 3. Popup Redesign */
.popup_disclaimer {
    background: rgba(4, 2, 10, 0.7) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 9999 !important;
}

.popup_disclaimer .popup-content {
    background: linear-gradient(135deg, #0f0822 0%, #060212 100%) !important;
    border: 1px solid rgba(168, 85, 247, 0.15) !important;
    border-radius: 24px !important;
    padding: 40px !important;
    max-width: 650px !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(139, 92, 246, 0.1) !important;
    color: #cbd5e1 !important;
    position: relative !important;
}

.popup_disclaimer h2 {
    color: #ffffff !important;
    font-size: 2.4rem !important;
    font-weight: 800 !important;
    border-bottom: 1px solid rgba(168, 85, 247, 0.1) !important;
    padding-bottom: 16px !important;
    margin: 0 0 20px 0 !important;
}

.popup_disclaimer p {
    font-size: 1.4rem !important;
    line-height: 1.7 !important;
    margin: 0 0 16px 0 !important;
}

.popup_disclaimer ul {
    padding-left: 20px !important;
    margin-bottom: 20px !important;
}

.popup_disclaimer li {
    font-size: 1.35rem !important;
    line-height: 1.6 !important;
    margin-bottom: 10px !important;
    list-style-type: disc !important;
}

.popup_disclaimer .close-button {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 2.8rem !important;
    top: 24px !important;
    right: 24px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.popup_disclaimer .close-button:hover {
    color: #ef4444 !important;
    transform: scale(1.15) !important;
}

/* ==========================================
   COLLAPSIBLE SIDEBAR LAYOUT
   ========================================== */

.db-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(10, 5, 25, 0.85);
    border-right: 1px solid rgba(168, 85, 247, 0.1);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(20px);
}

.db-sidebar.collapsed {
    width: 80px;
}

.db-sidebar-toggle {
    position: absolute;
    top: 24px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: #8b5cf6;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.db-sidebar-toggle:hover {
    transform: scale(1.1);
    background: #a855f7;
}

.db-sidebar-toggle svg {
    transition: transform 0.3s ease;
}

.db-sidebar.collapsed .db-sidebar-toggle svg {
    transform: rotate(180deg);
}

.db-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 8px;
    overflow: hidden;
}

.brand-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8b5cf6 0%, #bd0099 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.brand-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.db-sidebar.collapsed .brand-text {
    opacity: 0;
    pointer-events: none;
}

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

.db-sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #9d9db5;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
    overflow: hidden;
}

.db-sidebar-nav-item:hover {
    color: #ffffff;
    background: rgba(168, 85, 247, 0.08);
}

.db-sidebar-nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-left: 3px solid #8b5cf6;
    padding-left: 13px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    flex-shrink: 0;
}

.nav-text {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.db-sidebar.collapsed .nav-text {
    opacity: 0;
    pointer-events: none;
}

.db-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 8px;
    border-top: 1px solid rgba(168, 85, 247, 0.08);
    overflow: hidden;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #a855f7;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.db-sidebar.collapsed .user-details {
    opacity: 0;
    pointer-events: none;
}

.user-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 1.1rem;
    color: #6d6d8c;
    white-space: nowrap;
}

.db-content-area {
    flex-grow: 1;
    padding: 40px 24px;
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: radial-gradient(rgba(168, 85, 247, 0.08) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    background-position: center;
}
