/**
 * ITX Economic Calendar - Event Single Page Styles
 * Bybit-Style Light Theme v3.2 - Compact Layout
 * Professional, clean, minimalist design
 * 
 * @package ITX_Economic_Calendar
 * @since 2.0.0
 */

/* ═══════════════════════════════════════════════════════════════════
   ОСНОВНОЙ КОНТЕЙНЕР
   ═══════════════════════════════════════════════════════════════════ */

.itx-ec-event-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #2d3748;
    background: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════
   КОМПАКТНЫЙ ЗАГОЛОВОК (Одна строка: Флаг + Название + Метаданные)
   ═══════════════════════════════════════════════════════════════════ */

.event-compact-header {
    background: transparent;
    border: 2px solid #F7A600;
    border-radius: 8px;
    padding: 20px 30px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.event-compact-header .event-flag {
    font-size: 36px;
    line-height: 1;
}

.event-compact-header .event-title {
    flex: 1;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-compact-header .event-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #E2E8F0;
    flex-wrap: wrap;
}

.event-compact-header .event-timer,
.event-compact-header .event-date,
.event-compact-header .event-importance {
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-compact-header .event-separator {
    color: #718096;
}

.event-compact-header .star {
    margin: 0 -2px;
}

/* ═══════════════════════════════════════════════════════════════════
   ГОРИЗОНТАЛЬНЫЕ ПОКАЗАТЕЛИ (3 колонки)
   ═══════════════════════════════════════════════════════════════════ */

.event-indicators-horizontal {
    background: #F7F9FB;
    border: 1px solid #E0E6ED;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.indicators-header {
    font-size: 16px;
    font-weight: 600;
    color: #1A202C;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicators-header i {
    color: #F7A600;
}

.indicators-header .indicators-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #718096;
    margin-left: 8px;
}

.indicators-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.indicator-col {
    text-align: center;
    padding: 8px;
    background: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 6px;
}

.indicator-label {
    font-size: 10px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.indicator-label i {
    font-size: 10px;
    color: #F7A600;
}

.indicator-value {
    font-size: 18px;
    font-weight: 700;
    color: #1A202C;
    line-height: 1.2;
}

.indicator-col-timer .indicator-value-timer {
    font-size: 16px;
    font-family: 'Courier New', monospace;
    color: #F7A600;
}

.timer-label-small {
    text-align: center;
    font-size: 9px;
    color: #718096;
    text-transform: uppercase;
    margin-top: 2px;
}

.indicator-col-timer .timer-released {
    font-size: 14px;
    color: #10B981;
}

/* ═══════════════════════════════════════════════════════════════════
   ДВУХКОЛОНОЧНЫЙ LAYOUT (Таймер/Влияние | О событии)
   ═══════════════════════════════════════════════════════════════════ */

.event-two-column-layout {
    display: block;
    margin-bottom: 24px;
}

.event-right-column-full {
    width: 100%;
}

/* Левая колонка: Таймер + Влияние */
.event-left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-timer-block,
.event-impact-block {
    background: #F7F9FB;
    border: 1px solid #E0E6ED;
    border-radius: 8px;
    padding: 16px;
}

.timer-header,
.impact-header,
.affects-header,
.volatility-header {
    font-size: 14px;
    font-weight: 600;
    color: #1A202C;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    justify-content: space-between;
    width: 100%;
}

.about-header {
    font-size: 14px;
    font-weight: 600;
    color: #1A202C;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    justify-content: flex-start;
    width: 100%;
}

.timer-header i,
.impact-header i,
.about-header i,
.affects-header i,
.volatility-header i {
    color: #F7A600;
}

/* AI Load Button Container - Vertical Group */
.itx-ec-ai-button-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-left: auto;
}

.itx-ec-ai-button-label {
    font-size: 10px;
    font-weight: 500;
    color: #718096;
    line-height: 1.2;
    text-align: right;
    letter-spacing: 0.3px;
}

/* AI Load Button
 * СТАНДАРТ: Все AI кнопки должны использовать единый стиль:
 * - padding: 4px 11px
 * - background: #6366f1
 * - color: #FFFFFF
 * - border-radius: 8px
 * - font-size: 10px
 * - font-weight: 600
 * - box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2)
 * - Эффект shimmer при hover (::before с градиентом)
 * - Текст кнопки начинается с эмодзи ✨
 * - Пример: .itx-ec-fetch-speech-history, .itx-ec-load-ai-btn
 */
.itx-ec-load-ai-btn {
    padding: 4px 11px;
    background: #6366f1;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.itx-ec-load-ai-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.itx-ec-load-ai-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.itx-ec-load-ai-btn:hover::before {
    left: 100%;
}

.itx-ec-load-ai-btn:active {
    transform: translateY(0);
}

.itx-ec-load-ai-btn:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Success state */
.itx-ec-load-ai-btn.success {
    background: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.itx-ec-load-ai-btn.success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Error state */
.itx-ec-load-ai-btn.error {
    background: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    cursor: pointer;
}

.itx-ec-load-ai-btn.error:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.itx-ec-load-ai-btn.error:disabled {
    opacity: 1;
    cursor: not-allowed;
}

.itx-ec-load-ai-btn i {
    font-size: 10px;
}

.itx-ec-load-ai-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

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

.timer-display {
    font-size: 36px;
    font-weight: 700;
    color: #F7A600;
    text-align: center;
    padding: 20px 0;
    font-family: 'Courier New', monospace;
}

.timer-label {
    text-align: center;
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
}

.timer-released {
    font-size: 24px;
    color: #10B981;
}

.impact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.impact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #E0E6ED;
}

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

.impact-label {
    font-size: 13px;
    font-weight: 500;
    color: #4A5568;
}

.impact-value {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
}

.impact-value.impact-high {
    background: #FEE2E2;
    color: #EF4444;
}

.impact-value.impact-medium {
    background: #FEF3C7;
    color: #F59E0B;
}

.impact-value.impact-low {
    background: #D1FAE5;
    color: #10B981;
}

/* Правая колонка: О событии + На что влияет + Прогноз */
.event-right-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-about-block,
.event-affects-block,
.event-volatility-block {
    background: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 8px;
    padding: 20px;
}

.about-content {
    font-size: 14px;
    line-height: 1.6;
    color: #4A5568;
}

.affects-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.affects-list li {
    font-size: 14px;
    color: #4A5568;
    padding-left: 20px;
    position: relative;
}

.affects-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #F7A600;
    font-weight: bold;
}

