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

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Placeholder styling - lighter color for all inputs */
input::placeholder,
textarea::placeholder,
select option[value=""] {
    color: #5a6b7d !important;
    opacity: 0.6 !important;
    font-weight: 400 !important;
}

/* Style for unselected select elements */
select:invalid,
select option:disabled {
    color: #5a6b7d !important;
    opacity: 0.6 !important;
    font-weight: 400 !important;
}

/* Header */
.header {
    background: var(--bg-secondary);
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-primary);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-bintte {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #66aeea !important;
    letter-spacing: -1px !important;
    text-transform: lowercase !important;
    display: inline-block !important;
}

.logo-image {
    height: 28px;
    width: auto;
    display: block;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0089d3 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.back-btn {
    color: #7e8ba3;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #2a3142;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin-left: 12px;
}

.nav-menu {
    display: flex;
    gap: 32px;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav-menu a {
    color: #94a3b8 !important;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 15px;
    font-weight: 400;
}

.nav-menu a:hover {
    color: #cbd5e1 !important;
}

.nav-menu a.active {
    color: #0089d3 !important;
    font-weight: 400;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: #6e6969 !important;
    margin: 0 8px;
    opacity: 0.6;
}

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

.notification-icon {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid #7e8ba3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    color: #7e8ba3;
}

.notification-icon:hover {
    background: rgba(36, 43, 61, 0.5);
    border-color: #e8eaed;
    color: #e8eaed;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #0089d3;
    border-radius: 50%;
}

/* Notification icon - Has alerts state (orange) */
.notification-icon.has-alerts {
    border-color: #fb923c;
    color: #fb923c;
}

.notification-icon.has-alerts i {
    color: #fb923c !important;
}

.notification-icon.has-alerts:hover {
    background: rgba(251, 146, 60, 0.1);
    border-color: #fdba74;
    color: #fdba74;
}

.notification-icon.has-alerts:hover i {
    color: #fdba74 !important;
}

/* Notification icon - Critical state (red with pulse animation) */
.notification-icon.critical {
    border-color: #dc2626;
    color: #dc2626;
    animation: pulse-red 2s infinite;
}

.notification-icon.critical:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgb(255 60 60 / 54%);
    color: rgb(255 60 60 / 54%);
}

/* Notification dot - Critical state (red with pulse) */
.notification-dot.critical {
    background: #dc2626;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    animation: pulse-dot-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
    }
}

@keyframes pulse-dot-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0);
    }
}

/* Notification icon - Warning state (yellow/amber) */
.notification-icon.warning {
    border-color: #f59e0b;
    color: #f59e0b;
}

.notification-icon.warning:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: #fbbf24;
    color: #fbbf24;
}

.user-profile {
    position: relative;
}

.user-profile-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
}

.user-profile-info:hover {
    background: #242b3d;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #0089d3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #e8eaed;
    line-height: 1.2;
}

