/* Price 组件样式 */

/* ==================== Price 容器 ==================== */

.tl-mt-price-container {
    padding: 24px;
}

/* ==================== 筛选栏 ==================== */

.tl-mt-price-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

body.dark .tl-mt-price-filter-bar {
    background: #1e293b;
}

.tl-mt-price-filter-left,
.tl-mt-price-filter-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tl-mt-price-filter-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

body.dark .tl-mt-price-filter-select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.tl-mt-price-filter-select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.tl-mt-price-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.tl-mt-price-filter-btn.primary {
    background: #0ea5e9;
    color: #ffffff;
}

.tl-mt-price-filter-btn.primary:hover {
    background: #0284c7;
}

.tl-mt-price-filter-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

body.dark .tl-mt-price-filter-btn.secondary {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

.tl-mt-price-filter-btn.secondary:hover {
    background: #e2e8f0;
}

body.dark .tl-mt-price-filter-btn.secondary:hover {
    background: #475569;
}

/* ==================== 统计卡片 ==================== */

.tl-mt-price-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.tl-mt-price-stats-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.15s;
}

body.dark .tl-mt-price-stats-card {
    background: #1e293b;
    border-color: #334155;
}

.tl-mt-price-stats-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tl-mt-price-stats-card.warning {
    border-left: 4px solid #eab308;
}

.tl-mt-price-stats-card-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.tl-mt-price-stats-card-info-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

body.dark .tl-mt-price-stats-card-info-label {
    color: #94a3b8;
}

.tl-mt-price-stats-card-info-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

body.dark .tl-mt-price-stats-card-info-value {
    color: #f1f5f9;
}

.tl-mt-price-stats-card-info-value.yellow {
    color: #eab308;
}

.tl-mt-price-stats-card-info-value.green {
    color: #22c55e;
}

.tl-mt-price-stats-card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-mt-price-stats-card-icon-wrapper.red {
    background: rgba(239, 68, 68, 0.1);
}

.tl-mt-price-stats-card-icon-wrapper.blue {
    background: rgba(14, 165, 233, 0.1);
}

.tl-mt-price-stats-card-icon-wrapper.yellow {
    background: rgba(234, 179, 8, 0.1);
}

.tl-mt-price-stats-card-icon-wrapper.purple {
    background: rgba(168, 85, 247, 0.1);
}

.tl-mt-price-stats-card-icon {
    font-size: 24px;
}

.tl-mt-price-stats-card-icon.red {
    color: #ef4444;
}

.tl-mt-price-stats-card-icon.blue {
    color: #0ea5e9;
}

.tl-mt-price-stats-card-icon.yellow {
    color: #eab308;
}

.tl-mt-price-stats-card-icon.purple {
    color: #a855f7;
}

.tl-mt-price-stats-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.tl-mt-price-stats-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.tl-mt-price-stats-card-trend.up {
    color: #ef4444;
}

.tl-mt-price-stats-card-trend.down {
    color: #22c55e;
}

.tl-mt-price-stats-card-trend.neutral {
    color: #64748b;
}

body.dark .tl-mt-price-stats-card-trend.neutral {
    color: #94a3b8;
}

.tl-mt-price-stats-card-trend-icon {
    font-size: 16px;
}

.tl-mt-price-stats-card-trend-label {
    color: #94a3b8;
}

/* ==================== 图表网格 ==================== */