.volatility-pairs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.volatility-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    align-items: center;
    gap: 12px;
}

.volatility-pair {
    font-size: 13px;
    font-weight: 600;
    color: #1A202C;
}

.volatility-bar-container {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.volatility-bar-fill {
    height: 100%;
    background: #F7A600;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.volatility-bar-fill.high {
    background: #EF4444;
}

.volatility-bar-fill.medium {
    background: #F59E0B;
}

.volatility-bar-fill.low {
    background: #10B981;
}

.volatility-range {
    font-size: 12px;
    color: #718096;
    text-align: right;
}

/* Респонсив для двухколоночного layout */
@media (max-width: 768px) {
    .event-two-column-layout {
        grid-template-columns: 1fr;
    }
    
    .event-compact-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }
    
    .event-compact-header .event-title {
        font-size: 18px;
    }
    
    .indicators-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .indicator-value {
        font-size: 16px;
    }
    
    .indicator-col-timer .indicator-value-timer {
        font-size: 14px;
    }
    
    .volatility-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Скрыть дублирующийся контент из темы WordPress */
.itx-economic-event .entry-header,
.itx-economic-event .entry-meta,
.itx-economic-event .event-meta {
    display: none !important;
}

/* Скрыть только дублирующийся текстовый контент (параграфы), но не наш календарь */
article.itx-economic-event > .entry-content > p,
article.itx_economic_event > .entry-content > p {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   ХЛЕБНЫЕ КРОШКИ
   ═══════════════════════════════════════════════════════════════════ */

.designv2-breadcrumbs {
    margin-bottom: 24px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e6ed;
}

.designv2-breadcrumbs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.designv2-breadcrumbs li {
    display: flex;
    align-items: center;
    margin-right: 8px;
    font-size: 14px;
}

.designv2-breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: #a0aec0;
    font-size: 16px;
}

.designv2-breadcrumbs a {
    color: #718096;
    text-decoration: none;
    transition: color 0.2s;
}

.designv2-breadcrumbs a:hover {
    color: #2d3748;
}

.breadcrumb-active {
    color: #2d3748;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD HEADER - Bybit Style
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 32px 24px;
    background: #ffffff;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    margin-bottom: 24px;
    position: relative;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #f7a600; /* Bybit yellow accent */
    border-radius: 8px 0 0 8px;
}

.dashboard-flag {
    font-size: 48px;
    line-height: 1;
    margin-left: 8px;
}

.dashboard-title-section {
    flex: 1;
}

.dashboard-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.3;
}

