/* ============================================
 * WEEKLY REPORT VIEWER — Báo cáo tuần
 * Module: modules/weekly_report_viewer.css
 * ============================================ */

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-surface: #f8fafc;
    --accent-primary: #6366f1;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

[data-theme="dark"], body.dark-mode, .dark-mode {
    --bg-primary: #0a0e1a;
    --bg-card: #1a1f35;
    --bg-surface: rgba(26, 31, 53, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(99, 102, 241, 0.15);
}

/* ── Container ─────────────────────────────── */
.wreport-container {
    padding: 0 4px;
    color: var(--text-primary);
}

.wreport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.wreport-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.wreport-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wreport-week-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    padding: 4px;
}

.wreport-week-nav button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wreport-week-nav button:hover {
    background: rgba(99, 102, 241, 0.1);
}

.wreport-week-label {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
    color: var(--text-primary);
}

.wreport-export-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    background: var(--bg-card, #fff);
    color: var(--text-primary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wreport-export-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* ── Health Banner ─────────────────────────── */
.wreport-health-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 14px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.wreport-health-banner.green {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: #ecfdf5;
}

.wreport-health-banner.yellow {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    color: #fefce8;
}

.wreport-health-banner.red {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    color: #fef2f2;
}

.wreport-health-emoji {
    font-size: 2.5rem;
    line-height: 1;
}

.wreport-health-text h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
}

.wreport-health-text p {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.85;
}

/* ── Metrics Grid ──────────────────────────── */
.wreport-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.wreport-metric {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}

.wreport-metric::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 12px 0 0 12px;
}

.wreport-metric.completion::after { background: #22c55e; }
.wreport-metric.hub::after { background: #3b82f6; }
.wreport-metric.blocked::after { background: #ef4444; }
.wreport-metric.hours::after { background: #f59e0b; }

.wreport-metric-label {
    font-size: 0.72rem;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.wreport-metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.wreport-metric-sub {
    font-size: 0.78rem;
    color: var(--text-secondary, #64748b);
    margin-top: 4px;
}

/* ── Progress Ring ─────────────────────────── */
.wreport-progress-ring {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

/* ── Member Table ──────────────────────────── */
.wreport-members {
    margin-bottom: 24px;
}

.wreport-members h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.wreport-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.wreport-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #94a3b8);
    border-bottom: 2px solid var(--border-color, #e2e8f0);
    font-weight: 600;
}

.wreport-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-primary);
}

.wreport-table tr:hover td {
    background: rgba(99, 102, 241, 0.03);
}

.wreport-table .member-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wreport-table .member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.wreport-mini-bar {
    width: 80px;
    height: 6px;
    background: var(--border-color, #e2e8f0);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.wreport-mini-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.6s ease;
}

/* ── Highlights & Blockers ─────────────────── */
.wreport-section {
    margin-bottom: 24px;
}

.wreport-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.wreport-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wreport-list li {
    padding: 10px 14px;
    border-left: 3px solid;
    margin-bottom: 8px;
    border-radius: 0 8px 8px 0;
    background: var(--bg-card, #fff);
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.wreport-list.highlights li { border-color: #22c55e; }
.wreport-list.blockers li { border-color: #ef4444; }

/* ── VP TGĐ Submit Status ─────────────────── */
.wreport-submit-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-size: 0.82rem;
}

.wreport-submit-status.submitted {
    border-color: #22c55e;
    background: #f0fdf4;
}

.wreport-submit-status.pending {
    border-color: #f59e0b;
    background: #fffbeb;
}