.tl-mt-price-charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 1024px) {
    .tl-mt-price-charts-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.tl-mt-price-charts-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tl-mt-price-chart-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

body.dark .tl-mt-price-chart-card {
    background: #1e293b;
    border-color: #334155;
}

.tl-mt-price-chart-card.large {
    height: 400px;
}

.tl-mt-price-chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.tl-mt-price-chart-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

body.dark .tl-mt-price-chart-card-title {
    color: #f1f5f9;
}

.tl-mt-price-chart-card-subtitle {
    font-size: 12px;
    color: #64748b;
}

body.dark .tl-mt-price-chart-card-subtitle {
    color: #94a3b8;
}

.tl-mt-price-chart-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tl-mt-price-chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

body.dark .tl-mt-price-chart-legend-item {
    color: #94a3b8;
}

.tl-mt-price-chart-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.tl-mt-price-chart-legend-dot.red {
    background: #ef4444;
}

.tl-mt-price-chart-legend-dot.blue {
    background: #0ea5e9;
}

.tl-mt-price-chart-legend-line {
    width: 32px;
    height: 0;
    border-top: 2px dashed #ef4444;
}

.tl-mt-price-chart-canvas {
    flex: 1;
    min-height: 300px;
}

.tl-mt-price-region-chart {
    height: 200px;
}

/* ==================== 价格影响因子 ==================== */

.tl-mt-price-factors {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tl-mt-price-factor-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tl-mt-price-factor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.tl-mt-price-factor-label {
    color: #334155;
}

body.dark .tl-mt-price-factor-label {
    color: #cbd5e1;
}

.tl-mt-price-factor-effect {
    font-weight: 500;
    font-size: 13px;
}

.tl-mt-price-factor-effect.good {
    color: #22c55e;
}

.tl-mt-price-factor-effect.bad {
    color: #ef4444;
}

.tl-mt-price-factor-effect.neutral {
    color: #64748b;
}

.tl-mt-price-factor-bar-wrapper {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

body.dark .tl-mt-price-factor-bar-wrapper {
    background: #334155;
}

.tl-mt-price-factor-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.tl-mt-price-factor-bar.green {
    background: #22c55e;
}

.tl-mt-price-factor-bar.yellow {
    background: #eab308;
}

.tl-mt-price-factor-bar.red {
    background: #ef4444;
}

.tl-mt-price-factor-bar.gray {
    background: #94a3b8;
}

/* ==================== 价格表格 ==================== */

.tl-mt-price-table-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

body.dark .tl-mt-price-table-card {
    background: #1e293b;
    border-color: #334155;
}

.tl-mt-price-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    gap: 16px;
    flex-wrap: wrap;
}

body.dark .tl-mt-price-table-header {
    border-bottom-color: #334155;
}

.tl-mt-price-table-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

body.dark .tl-mt-price-table-title {
    color: #f1f5f9;
}

.tl-mt-price-table-subtitle {
    font-size: 14px;
    color: #64748b;
}

body.dark .tl-mt-price-table-subtitle {
    color: #94a3b8;
}

.tl-mt-price-table-actions {
    display: flex;
    gap: 12px;
}

.tl-mt-price-table-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}

.tl-mt-price-table-action-btn.primary {
    background: #0ea5e9;
    color: #ffffff;
}

.tl-mt-price-table-action-btn.primary:hover {
    background: #0284c7;
}

.tl-mt-price-table-action-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

body.dark .tl-mt-price-table-action-btn.secondary {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

.tl-mt-price-table-wrapper {
    overflow-x: auto;
}

.tl-mt-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tl-mt-price-table thead {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

body.dark .tl-mt-price-table thead {
    background: #0f172a;
    border-bottom-color: #334155;
}

.tl-mt-price-table th {
    padding: 16px 24px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.dark .tl-mt-price-table th {
    color: #94a3b8;
}

.tl-mt-price-table th.right {
    text-align: right;
}

.tl-mt-price-table th.center {
    text-align: center;
}

.tl-mt-price-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.15s;
}

body.dark .tl-mt-price-table tbody tr {
    border-bottom-color: #334155;
}

.tl-mt-price-table tbody tr:hover {
    background: #f8fafc;
}

body.dark .tl-mt-price-table tbody tr:hover {
    background: #334155;
}

.tl-mt-price-table td {
    padding: 16px 24px;
    color: #334155;
}

body.dark .tl-mt-price-table td {
    color: #cbd5e1;
}

.tl-mt-price-table td.bold {
    font-weight: 600;
    color: #0f172a;
}

body.dark .tl-mt-price-table td.bold {
    color: #f1f5f9;
}

.tl-mt-price-table td.right {
    text-align: right;
}

.tl-mt-price-table td.center {
    text-align: center;
}

.tl-mt-price-table td.danger {
    color: #ef4444;
}

.tl-mt-price-table td.success {
    color: #22c55e;
}

.tl-mt-price-table td.neutral {
    color: #64748b;
}

.tl-mt-price-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tl-mt-price-badge.market {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.tl-mt-price-badge.long {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.tl-mt-price-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tl-mt-price-change .material-symbols-outlined {
    font-size: 16px;
}

.tl-mt-price-deviation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100px;
    margin: 0 auto;
}

.tl-mt-price-deviation-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

body.dark .tl-mt-price-deviation-bar {
    background: #334155;
}

.tl-mt-price-deviation-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.tl-mt-price-deviation-fill.red {
    background: #ef4444;
}

.tl-mt-price-deviation-fill.green {
    background: #22c55e;
}

.tl-mt-price-deviation-text {
    font-size: 11px;
    color: #94a3b8;
}

.tl-mt-price-suggest {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tl-mt-price-suggest.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.tl-mt-price-suggest.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.tl-mt-price-suggest.primary {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.tl-mt-price-detail-btn {
    padding: 4px 12px;
    background: none;
    border: none;
    color: #0ea5e9;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
}

.tl-mt-price-detail-btn:hover {
    color: #0284c7;
}

.tl-mt-price-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

body.dark .tl-mt-price-table-footer {
    background: #0f172a;
    border-top-color: #334155;
}

.tl-mt-price-table-info {
    font-size: 12px;
    color: #64748b;
}

.tl-mt-price-table-pagination {
    display: flex;
    gap: 8px;
}

.tl-mt-price-table-page-btn {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

body.dark .tl-mt-price-table-page-btn {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

.tl-mt-price-table-page-btn:hover:not(:disabled) {
    background: #f1f5f9;
}

body.dark .tl-mt-price-table-page-btn:hover:not(:disabled) {
    background: #334155;
}

.tl-mt-price-table-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 高级筛选样式 ==================== */

.tl-mt-price-advanced-filter {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

body.dark .tl-mt-price-advanced-filter {
    background: #1e293b;
    border-color: #334155;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tl-mt-price-advanced-filter-row {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .tl-mt-price-advanced-filter-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tl-mt-price-advanced-filter-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tl-mt-price-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tl-mt-price-filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

body.dark .tl-mt-price-filter-group label {
    color: #cbd5e1;
}

.tl-mt-price-filter-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tl-mt-price-filter-range span {
    color: #94a3b8;
}

.tl-mt-price-filter-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #475569;
    background: #ffffff;
    transition: all 0.2s;
}

body.dark .tl-mt-price-filter-input {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

.tl-mt-price-filter-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.tl-mt-price-filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.tl-mt-price-btn-secondary,
.tl-mt-price-btn-primary {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.tl-mt-price-btn-secondary {
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

body.dark .tl-mt-price-btn-secondary {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
}

.tl-mt-price-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.dark .tl-mt-price-btn-secondary:hover {
    background: #475569;
}

.tl-mt-price-btn-primary {
    background: #0ea5e9;
    color: #ffffff;
}

.tl-mt-price-btn-primary:hover {
    background: #0284c7;
}

/* ==================== 自定义列配置样式 ==================== */

.tl-mt-column-config-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .tl-mt-column-config-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tl-mt-column-config-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .tl-mt-column-config-item {
    background: #334155;
}

.tl-mt-column-config-item:hover {
    background: #e2e8f0;
}

body.dark .tl-mt-column-config-item:hover {
    background: #475569;
}

.tl-mt-column-config-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.tl-mt-column-config-item span {
    font-size: 0.875rem;
    color: #475569;
}

body.dark .tl-mt-column-config-item span {
    color: #e2e8f0;
}
