@charset "UTF-8";
/* ==========================================================================
   WAYS STATION RECRUITMENT REPORT - CLEAN MODERN LIGHT THEME
   ========================================================================== */

:root {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-focus: #cbd5e1;
    
    /* WAYS STATION OFFICIAL BRAND PALETTE */
    --brand-blue: #049af0;         /* Xanh Dương Điện Thương Hiệu (Primary) */
    --brand-blue-hover: #0284c7;
    --brand-blue-dark: #0369a1;
    --brand-blue-light: #e0f2fe;
    --brand-blue-border: #7dd3fc;
    --brand-blue-glow: rgba(4, 154, 240, 0.15);

    --brand-orange: #ff7033;       /* Cam Năng Động Điểm Nhấn (Accent) */
    --brand-orange-hover: #ea580c;
    --brand-orange-light: #fff7ed;
    --brand-orange-border: #fed7aa;
    --brand-orange-glow: rgba(255, 112, 51, 0.2);

    --primary: var(--brand-blue);
    --primary-hover: var(--brand-blue-hover);
    --primary-light: var(--brand-blue-light);
    --primary-border: var(--brand-blue-border);

    --accent: var(--brand-orange);
    --accent-hover: var(--brand-orange-hover);
    --accent-light: var(--brand-orange-light);
    --accent-border: var(--brand-orange-border);

    --blue: var(--brand-blue);
    --blue-light: var(--brand-blue-light);
    --purple: #7c3aed;
    --purple-light: #f5f3ff;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --red: #dc2626;
    --red-light: #fef2f2;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   HEADER & SYNCHRONIZED CONTAINER
   ========================================================================== */

.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #fb923c);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.brand-text p {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.2;
}

.header-controls-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.filter-dropdown-wrapper {
    position: relative;
}

.picker-btn {
    height: 38px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0 12px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.picker-btn:hover {
    border-color: var(--border-focus);
    background: var(--bg-hover);
}

.picker-btn.has-pending-sync {
    border-color: #fb923c;
    background: #fff7ed;
}

.picker-btn .picker-label {
    text-align: left;
    white-space: nowrap;
}

.picker-btn .caret {
    color: var(--text-light);
    font-size: 11px;
}

.date-badge {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
}

.picker-btn.has-pending-sync .date-badge {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fdba74;
}

.btn-sync {
    height: 38px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    border: none;
    padding: 0 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.btn-sync:hover {
    background: #334155;
    transform: translateY(-1px);
}

.btn-sync.needs-sync:not(.loading) {
    background: linear-gradient(135deg, #ff7033, #ea580c);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

.btn-sync.needs-sync:not(.loading):hover {
    background: linear-gradient(135deg, #fb923c, #c2410c);
}

.sync-pending-dot {
    display: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fef08a;
    box-shadow: 0 0 0 2px rgba(254, 240, 138, 0.35);
    flex-shrink: 0;
}

.btn-sync.needs-sync:not(.loading) .sync-pending-dot {
    display: inline-block;
    animation: syncPulseDot 1.6s ease-in-out infinite;
}

@keyframes syncPulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.28); opacity: 0.75; }
}

.btn-sync.spinning i, .btn-sync.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   DROPDOWN POPOVERS
   ========================================================================== */

.dropdown-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 60;
    min-width: 280px;
    max-width: 340px;
    overflow: hidden;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-popover.hidden {
    display: none !important;
}

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

.dropdown-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.dropdown-search input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-main);
}

.popover-scroll-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
}

.group-title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    padding: 8px 10px 4px;
    letter-spacing: 0.5px;
}

.dropdown-item {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}

.dropdown-item:hover, .dropdown-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* Group Headers in Position Dropdown */
.dropdown-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    margin-top: 6px;
    margin-bottom: 2px;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.dropdown-group-header:hover {
    background: #e2e8f0;
    border-color: var(--border-color);
}

.dropdown-group-header.active {
    background: var(--primary-light);
    border-color: rgba(234, 88, 12, 0.3);
}

.group-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dropdown-group-header.active .group-header-left {
    color: var(--primary);
}

.group-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    transition: all 0.15s ease;
}

.dropdown-group-header:hover .group-badge {
    border-color: #cbd5e1;
    color: var(--text-main);
}

