/* WK17 周报看板样式 - UI视觉层 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    font-size: 10pt;
    background: #ffffff;
    color: #333333;
    line-height: 1.6;
}

/* Header */
.header {
    background: #ffffff;
    color: #333333;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    text-align: center;
}

.header h1 {
    font-size: 16pt;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.header p {
    font-size: 10pt;
    color: #666;
}

/* Layout */
.layout {
    display: flex;
    min-height: calc(100vh - 100px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    padding: 15px;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 50px;
    padding: 15px 5px;
}

.sidebar.collapsed .toc-title,
.sidebar.collapsed .toc-list {
    display: none;
}

.toggle-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 9pt;
    margin-bottom: 15px;
    transition: background 0.3s ease;
}

.toggle-btn:hover {
    background: #5a6fd6;
}

.toc-title {
    font-weight: bold;
    font-size: 11pt;
    color: #667eea;
    margin-bottom: 10px;
    padding-left: 10px;
}

.toc-list {
    list-style-type: none;
}

.toc-list li {
    padding: 8px 10px;
    border-bottom: 1px dotted #ddd;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toc-list li:hover {
    background: #e8e8e8;
}

.toc-list li:last-child {
    border-bottom: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Section */
.section {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
    background: white;
}

.section-header {
    background: #ffffff;
    padding: 12px 15px;
    border-bottom: 2px solid #667eea;
    font-weight: bold;
    font-size: 11pt;
    color: #333;
}

.section-content {
    padding: 15px;
}

/* Subsection */
.subsection {
    margin-bottom: 15px;
}

.subsection-title {
    font-weight: bold;
    font-size: 10pt;
    color: #667eea;
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 3px solid #667eea;
}

/* Metric Grid */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.metric-card {
    border: 1px solid #e0e0e0;
    padding: 10px;
    border-radius: 4px;
    background: #fafafa;
}

.metric-label {
    font-size: 9pt;
    color: #666;
    margin-bottom: 3px;
}

.metric-value {
    font-size: 12pt;
    font-weight: bold;
    color: #333;
}

.metric-change {
    font-size: 9pt;
    margin-top: 3px;
}

/* Change Colors */
.positive {
    color: #28a745;
}

.negative {
    color: #dc3545;
}

.neutral {
    color: #ffc107;
}

/* Alert Box */
.alert-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 9pt;
}

.alert-box.urgent {
    background: #f8d7da;
    border-color: #dc3545;
}

/* Case Box */
.case-box {
    border: 1px solid #ddd;
    padding: 12px;
    margin: 10px 0;
    border-radius: 4px;
    background: #f9f9f9;
}

.case-title {
    font-weight: bold;
    font-size: 10pt;
    color: #667eea;
    margin-bottom: 8px;
}

/* Region Tags */
.region-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 8pt;
    font-weight: bold;
    margin-right: 5px;
}

.region-or { background: #e3f2fd; color: #1565c0; }
.region-fr-n { background: #e8f5e9; color: #2e7d32; }
.region-fr-s { background: #fff3e0; color: #ef6c00; }
.region-kids { background: #fce4ec; color: #c2185b; }

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.summary-item {
    border: 1px solid #e0e0e0;
    padding: 12px;
    border-radius: 4px;
    background: #f9f9f9;
}

.summary-item h3 {
    font-size: 10pt;
    color: #667eea;
    margin-bottom: 8px;
    font-weight: bold;
}

.summary-item p {
    font-size: 9pt;
    line-height: 1.5;
}

/* Horizontal Line */
.horizontal-line {
    height: 1px;
    background: #e0e0e0;
    margin: 15px 0;
}

/* Note */
.note {
    font-size: 8pt;
    color: #999;
    font-style: italic;
    margin-top: 10px;
}

/* Lists */
ul {
    padding-left: 20px;
    margin: 5px 0;
}

li {
    margin: 3px 0;
}

/* Highlight Summary */
.highlight-summary {
    background: #ffffff;
    color: #333333;
    border: 1px solid #ddd;
    margin-bottom: 30px;
}

.highlight-summary .section-header {
    background: #ffffff;
    color: #333333;
    border-bottom: 2px solid #667eea;
}

.highlight-summary .summary-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
}

.highlight-summary .summary-item h3 {
    color: #667eea;
}

.highlight-summary .summary-item p {
    color: #333333;
}

/* 下钻展示样式 */
.drilldown-level {
    margin-top: 15px;
}

.back-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 9pt;
    margin-bottom: 15px;
}

.back-btn:hover {
    background: #5a6fd6;
}

.region-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.region-summary-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-summary-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.region-summary-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.region-icon {
    font-size: 16pt;
    margin-right: 8px;
}

.region-name {
    font-weight: bold;
    font-size: 12pt;
    color: #333;
    flex: 1;
}

.region-subtitle {
    font-size: 9pt;
    color: #666;
}

.region-summary-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 4px;
}

.stat-label {
    display: block;
    font-size: 8pt;
    color: #666;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 11pt;
    font-weight: bold;
    color: #333;
}

.stat-value.warning {
    color: #ffc107;
}

.stat-value.danger {
    color: #dc3545;
}

.drilldown-hint {
    text-align: center;
    margin-top: 10px;
    font-size: 9pt;
    color: #667eea;
    font-weight: bold;
}

.region-detail-header {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.region-detail-header h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.region-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.urgent-section, .store-section {
    margin-top: 15px;
}

.urgent-section h4, .store-section h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.store-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
}

.store-table th {
    background: #667eea;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: bold;
}

.store-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

.store-table tr:hover {
    background: #f5f5f5;
    cursor: pointer;
}

.store-table tr:hover td {
    background: #f5f5f5;
}

.store-detail-header {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.store-detail-header h3 {
    color: #667eea;
    margin-bottom: 5px;
}

.store-code {
    font-size: 10pt;
    color: #666;
}

.store-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

.detail-label {
    font-size: 9pt;
    color: #666;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 12pt;
    font-weight: bold;
    color: #333;
}

.detail-value.highlight {
    color: #667eea;
}

.detail-value.warning {
    color: #ffc107;
}

/* 历史案例表格 */
.case-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
    margin-top: 10px;
}

.case-history-table th {
    background: #667eea;
    color: white;
    padding: 10px 8px;
    text-align: left;
    font-weight: bold;
    font-size: 9pt;
}

.case-history-table td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 9pt;
}

.case-history-table tr:hover {
    background: #f5f5f5;
}

.case-history-table tr:nth-child(even) {
    background: #fafafa;
}

.case-history-table tr:nth-child(even):hover {
    background: #f0f0f0;
}

/* Responsive */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .sidebar.collapsed {
        width: 100%;
    }
    
    .metric-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .region-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .region-detail-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
