/* 指标跟踪样式 */

.tl-mt-target-container {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* 头部 */
.tl-mt-target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tl-mt-target-title {
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.tl-mt-target-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tl-mt-target-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

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

.tl-mt-target-btn.primary {
    background: #0ea5e9;
    color: white;
}

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

.tl-mt-target-btn .material-symbols-outlined {
    font-size: 18px;
}

/* 总览卡片网格 */
.tl-mt-target-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.tl-mt-target-overview-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tl-mt-target-overview-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.tl-mt-target-overview-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-mt-target-overview-icon .material-symbols-outlined {
    font-size: 28px;
}

.tl-mt-target-overview-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.tl-mt-target-overview-icon.yellow {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.tl-mt-target-overview-icon.gray {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

.tl-mt-target-overview-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.tl-mt-target-overview-info {
    flex: 1;
}

.tl-mt-target-overview-name {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.tl-mt-target-overview-value {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* 进度条 */
.tl-mt-target-progress-bar-wrapper {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.tl-mt-target-progress-bar {
    height: 100%;
    transition: width 0.3s;
}

.tl-mt-target-progress-bar.success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.tl-mt-target-progress-bar.primary {
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

.tl-mt-target-progress-bar.warning {
    background: linear-gradient(90deg, #eab308, #ca8a04);
}

.tl-mt-target-progress-bar.gray {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.tl-mt-target-overview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tl-mt-target-overview-progress {
    font-size: 13px;
    color: #64748b;
}

.tl-mt-target-overview-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

.tl-mt-target-overview-status.warning {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

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

.tl-mt-target-overview-status.pending {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

/* 明细卡片 */
.tl-mt-target-detail-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tl-mt-target-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tl-mt-target-detail-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.tl-mt-target-tabs {
    display: flex;
    gap: 8px;
}

.tl-mt-target-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.tl-mt-target-tab.active {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.tl-mt-target-tab:hover:not(.active) {
    background: #f8fafc;
}

.tl-mt-target-detail-body {
    margin-top: 20px;
}

/* 季度汇总 */
.tl-mt-target-quarterly {
    margin-bottom: 32px;
}

.tl-mt-target-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 16px 0;
}

.tl-mt-target-quarterly-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tl-mt-target-quarterly-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

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

.tl-mt-target-quarterly-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.tl-mt-target-quarterly-status {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

.tl-mt-target-quarterly-status.achieved {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.tl-mt-target-quarterly-status.warning {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.tl-mt-target-quarterly-status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.tl-mt-target-quarterly-status.pending {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

.tl-mt-target-quarterly-values {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tl-mt-target-quarterly-values > div {
    display: flex;
    justify-content: space-between;
}

.tl-mt-target-quarterly-label {
    font-size: 12px;
    color: #64748b;
}

.tl-mt-target-quarterly-value {
    font-size: 13px;
    color: #0f172a;
}

.tl-mt-target-quarterly-value.bold {
    font-weight: 600;
}

/* 月度明细 */
.tl-mt-target-monthly {
    margin-top: 24px;
}

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

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

.tl-mt-target-table thead {
    background: #f8fafc;
}

.tl-mt-target-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.tl-mt-target-table th.right,
.tl-mt-target-table td.right {
    text-align: right;
}

.tl-mt-target-table th.center,
.tl-mt-target-table td.center {
    text-align: center;
}

.tl-mt-target-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

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

.tl-mt-target-table td {
    padding: 12px 8px;
    color: #475569;
}

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

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

.tl-mt-target-table td.warning {
    color: #eab308;
}

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

.tl-mt-target-table td.muted {
    color: #94a3b8;
}

/* 状态指示器 */
.tl-mt-target-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tl-mt-target-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tl-mt-target-status-indicator.achieved .tl-mt-target-status-dot {
    background: #22c55e;
}

.tl-mt-target-status-indicator.warning .tl-mt-target-status-dot {
    background: #eab308;
}

.tl-mt-target-status-indicator.failed .tl-mt-target-status-dot {
    background: #ef4444;
}

.tl-mt-target-status-indicator.pending .tl-mt-target-status-dot {
    background: #94a3b8;
}

.tl-mt-target-status-text {
    font-size: 13px;
}

.tl-mt-target-status-indicator.achieved .tl-mt-target-status-text {
    color: #22c55e;
}

.tl-mt-target-status-indicator.warning .tl-mt-target-status-text {
    color: #eab308;
}

.tl-mt-target-status-indicator.failed .tl-mt-target-status-text {
    color: #ef4444;
}

.tl-mt-target-status-indicator.pending .tl-mt-target-status-text {
    color: #94a3b8;
}

/* 响应式 */
@media (max-width: 1024px) {
    .tl-mt-target-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tl-mt-target-quarterly-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tl-mt-target-container {
        padding: 16px;
    }
    
    .tl-mt-target-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .tl-mt-target-overview-grid,
    .tl-mt-target-quarterly-grid {
        grid-template-columns: 1fr;
    }
    
    .tl-mt-target-detail-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .tl-mt-target-tabs {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* 深色模式 */
body.dark .tl-mt-target-title {
    color: #f1f5f9;
}

body.dark .tl-mt-target-select {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark .tl-mt-target-overview-card,
body.dark .tl-mt-target-detail-card {
    background: #1e293b;
}

body.dark .tl-mt-target-overview-name,
body.dark .tl-mt-target-detail-title,
body.dark .tl-mt-target-quarterly-name,
body.dark .tl-mt-target-quarterly-value {
    color: #f1f5f9;
}

body.dark .tl-mt-target-quarterly-card {
    background: #0f172a;
    border-color: #334155;
}

body.dark .tl-mt-target-table thead {
    background: #0f172a;
}

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

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

body.dark .tl-mt-target-table tbody tr:hover {
    background: #0f172a;
}

body.dark .tl-mt-target-table td {
    color: #94a3b8;
}

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

body.dark .tl-mt-target-tab {
    border-color: #334155;
    color: #94a3b8;
}

body.dark .tl-mt-target-tab:hover:not(.active) {
    background: #0f172a;
}

body.dark .tl-mt-target-empty {
    color: #94a3b8;
}

body.dark .tl-mt-target-progress-bar-wrapper {
    background: #334155;
}

body.dark .tl-mt-target-section-title {
    color: #94a3b8;
}

/* 空状态 */
.tl-mt-target-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
    text-align: center;
}

.tl-mt-target-empty .material-symbols-outlined {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.tl-mt-target-empty p {
    font-size: 16px;
    margin: 0;
}

.tl-mt-target-empty-hint {
    font-size: 14px !important;
    margin-top: 8px !important;
    opacity: 0.7;
}