.dropdown-group-header.active .group-badge {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.dropdown-item-sub {
    padding-left: 24px;
    position: relative;
    font-size: 12.5px;
}

.dropdown-item-sub .sub-bullet {
    margin-right: 6px;
    color: var(--text-light);
    font-size: 11px;
}

.dropdown-item-sub:hover .sub-bullet,
.dropdown-item-sub.active .sub-bullet {
    color: var(--primary);
}

/* Date Popover */
.date-popover {
    min-width: 260px;
    padding: 8px;
}

.date-presets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.date-preset-btn {
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.date-preset-btn:hover, .date-preset-btn.active {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
    font-weight: 600;
}

.custom-date-section {
    padding: 8px 4px;
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
}

.custom-date-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.date-input-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 3px;
}

.date-input-group input[type="date"] {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    font-size: 12.5px;
    outline: none;
}

.btn-primary-sm {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 7px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary-sm:hover {
    background: var(--primary-hover);
}

.popover-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.date-popover-footer {
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compare-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.date-pending-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    line-height: 1.35;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-sm);
    padding: 6px 8px;
}

.date-pending-hint.hidden {
    display: none;
}

/* ==========================================================================
   DASHBOARD BODY & KPI CARDS
   ========================================================================== */

.dashboard-body {
    padding: 24px;
    max-width: 1440px;
    margin: 0 auto;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 90;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kpi-card.highlight {
    border-top: 3px solid var(--primary);
}

#kpi-card-interviews {
    position: relative;
    z-index: 120;
    overflow: visible !important;
}

#kpi-card-interviews:hover,
#kpi-card-interviews:focus-within {
    z-index: 150;
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.kpi-title {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.kpi-icon.orange { background: var(--primary-light); color: var(--primary); }
.kpi-icon.blue { background: var(--blue-light); color: var(--blue); }
.kpi-icon.purple { background: var(--purple-light); color: var(--purple); }
.kpi-icon.teal { background: #f0fdfa; color: #0d9488; }
.kpi-icon.green { background: var(--green-light); color: var(--green); }
.kpi-icon.amber { background: #fefce8; color: #ca8a04; }

.kpi-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 6px;
}

.text-green { color: var(--green) !important; }
.text-orange { color: var(--primary) !important; }
.text-purple { color: var(--purple) !important; }
.text-teal { color: #0d9488 !important; }

.kpi-compare {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.4;
}

.kpi-subtext {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.diff-positive { color: var(--green) !important; font-weight: 600; }
.diff-negative { color: var(--red) !important; font-weight: 600; }
.diff-neutral { color: var(--text-muted) !important; font-weight: 500; }

/* Sub-badge so sánh trong ô bảng (Rule 27) */
.table-diff-sub {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 3px;
    white-space: nowrap;
}
.table-diff-sub.diff-positive { color: var(--green) !important; }
.table-diff-sub.diff-negative { color: var(--red) !important; }
.table-diff-sub.diff-neutral { color: var(--text-light) !important; }

/* Badge so sánh biến động số lead trong danh sách TTXL (Rule 27) */
.legend-comp {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.legend-comp.diff-positive { color: var(--green) !important; background: var(--green-light); }
.legend-comp.diff-negative { color: var(--red) !important; background: var(--red-light); }
.legend-comp.diff-neutral { color: var(--text-muted) !important; background: #f1f5f9; }

/* ==========================================================================
   REPORT SECTIONS & TABLES
   ========================================================================== */

.report-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.section-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #ffffff;
}

.section-title-cluster h2 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
    margin-bottom: 2px;
}

.section-title-cluster p {
    font-size: 12.5px;
    color: var(--text-muted);
}

.sub-tabs-container {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
}

.sub-tab-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.sub-tab-btn:hover {
    color: var(--text-main);
}

.sub-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-pane.hidden {
    display: none !important;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.report-table thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.report-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.report-table tbody tr:hover {
    background-color: #f8fafc;
}

.report-table tbody tr.clickable-row {
    cursor: pointer;
}

.report-table tbody tr.active-group-row {
    background-color: rgba(37, 99, 235, 0.08) !important;
    border-left: 3px solid var(--primary);
}

.report-table tfoot tr,
.report-table tfoot tr.table-total-row,
.table-total-row {
    background: #f8fafc;
    font-weight: 700;
}

.report-table tfoot td,
.table-total-row td {
    padding: 13px 16px;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-main);
    font-size: 13px;
    white-space: nowrap;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* Badges */
.badge {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    display: inline-block;
}

.badge-green { background: var(--green-light); color: var(--green); }
.badge-orange { background: var(--primary-light); color: var(--primary); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-gray { background: #f1f5f9; color: var(--text-muted); }

.format-tag {
    background: #f1f5f9;
    color: var(--text-main);
    font-size: 11.5px;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    white-space: nowrap;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }
    .header-controls-group {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .sub-tabs-container {
        width: 100%;
        overflow-x: auto;
    }
    .sync-banner-inner {
        padding: 8px 16px;
    }
    .sync-stage-center {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .header-controls-group {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-dropdown-wrapper, .picker-btn, .btn-sync {
        width: 100%;
        justify-content: space-between;
    }
    .sync-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 12px;
    }
    .sync-status-cluster {
        justify-content: flex-end;
    }
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-body {
        padding: 16px 12px;
    }
}

/* Button Xem lại tất cả 14 vị trí trên Bảng 1 */
.btn-view-all-positions {
    background: #ffffff;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.btn-view-all-positions:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.active-filtered-row {
    background-color: var(--primary-light) !important;
}

/* ==========================================================================
   HEADER SYNC TIMESTAMP BADGE (HÌNH 4)
   ========================================================================== */
.sync-timestamp-badge {
    height: 38px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0 12px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.sync-timestamp-badge i {
    color: var(--primary);
    font-size: 13px;
}

/* ==========================================================================
   2 BIỂU ĐỒ TỶ TRỌNG TỔNG QUAN (HÌNH 3)
   ========================================================================== */
.overview-charts-section {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.overview-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.chart-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-title-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.chart-title-icon.blue { background: var(--blue-light); color: var(--blue); }
.chart-title-icon.orange { background: var(--primary-light); color: var(--primary); }
.chart-title-icon.teal { background: #f0fdfa; color: #0d9488; }

.chart-title-text h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.chart-title-text p {
    font-size: 12px;
    color: var(--text-muted);
}

.chart-badge {
    background: #f8fafc;
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.chart-card-body {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 18px;
    align-items: center;
    min-height: 280px;
}

.chart-legend-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
}

.chart-visual-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ==========================================================================
   INTERACTIVE SVG DONUT CHART & FLOATING TOOLTIP
   ========================================================================== */
.donut-chart-box {
    position: relative;
    width: 210px;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.donut-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.donut-slice {
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, filter 0.25s ease;
    transform-origin: 110px 110px;
    outline: none;
}

.donut-slice:hover,
.donut-slice.slice-active {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

.donut-svg.has-hover .donut-slice:not(.slice-active):not(:hover) {
    opacity: 0.45;
}

/* Tooltip Nổi Bay Theo Chuột */
.chart-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: #0f172a;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    box-shadow: 0 8px 20px -2px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    line-height: 1.4;
    opacity: 1;
    transform: translate(0, 0);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.chart-tooltip.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
}

.chart-tooltip .tooltip-header {
    font-weight: 700;
    font-size: 12.5px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
}

.chart-tooltip .tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.chart-tooltip .tooltip-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 11.5px;
    color: #94a3b8;
}

.chart-tooltip .tooltip-pct {
    color: #fb923c;
    font-weight: 700;
    font-size: 12px;
}

/* ==========================================================================
   LEGEND LIST ITEMS
   ========================================================================== */
.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 12px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.legend-item:hover,
.legend-item.legend-item-active {
    background: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.15);
    transform: translateX(4px);
}

.legend-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.legend-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-name {
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legend-item-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.legend-pct {
    font-weight: 700;
    color: var(--primary);
    font-size: 11.5px;
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.legend-val {
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 500;
}

/* ==========================================================================
   TAB 4: TRẠNG THÁI TƯ VẤN CHĂM SÓC (TTXL - HÌNH 2)
   ========================================================================== */
.status-consultation-card {
    padding: 24px;
    background: #ffffff;
}

.status-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.status-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-title-text h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.status-title-text p {
    font-size: 12.5px;
    color: var(--text-muted);
}

.status-card-badge {
    background: #f0fdfa;
    color: #0d9488;
    border: 1px solid #99f6e4;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.status-card-body {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 24px;
    align-items: center;
    min-height: 280px;
}

.status-legend-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 8px;
}

.status-visual-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Scrollbar mượt mà cho các danh sách legend */
.chart-legend-list::-webkit-scrollbar,
.status-legend-list::-webkit-scrollbar {
    width: 5px;
}

.chart-legend-list::-webkit-scrollbar-track,
.status-legend-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: var(--radius-full);
}

.chart-legend-list::-webkit-scrollbar-thumb,
.status-legend-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}

.chart-legend-list::-webkit-scrollbar-thumb:hover,
.status-legend-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive cho Overview Charts & Tab 4 */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .overview-charts-grid {
        grid-template-columns: 1fr;
    }
    .chart-card-body,
    .status-card-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .chart-visual-wrapper,
    .status-visual-wrapper {
        order: -1;
        margin-bottom: 8px;
    }
}

/* ==========================================================================
/* ==========================================================================
   SMART PROGRESS BANNER (KIỂU A) - MƯỢT MÀ, KHÔNG GIỰT, ĐỒNG BỘ MÀU SẮC
   ========================================================================== */
.sync-loading-banner {
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sync-loading-banner.hidden {
    display: none !important;
}

.sync-banner-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sync-stage-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.sync-spinner-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

.sync-step-badge {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Cụm ở giữa (Chỗ khoanh đỏ): Dòng trạng thái + Thanh tiến trình nằm gọn gàng bên dưới */
.sync-stage-center {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    max-width: 620px;
    min-width: 0;
}

.sync-stage-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.35;
    opacity: 1;
}

.sync-progress-track {
    width: 100%;
    height: 5px;
    background: #fed7aa;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.sync-progress-fill {
    height: 100%;
    width: 10%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.25s linear;
}

.sync-status-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sync-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #c2410c;
    background: #ffedd5;
    border: 1px solid #fed7aa;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.5px;
}

.sync-timer-badge i {
    font-size: 11px;
    color: var(--primary);
}

.sync-pct-badge {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: #ffffff;
    border: 1px solid #fed7aa;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    min-width: 48px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* Success State */
.sync-loading-banner.sync-completed {
    background: #f0fdf4;
    border-bottom-color: #86efac;
}

.sync-loading-banner.sync-completed .sync-spinner-icon {
    background: #16a34a;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

.sync-loading-banner.sync-completed .sync-step-badge {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.sync-loading-banner.sync-completed .sync-timer-badge {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.sync-loading-banner.sync-completed .sync-timer-badge i {
    color: #16a34a;
}

.sync-loading-banner.sync-completed .sync-pct-badge {
    color: #16a34a;
    border-color: #86efac;
}

.sync-loading-banner.sync-completed .sync-progress-fill {
    background: #16a34a;
    width: 100% !important;
}

/* Error State */
.sync-loading-banner.sync-error {
    background: #fef2f2;
    border-bottom-color: #fca5a5;
}

.sync-loading-banner.sync-error .sync-spinner-icon {
    background: #dc2626;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.sync-loading-banner.sync-error .sync-step-badge {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.sync-loading-banner.sync-error .sync-timer-badge {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.sync-loading-banner.sync-error .sync-timer-badge i {
    color: #dc2626;
}

.sync-loading-banner.sync-error .sync-pct-badge {
    color: #dc2626;
    border-color: #fca5a5;
}

.sync-loading-banner.sync-error .sync-progress-fill {
    background: #dc2626;
}

/* ==========================================================================
   GIAO DIỆN ĐĂNG NHẬP CHUYÊN NGHIỆP WAYS STATION (LOGIN PORTAL)
   ========================================================================== */

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090e1a;
    padding: 24px;
    overflow-y: auto;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hiệu ứng nền Mesh Gradient & Khối sáng thở đa chiều */
.login-mesh-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 50% 15%, rgba(234, 88, 12, 0.22) 0%, transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(37, 99, 235, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 15% 75%, rgba(234, 88, 12, 0.15) 0%, transparent 45%),
        #090e1a;
    pointer-events: none;
}

.login-glow-sphere {
    position: absolute;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.18) 0%, transparent 70%);
    filter: blur(80px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.95; }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    margin: auto;
}

/* Thẻ đăng nhập Glassmorphism cao cấp */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 24px;
    padding: 38px 34px;
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.45),
        0 0 35px rgba(234, 88, 12, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card.shake {
    animation: shakeCard 0.4s ease-in-out;
}

@keyframes shakeCard {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Header của Thẻ Đăng Nhập */
.login-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand-badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 10px 22px rgba(234, 88, 12, 0.4);
    transition: transform 0.3s ease;
}

.login-brand-badge:hover {
    transform: rotate(10deg) scale(1.05);
}

.login-brand-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #0f172a;
    margin-bottom: 6px;
}

.login-brand-subtitle {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 20px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-divider .divider-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.login-divider .divider-text {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-divider .divider-text i {
    color: var(--primary);
}

/* Thông Báo Lỗi Shake Alert */
.login-error-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    animation: fadeIn 0.25s ease-out;
}

.login-error-alert.hidden {
    display: none !important;
}

.login-error-alert i {
    font-size: 16px;
    flex-shrink: 0;
    color: #dc2626;
}

/* Nhóm Ô Nhập Dữ Liệu */
.login-input-group {
    margin-bottom: 18px;
    text-align: left;
}

.login-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    font-size: 15px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.input-with-icon input {
    width: 100%;
    height: 48px;
    padding: 0 42px 0 40px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.input-with-icon input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(234, 88, 12, 0.15);
}

.input-with-icon input:focus + .btn-pwd-toggle,
.input-with-icon input:focus ~ .input-icon {
    color: var(--primary);
}

.btn-pwd-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-pwd-toggle:hover {
    color: var(--primary);
}

/* Hàng Tùy Chọn & Bảo Mật */
.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #475569;
    font-weight: 500;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 3px 10px;
}

/* Nút Submit Đăng Nhập */
.btn-login-submit {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 20px -3px rgba(234, 88, 12, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn-login-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #fb923c 0%, #c2410c 100%);
    transform: translateY(-1.5px);
    box-shadow: 0 14px 26px -3px rgba(234, 88, 12, 0.5);
}

.btn-login-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.btn-login-submit .btn-content,
.btn-login-submit .btn-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login-submit .btn-spinner.hidden,
.btn-login-submit .btn-content.hidden {
    display: none !important;
}

/* Footer Thẻ */
.login-card-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.login-footer-info {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-footer-info i {
    color: var(--primary);
}

/* ==========================================================================
   USER SESSION CLUSTER & NÚT ĐĂNG XUẤT TRÊN HEADER
   ========================================================================== */

.user-session-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-full);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.02em;
}

.user-status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 2.5px rgba(34, 197, 94, 0.25);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.btn-logout i {
    font-size: 13px;
    transition: transform 0.2s;
}

.btn-logout:hover i {
    transform: translateX(2px);
}

/* ==========================================================================
   BIỂU ĐỒ ĐƯỜNG XU HƯỚNG THEO THỜI GIAN (LINE TREND CHART - TƯƠNG TỰ FACEBOOK ADS)
   ========================================================================== */

.timeline-chart-section {
    margin: 24px 0;
    width: 100%;
}

.timeline-chart-section.hidden {
    display: none !important;
}

.timeline-chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px 26px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    position: relative;
    transition: box-shadow 0.25s ease;
}

.timeline-chart-card:hover {
    box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.07);
}

.timeline-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 18px;
}

.timeline-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.timeline-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(37, 99, 235, 0.18));
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}

.timeline-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-title-row h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.timeline-range-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 9999px;
    border: 1px solid #bae6fd;
}

.timeline-header-text p {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
}

/* NÚT DROPDOWN CHỌN CHỈ SỐ THEO PHONG CÁCH ẢNH 3 */
.timeline-header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.metric-dropdown-wrapper {
    position: relative;
}

.metric-pill-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    user-select: none;
    min-width: 190px;
    background: var(--pill-bg, #f8fafc);
    border: 1.5px solid var(--pill-border, #e2e8f0);
}

.metric-pill-btn:hover {
    background: var(--pill-hover-bg, #f1f5f9) !important;
    border-color: var(--metric-color, #94a3b8) !important;
    box-shadow: 0 4px 14px var(--pill-shadow, rgba(0, 0, 0, 0.08)) !important;
    transform: translateY(-1px);
}

.metric-pill-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--metric-color, #64748b);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.metric-pill-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.metric-pill-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.metric-pill-sub {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
}

.metric-pill-caret {
    font-size: 11px;
    color: #64748b;
    margin-left: 2px;
    transition: transform 0.2s;
}

.metric-dropdown-wrapper.open .metric-pill-caret {
    transform: rotate(180deg);
}

.metric-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    max-height: 380px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.18);
    z-index: 1000;
    padding: 8px;
    animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 10px;
}

.metric-dropdown-item:hover {
    background: #f8fafc;
}

.metric-dropdown-item.active {
    background: #f0f9ff;
}

.metric-dropdown-item.active-line-2 {
    background: #f0fdf4;
}

.metric-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-item-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.metric-item-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
}

.metric-item-val {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-align: right;
}

/* VÙNG VẼ BIỂU ĐỒ SVG */
.timeline-chart-body {
    position: relative;
    width: 100%;
    min-height: 330px;
    user-select: none;
}

.timeline-svg-container {
    width: 100%;
    height: 330px;
}

.timeline-svg-container svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.timeline-grid-line {
    stroke: #f1f5f9;
    stroke-dasharray: 4, 4;
    stroke-width: 1;
}

.timeline-axis-label {
    font-size: 11px;
    fill: #64748b;
    font-family: 'Inter', -apple-system, sans-serif;
    user-select: none;
}

.timeline-axis-left {
    font-weight: 600;
    text-anchor: end;
}

.timeline-axis-right {
    font-weight: 600;
    text-anchor: start;
}

.timeline-date-label {
    font-size: 11px;
    fill: #64748b;
    text-anchor: middle;
    font-weight: 500;
}

.timeline-line-1,
.timeline-line-2 {
    fill: none;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.timeline-point-1,
.timeline-point-2 {
    fill: #ffffff;
    stroke-width: 2.5;
    transition: r 0.15s ease, stroke-width 0.15s ease;
}

.timeline-point-1.active,
.timeline-point-2.active {
    r: 6;
    stroke-width: 3.5;
}

.timeline-guideline {
    stroke: #94a3b8;
    stroke-dasharray: 3, 3;
    stroke-width: 1.5;
    pointer-events: none;
}

/* TOOLTIP NỔI THEO PHONG CÁCH FACEBOOK TRONG ẢNH 1 */
.timeline-floating-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 50;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04);
    min-width: 190px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.12s ease;
}

.timeline-floating-tooltip .tooltip-date {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.timeline-floating-tooltip .tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 5px;
    font-size: 12px;
}

.timeline-floating-tooltip .tooltip-row:last-child {
    margin-bottom: 0;
}

.timeline-floating-tooltip .tooltip-row-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-weight: 500;
}

