/* ===== Corporate Colors ===== */
:root {
    --primary: #fd5732;
    --primary-hover: #e64a2a;
    --primary-light: rgba(253, 87, 50, 0.1);
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --bg-card: #ffffff;

    --text-primary: #000000;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    --border-color: #e5e7eb;
    --border-radius: 8px;
    --border-radius-lg: 12px;

    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    --transition: all 0.2s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Header ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border-radius: var(--border-radius-lg);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== Navigation ===== */
.nav-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    padding: 6px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-icon {
    font-size: 16px;
}

/* ===== Tabs (for single page) ===== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    padding: 6px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab-icon {
    font-size: 16px;
}

/* ===== Tab Content ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ===== Quick Stats ===== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.quick-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.quick-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

.quick-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.quick-stat.primary .quick-stat-value { color: var(--primary); }
.quick-stat.success .quick-stat-value { color: var(--success); }
.quick-stat.danger .quick-stat-value { color: var(--danger); }
.quick-stat.info .quick-stat-value { color: var(--info); }
.quick-stat.warning .quick-stat-value { color: var(--warning); }

/* ===== Search Section ===== */
.search-section {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
}

.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 16px;
    font-size: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== Data Table ===== */
.table-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow);
    max-height: 600px;
    overflow-y: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    color: var(--primary);
}

.sort-icon {
    margin-left: 4px;
    opacity: 0.5;
}

