/* ========================================
   Steller - Dashboard Styles
   User Dashboard & Admin Dashboard
   ======================================== */

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
    position: relative;
}

/* Sidebar Navigation */
.dashboard-sidebar {
    width: 280px;
    height: 100vh;
    background: var(--secondary);
    color: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
    transition: all var(--duration-normal) var(--ease);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-header svg {
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease);
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--white);
    border-left-color: var(--primary);
}

.sidebar-nav a.active {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .btn {
    width: 100%;
    justify-content: center;
}

.sidebar-toggle {
    display: none;
}

/* Dashboard Main Content */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: all var(--duration-normal) var(--ease);
}

/* Dashboard Header */
.dashboard-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    color: var(--gray-900);
    margin: 0;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.95rem;
}

.user-name {
    color: var(--gray-600);
    font-weight: 500;
}

.available-balance {
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
}

.time {
    color: var(--gray-400);
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 2rem;
}

/* Stat Cards */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all var(--duration-normal) var(--ease);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header i {
    color: var(--primary);
    font-size: 1.25rem;
}

.card-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.card-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* Status Colored Cards */
.balance-card .card-header i {
    color: var(--success);
}

.equity-card .card-header i {
    color: var(--info);
}

.pnl-card .card-header i {
    color: var(--warning);
}

.positions-card .card-header i {
    color: var(--primary);
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h2 {
    font-size: 1.3rem;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.action-buttons .btn {
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    transition: all var(--duration-fast) var(--ease);
    box-shadow: var(--shadow-sm);
    border: none;
    cursor: pointer;
}

.action-buttons .btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: var(--white);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: var(--white);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.btn-info {
    background: linear-gradient(135deg, var(--info), #1d4ed8);
    color: var(--white);
}

.btn-secondary {
    background: var(--gray-300);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-400);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Trading Terminal */
.trading-terminal {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.terminal-header {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.header-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.terminal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.terminal-header h2 i {
    color: var(--primary);
}

.terminal-subtitle {
    margin: 0.5rem 0 0 0;
    color: var(--gray-500);
    font-size: 0.95rem;
}

/* Terminal Container */
.terminal-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Market Section */
.market-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Chart Section */
.chart-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.chart-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--gray-900);
    font-weight: 600;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease);
}

.chart-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chart-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.chart-placeholder {
    height: 250px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(99, 102, 241, 0.05));
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder svg {
    width: 100%;
    height: 100%;
}

.chart-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.chart-stat {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* Trading Form */
.trading-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-section.premium-section {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.9rem;
}

.form-label {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
    margin: 0;
}

.asset-dropdown {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    color: var(--gray-900);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease);
    font-family: inherit;
}

.asset-dropdown:hover {
    border-color: var(--primary);
}

.asset-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: var(--white);
}

.amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all var(--duration-fast) var(--ease);
}

.amount-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.currency-symbol {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.amount-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--gray-900);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    font-family: inherit;
}

.order-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.order-type-btn {
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.order-type-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.order-type-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.risk-management-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.risk-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.small-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
}

.risk-input {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    color: var(--gray-900);
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease);
    font-family: inherit;
}

.risk-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.risk-ratio-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