.timeline-floating-tooltip .tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.timeline-floating-tooltip .tooltip-row-val {
    font-weight: 700;
    color: #0f172a;
}

/* BOTTOM LEGEND */
.timeline-chart-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding-top: 14px;
    border-top: 1px solid #f8fafc;
    flex-wrap: wrap;
}

.timeline-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    cursor: default;
}

.timeline-legend-bar {
    width: 16px;
    height: 8px;
    border-radius: 2px;
}

/* ==========================================================================
   BIỂU ĐỒ ĐỐI ỨNG KỲ SO SÁNH (COMPARE TIMELINE CHART)
   ========================================================================== */
.timeline-compare-section {
    position: relative;
}

.compare-card-border {
    border: 1.5px dashed #cbd5e1;
    background: #ffffff;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.compare-card-border:hover {
    border-color: #94a3b8;
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.08);
}

.compare-icon-badge {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.compare-range-badge {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
    font-weight: 700;
}

.metric-sync-pill {
    cursor: default;
    position: relative;
    user-select: none;
}

.metric-sync-pill:hover {
    transform: none !important;
}

.sync-lock-badge {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

/* ==========================================================================
   BẢNG SỐ LIỆU THỐNG KÊ NGUỒN DATA TUYỂN DỤNG
   ========================================================================== */
.section-title-badge-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-total-sources {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
}

.source-item-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-heading);
}