.user-plan {
    font-size: 12px;
    color: #7e8ba3;
    line-height: 1.2;
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1f2e;
    border: 1px solid #2a3142;
    border-radius: 12px;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: none;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-menu-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-menu-name {
    font-weight: 400;
    font-size: 15px;
    color: #94a3b8;
}

.user-menu-email {
    font-size: 12px;
    color: #64748b;
}

.user-menu-title {
    font-weight: 400;
    font-size: 15px;
}

.user-menu-item {
    padding: 12px 20px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #94a3b8;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    position: relative;
}

.user-menu-item i {
    font-size: 12px;
    color: #7e8ba3;
}

.user-menu-item:hover {
    background: #242b3d;
}

.user-menu-link {
    color: #e8eaed !important;
}

.user-menu-link span {
    color: #e8eaed !important;
}

.user-menu-divider {
    height: 1px;
    background: #2a3142;
    margin: 4px 0;
}

.logout-btn {
    color: #94a3b8;
    background: var(--bg-primary);
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

/* Language Submenu */
.language-submenu-toggle {
    position: relative;
    color: #94a3b8 !important;
}

.submenu-arrow {
    font-size: 10px;
    transition: transform 0.3s;
    color: #94a3b8;
}

.language-submenu-toggle.active .submenu-arrow {
    transform: rotate(90deg);
}

.language-submenu {
    display: none;
    position: fixed;
    background: #1a1f2e;
    border: 1px solid #2a3142;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.language-submenu.show {
    display: block;
}

.language-submenu-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    opacity: 0.3;
    font-size: 14px;
}

.language-submenu-option:hover {
    background: #242b3d;
}

.language-submenu-option:first-child {
    border-radius: 8px 8px 0 0;
}

.language-submenu-option:last-child {
    border-radius: 0 0 8px 8px;
}

.language-submenu-option .language-flag {
    font-size: 20px;
    filter: grayscale(100%) brightness(1.5) opacity(0.6);
    transition: all 0.2s ease;
}

.language-submenu-option.active .language-flag {
    filter: grayscale(0%) brightness(1);
}

.language-submenu-option.active {
    color: #ffffff;
    font-weight: 500;
    opacity: 1;
}

.language-check {
    font-size: 14px;
    color: rgb(16 185 129 / 67%);
    opacity: 0;
    transition: opacity 0.2s;
}

.language-submenu-option.active .language-check {
    opacity: 1;
}

.logout-btn:hover {
    background: #1f2532;
}

/* Main Content */
.container {
    width: 100%;
    padding: 24px 32px;
}

/* Project Header */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.project-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-title h1 {
    font-size: 24px;
    font-weight: 600;
}

.badge {
    background: rgba(102, 126, 234, 0.2);
    color: #0089d3;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.simulation-text {
    color: #7e8ba3;
    font-size: 13px;
    margin-top: 4px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #7e8ba3;
    font-size: 13px;
}

/* Time Zone Display */
.time-zones {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: 0;
}

.time-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.time-label {
    color: #7e8ba3;
    font-weight: 500;
    font-size: 14px;
}

.time-value {
    color: #e8eaed;
    font-family: 'Courier New', monospace;
    background: #242b3d;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
    font-size: 16px;
}

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

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-secondary {
    background: #242b3d;
    color: #e8eaed;
}

.btn-secondary:hover {
    background: #2e3548;
}

.btn-primary {
    background: #0089d3;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

/* Add buttons (clean style - no background) */
#addResultBtn.btn-primary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

#addResultBtn.btn-primary:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stats-grid-2col {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card {
    background: #1a1f2e;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #2a3142;
}

.stat-label {
    color: #7e8ba3;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-change {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.stat-change.positive {
    color: rgb(16 185 129 / 67%);
}

.stat-change.negative {
    color: rgb(255 60 60 / 54%);
}

.arrow-up::before {
    content: '▲';
    font-size: 10px;
}

.arrow-down::before {
    content: '▼';
    font-size: 10px;
}

/* EA Status Cards */
.ea-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ea-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ea-indicator.online {
    background: rgb(16 185 129 / 67%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.ea-indicator.offline {
    background: rgb(255 60 60 / 54%);
}

.ea-name {
    font-weight: normal;
    font-size: 15px;
}

.ea-details {
    font-size: 13px;
    color: #7e8ba3;
    line-height: 1.3;
}

.ea-profit {
    font-weight: normal;
    margin-top: 4px;
}

.ea-profit.positive {
    color: rgb(16 185 129 / 67%);
}

.ea-profit.negative {
    color: rgb(255 60 60 / 54%);
}

/* Main Content Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1.58fr 1.42fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.card {
    background: #1a1f2e;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #2a3142;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #60a5fa;
}

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

.card-title {
    font-size: 16px;
    font-weight: 400;
}

.card-subtitle {
    color: #7e8ba3;
    font-size: 14px;
}

.card-value {
    font-size: 20px;
    font-weight: 400;
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: 8px;
}

.period-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #2a3142;
    border-radius: 6px;
    color: #7e8ba3;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.period-btn:hover,
.period-btn.active {
    background: #0089d3;
    color: white;
    border-color: #0089d3;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 280px;
    margin-top: 20px;
}

/* Trading Calendar */
.calendar-container {
    margin-top: 20px;
}

.calendar-with-summary {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.calendar-main {
    flex: 1;
    min-width: 0;
}

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

.weekly-summary {
    width: 90px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weekly-summary-header {
    text-align: center;
    font-size: 11px;
    color: #7e8ba3;
    text-transform: uppercase;
    padding: 8px 0 6px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.week-card {
    background: #242b3d;
    border: 1px solid #2a3142;
    border-radius: 6px;
    padding: 8px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 3px;
    position: relative;
}

.week-card:hover {
    border-color: #0089d3;
    background: #2a3142;
}

.week-winrate {
    position: absolute;
    top: 6px;
    right: 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.week-title {
    font-size: 10px;
    font-weight: 600;
    color: #7e8ba3;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.week-days {
    font-size: 11px;
    color: #5f636a;
    margin-top: 2px;
}

.week-total {
    font-size: 19px;
    margin: 2px 0;
}

.week-total.profit {
    color: rgb(16 185 129 / 67%);
}

.week-total.loss {
    color: rgb(255 60 60 / 54%);
}

.week-total.neutral {
    color: #7e8ba3;
}

/* Responsive adjustments for weekly summary */
@media (max-width: 1400px) {
    .calendar-with-summary {
        flex-direction: column;
    }

    .weekly-summary {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        gap: 12px;
    }

    .week-card {
        min-width: 140px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .weekly-summary {
        gap: 8px;
    }

    .week-card {
        min-width: 120px;
        padding: 10px;
    }

    .week-number {
        font-size: 11px;
    }

    .week-days {
        font-size: 12px;
    }

    .week-total {
        font-size: 13px;
    }
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.broker-selector {
    background: #242b3d;
    border: 1px solid #2a3142;
    color: #0089d3 !important;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    min-width: 140px;
    transition: all 0.3s;
}

.broker-selector option {
    color: #e8eaed;
    background: #242b3d;
}

.broker-selector:hover {
    background: #2e3548;
    border-color: #0089d3;
}

.broker-selector:focus {
    outline: none;
    border-color: #0089d3;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.calendar-month {
    font-size: 16px;
    font-weight: 400;
    color: #9ca3af;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav-btn {
    background: #242b3d94;
    border: 1px solid #2a3142;
    color: #7e8ba3;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: #2e3548cc;
    color: #e8eaed;
    border-color: #3a4252;
}

.calendar-nav-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.calendar-nav-btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(126, 139, 163, 0.3);
    border-radius: 50%;
    border-top-color: #7e8ba3;
    animation: spin 0.6s linear infinite;
}

/* Account Navigation Buttons */
.account-nav-btn {
    background: #242b3d94;
    border: 1px solid #2a3142;
    color: #7e8ba3;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    min-width: 32px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-nav-btn:hover {
    background: #2e3548cc;
    color: #e8eaed;
    border-color: #3a4252;
}

.account-nav-btn:active {
    transform: scale(0.95);
}

.account-nav-btn i {
    font-size: 12px;
}

.calendar-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 2px;
    background: transparent;
}

.calendar-day-header {
    background: rgba(30, 30, 30, 0.3) !important;
    padding: 8px 4px;
    text-align: center;
    font-size: 10px;
    font-weight: 400;
    color: #7e8ba3;
    text-transform: uppercase;
    border-radius: 3px;
}

#calendarDays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.calendar-day {
    background: #242b3d;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 60px;
    position: relative;
}

.calendar-day:hover {
    transform: scale(1.05);
    z-index: 10;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
    opacity: 0;
}

.calendar-day.empty:hover {
    transform: none;
}

.calendar-day.profit {
    background: rgba(16, 185, 129, 0.15);
    color: #e8eaed;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.calendar-day.loss {
    background: rgba(239, 68, 68, 0.15);
    color: #e8eaed;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.calendar-day.breakeven {
    background: #303947;
    color: #7e8ba3;
    border: 1px solid #2a3142;
}

.calendar-day.neutral {
    background: #1c2533;
    color: #7e8ba3;
    border: 1px solid #2a3142;
}

.calendar-day-number {
    font-size: 11px;
    position: absolute;
    top: 4px;
    right: 6px;
    color: #9ca3af;
}

.calendar-day-value {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
    color: #e8eaed;
    margin-top: 4px;
    position: relative;
    top: 8px;
}

.calendar-currency-symbol {
    font-size: 13px;
    opacity: 0.8;
}

/* Trade count text */
.trade-count-text {
    font-size: 11px;
    color: #7c838e;
    text-align: center;
    margin-top: 10px;
}

.calendar-day.profit .calendar-day-value {
    color: rgb(16 185 129 / 67%);
}

.calendar-day.loss .calendar-day-value {
    color: rgb(255 60 60 / 54%);
}

.calendar-day.breakeven .calendar-day-value {
    color: #7e8ba3;
}

.calendar-day.today {
    border: 2px solid #60a5fa !important;
    box-sizing: border-box;
}

.calendar-day.loading {
    background: #242b3d;
    border-color: #94a3b8;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Clickable calendar days */
.calendar-day[style*="cursor: pointer"]:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.calendar-day[style*="cursor: pointer"]:active {
    transform: scale(0.98);
}

.calendar-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #2a3142;
}

.calendar-stat {
    text-align: center;
}

.calendar-stat-label {
    font-size: 12px;
    color: #7e8ba3;
    text-transform: uppercase;
    margin-bottom: 6px;
}

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

.calendar-stat-value.profit {
    color: rgb(16 185 129 / 67%);
}

.calendar-stat-value.loss {
    color: rgb(255 60 60 / 54%);
}

/* Alerts Dropdown */
.alerts-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1f2e;
    border: 1px solid #2a3142;
    border-radius: 12px;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: none;
}

.alerts-dropdown.show {
    display: block;
}

.alerts-header {
    padding: 16px 20px;
    border-bottom: 1px solid #2a3142;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alerts-title {
    font-weight: 600;
    font-size: 14px;
}

.alerts-count {
    background: #0089d3;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.alert-item {
    padding: 12px 20px;
    border-bottom: 1px solid #242b3d;
    transition: background 0.2s;
    display: block;
}

.alert-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.alert-item-link:hover .alert-item {
    background: #1f2532;
}

.alert-item.alert-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.alert-item.alert-link:hover {
    background: #1f2532;
}

.alert-item:last-child {
    border-bottom: none;
}

/* Alert items with priority styling */
.alert-item.critical {
    background: rgba(220, 38, 38, 0.08);
    border-left: 3px solid #dc2626;
}

.alert-item.critical:hover {
    background: rgba(220, 38, 38, 0.12);
}

.alert-item.high {
    background: rgba(234, 88, 12, 0.06);
    border-left: 3px solid #ea580c;
}

.alert-item.high:hover {
    background: rgba(234, 88, 12, 0.10);
}

.alert-item.medium {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid #f59e0b;
}

.alert-item.medium:hover {
    background: rgba(245, 158, 11, 0.08);
}

.alert-content-wrapper {
    display: block;
}

.alert-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #1f2532;
    color: #0089d3;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-top: 1px solid #242b3d;
    transition: all 0.2s;
}

.alert-footer:hover {
    background: #242b3d;
    color: #7e95ff;
}

.alert-footer i {
    font-size: 12px;
}

.alert-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.alert-type.success {
    color: rgb(16 185 129 / 67%);
}

.alert-type.warning {
    color: #f59e0b;
}

.alert-type.error {
    color: rgb(255 60 60 / 54%);
}

.alert-message {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.alert-time {
    font-size: 11px;
    color: #7e8ba3;
}

.alert-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.alert-type-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.alert-type-title {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    flex: 1;
}

.alert-dismiss-btn {
    background: transparent;
    border: none;
    color: #7e8ba3;
    cursor: pointer;
    padding: 4px;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.alert-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.alert-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #0089d3;
    text-decoration: none;
    margin-top: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.alert-action-link:hover {
    color: #7e95ff;
}

.alert-action-link i {
    font-size: 10px;
}

/* Table */
.table-container {
    background: #1a1f2e;
    border-radius: 12px;
    border: 1px solid #2a3142;
    overflow: hidden;
}

.table-content {
    overflow: auto;
    max-height: 400px;
}

.table-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a3142;
}

.table-tabs {
    display: flex;
    gap: 24px;
}

.table-tab {
    padding: 8px 0;
    color: #7e8ba3;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    font-size: 16px;
}

.table-tab.active {
    color: #0089d3;
    border-bottom-color: #0089d3;
}

.search-box {
    background: #242b3d;
    border: 1px solid #2a3142;
    padding: 8px 16px;
    border-radius: 6px;
    color: #e8eaed;
    width: 240px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: #1a1f2e;
    padding: 16px 24px;
    text-align: left;
    font-weight: 600;
    color: #7e8ba3;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a3142;
}

tbody td {
    padding: 16px 24px;
    border-bottom: 1px solid #242b3d;
    font-size: 16px;
}

tbody tr:hover {
    background: #1f2532;
}

.action-type {
    font-weight: 600;
}

.portfolio-value {
    font-weight: 600;
}

.evolution-positive {
    color: rgb(16 185 129 / 67%);
}

.evolution-negative {
    color: rgb(255 60 60 / 54%);
}

.health-value {
    font-weight: 600;
    color: #0089d3;
}

/* Responsive */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .logo img {
        height: 48px !important;
    }

    .notification-icon {
        width: 32px;
        height: 32px;
        border-width: 1.5px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 10px;
    }

    .container {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-headers {
        gap: 2px;
    }

    #calendarDays {
        gap: 2px;
    }

    .calendar-day {
        padding: 4px 2px;
    }

    .calendar-day-header {
        padding: 4px 1px;
        font-size: 9px;
    }

    .calendar-day-number {
        font-size: 11px;
        top: 3px;
        right: 4px;
    }

    .calendar-day-value {
        font-size: 13px;
    }

    .calendar-currency-symbol {
        font-size: 10px;
    }

    .calendar-summary {
        gap: 8px;
    }

    .calendar-stat-value {
        font-size: 12px;
    }

    .nav-menu {
        display: none;
    }

    .project-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .project-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .time-zones {
        margin-left: 0;
        gap: 16px;
    }

    .time-item {
        font-size: 11px;
    }

    .time-value {
        min-width: 55px;
        padding: 3px 6px;
    }
}

/* Loading Spinner Styles */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Button Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: not-allowed;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

.btn-danger.loading::after {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
}

.btn-secondary.loading::after {
    border-color: rgba(232, 234, 237, 0.3);
    border-top-color: #e8eaed;
}

/* Action Button Loading */
.btn-action.loading {
    color: transparent !important;
    pointer-events: none;
}

.btn-action.loading::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    top: 50%;
    left: 50%;
    margin-left: -6px;
    margin-top: -6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

/* Modal Styles for Dashboard - Maximum Specificity */
body #addResultModal.modal,
#addResultModal.modal,
body #noBrokerModal.modal,
#noBrokerModal.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 20, 25, 0.9) !important;
    display: none !important; /* Hidden by default */
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Modal open state */
#addResultModal.modal-open,
body #addResultModal.modal-open,
#noBrokerModal.modal-open,
body #noBrokerModal.modal-open {
    display: flex !important;
}

body #addResultModal .modal-content,
#addResultModal .modal-content,
body #noBrokerModal .modal-content,
#noBrokerModal .modal-content {
    background: #1a1f2e !important;
    border: 1px solid #2a3142 !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7) !important;
    width: 90% !important;
    max-width: 900px !important;
    max-height: 90vh !important;
    overflow: hidden !important;
}

#addResultModal .modal-header,
#noBrokerModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #2a3142;
    background: #1a1f2e;
}

#addResultModal .modal-header h3,
#noBrokerModal .modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #e8eaed !important;
    margin: 0;
}