.dashboard-subtitle {
    margin: 4px 0 0;
    font-size: 16px;
    color: #718096;
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD CARDS WRAPPER
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-cards-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .dashboard-cards-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD CARD - Bybit Minimalist Style
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.dashboard-card:hover {
    border-color: #cbd5e0;
}

.dashboard-card-header {
    padding: 16px 20px;
    background: #f7fafc;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-card-header i {
    font-size: 16px;
    color: #718096;
}

/* ═══════════════════════════════════════════════════════════════════
   METRICS CARD - Clean Grid
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-metrics-card {
    /* Стили унаследованы от .dashboard-card */
}

.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.metric-item {
    padding: 24px 20px;
    text-align: center;
    border-right: 1px solid #e0e6ed;
    border-bottom: 1px solid #e0e6ed;
    transition: background 0.2s;
    background: #ffffff;
}

.metric-item:nth-child(2n) {
    border-right: none;
}

.metric-item:nth-child(n+3) {
    border-bottom: none;
}

.metric-item:hover {
    background: #f7fafc;
}

/* Tablet: статус под метриками, сетка 2x2 сохраняется */
@media (min-width: 768px) and (max-width: 992px) {
    .dashboard-cards-wrapper {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .dashboard-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-status-card {
        width: 100%;
    }
    
    .status-content {
        padding: 24px;
        min-height: auto;
    }
}

/* Mobile: все элементы в одну колонку */
@media (max-width: 767px) {
    .dashboard-cards-wrapper {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-item {
        border-right: none;
    }
    
    .metric-item:not(:last-child) {
        border-bottom: 1px solid #e0e6ed;
    }
    
    .metric-item:last-child {
        border-bottom: none;
    }
}

.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #a0aec0;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
    margin-bottom: 4px;
    font-family: 'Courier New', monospace;
}

.metric-actual {
    color: #2d3748;
}

.metric-forecast {
    color: #4a5568;
}

.metric-previous {
    color: #718096;
}

.metric-sublabel {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 4px;
}

.metric-diff {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.metric-diff.positive {
    background: #d1fae5;
    color: #065f46;
}

.metric-diff.negative {
    background: #fee2e2;
    color: #991b1b;
}

.metric-diff.neutral {
    background: #f3f4f6;
    color: #6b7280;
}

.importance-star {
    font-size: 24px;
    margin: 0 2px;
}

.importance-star.star-active {
    color: #f7a600; /* Bybit yellow */
}

.importance-star.star-inactive {
    color: #e5e7eb;
}

/* ═══════════════════════════════════════════════════════════════════
   STATUS CARD - Professional
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-status-card {
    /* Стили унаследованы от .dashboard-card */
}

.status-content {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
    justify-content: center;
}

.status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 40px;
    background: #f7fafc;
    border: 2px solid #e0e6ed;
}

.status-icon.status-pending {
    background: #fef3c7;
    border-color: #f7a600;
    color: #92400e;
}