.source-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.source-note-cell {
    font-size: 12.5px;
    color: var(--text-muted);
}

.source-note-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11.5px;
    font-weight: 500;
}

.source-pct-cluster {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.source-progress-bar {
    width: 60px;
    height: 6px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.source-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
}

.badge-channel {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
}

.badge-channel.ads-in {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.badge-channel.ads-out {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.source-total-row {
    background: #f8fafc;
    font-weight: 700;
}

.source-total-row td {
    border-top: 2px solid var(--border-color);
}

/* ==========================================================================
   TOOLTIP QUY TẮC XÁC ĐỊNH LỊCH HẸN PHỎNG VẤN (PV) CHO TỪNG KHỐI (TỐI GIẢN ĐEN TRẮNG / XÁM TRẮNG)
   ========================================================================== */
.kpi-title-cluster {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kpi-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 200;
}

.kpi-tooltip-trigger {
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #64748b;
    font-size: 13.5px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.kpi-tooltip-trigger:hover,
.kpi-tooltip-trigger:focus,
.kpi-tooltip-wrapper:hover .kpi-tooltip-trigger {
    color: #0f172a;
    opacity: 1;
    transform: scale(1.15);
}

.kpi-rule-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: -10px;
    width: 360px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.06);
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
    text-align: left;
}

/* Mũi tên chỉ vào icon dấu hỏi */
.kpi-rule-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 11px;
    height: 11px;
    background: #ffffff;
    transform: rotate(45deg);
    border-top: 1px solid #cbd5e1;
    border-left: 1px solid #cbd5e1;
    z-index: 1000000;
}

/* Hiển thị khi hover trên PC hoặc click/tap (class .show) */
.kpi-tooltip-wrapper:hover .kpi-rule-popover,
.kpi-rule-popover.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.rule-popover-header {
    padding: 11px 14px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
}

.rule-popover-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.rule-popover-title i {
    color: #334155;
    font-size: 13px;
}

.rule-popover-badge {
    font-size: 10px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 1.5px 7px;
    border-radius: 6px;
}

.rule-popover-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
}