#addResultModal .modal-close,
#noBrokerModal .modal-close {
    background: none !important;
    border: none !important;
    font-size: 24px;
    color: #7e8ba3 !important;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

#addResultModal .modal-close:hover,
#noBrokerModal .modal-close:hover {
    color: #e8eaed !important;
    background: #242b3d !important;
}

#addResultModal .modal-body,
#noBrokerModal .modal-body {
    padding: 24px !important;
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    background: #1a1f2e;
}

#addResultModal .modal-footer,
#noBrokerModal .modal-footer {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    padding: 20px 24px !important;
    border-top: 1px solid #2a3142 !important;
    background: #0f1419 !important;
    position: sticky !important;
    bottom: 0 !important;
    margin: 0 !important;
}

/* Form Grid Layout */
#addResultModal .form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin-top: 0 !important;
}

#addResultModal .form-group-full {
    grid-column: 1 / -1 !important;
}

/* Form Styles for Modal - Higher Specificity */
#addResultModal .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

#addResultModal .form-group label {
    display: block;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #e8eaed !important;
    margin: 0 !important;
    text-align: left !important;
}

#addResultModal .form-input,
#addResultModal .form-select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #242424 !important;
    border-radius: 8px !important;
    background: #0e0f16 !important;
    color: #9ca3af !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease !important;
    box-sizing: border-box;
}

