/* Стили для окон экономики */

/* Окно Портфеля */
.portfolio-content {
    padding: 20px;
}

.net-worth-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.net-worth-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.net-worth-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.real-value {
    font-size: 0.85rem;
    opacity: 0.8;
}

.risk-indicator-container {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.risk-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.risk-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.risk-indicator {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #ffeb3b 50%, #f44336 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.assets-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.assets-table th {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.assets-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.asset-row:hover {
    background: rgba(0, 120, 212, 0.05);
    cursor: pointer;
}

.profit {
    color: #4caf50;
    font-weight: 600;
}

.loss {
    color: #f44336;
    font-weight: 600;
}

/* Окно Рынка */
.market-content {
    padding: 15px;
}

/* Market Status Banner */
.market-status-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
    }
}

.market-status-banner .status-icon {
    font-size: 2.5rem;
    animation: blink 1.5s infinite;
}

.market-status-banner .status-message {
    flex: 1;
    color: white;
}

.market-status-banner .status-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.market-status-banner .status-details {
    font-size: 0.95rem;
    opacity: 0.95;
    line-height: 1.5;
}

.market-ticker {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-text {
    display: inline-block;
    animation: ticker-scroll 20s linear infinite;
}

@keyframes ticker-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Вкладки категорий активов */
.market-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.market-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid transparent;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.market-tab:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.market-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.market-tab .tab-icon {
    font-size: 1.2rem;
}

.market-tab .tab-label {
    font-weight: 600;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.market-table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.market-row:hover {
    background: rgba(0, 120, 212, 0.05);
}

.positive {
    color: #4caf50;
    font-weight: 600;
}

.negative {
    color: #f44336;
    font-weight: 600;
}

.btn-buy {
    background: #4caf50;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-buy:hover {
    background: #45a049;
}

.btn-sell {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-sell:hover {
    background: #da190b;
}

/* Quantity input in market table */
.market-qty-input {
    width: 80px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: right;
}

.market-qty-input:focus {
    outline: none;
    border-color: #0078D4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

/* Окно Банка */
.bank-content {
    padding: 20px;
}

.account-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.account-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.account-balance {
    font-size: 2rem;
    font-weight: bold;
}

.credit-score-display {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.credit-score {
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.credit-rating-label {
    font-size: 0.85rem;
    margin-top: 5px;
    opacity: 0.9;
    transition: color 0.3s ease;
}

.bank-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.bank-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.bank-tab.active {
    color: #0078D4;
    border-bottom-color: #0078D4;
    font-weight: 600;
}

.loans-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loan-item {
    background: rgba(0, 0, 0, 0.03);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f44336;
}

.loan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.loan-rate {
    color: #f44336;
    font-weight: 600;
}

.loan-details {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #666;
}

.btn-payoff {
    background: #0078D4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-payoff:hover {
    background: #005a9e;
}

.btn-sell {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    margin-left: 8px;
}

.btn-sell:hover {
    background: #da190b;
}

.transactions-list {
    max-height: 300px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
}

.transaction-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.transaction-date {
    font-size: 0.8rem;
    color: #999;
    min-width: 80px;
}

.transaction-desc {
    flex: 1;
    font-size: 0.9rem;
    margin: 0 15px;
}

.transaction-amount {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Уведомления */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Стили для вкладки Ключевая ставка */
.keyrate-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.keyrate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

#cb-meetings-list {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0, 0, 0, 0.1);
}

#cb-meetings-list::-webkit-scrollbar {
    width: 8px;
}

#cb-meetings-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

#cb-meetings-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.meeting-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.meeting-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.meeting-item.past {
    opacity: 0.6;
    border-left-color: #999;
}

.meeting-item.upcoming {
    border-left-color: #4caf50;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.05) 0%, white 100%);
}

.meeting-date {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.meeting-year {
    color: #667eea;
    font-weight: 600;
    font-size: 0.85rem;
}

.meeting-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 5px;
}

.meeting-status.completed {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.meeting-status.scheduled {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

/* Окно Жизни */
.life-content {
    padding: 20px;
}

.life-header {
    margin-bottom: 20px;
}

.life-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.stat-row:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: bold;
}

.life-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.finance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.finance-card {
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.finance-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.finance-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.finance-value.positive {
    color: #4caf50;
}

.finance-value.negative {
    color: #f44336;
}

/* Окно Графика */
.chart-window-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chart-asset-info {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.chart-price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.chart-current-price {
    font-size: 2rem;
    font-weight: bold;
}

.chart-change {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.chart-change.positive {
    color: #4caf50;
}

.chart-change.negative {
    color: #f44336;
}

.chart-asset-details {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.chart-timeframe-selector {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.timeframe-btn {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid transparent;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #333;
}

.timeframe-btn:hover {
    background: #f0f0f0;
    border-color: #667eea;
}

.timeframe-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.chart-container {
    flex: 1;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 10px;
    position: relative;
    min-height: 480px;
}

#chart-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Live Trading Indicator */
.chart-live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    margin-top: 10px;
    background: rgba(0, 208, 132, 0.1);
    border: 2px solid #00d084;
    border-radius: 8px;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: #00d084;
        box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.4);
    }
    50% {
        border-color: #00ff9f;
        box-shadow: 0 0 10px 5px rgba(0, 208, 132, 0.6);
    }
}

.live-dot {
    width: 12px;
    height: 12px;
    background: #00d084;
    border-radius: 50%;
    animation: blink 1s infinite;
    box-shadow: 0 0 10px #00d084;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

.live-text {
    font-size: 0.95rem;
    font-weight: bold;
    color: #00d084;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Calendar Window Styles */
.calendar-window-content {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.calendar-header h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    color: #333;
    text-align: center;
}

.calendar-current-status {
    margin-bottom: 25px;
}

.status-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-indicator.open .status-icon {
    font-size: 2.5rem;
    animation: pulse-green 2s infinite;
}

.status-indicator.closed .status-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

@keyframes pulse-green {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.status-info {
    flex: 1;
}

.status-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.status-indicator.open .status-title {
    color: #00d084;
}

.status-indicator.closed .status-title {
    color: #ff4757;
}

.status-message {
    font-size: 1rem;
    color: #666;
    margin-bottom: 5px;
}

.status-time {
    font-size: 0.9rem;
    color: #999;
}

.calendar-sessions h4,
.calendar-holidays h4 {
    margin: 20px 0 15px 0;
    font-size: 1.2rem;
    color: #333;
}

.session-list {
    display: grid;
    gap: 10px;
}

.session-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.session-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.session-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.session-item.highlight .session-desc {
    color: rgba(255, 255, 255, 0.9);
}

.session-time {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #667eea;
}

.session-item.highlight .session-time {
    color: white;
}

.session-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.session-desc {
    font-size: 0.85rem;
    color: #999;
}

.holiday-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.holiday-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.holiday-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.holiday-item.past {
    opacity: 0.5;
    background: #f0f0f0;
}

.holiday-date {
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;
    min-width: 50px;
    text-align: center;
}

.holiday-name {
    font-size: 0.9rem;
    color: #333;
    flex: 1;
}

.calendar-weekend-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    border-radius: 8px;
}

.calendar-weekend-info p {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
}