.rule-group-card {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: all 0.15s ease;
}

.rule-group-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Khi khối được chọn xem -> Highlight đen trắng rõ ràng, không màu mè */
.rule-group-card.active-highlight {
    background: #f8fafc;
    border: 1.5px solid #0f172a;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.rule-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.rule-group-name {
    font-size: 11.5px;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rule-group-icon {
    font-size: 12px;
    color: #475569;
    width: 14px;
    text-align: center;
}

.rule-active-tag {
    display: none;
    font-size: 9.5px;
    font-weight: 700;
    color: #ffffff;
    background: #0f172a;
    padding: 1px 6px;
    border-radius: 4px;
    align-items: center;
    gap: 3px;
}

.rule-group-card.active-highlight .rule-active-tag {
    display: inline-flex;
}

.rule-group-desc {
    font-size: 11px;
    line-height: 1.4;
    color: #475569;
}

.rule-group-desc code {
    background: #f1f5f9;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 10.5px;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-weight: 600;
}

.rule-group-desc b {
    color: #0f172a;
    font-weight: 700;
}

.rule-popover-footer {
    padding: 7px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    font-size: 10px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rule-popover-footer i {
    color: #64748b;
}

/* ==========================================================================
   ADSET, STATUS BADGES & BUDGET DISPLAY (TAB 1 CHI TIẾT MÃ BÀI)
   ========================================================================== */
.adset-title {
    color: #0f172a;
    font-weight: 600;
    font-size: 13px;
    display: block;
    line-height: 1.35;
    max-width: 260px;
}

.code-badge {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-weight: 700;
    font-size: 12px;
    padding: 2.5px 8px;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.budget-unit {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.budget-subtext {
    font-size: 11.5px;
    color: #64748b;
    font-style: italic;
}

.badge-status-active {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    white-space: nowrap;
}
.badge-status-active i { font-size: 8px; }

.badge-status-paused {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    white-space: nowrap;
}
.badge-status-paused i { font-size: 8.5px; }

.badge-status-scheduled {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    white-space: nowrap;
}
.badge-status-scheduled i { font-size: 9px; }

.badge-status-pending {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    white-space: nowrap;
}
.badge-status-pending i { font-size: 9px; }

.badge-status-disapproved {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    white-space: nowrap;
}
.badge-status-disapproved i { font-size: 9px; }

.badge-status-archived {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    white-space: nowrap;
}
.badge-status-archived i { font-size: 9px; }

/* ==========================================================================
   WAYS STATION BRAND LOGO & ACCENT SYSTEM (SPEC 010)
   ========================================================================== */
.brand-logo {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1.5px solid rgba(4, 154, 240, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(4, 154, 240, 0.1);
    padding: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--brand-blue-hover);
}

.login-brand-badge {
    width: 76px;
    height: 76px;
    background: #ffffff;
    border: 2px solid rgba(4, 154, 240, 0.25);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(4, 154, 240, 0.15);
    padding: 8px;
    overflow: hidden;
}

.login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.login-brand-title {
    color: var(--brand-blue-hover) !important;
}

/* Nút Đồng Bộ Mang Màu Cam Điểm Nhấn Thương Hiệu */
.sync-btn {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-hover)) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(255, 112, 51, 0.28) !important;
    font-weight: 600;
}

.sync-btn:hover {
    background: linear-gradient(135deg, #ff824d, var(--brand-orange)) !important;
    box-shadow: 0 4px 16px rgba(255, 112, 51, 0.38) !important;
    transform: translateY(-1px);
}

/* Nút Đăng Nhập Mang Màu Xanh Chủ Đạo */
.btn-login-submit {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-hover)) !important;
    box-shadow: 0 4px 14px rgba(4, 154, 240, 0.25) !important;
}

.btn-login-submit:hover {
    box-shadow: 0 6px 20px rgba(4, 154, 240, 0.35) !important;
}

/* Thanh Tiến Trình Chuyển Màu Gradient Xanh -> Cam */
.sync-progress-fill {
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange)) !important;
}