#addResultModal .form-input:focus {
    outline: none !important;
    border-color: #0089d3 !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

#addResultModal .form-input:read-only {
    background: #0e0f16 !important;
    color: #7e8ba3 !important;
}

#addResultModal .form-input::placeholder {
    color: #7e8ba3 !important;
}

#addResultModal textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

#addResultModal .radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: space-between;
}

#addResultModal .radio-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

#addResultModal .radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#addResultModal .radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #e8eaed !important;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 38px;
    white-space: nowrap;
}

#addResultModal .radio-option:hover .radio-label {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Selected state */
#addResultModal .radio-option input[type="radio"]:checked + .radio-label {
    border-width: 2px;
    font-weight: 500 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Win/Profit - Green */
#addResultModal .radio-option[data-type="win"] .radio-label {
    color: rgb(16 185 129 / 67%) !important;
}

#addResultModal .radio-option[data-type="win"] input[type="radio"]:checked + .radio-label {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgb(16 185 129 / 67%);
}

/* Loss - Red */
#addResultModal .radio-option[data-type="loss"] .radio-label {
    color: rgb(255 60 60 / 54%) !important;
}

#addResultModal .radio-option[data-type="loss"] input[type="radio"]:checked + .radio-label {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgb(255 60 60 / 54%);
}

