/* --- CSS Variables & Design System --- */
:root {
    --bg-main: #04080e;
    --bg-sidebar: #0b141e;
    --border-sidebar: #122133;
    
    --card-bg: #101e2d;
    --card-border: #20344a;
    
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #64748b;
    --text-nav: #8fa0b5;
    
    --accent-mint: #20e39f;
    --accent-mint-glow: rgba(32, 227, 159, 0.25);
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.4);
    
    --nav-active-bg: #192b3f;
    --divider-color: #17283a;
    
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-smooth: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), padding 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

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

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

.app-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* --- Compact Sidebar Styling --- */
.sidebar {
    width: 248px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-sidebar);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    box-sizing: border-box;
    user-select: none;
    transition: var(--transition-smooth);
    overflow: visible;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 32px;
    flex-shrink: 0;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 7px;
}

.sidebar-logo-toggle {
    cursor: pointer;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: #0b1a28;
    border: 1px solid var(--accent-mint);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px var(--accent-mint-glow);
    flex-shrink: 0;
}

.logo-icon svg {
    width: 16px;
    height: 16px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.brand-name {
    font-weight: 700;
    font-size: 15px;
    color: #f1f5f9;
    line-height: 1.1;
    letter-spacing: -0.3px;
}

.brand-name .ai-text {
    color: var(--accent-mint);
}

.brand-sub-container {
    display: flex;
    flex-direction: column;
    margin-top: 2px;
}

.brand-sub {
    font-size: 7.5px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.8px;
    line-height: 1.1;
}

.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.workspace-wrapper {
    position: relative;
    width: 100%;
    margin-top: 30px;
    height: 52px;
    flex-shrink: 0;
}

.create-account-empty-btn {
    width: 100%;
    height: 52px;
    background-color: rgba(32, 227, 159, 0.03);
    border: 1px dashed var(--accent-mint);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.create-account-empty-btn:hover {
    background-color: rgba(32, 227, 159, 0.08);
    box-shadow: 0 0 10px var(--accent-mint-glow);
}

.create-empty-plus {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-mint);
}

.workspace-card {
    width: 100%;
    height: 52px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.workspace-card:hover {
    border-color: #2e4a68;
    background-color: #132437;
}

.workspace-user {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: transparent;
    color: #0f172a;
    font-size: 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.user-name {
    font-size: 12px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.user-plan {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-icon {
    font-size: 10px;
    color: #64748b;
    flex-shrink: 0;
    transition: transform 0.2s, opacity 0.2s ease;
}

.workspace-card.active .dropdown-icon {
    transform: rotate(180deg);
}

.workspace-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 300px;
    background-color: #0d1724;
    border: 1px solid #1a2a3e;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    overflow: visible !important;
}

.workspace-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.workspace-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    padding: 0 2px;
    margin-bottom: 4px;
}

.account-count-badge {
    font-size: 9.5px;
    background-color: #17283a;
    color: #94a3b8;
    padding: 2px 6px;
    border-radius: 10px;
}

.workspace-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: visible;
    overflow-x: visible;
}

.account-item-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    overflow: visible !important;
    width: 100%;
}

.account-item-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #1e334d;
}

.account-item-option.active {
    background-color: rgba(32, 227, 159, 0.06);
    border-color: rgba(32, 227, 159, 0.25);
}

.account-item-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex-grow: 1;
    padding-right: 8px;
}

.account-item-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.account-item-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.account-inline-dot {
    font-size: 10px;
    color: #64748b;
    flex-shrink: 0;
}