/* ==========================================================================
   RECRUITMENT TARGETS (NHU CẦU TUYỂN DỤNG CHI NHÁNH) - NÚT HEADER & MODAL
   ========================================================================== */

/* Nút Bấm Trên Header */
.btn-recruitment-targets {
    height: 38px;
    background: #ffffff;
    border: 1.5px solid var(--brand-blue-border);
    padding: 0 14px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-blue-dark);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(4, 154, 240, 0.12);
}

.btn-recruitment-targets:hover {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 154, 240, 0.22);
}

.btn-recruitment-targets:active {
    transform: translateY(0);
}

.btn-targets-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    font-size: 14px;
    transition: transform 0.2s ease;
}

.btn-recruitment-targets:hover .btn-targets-icon {
    transform: scale(1.15) rotate(15deg);
}

.btn-targets-label {
    letter-spacing: -0.2px;
}

.targets-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-hover));
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 800;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
    letter-spacing: 0.2px;
    transition: transform 0.2s ease;
}

.btn-recruitment-targets:hover .targets-badge-count {
    transform: scale(1.08);
}

/* Modal Overlay & Backdrop */
.targets-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.targets-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.targets-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal Container */
.targets-modal-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1040px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.targets-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    gap: 16px;
}

.targets-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.targets-header-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-hover));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(4, 154, 240, 0.3);
    flex-shrink: 0;
}