/* Breakeven - Gray */
#addResultModal .radio-option[data-type="breakeven"] .radio-label {
    color: #9ca3af !important;
}

#addResultModal .radio-option[data-type="breakeven"] input[type="radio"]:checked + .radio-label {
    background: rgba(156, 163, 175, 0.15);
    border-color: #9ca3af;
}

/* Button Styles for Modal - Higher Specificity */
#addResultModal .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#addResultModal .btn-primary {
    background: #0089d3 !important;
    color: white !important;
}

#addResultModal .btn-primary:hover {
    background: #5a6fd8 !important;
    transform: translateY(-1px);
}

#addResultModal .btn-primary:disabled {
    background: #4a5568 !important;
    cursor: not-allowed;
    transform: none;
}

#addResultModal .btn-secondary {
    background: #6b7280 !important;
    color: white !important;
}

#addResultModal .btn-secondary:hover {
    background: #5a5f6d !important;
}

/* Loading States */
#addResultModal .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#addResultModal .loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Calendar Add Button Styling */
.card-header .btn.btn-primary {
    background: #0089d3;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card-header .btn.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

/* Recent History Section */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(42, 49, 66, 0.5);
    transition: all 0.2s ease;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background: rgba(42, 49, 66, 0.3);
    margin: 0 -12px;
    padding: 12px;
    border-radius: 6px;
}

.history-content {
    flex: 1;
}