.account-badge-active {
    font-size: 9.5px;
    font-weight: 600;
    background-color: rgba(32, 227, 159, 0.15);
    color: var(--accent-mint);
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.account-item-sub {
    font-size: 10.5px;
    color: #64748b;
}

.account-right-action {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow: visible !important;
}

.account-more-btn {
    background: transparent;
    border: none;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, background-color 0.2s, color 0.2s;
}

.account-item-option:hover .account-more-btn {
    opacity: 1;
    visibility: visible;
}

.account-more-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.account-action-popup {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    width: 130px;
    background-color: #0d1724;
    border: 1px solid #1a2a3e;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 99999;
}

.account-action-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.action-popup-item {
    width: 100%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    font-size: 11.5px;
    font-weight: 500;
    color: #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-align: left;
}

.action-popup-item svg {
    color: #64748b;
    transition: color 0.2s;
}

.action-popup-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.action-popup-item:hover svg {
    color: var(--accent-mint);
}

.action-popup-item.delete-action:hover {
    background-color: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.action-popup-item.delete-action:hover svg {
    color: #f87171;
}

.workspace-menu-divider {
    height: 1px;
    background-color: #17283a;
    margin: 8px 0;
}

.create-account-btn {
    width: 100%;
    background-color: transparent;
    border: 1px dashed #20344a;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--accent-mint);
    transition: background-color 0.2s, border-color 0.2s;
    text-align: left;
    margin-top: 2px;
}

.create-account-btn:hover {
    background-color: rgba(32, 227, 159, 0.05);
    border-color: var(--accent-mint);
}

.create-account-icon {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.create-account-text {
    display: flex;
    flex-direction: column;
}

.create-title {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}

.create-sub {
    font-size: 10px;
    color: #64748b;
}

.nav-section-label {
    margin-top: 30px;
    font-size: 9.5px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 1.5px;
    padding-left: 8px;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.nav-menu {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.nav-item {
    width: 100%;
    height: 36px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-nav);
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    background: transparent;
    transition: background-color 0.2s, color 0.2s;
    position: relative;
    box-sizing: border-box;
}

.nav-item span {
    transition: opacity 0.2s ease;
}

.nav-icon {
    width: 18px;
    display: flex;
    justify-content: center;
    font-size: 13px;
    color: #64748b;
    margin-right: 10px;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 15px;
    height: 15px;
}

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

.nav-item:hover .nav-icon {
    color: var(--text-nav);
}

.nav-item.active {
    background-color: var(--nav-active-bg);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: -2px 0 0 0 var(--accent-mint);
}

.nav-item.active .nav-icon {
    color: #ffffff;
}

.status-dot {
    margin-left: auto;
    width: 6px;
    height: 6px;
    background-color: var(--accent-mint);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-mint-glow);
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.sidebar-bottom-group {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0;
}

.user-profile-card {
    width: 100%;
    height: 56px;
    background-color: transparent;
    border: none;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 8px;
}

.user-profile-card:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

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

.user-profile-avatar {
    width: 38px;
    height: 38px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--accent-mint);
    font-size: 16px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: lowercase;
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: opacity 0.2s ease;
}

.user-profile-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.user-profile-plan {
    font-size: 11px;
    color: #64748b;
}

.user-profile-dropdown {
    font-size: 12px;
    color: #64748b;
    flex-shrink: 0;
    transition: transform 0.2s, opacity 0.2s ease;
}

.user-profile-card.active .user-profile-dropdown {
    transform: rotate(180deg);
}

.profile-popup-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0; /* ავტომატურად უზრუნველყოფს მშობელი ელემენტის სიგანის სრულად დაკავებას */
    margin-bottom: 8px;
    width: 100%; /* ფიქსირებული 300px-ის ნაცვლად ხდება 100% */
    box-sizing: border-box; /* რომ პადინგები სიგანეში არ გაცდეს */
    background-color: #0d1724;
    border: 1px solid #1a2a3e;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.profile-popup-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.xp-card {
    background-color: rgba(32, 227, 159, 0.05);
    border: 1px solid rgba(32, 227, 159, 0.15);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xp-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xp-icon {
    width: 30px;
    height: 30px;
    background-color: rgba(32, 227, 159, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xp-details {
    display: flex;
    flex-direction: column;
}

.xp-title {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}

.xp-count {
    font-size: 10px;
    color: #94a3b8;
}

.xp-percentage {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-mint);
}

.xp-progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.xp-progress-fill {
    width: 0%;
    height: 100%;
    background-color: var(--accent-mint);
    box-shadow: 0 0 8px var(--accent-mint-glow);
    border-radius: 2px;
}

.profile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.profile-menu-item svg {
    color: #64748b;
    transition: color 0.2s;
}

.profile-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.profile-menu-item:hover svg {
    color: var(--accent-mint);
}

.profile-menu-divider {
    height: 1px;
    background-color: #17283a;
    margin: 4px 0;
}

.profile-menu-item.logout {
    color: #f87171;
}

.profile-menu-item.logout svg {
    color: #f87171;
}

.profile-menu-item.logout:hover {
    background-color: rgba(248, 113, 113, 0.1);
}

.subtle-divider {
    width: 100%;
    height: 1px;
    background-color: var(--divider-color);
    margin-top: 12px;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.sync-status-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 16px;
    flex-shrink: 0;
}

.sync-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-mint);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-mint-glow);
    flex-shrink: 0;
}

.sync-text {
    font-size: 11px;
    color: #64748b;
    transition: opacity 0.2s ease;
}

.main-content {
    flex-grow: 1;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* --- Fixed (Sticky) Dashboard Top Header --- */
.dashboard-top-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    backdrop-filter: blur(10px) !important;
    background-color: rgba(11, 20, 30, 0.85) !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    border-bottom: 1px solid var(--border-sidebar) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 32px !important;
    flex-shrink: 0 !important;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.breadcrumb-brand {
    font-weight: 700;
    color: #ffffff;
}

.breadcrumb-separator {
    color: #64748b;
}

.breadcrumb-page {
    color: var(--accent-mint);
    font-weight: 600;
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon-btn {
    width: 34px;
    height: 34px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.header-icon-btn:hover {
    color: #ffffff;
    border-color: #2e4a68;
}

.dashboard-view-container {
    width: 100%;
}

.dashboard-content {
    padding: 32px;
    max-width: 1260px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Welcome Banner --- */
.welcome-banner {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 4px !important;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.live-account-tag-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.live-green-dot {
    width: 7px;
    height: 7px;
    background-color: #20e39f;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(32, 227, 159, 0.8);
    animation: livePulseDot 2s infinite ease-in-out;
}

@keyframes livePulseDot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px rgba(32, 227, 159, 1); }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.live-account-overview-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: #94a3b8;
    text-transform: uppercase;
}

.welcome-text-group h1 {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin: 0 0 4px 0;
}

.welcome-text-group p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.btn-top-action {
    background-color: var(--accent-mint);
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    color: #04080e;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 12px var(--accent-mint-glow);
}

.btn-top-action:hover {
    background-color: #19cc8e;
}

/* --- Animated Empty State --- */
.dashboard-empty-state {
    background-color: #0d1724;
    border: 1px dashed #1a2a3e;
    border-radius: 16px;
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-trading-radar {
    width: 220px;
    height: 160px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.radar-pulse-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--accent-mint);
    opacity: 0;
}

.ring-wave-1 {
    width: 60px;
    height: 60px;
    animation: radarPulse 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.ring-wave-2 {
    width: 60px;
    height: 60px;
    animation: radarPulse 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite 1.2s;
}

.radar-core-glow {
    width: 52px;
    height: 52px;
    background: radial-gradient(circle, rgba(32, 227, 159, 0.2) 0%, rgba(13, 23, 36, 0.9) 70%);
    border: 1px solid var(--accent-mint);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px var(--accent-mint-glow);
    z-index: 2;
}

.floating-node {
    position: absolute;
    background-color: #101e2d;
    border: 1px solid #20344a;
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #f1f5f9;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    z-index: 3;
}

.node-chart { top: 15px; left: 10px; }
.node-ai { bottom: 20px; right: 15px; }
.node-journal { top: 25px; right: 10px; }

.float-1 { animation: floatSlow 4s ease-in-out infinite alternate; }
.float-2 { animation: floatSlow 5s ease-in-out infinite alternate-reverse; }
.float-3 { animation: floatSlow 4.5s ease-in-out infinite alternate 0.5s; }

@keyframes radarPulse {
    0% { width: 40px; height: 40px; opacity: 0.8; }
    100% { width: 180px; height: 180px; opacity: 0; }
}

@keyframes floatSlow {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); }
}

.dashboard-empty-state h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.dashboard-empty-state p {
    font-size: 13px;
    color: #64748b;
    max-width: 520px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.empty-state-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary-glow {
    background-color: var(--accent-mint);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    color: #04080e;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 15px var(--accent-mint-glow);
}

.btn-primary-glow:hover {
    background-color: #19cc8e;
}

/* --- Connect Broker & Tooltip --- */
.broker-tooltip-container {
    position: relative;
    display: inline-block;
}

.btn-secondary-broker {
    background-color: #101e2d;
    border: 1px solid #20344a;
    border-radius: 10px;
    padding: 12px 20px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn-secondary-broker:hover {
    background-color: #162a40;
    border-color: #3b82f6;
    color: #ffffff;
}

.broker-info-icon {
    display: flex;
    align-items: center;
    color: #64748b;
    margin-left: 2px;
}

.custom-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 220px;
    background-color: #0b141e;
    border: 1px solid #1e334d;
    color: #cbd5e1;
    font-size: 11.5px;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    pointer-events: none;
}

.broker-tooltip-container:hover .custom-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* --- Active Dashboard Analytics Grid --- */
.dashboard-active-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.metrics-top-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

@media(max-width: 1300px) {
    .metrics-top-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.stat-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
}

.stat-icon-badge {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.stat-icon-badge.green { background-color: rgba(32, 227, 159, 0.15); }
.stat-icon-badge.blue { background-color: rgba(59, 130, 246, 0.15); }
.stat-icon-badge.purple { background-color: rgba(192, 132, 252, 0.15); }
.stat-icon-badge.orange { background-color: rgba(251, 191, 36, 0.15); }
.stat-icon-badge.red { background-color: rgba(248, 113, 113, 0.15); }
.stat-icon-badge.cyan { background-color: rgba(6, 182, 212, 0.15); }

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.stat-value.positive { color: var(--accent-mint); }
.stat-value.negative { color: #f87171; }

.stat-sub-trend {
    font-size: 10.5px;
}
.stat-sub-trend.positive { color: var(--accent-mint); }
.stat-sub-trend.negative { color: #f87171; }
.stat-sub-trend.neutral { color: #64748b; }

/* Middle Row Layout */
.dashboard-middle-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media(max-width: 1024px) {
    .dashboard-middle-row {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.card-section-title {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
}

.equity-total-val {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.equity-badge {
    font-size: 11.5px;
    font-weight: 700;
    background-color: rgba(32, 227, 159, 0.12);
    color: var(--accent-mint);
    padding: 2px 8px;
    border-radius: 6px;
}

.chart-timeframe-tabs {
    display: flex;
    gap: 4px;
    background-color: #0b141e;
    border: 1px solid #1a2a3e;
    border-radius: 8px;
    padding: 3px;
}

.tf-tab {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.tf-tab.active, .tf-tab:hover {
    background-color: #192b3f;
    color: #ffffff;
}

/* --- Account Equity Card & Layout Styles --- */
.equity-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 380px;
}

.equity-sub-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
}

.equity-legend-line {
    width: 14px;
    height: 2px;
    background-color: var(--accent-mint);
    border-radius: 1px;
}

.equity-updated-text {
    margin-left: auto;
    font-size: 10.5px;
    color: #475569;
}

.equity-chart-wrapper {
    display: flex;
    gap: 12px;
    height: 240px;
    margin-top: 15px;
    position: relative;
}

.equity-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 10.5px;
    color: #64748b;
    font-weight: 500;
    padding-bottom: 24px;
    user-select: none;
    min-width: 45px;
}

.equity-chart-main-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.equity-chart-line-sim {
    width: 100%;
    height: 210px;
    position: relative;
    cursor: crosshair;
}

.sim-svg-line {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
    padding: 6px 4px 0 4px;
    height: 24px;
}

/* --- Interactive Hover Line, Dot & Smooth Tooltip Styles --- */
.equity-hover-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, left 0.1s ease-out;
    z-index: 10;
}

.equity-hover-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--accent-mint);
    border: 2px solid #0d1724;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-mint);
    transform: translate(-50%, -50%) scale(0.5);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, left 0.1s ease-out, top 0.1s ease-out;
    z-index: 12;
}

.equity-tooltip-box {
    position: absolute;
    background-color: #0d1724;
    border: 1px solid #1e334d;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -130%) scale(0.95);
    transition: opacity 0.15s ease, transform 0.15s ease, left 0.1s ease-out, top 0.1s ease-out, visibility 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    pointer-events: none;
    z-index: 20;
    white-space: nowrap;
}

.equity-hover-line.active,
.equity-hover-dot.active,
.equity-tooltip-box.active {
    opacity: 1;
    visibility: visible;
}

.equity-hover-dot.active {
    transform: translate(-50%, -50%) scale(1);
}

.equity-tooltip-box.active {
    transform: translate(-50%, -120%) scale(1);
}

.equity-tooltip-date {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 500;
}

.equity-tooltip-val {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
}

.equity-tooltip-val span {
    color: var(--accent-mint);
}

/* --- Trading Activity Widget & Heatmap Styles --- */
.trading-activity-main-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.activity-header-icon {
    width: 32px;
    height: 32px;
    background-color: rgba(32, 227, 159, 0.1);
    border: 1px solid rgba(32, 227, 159, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-header-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #94a3b8;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-dot.no-trades { background-color: #17283a; border: 1px solid #20344a; }
.legend-dot.win { background-color: #20e39f; box-shadow: 0 0 6px var(--accent-mint-glow); }
.legend-dot.loss { background-color: #f87171; box-shadow: 0 0 6px rgba(248, 113, 113, 0.4); }

.activity-heatmap-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(11, 20, 30, 0.5);
    border: 1px solid #1a2a3e;
    border-radius: 10px;
    padding: 14px;
}

.heatmap-weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.heatmap-cell {
    aspect-ratio: 1;
    background-color: #101e2d;
    border: 1px solid #1c3046;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.heatmap-cell:hover {
    border-color: #3b82f6;
    transform: scale(1.08);
}

.heatmap-cell.has-trades.win {
    background-color: rgba(32, 227, 159, 0.2);
    border-color: #20e39f;
    color: #20e39f;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(32, 227, 159, 0.15);
}

.heatmap-cell.has-trades.loss {
    background-color: rgba(248, 113, 113, 0.2);
    border-color: #f87171;
    color: #f87171;
    font-weight: 700;
}

.activity-stats-bottom-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.activity-stat-box {
    background-color: rgba(11, 20, 30, 0.7);
    border: 1px solid #1a2a3e;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.act-stat-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.act-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.act-dot.purple { background-color: #c084fc; box-shadow: 0 0 6px rgba(192, 132, 252, 0.4); }
.act-dot.green { background-color: #20e39f; box-shadow: 0 0 6px var(--accent-mint-glow); }
.act-dot.red { background-color: #f87171; box-shadow: 0 0 6px rgba(248, 113, 113, 0.4); }

.act-label {
    font-size: 9.5px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}

.act-value {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 2px;
}

.act-sub {
    font-size: 10px;
    color: #64748b;
}

/* AI Coach Insight Banner */
.ai-coach-insight-banner {
    background: linear-gradient(135deg, #101e2d 0%, #0d1724 100%);
    border: 1px solid rgba(32, 227, 159, 0.2);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.ai-coach-banner-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-coach-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-spark-icon {
    font-size: 14px;
}

.ai-badge-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-mint);
    letter-spacing: 0.5px;
}

.new-tag-pill {
    font-size: 9px;
    font-weight: 700;
    background-color: rgba(32, 227, 159, 0.15);
    color: var(--accent-mint);
    padding: 1px 6px;
    border-radius: 4px;
}

.ai-insight-text {
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.4;
}

.btn-review-trades {
    background-color: transparent;
    border: 1px solid #20344a;
    border-radius: 8px;
    padding: 9px 16px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-review-trades:hover {
    background-color: rgba(32, 227, 159, 0.08);
    border-color: var(--accent-mint);
    color: var(--accent-mint);
}

/* --- Modals General --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(4, 8, 14, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 999999;
    padding: 20px;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    background-color: #0d1724;
    border: 1px solid #1a2a3e;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.2s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.create-modal-card { max-width: 560px; }
.trade-modal-card { max-width: 680px; padding: 28px; }

.trade-modal-top-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-mint);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trade-form-section {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px solid #17283a;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trade-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    padding-bottom: 10px;
    border-bottom: 1px solid #17283a;
}

.trade-section-header svg { color: var(--accent-mint); }

.trade-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.result-radio-label { cursor: pointer; }
.result-radio-label input { display: none; }

.result-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    background-color: #101e2d;
    border: 1px solid #20344a;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.result-radio-label input:checked + .result-badge.win { background-color: rgba(32, 227, 159, 0.15); border-color: #20e39f; color: #20e39f; }
.result-radio-label input:checked + .result-badge.loss { background-color: rgba(248, 113, 113, 0.15); border-color: #f87171; color: #f87171; }
.result-radio-label input:checked + .result-badge.breakeven { background-color: rgba(251, 191, 36, 0.15); border-color: #fbbf24; color: #fbbf24; }
.result-radio-label input:checked + .result-badge.partial { background-color: rgba(59, 130, 246, 0.15); border-color: #3b82f6; color: #60a5fa; }

.input-hint { font-size: 10px; color: #64748b; margin-top: 2px; }

.emotions-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.emotion-chip {
    background-color: #101e2d;
    border: 1px solid #20344a;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emotion-chip:hover { border-color: #3b82f6; color: #ffffff; }
.emotion-chip.active { background-color: rgba(32, 227, 159, 0.15); border-color: var(--accent-mint); color: var(--accent-mint); font-weight: 600; }

.screenshot-upload-dropzone {
    background-color: #101e2d;
    border: 1px dashed #20344a;
    border-radius: 10px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.screenshot-upload-dropzone:hover { border-color: var(--accent-mint); background-color: rgba(32, 227, 159, 0.02); }

.upload-icon-circle {
    width: 40px;
    height: 40px;
    background-color: rgba(32, 227, 159, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.upload-title { font-size: 12.5px; font-weight: 600; color: #ffffff; margin-bottom: 4px; }
.upload-sub { font-size: 10.5px; color: #64748b; }

.modal-backdrop.show .modal-card { transform: scale(1); }

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-title-group h2 { font-size: 18px; font-weight: 700; color: #ffffff; }
.modal-title-group p { font-size: 12px; color: #64748b; margin-top: 4px; line-height: 1.4; }

.modal-close-btn { background: transparent; border: none; font-size: 22px; color: #64748b; cursor: pointer; transition: color 0.2s; }
.modal-close-btn:hover { color: #ffffff; }

.modal-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label-row { display: flex; align-items: center; gap: 6px; color: #94a3b8; }
.form-label { font-size: 11px; font-weight: 600; color: #94a3b8; }

.account-types-grid { display: flex; flex-direction: column; gap: 6px; }
.account-type-option { cursor: pointer; }
.account-type-option input { display: none; }

.account-type-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background-color: #101e2d;
    border: 1px solid #20344a;
    border-radius: 8px;
    transition: border-color 0.2s, background-color 0.2s;
}

.account-type-option input:checked + .account-type-card { border-color: var(--accent-mint); background-color: rgba(32, 227, 159, 0.08); }

.type-icon { font-size: 15px; }
.type-info { display: flex; flex-direction: column; }
.type-title { font-size: 12.5px; font-weight: 600; color: #ffffff; }
.type-desc { font-size: 10.5px; color: #64748b; }

.form-row { display: flex; gap: 12px; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-input, .form-select {
    width: 100%;
    height: 40px;
    background-color: #101e2d;
    border: 1px solid #20344a;
    border-radius: 8px;
    padding: 0 12px;
    color: #ffffff;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-textarea {
    width: 100%;
    height: 80px;
    background-color: #101e2d;
    border: 1px solid #20344a;
    border-radius: 8px;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent-mint); }

.preview-section { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.preview-header-title { font-size: 12px; font-weight: 600; color: #ffffff; }

.account-preview-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid #1a2a3e;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-left { display: flex; flex-direction: column; gap: 4px; }
.preview-name-row { display: flex; align-items: center; gap: 8px; }
.preview-type-icon { font-size: 14px; }
.preview-account-name { font-size: 14px; font-weight: 700; color: #ffffff; }
.preview-account-type { font-size: 11.5px; color: #94a3b8; }
.preview-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.preview-balance { font-size: 16px; font-weight: 800; color: #ffffff; letter-spacing: -0.3px; }
.preview-balance-sub { font-size: 10.5px; color: #64748b; }

.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }

.btn-cancel {
    background: transparent;
    border: 1px solid #20344a;
    border-radius: 8px;
    padding: 9px 18px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.btn-cancel:hover { color: #ffffff; border-color: #2e4a68; }

.btn-submit {
    background-color: var(--accent-mint);
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    color: #04080e;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 10px var(--accent-mint-glow);
}
.btn-submit:hover { background-color: #19cc8e; }

.rename-modal-card { max-width: 440px; border-color: rgba(32, 227, 159, 0.3); }
.rename-title-group { display: flex; align-items: center; gap: 10px; }
.rename-title-group h2 { color: #ffffff; font-size: 16px; }
.rename-icon-wrapper { width: 28px; height: 28px; background-color: rgba(32, 227, 159, 0.12); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--accent-mint); }
.rename-current-sub { font-size: 11.5px; color: #64748b; margin-top: 4px; }
.btn-rename-confirm { background-color: var(--accent-mint); border: none; border-radius: 8px; padding: 9px 20px; color: #04080e; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 0 10px var(--accent-mint-glow); }
.btn-rename-confirm:hover { background-color: #19cc8e; }

.delete-modal-card { border-color: rgba(248, 113, 113, 0.25); max-width: 440px; }
.delete-title-group { display: flex; align-items: center; gap: 10px; }
.delete-title-group h2 { color: #f87171; font-size: 16px; }
.delete-icon-wrapper { width: 32px; height: 32px; background-color: rgba(248, 113, 113, 0.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #f87171; }
.delete-modal-body { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.delete-acc-info-box { background-color: rgba(255, 255, 255, 0.02); border: 1px solid #1a2a3e; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.delete-acc-top { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #17283a; }
.delete-acc-avatar { width: 28px; height: 28px; font-size: 16px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.delete-acc-name { font-size: 13px; font-weight: 700; color: #ffffff; }
.delete-acc-details { display: flex; flex-direction: column; gap: 6px; }
.del-detail-row { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; }
.del-detail-row span:last-child { color: #ffffff; font-weight: 600; }
.delete-warning-box { background-color: rgba(248, 113, 113, 0.05); border: 1px solid rgba(248, 113, 113, 0.2); border-radius: 8px; padding: 12px; display: flex; align-items: flex-start; gap: 10px; color: #fca5a5; font-size: 11.5px; line-height: 1.4; }
.btn-delete-confirm { background-color: #ef4444; border: none; border-radius: 8px; padding: 9px 20px; color: #ffffff; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
.btn-delete-confirm:hover { background-color: #dc2626; }

/* --- Collapsed Sidebar State --- */
.sidebar.collapsed { width: 68px; padding: 20px 10px; overflow: hidden; }
.sidebar.collapsed .sidebar-collapse-btn { display: none !important; }
.sidebar.collapsed .nav-section-label { opacity: 0 !important; visibility: hidden !important; display: block !important; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .dropdown-icon,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-profile-info,
.sidebar.collapsed .user-profile-dropdown,
.sidebar.collapsed .profile-popup-menu,
.sidebar.collapsed .workspace-dropdown-menu,
.sidebar.collapsed .create-account-empty-btn span:not(.create-empty-plus) {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
}
.sidebar.collapsed .create-account-empty-btn .create-empty-plus { display: inline-block !important; font-size: 18px; }
.sidebar.collapsed .subtle-divider { width: 36px !important; margin-left: auto !important; margin-right: auto !important; }
.sidebar.collapsed .sync-status-row { justify-content: center !important; padding: 0 !important; }
.sidebar.collapsed .sync-text { display: none !important; }
.sidebar.collapsed .sidebar-header { justify-content: center; }
.sidebar.collapsed .logo-wrapper { margin-left: 0; justify-content: center; }
.sidebar.collapsed .workspace-card,
.sidebar.collapsed .create-account-empty-btn,
.sidebar.collapsed .nav-item,
.sidebar.collapsed .user-profile-card { justify-content: center; padding: 0; }
.sidebar.collapsed .nav-icon { margin-right: 0; }



/* --- Trading Activity Heatmap Tooltip Styles --- */
.heatmap-cell {
    position: relative; /* რომ პოპ-აპი უჯრაზე იყოს მიბმული */
}

.heatmap-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 170px;
    background-color: #0d1724;
    border: 1px solid #1e334d;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    text-align: left;
    white-space: nowrap;
}

.heatmap-cell:hover .heatmap-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.heatmap-tooltip-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid #17283a;
    padding-bottom: 6px;
}

.heatmap-tooltip-header svg {
    color: var(--accent-mint);
}

.heatmap-tooltip-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
}

.heatmap-tooltip-pl {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(32, 227, 159, 0.08);
    border: 1px solid rgba(32, 227, 159, 0.2);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-mint);
}

.heatmap-tooltip-pl.loss {
    background-color: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* --- Pure Soft Fade-In Animation (Header excluded) --- */
@keyframes pureFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.content-appear-anim {
    animation: pureFadeIn 0.4s ease forwards;
}




.settings-view-container {
    padding: 30px;
    color: #f8fafc;
    max-width: 1200px;
}
.settings-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}
.settings-header p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 24px;
}
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media(max-width: 900px) {
    .settings-grid { grid-template-columns: 1fr; }
}
.settings-card {
    background: #0b131f;
    border: 1px solid #1a2a3e;
    border-radius: 16px;
    padding: 24px;
}
.settings-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}
.settings-card-sub {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
}
.profile-photo-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.settings-avatar {
    width: 48px;
    height: 48px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}
.settings-hint {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-top: 6px;
}
.settings-form-group {
    margin-bottom: 16px;
}
.settings-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #cbd5e1;
}
.settings-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.settings-input {
    width: 100%;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
}
.settings-btn-primary {
    background: #20e39f;
    color: #000;
    font-weight: 600;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}
.settings-btn-secondary {
    background: #1e293b;
    color: #fff;
    border: 1px solid #334155;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}
.settings-btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}
.setting-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #111827;
}
.toggle-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
}
.toggle-desc {
    font-size: 12px;
    color: #64748b;
}
/* Toggle Switch Design */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: .3s; border-radius: 22px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: #20e39f; }
input:checked + .slider:before { transform: translateX(18px); }
.settings-action-row {
    display: flex;
    gap: 12px;
}
.settings-account-item {
    background: #020617;
    border: 1px solid #1e293b;
    padding: 12px 16px;
    border-radius: 8px;
}
.badge-default { background: #3b82f6; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.badge-active { background: #20e39f; color: #000; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: bold; }



/* =============================================================
   TradePilot AI — Settings page (matches the existing dashboard)
   ============================================================= */
.settings-view-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 34px 32px 48px;
    color: var(--text-primary);
}
.settings-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}
.settings-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-mint);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}
.settings-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-mint); box-shadow: 0 0 8px var(--accent-mint-glow); }
.settings-header h1 { color: #f8fafc; font-size: 29px; letter-spacing: -1px; margin: 0 0 5px; }
.settings-header p { color: var(--text-muted); font-size: 13px; margin: 0; }
.settings-back-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px;
    border: 1px solid var(--card-border); border-radius: 8px; background: var(--card-bg);
    color: var(--text-secondary); font: 600 11px var(--font-family); cursor: pointer; transition: .2s;
}
.settings-back-btn:hover { border-color: var(--accent-mint); color: var(--accent-mint); }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr); gap: 20px; align-items: start; }
.settings-main-column, .settings-side-column { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.settings-card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 11px;
    padding: 22px; min-width: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}