.ratio-label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.ratio-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.slider-container {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Trade Actions */
.trade-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

/* Slider Container */
.slider-container {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.slider-value-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.amount-slider {
    width: 100%;
    height: 6px;
    margin: 1rem 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.risk-display {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(245, 158, 11, 0.05));
    border-radius: 6px;
    border-left: 3px solid var(--danger);
}

.risk-value {
    font-weight: 700;
    color: var(--danger);
}

.risk-percentage {
    color: var(--gray-600);
}

/* Direction Selector */
.direction-selector-premium {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.direction-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.direction-btn {
    padding: 1.5rem;
    border: 2px solid var(--gray-300);
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease);
    font-weight: 700;
    font-size: 1rem;
}

.direction-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.direction-btn.up-btn:hover {
    border-color: var(--success);
}

.direction-btn.up-btn.active {
    background: linear-gradient(135deg, var(--success), #059669);
    color: var(--white);
    border-color: var(--success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.direction-btn.down-btn:hover {
    border-color: var(--danger);
}

.direction-btn.down-btn.active {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: var(--white);
    border-color: var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.btn-content i {
    font-size: 1.5rem;
}

/* Market Data Panel */
.market-data-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Technical Analysis */
.indicator-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.indicator-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.indicator-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
}

.indicator-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.indicator-value.neutral {
    color: var(--warning);
}

.indicator-value.positive {
    color: var(--success);
}

.indicator-bar {
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin-top: 0.5rem;
    opacity: 0.6;
}

/* Performance Section */
.performance-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-box {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.stat-icon-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon-small.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stat-icon-small.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-icon-small.info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.stat-icon-small.primary {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 600;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Market Summary */
.market-summary {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
}

.summary-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.summary-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    text-transform: uppercase;
    font-weight: 600;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.summary-value.positive {
    color: var(--success);
}

/* Market Sessions */
.market-sessions-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.session-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.session-name {
    font-weight: 700;
    color: var(--gray-900);
    font-size: 0.9rem;
}

.session-time {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.session-status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
}

.session-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.session-status.active.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.session-status.closed {
    background: rgba(211, 211, 211, 0.3);
    color: var(--gray-600);
}

.session-status.coming {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
}

/* Account Statistics */
.account-statistics {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
}

.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.account-stat-card {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.account-stat-card.highlight {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(99, 102, 241, 0.05));
    border-color: var(--primary);
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 600;
}

.stat-card-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-card-sublabel {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.margin-level-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.margin-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
}

.margin-percent {
    color: var(--primary);
    font-weight: 700;
}

.margin-bar-container {
    position: relative;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.margin-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning));
    transition: width 0.3s ease;
}

.margin-danger-line {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--danger);
}

/* Economic Calendar */
.economic-calendar {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1.25rem;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-event {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--gray-300);
}

.calendar-event.high-impact {
    border-left-color: var(--danger);
}

.calendar-event.medium-impact {
    border-left-color: var(--warning);
}

.calendar-event.low-impact {
    border-left-color: var(--info);
}

.event-time {
    font-weight: 700;
    color: var(--gray-900);
    min-width: 60px;
}

.event-country {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-flag {
    font-size: 1.5rem;
}

.country-name {
    font-weight: 700;
    color: var(--gray-900);
}

.event-title {
    font-weight: 600;
    color: var(--gray-700);
}

.event-impact-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.high-impact .event-impact-badge {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.medium-impact .event-impact-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.low-impact .event-impact-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* Currency Heatmap */
.currency-heatmap-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.heatmap-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.heatmap-title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.heatmap-title i {
    color: var(--danger);
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.heatmap-cell {
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--white);
    text-align: center;
}

.heatmap-cell.very-strong {
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--white);
}

.heatmap-cell.strong {
    background: linear-gradient(135deg, #6ee7b7, #10b981);
    color: var(--white);
}

.heatmap-cell.neutral {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: var(--white);
}

.heatmap-cell.weak {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: var(--white);
}

.heatmap-cell.very-weak {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: var(--white);
}

.currency-code {
    font-size: 1.1rem;
    font-weight: 700;
}

.strength-indicator {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Trading Features Section */
.trading-features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.features-container {
    display: contents;
}

/* Pending Orders */
.pending-orders-panel {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.panel-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-title i {
    color: var(--primary);
}

.pending-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pending-order-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--primary);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.order-pair {
    font-weight: 700;
    color: var(--gray-900);
}

.order-type-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary);
}

.order-type-badge.limit {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
}

.order-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.empty-message {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

/* Open Positions & Trade History */
.open-positions,
.trade-history {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
}

.section-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h2 i {
    color: var(--primary);
}

.position-count,
.active-count {
    padding: 0.4rem 0.8rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.market-ticker {
    display: flex;
    gap: 1.5rem;
    min-width: fit-content;
    flex-wrap: wrap;
}

.ticker-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    min-width: 160px;
    transition: all var(--duration-fast) var(--ease));
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ticker-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1), transparent 70%);
    border-radius: 50%;
}

.ticker-item:hover {
    border-color: rgba(0, 212, 255, 0.4);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(99, 102, 241, 0.08));
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.15);
}

.ticker-symbol {
    font-weight: 700;
    color: var(--white);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.ticker-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    position: relative;
    z-index: 1;
}

.ticker-change {
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.ticker-change::before {
    content: '▲';
    font-size: 0.7rem;
}

.ticker-change.positive {
    color: var(--success);
}

.ticker-change.positive::before {
    color: var(--success);
}

.ticker-change.negative {
    color: var(--danger);
}

.ticker-change.negative::before {
    content: '▼';
    color: var(--danger);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.trades-table,
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
}

.trades-table th,
.history-table th {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.trades-table td,
.history-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.trades-table tr:hover,
.history-table tr:hover {
    background: var(--gray-50);
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge.processing {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* Sections */
section {
    margin-bottom: 2rem;
}

section h2 {
    font-size: 1.3rem;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

section h2 i {
    color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all var(--duration-fast) var(--ease);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: var(--gray-50);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-row.full {
    grid-template-columns: 1fr;
}

/* Trade Actions */
.trade-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.trade-actions .btn {
    flex: 1;
    padding: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease);
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-form {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ========================================
   POSITIONS TABLE & PREDICTIONS TABLE
   ======================================== */

.positions-table-wrapper {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    overflow-x: auto;
}

.positions-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.positions-table thead {
    background: linear-gradient(135deg, var(--secondary) 0%, #0f172a 100%);
    color: var(--white);
}

.positions-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
    color: var(--white);
}

.positions-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--duration-fast) var(--ease);
}

.positions-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.03);
    box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.05);
}

.positions-table td {
    padding: 1rem;
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 500;
}

.positions-table td:first-child {
    color: var(--gray-900);
    font-weight: 700;
}

.positions-table .empty-row {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Trade History / Predictions Table */
.recent-predictions {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
    border: 1px solid var(--gray-100);
}

.recent-predictions .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
}

.recent-predictions .section-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recent-predictions .section-header h2 i {
    color: var(--primary);
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--duration-fast) var(--ease);
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.view-all-link:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-dark);
    transform: translateX(4px);
}

.view-all-link i {
    font-size: 0.85rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.predictions-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
}

.predictions-table thead {
    background: linear-gradient(135deg, var(--secondary) 0%, #0f172a 100%);
    color: var(--white);
}

.predictions-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
    color: var(--white);
}

.predictions-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--duration-fast) var(--ease);
}