.history-action {
    font-size: 13px;
    font-weight: 500;
    color: #e8eaed;
    margin-bottom: 4px;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-date {
    font-size: 11px;
    color: #7e8ba3;
}

.history-evolution {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.history-evolution.positive {
    color: rgb(16 185 129 / 67%);
    background: rgba(16, 185, 129, 0.1);
}

.history-evolution.negative {
    color: rgb(255 60 60 / 54%);
    background: rgba(239, 68, 68, 0.1);
}

.history-value {
    font-size: 13px;
    font-weight: 600;
    color: #e8eaed;
    text-align: right;
}

/* Trading Analytics & KPI Cards */
.kpi-card {
    background: #1a1f2e;
    border-radius: 12px;
    padding: 15px 15px 5px 15px;
    border: 1px solid #2a3142;
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #60a5fa;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kpi-label {
    font-size: 13px;
    font-weight: 400;
    color: #7e8ba3;
    letter-spacing: 0.5px;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.kpi-trend.positive {
    color: rgb(16 185 129 / 67%);
    background: none;
    font-size: 15px;
}

.kpi-trend.negative {
    color: rgb(255 60 60 / 54%);
    background: none;
    font-size: 15px;
}

.kpi-trend.neutral {
    color: #7e8ba3;
    background: none;
    font-size: 15px;
}

.kpi-value {
    font-size: 25px;
    font-weight: 400;
    margin-bottom: 8px;
    line-height: 1;
}

.kpi-subtitle {
    font-size: 11px;
    color: #7e8ba3;
    margin-bottom: 12px;
}

/* Consistency Score Progress Bar */
.consistency-bar {
    width: 100%;
    height: 8px;
    background: #242b3d;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.consistency-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgb(16 185 129 / 67%), #059669);
    border-radius: 4px;
    transition: width 0.6s ease-in-out, background 0.3s ease;
}

.consistency-bar-fill.good {
    background: linear-gradient(90deg, rgb(16 185 129 / 67%), #059669);
}

.consistency-bar-fill.medium {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.consistency-bar-fill.poor {
    background: linear-gradient(90deg, rgb(255 60 60 / 54%), #dc2626);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #242b3d;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

/* Chart Cards */
.chart-card {
    background: #1a1f2e;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2a3142;
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e8eaed;
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #2a3142;
    border-radius: 6px;
    color: #7e8ba3;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.chart-btn:hover,
.chart-btn.active {
    background: #0089d3;
    color: white;
    border-color: #0089d3;
}

.chart-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    font-weight: 500;
}

/* Risk Management */
.risk-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.risk-status.healthy {
    color: rgb(16 185 129 / 67%);
    background: rgba(16, 185, 129, 0.1);
}

.risk-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(42, 49, 66, 0.5);
}

.risk-metric:last-child {
    border-bottom: none;
}

.risk-label {
    font-size: 12px;
    color: #7e8ba3;
}

.risk-value {
    font-size: 13px;
    font-weight: 600;
}

/* Responsive adjustments for KPI grid */
@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 1000px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }

    .kpi-card {
        padding: 16px;
    }

    .kpi-value {
        font-size: 24px;
    }

    #addResultModal .form-grid {
        grid-template-columns: 1fr !important;
    }

    #addResultModal .modal-content {
        margin: 16px;
        width: calc(100% - 32px) !important;
    }
}

/* Info Icon Tooltip */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #7e8ba3;
    opacity: 0.7;
    cursor: help;
    transition: all 0.2s ease;
    position: relative;
    width: 14px;
    height: 14px;
}

.info-icon:hover {
    opacity: 1;
    color: #3b82f6;
}

/* Tooltip container */
.info-icon[data-tooltip] {
    position: relative;
}

/* Tooltip bubble */
.info-icon[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #2a3142;
    color: #e8eaed;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    width: 220px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    text-align: center;
    font-weight: 400;
}

/* Tooltip arrow */
.info-icon[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2a3142;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

/* Show tooltip on hover */
.info-icon[data-tooltip]:hover::before,
.info-icon[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Existing Trades Container - Dashboard Modal */
.existing-trades-container {
    background: #1a1f2e;
    border: 1px solid #2a3142;
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    margin-bottom: 12px;
}

.existing-trades-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    color: #7e8ba3;
    font-size: 10px;
    font-weight: 500;
}

.existing-trades-header i {
    color: #0089d3;
    font-size: 9px;
}

/* Cards Wrapper with Horizontal Scroll */
.existing-trades-cards-wrapper {
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
}

.existing-trades-cards-wrapper::-webkit-scrollbar {
    height: 6px;
}

.existing-trades-cards-wrapper::-webkit-scrollbar-track {
    background: #0f1419;
    border-radius: 3px;
}

.existing-trades-cards-wrapper::-webkit-scrollbar-thumb {
    background: #3a4556;
    border-radius: 3px;
}

.existing-trades-cards-wrapper::-webkit-scrollbar-thumb:hover {
    background: #0089d3;
}

/* Cards Container */
.existing-trades-cards {
    display: flex;
    gap: 10px;
    padding: 2px;
    min-height: 80px;
}

/* Individual Trade Card */
.trade-card {
    flex: 0 0 auto;
    min-width: 110px;
    width: 110px;
    height: 90px;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: default;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
}

.trade-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Profit Card - Green */
.trade-card.profit {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.trade-card.profit:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgb(16 185 129 / 67%);
}

/* Loss Card - Red */
.trade-card.loss {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.trade-card.loss:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgb(255 60 60 / 54%);
}

/* Breakeven Card - Gray */
.trade-card.breakeven {
    background: rgba(126, 139, 163, 0.1);
    border-color: rgba(126, 139, 163, 0.2);
}

.trade-card.breakeven:hover {
    background: rgba(126, 139, 163, 0.15);
    border-color: #7e8ba3;
}

/* Card Currency Pair */
.trade-card-pair {
    font-size: 12px;
    font-weight: 400;
    color: #e8eaed;
    text-align: center;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

/* Card Value */
.trade-card-value {
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    letter-spacing: 0.5px;
}

.trade-card-value .currency-symbol {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
}

.trade-card.profit .trade-card-value {
    color: rgb(16 185 129 / 67%);
}

.trade-card.loss .trade-card-value {
    color: rgb(255 60 60 / 54%);
}

.trade-card.breakeven .trade-card-value {
    color: #9ca3af;
}

/* Card Time */
.trade-card-time {
    font-size: 14px;
    font-weight: 500;
    color: #7e8ba3;
    text-align: center;
    margin-top: 2px;
}

/* Trade card delete button */
.trade-card-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
    z-index: 10;
    opacity: 0;
}

.trade-card:hover .trade-card-delete {
    opacity: 1;
}

.trade-card-delete:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

.trade-card-delete:active {
    transform: scale(0.95);
}

/* Card Launch Date (shown when trade was launched on a different day) */
.trade-card-launch-date {
    font-size: 14px;
    font-weight: 500;
    color: #7e8ba3;
    margin-left: 4px;
}

.trade-card-launch-date::before {
    content: "- ";
}

/* Confirm Delete Modal */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.confirm-modal-content {
    position: relative;
    background: #1e293b;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.confirm-modal-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.confirm-modal-icon i {
    font-size: 24px;
    color: #fbbf24;
}

.confirm-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #e8eaed;
    text-align: center;
    margin: 0 0 12px 0;
}

.confirm-modal-message {
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

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

.confirm-btn-cancel,
.confirm-btn-confirm {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn-cancel {
    background: #242b3d;
    color: #e8eaed;
}

.confirm-btn-cancel:hover {
    background: #2d3548;
}

.confirm-btn-confirm {
    background: rgb(255 60 60 / 54%);
    color: white;
}

.confirm-btn-confirm:hover {
    background: #dc2626;
}

.confirm-btn-confirm:active,
.confirm-btn-cancel:active {
    transform: scale(0.98);
}

.existing-trades-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 2px;
    font-size: 10px;
}

.existing-trades-table thead {
    background: #242b3d;
    position: sticky;
    top: 0;
    z-index: 1;
}

.existing-trades-table th {
    padding: 3px 5px;
    text-align: left;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
    font-size: 9px;
    background: #1a1f2e;
}

.existing-trades-table tbody tr {
    border-radius: 3px;
}

.existing-trades-table td {
    padding: 5px 5px;
    color: #e8eaed;
    font-size: 14px;
}

.existing-trades-table td:first-child {
    border-radius: 3px 0 0 3px;
}

.existing-trades-table td:last-child {
    border-radius: 0 3px 3px 0;
    letter-spacing: 0.3px;
}

.existing-trades-table tbody tr.profit-row {
    background: rgba(16, 185, 129, 0.08);
}

.existing-trades-table tbody tr.loss-row {
    background: rgba(239, 68, 68, 0.08);
}

.existing-trades-table tbody tr.breakeven-row {
    background: rgba(126, 139, 163, 0.05);
}

.existing-trades-table tbody tr:hover {
    filter: brightness(1.15);
}

.existing-trades-table .profit {
    color: rgb(16 185 129 / 67%);
}

.existing-trades-table .loss {
    color: rgb(255 60 60 / 54%);
}

.existing-trades-table .breakeven {
    color: #7e8ba3;
}

/* ===================================
   LIGHT THEME - MODAL #addResultModal
   =================================== */

[data-theme="light"] #addResultModal .modal-content {
    background: white !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] #addResultModal .modal-header {
    background: white !important;
    border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] #addResultModal .modal-header h3 {
    color: #1e293b !important;
}