.data-table th.sorted .sort-icon {
    opacity: 1;
    color: var(--primary);
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

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

/* ===== Location Cell ===== */
.location-cell {
    display: flex;
    flex-direction: column;
}

.location-country {
    font-weight: 600;
    color: var(--text-primary);
}

.location-city {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== Days Ago ===== */
.days-ago {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.days-ago.warning { color: var(--warning); font-weight: 600; }
.days-ago.danger { color: var(--danger); font-weight: 600; }

/* ===== Table Footer ===== */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

#tableInfo {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== Toggle Switch ===== */
.toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    position: relative;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 1px;
    left: 1px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Statistics Page ===== */
.stats-page {
    padding: 20px;
}

.stats-header {
    text-align: center;
    margin-bottom: 32px;
}

.stats-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stats-header p {
    color: var(--text-muted);
}

/* ===== Stats Overview Cards ===== */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.stat-card.large {
    grid-column: span 1;
}

.stat-card.highlight {
    border-color: var(--primary);
    border-width: 2px;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stat-card-title {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-icon {
    font-size: 24px;
}

.stat-card-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card-footer {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== Coverage Circle ===== */
.coverage-circle {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.circular-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 3;
}

.circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.coverage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.coverage-percent {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.coverage-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ===== Charts ===== */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.chart-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow);
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* ===== Breakdown Section ===== */
.breakdown-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.breakdown-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.breakdown-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.breakdown-item-name {
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-item-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.breakdown-item-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.breakdown-item-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ===== Overview Cards ===== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.overview-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow);
    max-height: 400px;
    overflow-y: auto;
}

.overview-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overview-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.overview-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.overview-item:hover {
    background: var(--bg-tertiary);
}

.overview-item-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    margin-right: 14px;
    flex-shrink: 0;
}

.overview-item-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.overview-item-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

/* ===== Attention Section ===== */
.attention-section {
    margin-bottom: 32px;
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.attention-card {
    padding: 32px 24px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.attention-card.warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.attention-card.danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.attention-card.info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.attention-value {
    font-size: 56px;
    font-weight: 700;
}

.attention-card.warning .attention-value { color: var(--warning); }
.attention-card.danger .attention-value { color: var(--danger); }
.attention-card.info .attention-value { color: var(--info); }

.attention-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 12px;
}

.attention-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== Footer ===== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
    box-shadow: var(--shadow);
}

.footer-center {
    display: flex;
    align-items: center;
}

.online-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 20px;
    color: var(--success);
    font-weight: 500;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.sync-dot.error {
    background: var(--danger);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Loader ===== */
.loader {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header-brand {
        flex-direction: column;
    }

    .tabs, .nav-tabs {
        flex-wrap: wrap;
    }

    .tab, .nav-link {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }

    .quick-stats {
        grid-template-columns: 1fr 1fr;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .attention-grid {
        grid-template-columns: 1fr;
    }

    .stats-overview {
        grid-template-columns: 1fr;
    }
}

/* ===== Scrollable Cards ===== */
.overview-card.scrollable {
    max-height: 500px;
    overflow-y: auto;
}

.overview-card.scrollable::-webkit-scrollbar {
    width: 6px;
}

.overview-card.scrollable::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.overview-card.scrollable::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.overview-card.scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Count Badge ===== */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* ===== Clickable Items ===== */
.overview-item.clickable {
    cursor: pointer;
}

.overview-item.clickable:hover {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.modal-employee-item {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

.modal-employee-item:last-child {
    margin-bottom: 0;
}

.modal-employee-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.modal-employee-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.modal-tag.team {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.modal-tag.location {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* ===== Export Dropdown ===== */
.export-dropdown {
    position: relative;
}

.export-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 200px;
    overflow: hidden;
}

.export-menu.active {
    display: block;
}

.export-menu button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.export-menu button:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* ===== Metrics Row ===== */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--border-color);
}

.metric-card.primary { border-left-color: var(--primary); }
.metric-card.success { border-left-color: var(--success); }
.metric-card.warning { border-left-color: var(--warning); }
.metric-card.info { border-left-color: var(--info); }

.metric-icon {
    font-size: 28px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.metric-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Stats Grid 2 ===== */
.stats-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.stat-panel {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Coverage Display */
.coverage-display {
    display: flex;
    align-items: center;
    padding: 24px;
    gap: 32px;
}

.coverage-circle-large {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.coverage-circle-large .circular-chart {
    width: 100%;
    height: 100%;
}

.coverage-circle-large .circle-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 2.5;
}

.coverage-circle-large .circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 0.5s ease;
}

.coverage-circle-large .coverage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.coverage-circle-large .coverage-percent {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.coverage-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.coverage-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Attention Items */
.attention-items {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attention-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--border-radius);
}

.attention-item.warning {
    background: rgba(245, 158, 11, 0.08);
}

.attention-item.danger {
    background: rgba(239, 68, 68, 0.08);
}

.attention-item.info {
    background: rgba(59, 130, 246, 0.08);
}

.attention-item-icon {
    font-size: 24px;
}

.attention-item-content {
    flex: 1;
}

.attention-item-value {
    font-size: 24px;
    font-weight: 700;
}

.attention-item.warning .attention-item-value { color: var(--warning); }
.attention-item.danger .attention-item-value { color: var(--danger); }
.attention-item.info .attention-item-value { color: var(--info); }

.attention-item-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.attention-item-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Charts Row ===== */
.charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.chart-panel {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.chart-wrapper {
    padding: 24px;
    height: 300px;
}

/* ===== Tables Row ===== */
.tables-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.tables-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.table-panel {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.table-panel.scrollable {
    max-height: 450px;
    display: flex;
    flex-direction: column;
}

.table-panel.scrollable .table-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.table-list {
    padding: 12px;
}

.table-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    margin-bottom: 4px;
}

.table-item:last-child {
    margin-bottom: 0;
}

.table-item.clickable {
    cursor: pointer;
}

.table-item.clickable:hover {
    background: var(--bg-secondary);
}

.table-item-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.table-item:nth-child(1) .table-item-rank { background: var(--primary); color: white; }
.table-item:nth-child(2) .table-item-rank { background: #ff7b5a; color: white; }
.table-item:nth-child(3) .table-item-rank { background: #ffaa91; color: white; }

.table-item-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-item-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

/* ===== Recent Panel ===== */
.recent-panel {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
}

.recent-item {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.recent-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item-location {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.recent-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Modal City Groups */
.modal-city-group {
    margin-bottom: 8px;
}

.modal-city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.modal-city-header.clickable:hover {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
    cursor: pointer;
}

.modal-city-name {
    font-weight: 600;
    color: var(--text-primary);
}

.modal-city-count {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* ===== Positions Section ===== */
.positions-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.positions-section .panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.positions-section .panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.positions-search {
    margin-left: auto;
}

.positions-search input {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    width: 250px;
    transition: var(--transition);
}

.positions-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.position-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.position-card.clickable {
    cursor: pointer;
}

.position-card.clickable:hover {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}

.position-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 12px;
}

.position-count {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
}

.empty-state-text {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    grid-column: 1 / -1;
}

/* Position Search Styles */
.positions-search input {
    width: 350px;
}

.positions-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.positions-hint .hint-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.positions-hint .hint-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.positions-hint .hint-examples {
    font-size: 13px;
    color: var(--text-muted);
}

#positionSearchResults {
    padding: 0 16px;
}

.search-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.search-summary .summary-total {
    font-weight: 600;
    color: var(--primary);
}

.search-summary .summary-countries {
    font-weight: 600;
    color: var(--info);
}

.search-summary .btn {
    margin-left: auto;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.position-card.exact-match {
    border: 2px solid var(--primary);
    background: var(--primary-light);
}

.position-card mark {
    background: var(--warning);
    color: var(--text-primary);
    padding: 0 2px;
    border-radius: 2px;
}

/* Position Details Modal Styles */
.position-country-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.country-chip {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.position-country-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-city-header.country-header {
    background: var(--info);
    color: white;
}

.modal-city-header.country-header .modal-city-name {
    color: white;
}

.modal-city-header.country-header .modal-city-count {
    background: rgba(255, 255, 255, 0.2);
}

.country-employees {
    padding: 8px 0 8px 16px;
    border-left: 2px solid var(--border-color);
    margin-left: 16px;
}