.settings-section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.settings-section-icon {
    display: flex; align-items: center; justify-content: center; flex: 0 0 34px; height: 34px;
    border: 1px solid rgba(32,227,159,.2); border-radius: 9px; background: rgba(32,227,159,.07);
    color: var(--accent-mint); font-size: 17px;
}
.settings-section-heading h2 { color: #f8fafc; font-size: 16px; font-weight: 700; letter-spacing: -.3px; margin: 1px 0 4px; }
.settings-section-heading p { color: var(--text-muted); font-size: 11px; line-height: 1.55; margin: 0; }
.settings-photo-row { display: flex; align-items: center; gap: 15px; padding: 0 0 19px; margin-bottom: 20px; border-bottom: 1px solid var(--divider-color); }
.settings-avatar { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; background: #182a3b; border: 1px solid #2a4055; color: var(--accent-mint); font-size: 23px; font-weight: 700; }
.settings-avatar img, .user-profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.settings-photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.settings-photo-actions > strong, .settings-subheading h3 { color: #eaf0f6; font-size: 12px; font-weight: 600; }
.settings-photo-buttons { display: flex; align-items: center; gap: 12px; }
.settings-upload-btn { display: inline-flex; align-items: center; }
.settings-text-btn { border: 0; background: transparent; color: #8394a8; font: 500 11px var(--font-family); cursor: pointer; }
.settings-text-btn:hover { color: #f87171; }
.settings-hint { display: block; color: #64748b; font-size: 10px; line-height: 1.5; }
.settings-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-form-group { min-width: 0; margin-bottom: 15px; }
.settings-form-group label { display: block; color: #cbd5e1; font-size: 11px; font-weight: 600; margin-bottom: 7px; }
.settings-input { width: 100%; min-width: 0; height: 39px; padding: 0 12px; color: #f8fafc; background: #07111c; border: 1px solid #26394d; border-radius: 7px; outline: none; font: 12px var(--font-family); transition: border-color .2s, box-shadow .2s; }
.settings-input:focus { border-color: var(--accent-mint); box-shadow: 0 0 0 3px rgba(32,227,159,.08); }
.settings-input-disabled { color: #8391a2; background: #111e2b; cursor: not-allowed; }
.settings-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 3px; }
.settings-inline-note { color: #718397; font-size: 10px; line-height: 1.4; }
.settings-btn-primary, .settings-btn-secondary, .settings-btn-danger {
    display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px;
    border-radius: 7px; font: 600 11px var(--font-family); cursor: pointer; transition: .2s; white-space: nowrap;
}
.settings-btn-primary { color: #04110c; background: var(--accent-mint); border: 1px solid var(--accent-mint); }
.settings-btn-primary:hover { background: #42efb4; box-shadow: 0 0 14px rgba(32,227,159,.18); }
.settings-btn-secondary { color: #dbe5ef; background: #102033; border: 1px solid #294057; }
.settings-btn-secondary:hover { color: var(--accent-mint); border-color: var(--accent-mint); }
.settings-btn-danger { color: #f87171; background: rgba(248,113,113,.07); border: 1px solid rgba(248,113,113,.22); }
.settings-btn-danger:hover { background: rgba(248,113,113,.13); border-color: #f87171; }
.settings-inner-divider { height: 1px; background: var(--divider-color); margin: 20px 0; }
.settings-subheading { margin-bottom: 16px; }
.settings-subheading h3 { margin: 0 0 5px; font-size: 13px; }
.settings-subheading p { color: var(--text-muted); font-size: 10px; margin: 0; }
.settings-notification-list { margin-top: -5px; }
.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; padding: 12px 1px; border-bottom: 1px solid rgba(38,57,77,.72); cursor: pointer; }
.settings-toggle-row:last-child { border-bottom: 0; }
.settings-toggle-row > span:first-child { display: flex; flex-direction: column; gap: 5px; }
.settings-toggle-row strong { color: #e7edf5; font-size: 11px; font-weight: 600; }
.settings-toggle-row small { color: #718397; font-size: 10px; line-height: 1.4; }
.settings-switch { position: relative; width: 38px; height: 21px; flex: 0 0 38px; }
.settings-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.settings-switch i { position: absolute; inset: 0; border-radius: 20px; background: #26394d; border: 1px solid #34485d; transition: .2s; }
.settings-switch i::after { content: ''; position: absolute; width: 13px; height: 13px; left: 3px; top: 3px; border-radius: 50%; background: #9aa9b8; transition: .2s; }
.settings-switch input:checked + i { background: rgba(32,227,159,.25); border-color: var(--accent-mint); }
.settings-switch input:checked + i::after { transform: translateX(17px); background: var(--accent-mint); box-shadow: 0 0 8px rgba(32,227,159,.3); }
.settings-switch input:focus-visible + i { outline: 2px solid var(--accent-mint); outline-offset: 3px; }
.settings-account-summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; margin-bottom: 12px; background: rgba(32,227,159,.045); border: 1px solid rgba(32,227,159,.14); border-radius: 8px; }
.settings-account-summary > div { display: flex; align-items: baseline; gap: 9px; }
.settings-account-summary strong { color: var(--accent-mint); font-size: 21px; }
.settings-account-summary span { color: #8da0b3; font-size: 10px; }
.settings-summary-icon { color: var(--accent-mint) !important; font-size: 22px !important; }
.settings-accounts-list { display: flex; flex-direction: column; gap: 8px; }
.settings-account-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; background: #091521; border: 1px solid #203449; border-radius: 8px; }
.settings-account-item.is-active { border-color: rgba(32,227,159,.45); background: rgba(32,227,159,.035); }
.settings-account-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; background: #14283a; border-radius: 8px; font-size: 17px; }
.settings-account-info { min-width: 0; flex: 1; }
.settings-account-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #edf3f8; font-size: 11px; font-weight: 600; }
.settings-account-info small { display: block; margin-top: 5px; color: #718397; font-size: 9px; }
.settings-account-pill { padding: 2px 6px; border-radius: 4px; color: var(--accent-mint); background: rgba(32,227,159,.12); font-size: 8px; font-weight: 700; }
.settings-account-balance { color: var(--accent-mint); font-size: 10px; font-weight: 600; white-space: nowrap; }
.settings-empty-accounts { padding: 18px 12px; text-align: center; color: #718397; background: #091521; border: 1px dashed #294057; border-radius: 8px; font-size: 10px; line-height: 1.6; }
.settings-accounts-hint { margin-top: 12px; }
.settings-privacy-action, .settings-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(38,57,77,.72); }
.settings-privacy-action > div, .settings-danger-zone > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.settings-privacy-action strong, .settings-danger-zone strong { color: #e7edf5; font-size: 11px; }
.settings-privacy-action small, .settings-danger-zone small { color: #718397; font-size: 9px; line-height: 1.5; }
.settings-danger-zone { margin-bottom: 13px; border-bottom: 0; }
.settings-danger-zone strong { color: #fca5a5; }
@media (max-width: 1050px) { .settings-layout { grid-template-columns: 1fr; } .settings-side-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; } }
@media (max-width: 700px) {
    .settings-view-container { padding: 24px 16px 36px; }
    .settings-header { align-items: flex-start; flex-direction: column; }
    .settings-header h1 { font-size: 25px; }
    .settings-card { padding: 17px; }
    .settings-side-column { display: flex; }
    .settings-form-row { grid-template-columns: 1fr; gap: 0; }
    .settings-card-footer { align-items: flex-start; flex-direction: column; }
    .settings-card-footer .settings-btn-primary, .settings-card-footer .settings-btn-secondary { align-self: flex-end; }
    .settings-privacy-action, .settings-danger-zone { align-items: flex-start; flex-direction: column; }
}

/* Settings > Trading Accounts: rename / delete actions */
.settings-account-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.settings-account-action-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; color: #8da0b3; background: #0d1d2d; border: 1px solid #203449; border-radius: 7px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.settings-account-action-btn:hover { color: var(--accent-mint); border-color: rgba(32,227,159,.45); background: rgba(32,227,159,.08); }
.settings-account-action-btn.is-danger:hover { color: #ff5c6c; border-color: rgba(255,92,108,.45); background: rgba(255,92,108,.08); }
.settings-account-action-btn:focus-visible { outline: 2px solid var(--accent-mint); outline-offset: 2px; }
@media (max-width: 520px) { .settings-account-item { flex-wrap: wrap; } .settings-account-actions { margin-left: auto; } }

/* ===== Journal page ===== */
.j-actions { display: flex; gap: 10px; }
.j-btn { padding: 10px 16px; font: 600 12px var(--font-family); color: #e2e8f0; background: #0d1d2d; border: 1px solid #203449; border-radius: 9px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.j-btn:hover { border-color: rgba(32,227,159,.5); transform: translateY(-1px); }
.j-btn-primary { color: #04100b; background: var(--accent-mint); border-color: var(--accent-mint); box-shadow: 0 6px 20px var(--accent-mint-glow); }
.j-btn-primary:hover { background: #3dffb7; }
.j-btn-danger { color: #ff5c6c; background: rgba(255,92,108,.07); border-color: rgba(255,92,108,.3); }
.j-btn-danger:hover { border-color: #ff5c6c; background: rgba(255,92,108,.14); }

.pos { color: var(--accent-mint); } .neg { color: #ff5c6c; } .flat { color: #8da0b3; }


.j-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; margin-bottom: 16px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; }
.j-search { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; padding: 0 12px; color: #718397; background: #091521; border: 1px solid #203449; border-radius: 9px; }
.j-search:focus-within { border-color: rgba(32,227,159,.5); }
.j-search input { flex: 1; min-width: 0; padding: 10px 0; color: #fff; font: 12px var(--font-family); background: none; border: 0; outline: 0; }
.j-chips, .j-view { display: inline-flex; padding: 3px; gap: 2px; background: #091521; border: 1px solid #203449; border-radius: 9px; }
.j-chips button, .j-view button { padding: 7px 12px; color: #8da0b3; font: 600 11px var(--font-family); background: none; border: 0; border-radius: 7px; cursor: pointer; }
.j-chips button.active, .j-view button.active { color: var(--accent-mint); background: rgba(32,227,159,.12); }
.j-select { padding: 10px 12px; color: #e2e8f0; font: 12px var(--font-family); background: #091521; border: 1px solid #203449; border-radius: 9px; outline: 0; }

.j-list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.j-list.list { display: flex; flex-direction: column; gap: 8px; }
.j-trade { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 16px 20px; overflow: hidden; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; cursor: pointer; transition: transform .15s, border-color .15s; }
.j-trade::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #3a4d63; }
.j-trade.pos::before { background: var(--accent-mint); } .j-trade.neg::before { background: #ff5c6c; }
.j-trade:hover, .j-trade:focus-visible { transform: translateY(-2px); border-color: rgba(32,227,159,.45); outline: 0; }
.j-t-top { display: flex; align-items: center; gap: 8px; }
.j-sym { font-size: 15px; font-weight: 700; }
.j-side { padding: 2px 8px; font-size: 10px; font-weight: 700; border-radius: 999px; }
.j-side.buy { color: var(--accent-mint); background: rgba(32,227,159,.12); }
.j-side.sell { color: #ff5c6c; background: rgba(255,92,108,.12); }
.j-date { margin-left: auto; color: #718397; font-size: 11px; }
.j-pl { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.j-meta, .j-emos { display: flex; flex-wrap: wrap; gap: 6px; }
.j-pill { padding: 3px 8px; color: #b6c4d3; font-size: 10px; font-weight: 600; background: #14283a; border-radius: 6px; }
.j-emos span { padding: 3px 8px; color: #8da0b3; font-size: 10px; border: 1px dashed #2b415a; border-radius: 999px; }
.j-note { margin: 0; color: #8da0b3; font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.j-list.list .j-trade { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 16px; padding: 12px 16px 12px 20px; }
.j-list.list .j-t-top { flex: 0 0 240px; } .j-list.list .j-date { margin-left: 0; }
.j-list.list .j-pl { flex: 0 0 130px; font-size: 18px; }
.j-list.list .j-note { flex: 1 1 200px; -webkit-line-clamp: 1; }
.j-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 56px 20px; text-align: center; background: var(--card-bg); border: 1px dashed #2b415a; border-radius: 14px; }
.j-empty-ico { font-size: 34px; } .j-empty h3 { margin: 0; font-size: 16px; } .j-empty p { margin: 0 0 8px; max-width: 360px; color: #8da0b3; font-size: 12px; line-height: 1.6; }


@media (max-width: 640px) {
    .j-list.list .j-t-top, .j-list.list .j-pl { flex: 1 1 100%; }
}


.j-actions { align-items: center; }
.j-actions .j-btn { padding: 10px 18px; font-size: 12.5px; border-radius: 8px; }

/* ===== Trade detail page ===== */
.td-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.td-actions { display: flex; align-items: center; gap: 8px; }
.td-bar .j-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; font-size: 12px; }
.td-menu-wrap { position: relative; }
.td-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; display: none; min-width: 180px; padding: 6px; background: #0b141e; border: 1px solid var(--card-border); border-radius: 10px; box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.td-menu.show { display: block; }
.td-menu button { display: block; width: 100%; padding: 9px 10px; color: #e2e8f0; font: 600 12px var(--font-family); text-align: left; background: none; border: 0; border-radius: 7px; cursor: pointer; }
.td-menu button:hover { color: var(--accent-mint); background: #14283a; }
.td-title { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.td-avatar { display: grid; place-items: center; width: 56px; height: 56px; color: var(--accent-mint); font-size: 16px; font-weight: 800; background: rgba(32,227,159,.08); border: 1px solid rgba(32,227,159,.35); border-radius: 14px; }
.td-title h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 28px; letter-spacing: -.02em; }
.td-title p { margin: 0; color: #8da0b3; font-size: 13px; }
.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 20px; }
.td-main, .td-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.td-card { padding: 20px 22px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; }
.td-card h3 { margin: 0 0 16px; font-size: 14px; }
.td-hero { padding: 24px 26px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; }
.td-hero.pos { border-color: rgba(32,227,159,.4); background: linear-gradient(135deg, rgba(32,227,159,.14), var(--card-bg) 70%); }
.td-hero.neg { border-color: rgba(255,92,108,.4); background: linear-gradient(135deg, rgba(255,92,108,.14), var(--card-bg) 70%); }
.td-hero > span { color: #8da0b3; font-size: 12px; font-weight: 600; }
.td-hero > b { display: block; margin: 6px 0 16px; font-size: 40px; letter-spacing: -.03em; }
.td-rrbar { display: flex; gap: 3px; height: 10px; }
.td-rrbar i { display: block; border-radius: 5px; }
.td-rrbar .risk { background: #fbbf24; } .td-rrbar .rew { background: currentColor; }
.td-rr-labels { display: flex; justify-content: space-between; margin-top: 8px; color: #8da0b3; font-size: 11px; }
.td-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 16px; }
.td-meta span, .td-info span { display: block; margin-bottom: 6px; color: #718397; font-size: 11px; }
.td-meta b { font-size: 15px; }
.td-info { margin-bottom: 16px; } .td-info:last-child { margin-bottom: 0; } .td-info b { font-size: 13px; } .td-info em { font-style: normal; }
.td-note { width: 100%; min-height: 130px; padding: 12px; resize: vertical; color: #fff; font: 12px/1.6 var(--font-family); background: #091521; border: 1px solid #203449; border-radius: 9px; outline: 0; box-sizing: border-box; }
.td-note:focus { border-color: rgba(32,227,159,.5); }
.td-note-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.td-result { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 13px; font-weight: 700; background: #14283a; border-radius: 999px; }
.td-result::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.td-muted { margin: 0; color: #718397; font-size: 12px; }
.j-card-modal { width: min(560px, 94vw); }
.j-card-body { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 4px 24px 24px; }
.j-card-preview canvas { display: block; max-width: 100%; max-height: 52vh; width: auto; height: auto; border-radius: 16px; border: 1px solid #203449; }
.j-card-dl { justify-content: center; width: 100%; }
@media (max-width: 980px) { .td-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .td-meta { grid-template-columns: repeat(2, 1fr); } .td-hero > b { font-size: 32px; } }



/* T და P ასოების Take Profit კონცეფცია */
.logo-t,
.logo-p {
    color: var(--accent-mint);
    text-shadow: 0 0 10px var(--accent-mint-glow);
    font-weight: 800; /* ოდნავ უფრო გამოკვეთილი რომ იყოს */
}


@keyframes cardPopIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.j-trade {
    position: relative; /* რომ აბსოლუტური პოზიცია სწორად დაჯდეს */
}
.j-card-quick-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.j-trade:hover .j-card-quick-actions {
    opacity: 1; /* გამოჩნდება მხოლოდ მაშინ, როცა მაუსს მიიტან ქარდზე */
}
.j-quick-btn {
    width: 26px;
    height: 26px;
    background: #0d1724;
    border: 1px solid #20344a;
    border-radius: 6px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.j-quick-btn:hover {
    background: #192b3f;
    border-color: var(--accent-mint);
}
.j-quick-btn.danger:hover {
    border-color: #f87171;
    background: rgba(248,113,113,0.1);
}

.td-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    display: block; /* რომ ანიმაციამ იმუშაოს */
    min-width: 190px;
    padding: 6px;
    background: #0b141e;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0,0,0,.5);
    
    /* ანიმაციის საწყისი მდგომარეობა */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.td-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.td-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    color: #e2e8f0;
    font: 600 12px var(--font-family);
    text-align: left;
    background: none;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}