[data-theme="light"] #addResultModal .modal-close {
    color: #64748b !important;
}

[data-theme="light"] #addResultModal .modal-close:hover {
    color: #1e293b !important;
    background: #f1f5f9 !important;
}

[data-theme="light"] #addResultModal .modal-body {
    background: white !important;
}

[data-theme="light"] #addResultModal .modal-footer {
    background: #f8fafc !important;
    border-top-color: #e2e8f0 !important;
}

/* Form Labels */
[data-theme="light"] #addResultModal .form-group label {
    color: #1e293b !important;
}

/* Form Inputs and Selects */
[data-theme="light"] #addResultModal .form-input,
[data-theme="light"] #addResultModal .form-select {
    background: white !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

[data-theme="light"] #addResultModal .form-input:focus,
[data-theme="light"] #addResultModal .form-select:focus {
    border-color: #0089d3 !important;
    background: white !important;
}

[data-theme="light"] #addResultModal .form-input::placeholder {
    color: #94a3b8 !important;
}

[data-theme="light"] #addResultModal .form-input:read-only {
    background: #f8fafc !important;
    color: #64748b !important;
}

/* Select Options */
[data-theme="light"] #addResultModal .form-select option {
    background: white !important;
    color: #1e293b !important;
}

/* Radio Buttons */
[data-theme="light"] #addResultModal .radio-label {
    background: white !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