.targets-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.targets-title-row h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.3px;
    margin: 0;
}

.targets-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: var(--green-light);
    color: var(--green);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(22, 163, 74, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.targets-header-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.targets-header-desc strong {
    color: var(--brand-blue-dark);
}

.targets-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-targets-refresh {
    height: 34px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-targets-refresh:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
    color: var(--brand-blue);
}

.btn-targets-refresh.loading i {
    animation: fa-spin 1s infinite linear;
}

.btn-targets-close {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-targets-close:hover {
    background: var(--red-light);
    border-color: #fecaca;
    color: var(--red);
}

/* 4 Mini KPI Cards Grid */
.targets-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.target-kpi-card {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.target-kpi-card:hover {
    border-color: var(--border-focus);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.target-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.target-kpi-icon.blue {
    background: var(--brand-blue-light);
    color: var(--brand-blue);
}

.target-kpi-icon.purple {
    background: var(--purple-light);
    color: var(--purple);
}

.target-kpi-icon.orange {
    background: var(--brand-orange-light);
    color: var(--brand-orange);
}

.target-kpi-icon.green {
    background: var(--green-light);
    color: var(--green);
}

.target-kpi-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.target-kpi-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.target-kpi-val {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin: 2px 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.target-kpi-sub {
    font-size: 11px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Toolbar: Tabs & Search / Filters */
.targets-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    gap: 14px;
    flex-wrap: wrap;
}

.targets-tabs-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-page);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.targets-tab-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 6px;
    background: transparent;
    border: none;
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.targets-tab-btn:hover {
    color: var(--text-main);
}

.targets-tab-btn.active {
    background: #ffffff;
    color: var(--brand-blue);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.targets-tab-counter {
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: rgba(100, 116, 139, 0.12);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.targets-tab-btn.active .targets-tab-counter {
    background: var(--brand-blue-light);
    color: var(--brand-blue);
}

.targets-filters-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.targets-search-box {
    position: relative;
    width: 220px;
}

.targets-search-box i.fa-magnifying-glass {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 13px;
    pointer-events: none;
}

.targets-search-box input {
    width: 100%;
    height: 34px;
    padding: 0 30px 0 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--text-main);
    background: #ffffff;
    transition: all 0.2s ease;
}

.targets-search-box input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(4, 154, 240, 0.15);
}

.btn-clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 2px;
    font-size: 13px;
}

.btn-clear-search:hover {
    color: var(--text-main);
}

.targets-select-wrapper {
    position: relative;
    min-width: 170px;
}

.targets-select {
    width: 100%;
    height: 34px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
}

.targets-select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(4, 154, 240, 0.15);
}

.select-caret {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--text-light);
    pointer-events: none;
}

/* Modal Body Content Area */
.targets-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    background: var(--bg-page);
    min-height: 340px;
}

.targets-panel {
    display: none;
}

.targets-panel.active {
    display: block;
}

.targets-panel.hidden {
    display: none !important;
}

/* State Box (Loading, Error, Empty) */
.targets-state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
}

.targets-state-box.hidden {
    display: none !important;
}

.targets-spinner {
    font-size: 32px;
    color: var(--brand-blue);
    margin-bottom: 14px;
}

.targets-error-icon {
    font-size: 36px;
    color: var(--red);
    margin-bottom: 12px;
}

.targets-empty-icon {
    font-size: 36px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.targets-state-box p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 0 16px;
}

.btn-retry,
.btn-reset-filters {
    height: 34px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--brand-blue);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-retry:hover,
.btn-reset-filters:hover {
    background: var(--brand-blue-hover);
}

/* Tab 1: Branches Accordion Cards */
.branches-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.branch-accordion-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.branch-accordion-item:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-sm);
}

.branch-accordion-item.expanded {
    border-color: var(--brand-blue-border);
    box-shadow: 0 4px 14px rgba(4, 154, 240, 0.08);
}

.branch-accordion-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    gap: 14px;
    transition: background-color 0.2s ease;
}