.status-icon.status-released {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.status-info {
    margin-bottom: 20px;
}

.status-label {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-time {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    font-family: 'Courier New', monospace;
    margin-bottom: 4px;
}

.status-date {
    font-size: 14px;
    color: #718096;
}

.countdown-timer {
    color: #f7a600; /* Bybit accent for countdown */
}

.status-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e6ed;
    width: 100%;
}

.status-currency {
    display: inline-block;
    padding: 8px 20px;
    background: #f7fafc;
    color: #2d3748;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD SECTION
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-section {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.dashboard-section-header {
    padding: 16px 24px;
    background: #f7fafc;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-section-title i {
    font-size: 18px;
    color: #718096;
}

.dashboard-section-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-section-content {
    padding: 24px;
    line-height: 1.8;
    color: #4a5568;
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════════
   CHART SECTION
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-chart-section {
    /* Стили унаследованы от .dashboard-section */
}

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

.period-btn {
    padding: 6px 14px;
    border: 1px solid #e0e6ed;
    background: #ffffff;
    color: #718096;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    background: #f7fafc;
    color: #2d3748;
    border-color: #cbd5e0;
}

.period-btn.active {
    background: #f7a600; /* Bybit yellow */
    color: #ffffff;
    border-color: #f7a600;
}

.settings-btn {
    padding: 6px 12px;
    border: 1px solid #e0e6ed;
    background: #ffffff;
    color: #718096;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-btn:hover {
    background: #f7fafc;
    color: #2d3748;
    border-color: #cbd5e0;
}

.chart-container {
    padding: 24px;
}

#chartContainer {
    border-radius: 4px;
    background: #f7fafc;
    margin-bottom: 20px;
    border: 1px solid #e0e6ed;
}

/* Скрыть подпись CanvasJS на графике */
#chartContainer .canvasjs-chart-credit,
#chartContainer a[href*="canvasjs"] {
    display: none !important;
}

.chart-loading {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-size: 14px;
}

.chart-description {
    padding: 16px 24px;
    background: #f7fafc;
    border-top: 1px solid #e0e6ed;
    margin-top: -20px;
}

.chart-description p {
    margin: 0;
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   RECENT VALUES TABLE
   ═══════════════════════════════════════════════════════════════════ */

.recent-values-table {
    padding: 24px;
    border-top: 1px solid #e0e6ed;
}

.recent-values-table h6 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabs */
.values-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e6ed;
    align-items: center;
}

.values-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.values-tab:hover {
    color: #2d3748;
}

.values-tab.active {
    color: #167ac6;
    border-bottom-color: #167ac6;
}

/* AI Update Button */
.itx-ec-update-values-btn {
    padding: 4px 11px;
    background: #6366f1;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.itx-ec-update-values-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.itx-ec-update-values-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.itx-ec-update-values-btn:hover::before {
    left: 100%;
}

.itx-ec-update-values-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.itx-ec-update-values-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.itx-ec-update-values-btn:disabled:hover {
    background: #9ca3af;
    transform: none;
}

.values-tab-content {
    display: none;
}

.values-tab-content.active {
    display: block;
}

.values-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.value-row {
    display: grid;
    grid-template-columns: 80px 80px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #f7fafc;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    transition: all 0.2s;
}

.value-row:hover {
    background: #ffffff;
    border-color: #cbd5e0;
}

.value-date {
    font-size: 13px;
    color: #718096;
    font-weight: 600;
}

.value-number {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    font-family: 'Courier New', monospace;
}

.value-bar {
    position: relative;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

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

.bar-fill.positive {
    background: #10b981;
}

.bar-fill.negative {
    background: #ef4444;
}

.bar-fill.neutral {
    background: #9ca3af;
}

/* ═══════════════════════════════════════════════════════════════════
   HISTORICAL EVENTS SECTION
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-events-section {
    /* Стили унаследованы от .dashboard-section */
}

.dashboard-events-list {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-event-card {
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s;
    background: #ffffff;
}

.dashboard-event-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f7fafc;
    border-bottom: 1px solid #e0e6ed;
}

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

.event-icon {
    font-size: 18px;
}

.event-date-text {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.event-value-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: #f7a600; /* Bybit yellow */
    border-radius: 4px;
    color: #ffffff;
    font-weight: 700;
}

.event-value-icon {
    font-size: 16px;
}

.event-value-text {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-value-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.event-value-change.positive {
    color: #10b981;
}

.event-value-change.negative {
    color: #ef4444;
}

.event-badge-hot {
    font-size: 16px;
}

.event-card-content {
    padding: 20px;
}

.event-card-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.5;
}

.event-card-description {
    margin: 0;
    font-size: 14px;
    color: #718096;
    line-height: 1.7;
}

.event-card-footer {
    padding: 16px 20px;
    background: #f7fafc;
    border-top: 1px solid #e0e6ed;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.event-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    text-decoration: none;
    color: #4a5568;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.event-link:hover {
    background: #f7a600; /* Bybit yellow on hover */
    color: #ffffff;
    border-color: #f7a600;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .itx-ec-event-single {
        padding: 12px;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    
    .dashboard-title {
        font-size: 22px;
    }
    
    .dashboard-subtitle {
        font-size: 14px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .status-content {
        padding: 24px 20px;
        min-height: 150px;
    }
    
    .status-icon {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }
    
    .value-row {
        grid-template-columns: 60px 60px 1fr;
        gap: 8px;
        padding: 10px;
    }
    
    .event-card-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   AI RECOMMENDATIONS & RELATED EVENTS - Bybit Light Theme
   ═══════════════════════════════════════════════════════════════════ */

/* Bybit Light Theme Variables */
:root {
    --bybit-primary: #F7A600;
    --bybit-light-bg: #FFFFFF;
    --bybit-light-card: #F7F9FB;
    --bybit-light-border: #E0E6ED;
    --bybit-light-text: #1A202C;
    --bybit-light-text-secondary: #718096;
    --bybit-success: #10B981;
    --bybit-warning: #F59E0B;
    --bybit-danger: #EF4444;
}

/* AI Recommendations Block */
.dashboard-ai-recommendations {
    background: var(--bybit-light-bg);
    border: 1px solid var(--bybit-light-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.dashboard-ai-recommendations .dashboard-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.dashboard-ai-recommendations .dashboard-section-header i {
    color: var(--bybit-primary);
    font-size: 20px;
}

.dashboard-ai-recommendations h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--bybit-light-text);
}

.ai-placeholder {
    background: var(--bybit-light-card);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    color: var(--bybit-light-text-secondary);
    font-size: 14px;
}

/* Volatility Forecast */
.dashboard-volatility-forecast {
    margin-top: 16px;
}

.volatility-pairs {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.volatility-pair {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bybit-light-card);
    border-radius: 6px;
    border: 1px solid var(--bybit-light-border);
}

.volatility-pair-name {
    font-weight: 600;
    color: var(--bybit-light-text);
    font-size: 14px;
}

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

.volatility-bar {
    width: 100px;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.volatility-bar-fill {
    height: 100%;
    background: var(--bybit-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.volatility-bar-fill.high {
    background: var(--bybit-danger);
}

.volatility-bar-fill.medium {
    background: var(--bybit-warning);
}

.volatility-bar-fill.low {
    background: var(--bybit-success);
}

.volatility-range {
    font-size: 13px;
    color: var(--bybit-light-text-secondary);
    min-width: 80px;
    text-align: right;
}

/* Trading Scenarios */
.dashboard-scenarios {
    margin-top: 20px;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.scenario-card {
    background: var(--bybit-light-card);
    border: 2px solid var(--bybit-light-border);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.scenario-card:hover {
    border-color: var(--bybit-primary);
    box-shadow: 0 4px 12px rgba(247, 166, 0, 0.1);
}

.scenario-card.hawkish {
    border-left: 4px solid var(--bybit-success);
}

.scenario-card.dovish {
    border-left: 4px solid var(--bybit-danger);
}

.scenario-card.neutral {
    border-left: 4px solid var(--bybit-light-text-secondary);
}

.scenario-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--bybit-light-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scenario-icon {
    font-size: 18px;
}

.scenario-potential {
    font-size: 20px;
    font-weight: 700;
    margin: 8px 0;
}

.scenario-potential.positive {
    color: var(--bybit-success);
}

.scenario-potential.negative {
    color: var(--bybit-danger);
}

.scenario-potential.neutral {
    color: var(--bybit-light-text-secondary);
}

.scenario-description {
    font-size: 13px;
    color: var(--bybit-light-text-secondary);
    line-height: 1.5;
}

/* Related Events */
.dashboard-related-events {
    background: var(--bybit-light-bg);
    border: 1px solid var(--bybit-light-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.dashboard-related-events h5 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--bybit-light-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bybit-light-card);
    border: 1px solid var(--bybit-light-border);
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.related-event-item:hover {
    border-color: var(--bybit-primary);
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.related-event-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-event-flag {
    font-size: 24px;
}

.related-event-details {
    flex: 1;
}

.related-event-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--bybit-light-text);
    margin-bottom: 4px;
}

.related-event-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--bybit-light-text-secondary);
}

.related-event-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.related-event-importance {
    display: flex;
    align-items: center;
    gap: 2px;
}

.related-event-importance .star {
    color: var(--bybit-primary);
}

.related-event-importance .star.inactive {
    color: var(--bybit-light-border);
}

/* Subscription Form */
.dashboard-subscription {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 2px solid var(--bybit-primary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.subscription-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.subscription-header i {
    font-size: 24px;
    color: var(--bybit-primary);
}

.subscription-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--bybit-light-text);
}

.subscription-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subscription-channels {
    display: flex;
    gap: 20px;
}

.subscription-channels label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--bybit-light-text);
    cursor: pointer;
    user-select: none;
}

.subscription-channels input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.subscription-timing {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subscription-timing label {
    font-size: 14px;
    color: var(--bybit-light-text);
    font-weight: 500;
}

.subscription-form select,
.subscription-form input[type="email"],
.subscription-form input[type="text"] {
    padding: 12px 16px;
    border: 1px solid var(--bybit-light-border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bybit-light-bg);
    color: var(--bybit-light-text);
    transition: all 0.2s;
}

.subscription-form select:focus,
.subscription-form input:focus {
    outline: none;
    border-color: var(--bybit-primary);
    box-shadow: 0 0 0 3px rgba(247, 166, 0, 0.1);
}

.subscription-form button[type="submit"] {
    padding: 14px 24px;
    background: var(--bybit-primary);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.subscription-form button[type="submit"]:hover {
    background: #E69500;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 166, 0, 0.3);
}

.subscription-form button[type="submit"]:active {
    transform: translateY(0);
}

/* Speech History with Button */
.dashboard-speech-history {
    background: var(--bybit-light-bg);
    border: 1px solid var(--bybit-light-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.dashboard-speech-history .dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dashboard-speech-history h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--bybit-light-text);
}

.itx-ec-fetch-speech-history {
    padding: 4px 11px;
    background: #6366f1;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.itx-ec-fetch-speech-history::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.itx-ec-fetch-speech-history:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.itx-ec-fetch-speech-history:hover::before {
    left: 100%;
}

.itx-ec-fetch-speech-history:active {
    transform: translateY(0);
}

.itx-ec-fetch-speech-history:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Success state */
.itx-ec-fetch-speech-history.success {
    background: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.itx-ec-fetch-speech-history.success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Error state */
.itx-ec-fetch-speech-history.error {
    background: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    cursor: pointer;
}

.itx-ec-fetch-speech-history.error:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.itx-ec-fetch-speech-history.error:disabled {
    opacity: 1;
    cursor: not-allowed;
}

#speech-history-container .placeholder {
    background: var(--bybit-light-card);
    padding: 40px 20px;
    border-radius: 6px;
    text-align: center;
    color: var(--bybit-light-text-secondary);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   ТАБЛИЦА ИСТОРИЧЕСКИХ ДАННЫХ (Bybit Light Style)
   ═══════════════════════════════════════════════════════════════════ */

.dashboard-speech-history table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    margin-top: 16px;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-speech-history thead {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.dashboard-speech-history thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap;
}

.dashboard-speech-history tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.dashboard-speech-history tbody tr:hover {
    background: #f8fafc;
}

.dashboard-speech-history tbody tr:last-child {
    border-bottom: none;
}

.dashboard-speech-history tbody td {
    padding: 16px 12px;
    color: #334155;
    vertical-align: middle;
}

/* Первая колонка (Дата) */
.dashboard-speech-history tbody td:first-child {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    white-space: nowrap;
}

/* Колонка со спикером и темой */
.dashboard-speech-history tbody td:nth-child(2) {
    max-width: 400px;
    line-height: 1.6;
}

.dashboard-speech-history tbody td:nth-child(2) strong {
    color: #0f172a;
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.dashboard-speech-history .speech-topic {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

/* Колонка с реакцией валюты */
.dashboard-speech-history .speech-reaction {
    font-weight: 700;
    font-size: 15px;
    text-align: center;
}

.dashboard-speech-history .speech-reaction.positive {
    color: #16a34a;
}

.dashboard-speech-history .speech-reaction.negative {
    color: #dc2626;
}

/* Сводка под таблицей */
.dashboard-speech-history .speech-history-summary {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.dashboard-speech-history .speech-history-summary h6 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-speech-history .summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.dashboard-speech-history .summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #FFFFFF;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.dashboard-speech-history .summary-stat .label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.dashboard-speech-history .summary-stat .value {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

/* Responsive */
@media (max-width: 768px) {
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    
    .subscription-channels {
        flex-direction: column;
        gap: 12px;
    }
    
    .dashboard-speech-history .dashboard-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .itx-ec-ai-button-group {
        width: 100%;
        align-items: center;
    }
    
    .itx-ec-ai-button-label {
        text-align: center;
    }
    
    .itx-ec-fetch-speech-history {
        width: 100%;
        justify-content: center;
    }
    
    .itx-ec-load-ai-btn {
        width: 100%;
        justify-content: center;
    }
    
    .itx-ec-update-values-btn {
        width: 100%;
        justify-content: center;
    }
    
    .volatility-pair {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .volatility-level {
        width: 100%;
        justify-content: space-between;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════ */

@media print {
    .dashboard-header {
        background: #fff;
        border: 1px solid #000;
    }
    
    .dashboard-header::before {
        display: none;
    }
    
    .dashboard-card,
    .dashboard-section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .dashboard-subscription,
    .itx-ec-fetch-speech-history {
        display: none;
    }
}