[data-theme="light"] #addResultModal .radio-option:hover .radio-label {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

[data-theme="light"] #addResultModal .radio-option[data-type="win"] .radio-label {
    color: #059669 !important;
}

[data-theme="light"] #addResultModal .radio-option[data-type="win"] input[type="radio"]:checked + .radio-label {
    background: rgba(5, 150, 105, 0.1) !important;
    border-color: #059669 !important;
}

[data-theme="light"] #addResultModal .radio-option[data-type="loss"] .radio-label {
    color: #dc2626 !important;
}

[data-theme="light"] #addResultModal .radio-option[data-type="loss"] input[type="radio"]:checked + .radio-label {
    background: rgba(220, 38, 38, 0.1) !important;
    border-color: #dc2626 !important;
}

[data-theme="light"] #addResultModal .radio-option[data-type="breakeven"] .radio-label {
    color: #64748b !important;
}

[data-theme="light"] #addResultModal .radio-option[data-type="breakeven"] input[type="radio"]:checked + .radio-label {
    background: rgba(148, 163, 184, 0.1) !important;
    border-color: #94a3b8 !important;
}

/* Chart Paste Area */
[data-theme="light"] #addResultModal #chart_paste_area_dash {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] #addResultModal #chart_placeholder_dash {
    color: #94a3b8 !important;
}

[data-theme="light"] #addResultModal #chart_placeholder_dash strong {
    color: #0089d3 !important;
}

/* Small Text */
[data-theme="light"] #addResultModal small {
    color: #64748b !important;
}

/* Existing Trades Container */
[data-theme="light"] #addResultModal .existing-trades-container {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] #addResultModal .existing-trades-header {
    color: #1e293b !important;
}

[data-theme="light"] #addResultModal .existing-trades-table {
    background: white !important;
}

[data-theme="light"] #addResultModal .existing-trades-table th {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

[data-theme="light"] #addResultModal .existing-trades-table td {
    color: #1e293b !important;
}

[data-theme="light"] #addResultModal .existing-trades-table tbody tr:hover {
    background: #f1f5f9 !important;
    filter: none !important;
}

[data-theme="light"] #addResultModal .existing-trades-table .profit {
    color: #059669 !important;
}

[data-theme="light"] #addResultModal .existing-trades-table .loss {
    color: #dc2626 !important;
}

[data-theme="light"] #addResultModal .existing-trades-table .breakeven {
    color: #64748b !important;
}

/* ===================================
   LIGHT THEME - DASHBOARD CARDS
   =================================== */

[data-theme="light"] .card {
    background: white;
    border-color: #d4dce4 !important;
}

[data-theme="light"] .card-title {
    color: #1e293b;
}

[data-theme="light"] .card-subtitle {
    color: #64748b;
}

[data-theme="light"] .card-value {
    color: #1e293b;
}

/* Week Card */
[data-theme="light"] .week-card {
    background: white;
    border-color: #d4dce4 !important;
}

/* Broker Selector */
[data-theme="light"] .broker-selector {
    background: white;
    border-color: #d4dce4 !important;
}

/* Calendar Navigation Buttons */
[data-theme="light"] .calendar-nav-btn {
    border-color: #d4dce4 !important;
}

/* Account Navigation Buttons */
[data-theme="light"] .account-nav-btn {
    background: white;
    border-color: #d4dce4 !important;
    color: #64748b;
}

[data-theme="light"] .account-nav-btn:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1 !important;
}

/* Search Box */
[data-theme="light"] .search-box {
    background: white;
    border-color: #d4dce4 !important;
}

/* No Broker Modal */
[data-theme="light"] #noBrokerModal .modal-content {
    background: white;
    border-color: #d4dce4 !important;
}

/* Existing Trades Container */
[data-theme="light"] .existing-trades-container {
    background: white;
    border-color: #d4dce4 !important;
}