.branch-accordion-header:hover {
    background-color: #fafafa;
}

.branch-accordion-item.expanded .branch-accordion-header {
    background-color: var(--brand-blue-light);
    border-bottom: 1px solid #e0f2fe;
}

.branch-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.branch-rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.branch-accordion-item.top-1 .branch-rank-badge {
    background: #fef08a;
    color: #854d0e;
}

.branch-accordion-item.top-2 .branch-rank-badge {
    background: #e2e8f0;
    color: #475569;
}

.branch-accordion-item.top-3 .branch-rank-badge {
    background: #fed7aa;
    color: #9a3412;
}

.branch-name-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.branch-district-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-blue);
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.branch-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.branch-openings-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--brand-orange-light);
    border: 1px solid var(--brand-orange-border);
    color: var(--brand-orange-hover);
    font-size: 12px;
    font-weight: 800;
}

.branch-chevron {
    color: var(--text-light);
    font-size: 12px;
    transition: transform 0.25s ease;
}

.branch-accordion-item.expanded .branch-chevron {
    transform: rotate(180deg);
    color: var(--brand-blue);
}

/* Accordion Content / Table */
.branch-accordion-content {
    display: none;
    padding: 14px 18px;
    background: #ffffff;
}

.branch-accordion-item.expanded .branch-accordion-content {
    display: block;
}

.openings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.openings-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-page);
}

.openings-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.openings-table tr:last-child td {
    border-bottom: none;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.role-badge.gym {
    background: #e0f2fe;
    color: #0369a1;
}

.role-badge.giu-xe {
    background: #fef3c7;
    color: #b45309;
}

.role-badge.thu-ngan {
    background: #f3e8ff;
    color: #7e22ce;
}

.role-badge.bida {
    background: #fee2e2;
    color: #b91c1c;
}

.role-badge.net {
    background: #dcfce7;
    color: #15803d;
}

.role-badge.cau-long {
    background: #ffedd5;
    color: #c2410c;
}

.shift-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: var(--bg-hover);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
}

.gender-tags-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gender-tag {
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 10.5px;
    font-weight: 700;
}

.gender-tag.male {
    background: #dbeafe;
    color: #1d4ed8;
}

.gender-tag.female {
    background: #fce7f3;
    color: #be185d;
}

.offday-text {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Tab 2: Position Cards Grid */
.positions-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.position-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.position-card:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.pos-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pos-card-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-card-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    font-size: 13px;
    font-weight: 800;
}

.pos-progress-bar {
    width: 100%;
    height: 7px;
    background: var(--bg-hover);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.pos-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange));
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pos-card-branches-title {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 4px 0 0;
}

.pos-branches-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 4px;
}

.pos-branch-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    color: var(--text-main);
}

.pos-branch-pill strong {
    color: var(--brand-orange-hover);
    font-weight: 800;
}

/* Modal Footer */
.targets-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
}

.targets-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.btn-secondary-close {
    height: 32px;
    padding: 0 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-close:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

/* Tab 3: History Timeline */
.history-timeline-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.history-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
}

.history-header-title i {
    color: var(--brand-blue);
}

.history-cron-notice {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 500;
}

.history-timeline-list {
    position: relative;
    padding-left: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.history-timeline-list::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, var(--brand-blue) 0%, #cbd5e1 100%);
    border-radius: 2px;
}

.timeline-day-card {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.timeline-day-card::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(4, 154, 240, 0.15);
    transition: all 0.2s ease;
}

.timeline-day-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.timeline-day-card:hover::before {
    background: var(--brand-blue);
    box-shadow: 0 0 0 5px rgba(4, 154, 240, 0.25);
}

.timeline-day-card.today {
    border-left: 4px solid var(--brand-blue);
}

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

.timeline-date-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
}

.timeline-tag-today {
    font-size: 10.5px;
    font-weight: 700;
    background: #e0f2fe;
    color: #0284c7;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}

.timeline-delta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.timeline-delta-badge.up {
    background: #dcfce7;
    color: #15803d;
}

.timeline-delta-badge.down {
    background: #fee2e2;
    color: #b91c1c;
}

.timeline-delta-badge.same {
    background: #f1f5f9;
    color: #64748b;
}

.timeline-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.timeline-chips-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.timeline-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    background: var(--bg-page);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 500;
}

.timeline-chip strong {
    font-weight: 700;
    color: var(--brand-blue);
}

.timeline-action-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-blue);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* History Detail Container */
.history-day-detail-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-detail-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
    gap: 8px;
}

.btn-back-timeline {
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-back-timeline:hover {
    background: #f8fafc;
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.history-detail-badge {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive Cho Màn Hình Nhỏ */
@media (max-width: 900px) {
    .targets-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .positions-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .targets-modal-overlay {
        padding: 10px;
    }
    .targets-modal-header {
        padding: 14px 16px;
    }
    .targets-title-row h2 {
        font-size: 15px;
    }
    .targets-kpi-grid {
        grid-template-columns: 1fr;
        padding: 12px 16px;
    }
    .targets-toolbar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
    }
    .targets-filters-group {
        flex-direction: column;
        align-items: stretch;
    }
    .targets-search-box {
        width: 100%;
    }
    .targets-modal-body {
        padding: 12px 16px;
    }
}