.predictions-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.03);
    box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.05);
}

.predictions-table td {
    padding: 1rem;
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 500;
}

.predictions-table td:first-child {
    color: var(--gray-900);
    font-weight: 700;
}

.predictions-table .empty-row {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Direction badges for trade history */
.predictions-table .direction-up {
    color: var(--success);
    font-weight: 700;
}

.predictions-table .direction-down {
    color: var(--danger);
    font-weight: 700;
}

/* Result status badges */
.predictions-table .result-win {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-block;
}

.predictions-table .result-loss {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-block;
}

.predictions-table .result-closed {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-block;
}

/* P/L color coding */
.predictions-table .pnl-positive {
    color: var(--success);
    font-weight: 700;
}

.predictions-table .pnl-negative {
    color: var(--danger);
    font-weight: 700;
}

.predictions-table .pnl-neutral {
    color: var(--gray-600);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .trading-terminal {
        padding: 1.5rem;
    }

    .terminal-container {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .dashboard-sidebar {
        width: 260px;
    }

    .dashboard-header {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .header-content {
        gap: 1rem;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .header-info {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .dashboard-sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 999;
        transition: left var(--duration-normal) var(--ease);
        top: 0;
    }

    .dashboard-sidebar.active {
        left: 0;
    }

    .dashboard-main {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--gray-700);
        cursor: pointer;
    }

    .dashboard-header {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .dashboard-header h1 {
        font-size: 1.3rem;
    }

    .header-info {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .market-ticker {
        gap: 1rem;
    }

    .ticker-item {
        min-width: 120px;
        padding: 0.75rem;
    }

    .terminal-container {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .chart-controls {
        flex-wrap: wrap;
    }

    .order-type-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .risk-management-grid {
        grid-template-columns: 1fr;
    }

    .trades-table,
    .history-table {
        font-size: 12px;
    }

    .trades-table th,
    .history-table th,
    .trades-table td,
    .history-table td {
        padding: 0.75rem 0.5rem;
    }

    .modal-content {
        width: 95%;
    }

    /* Mobile heatmap - 2 columns */
    .heatmap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header h1 {
        font-size: 1.1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .header-info {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .card-amount {
        font-size: 1.5rem;
    }

    .trading-terminal {
        padding: 1rem;
    }

    .terminal-header h2 {
        font-size: 1.2rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .chart-placeholder {
        height: 200px;
    }

    .chart-stats {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 1rem;
    }

    .order-type-selector {
        grid-template-columns: 1fr;
    }

    .section-title-wrapper {
        flex-wrap: wrap;
    }

    .trades-table,
    .history-table {
        font-size: 11px;
    }

    .trades-table th,
    .history-table th,
    .trades-table td,
    .history-table td {
        padding: 0.5rem;
    }

    .form-row {
        gap: 1rem;
    }

    .trade-actions {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .positions-table-wrapper,
    .table-responsive {
        overflow-x: auto;
    }

    .positions-table,
    .predictions-table {
        font-size: 0.8rem;
    }

    .positions-table th,
    .predictions-table th,
    .positions-table td,
    .predictions-table td {
        padding: 0.5rem 0.25rem;
    }

    .positions-table th {
        font-size: 0.75rem;
    }
}
