﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Modal Scrollbar Styles */
.modal-body::-webkit-scrollbar {
    width: 6px;
    background-color: #f5f5f5;
}

.modal-body::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #198754;
    border-radius: 4px;
}

    .modal-body::-webkit-scrollbar-thumb:hover {
        background-color: #198754;
    }

.man {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Stats Section */
.stats-section {
    margin-top: 0px !important;
    background: #f8f9fa;
}

/* Stat Cards */
.stat-card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #007bff;
    overflow: hidden;
}

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }

    .stat-card.primary {
        border-left-color: #007bff;
    }

    .stat-card.success {
        border-left-color: #28a745;
    }

    .stat-card.warning {
        border-left-color: #ffc107;
    }

    .stat-card.danger {
        border-left-color: #dc3545;
    }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
}

    .stat-icon.primary {
        color: #007bff;
    }

    .stat-icon.success {
        color: #28a745;
    }

    .stat-icon.warning {
        color: #ffc107;
    }

    .stat-icon.danger {
        color: #dc3545;
    }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up {
    color: #28a745;
}

.trend-down {
    color: #dc3545;
}

/* Chart Cards */
.chart-card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

    .chart-card:hover {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }

.chart-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 12px 12px 0 0;
}

    .chart-header h6 {
        color: #2c3e50;
        font-weight: 700;
        margin-bottom: 0.25rem;
    }

    .chart-header p {
        color: #6c757d;
        margin-bottom: 0;
        font-size: 0.9rem;
    }

/* Chart Container Responsive Styles */
.chart-container {
    position: relative;
    height: 350px; /* Default height for desktop */
    width: 100%;
}

    .chart-container canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
    }

/* Sector Cards */
.sector-card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 2rem 1.5rem;
    text-align: center;
    height: 100%;
    border: 1px solid #e9ecef;
}

    .sector-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }

.sector-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    background: #d4edda;
    color: black;
}

.sector-count {
    font-size: 2.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0.5rem 0;
}

/* Buttons */
.btn-modern {
    background: #007bff;
    border: none;
    border-radius: 6px;
    padding: 10px 25px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

    .btn-modern:hover {
        background: #0056b3;
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }

/* KPI Cards */
.kpi-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    border: 1px solid #e9ecef;
}

    .kpi-card.accident {
        border-left-color: #dc3545;
    }

    .kpi-card.compensation {
        border-left-color: #007bff;
    }

    .kpi-card.employment {
        border-left-color: #28a745;
    }

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.kpi-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop (1200px and above) */
@media (min-width: 1200px) {
    .chart-container {
        height: 380px;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .chart-container {
        height: 320px;
    }

    .stat-value {
        font-size: 1.8rem;
    }
}

/* Tablet Devices (768px - 991px) */
@media (max-width: 991px) {
    .stats-section {
        padding: 20px 15px;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .stat-card {
        margin-bottom: 15px;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .chart-card {
        margin-bottom: 20px;
    }

    .chart-container {
        height: 300px;
    }

    .sector-card {
        padding: 1.5rem 1rem;
    }

    .sector-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Mobile Devices (576px - 767px) */
@media (max-width: 768px) {
    /* Section spacing */
    .section {
        padding: 30px 0 !important;
    }

    .stats-section {
        margin-top: 0 !important;
        padding: 20px 10px;
    }

    /* Chart adjustments for mobile */
    .chart-container {
        height: 280px !important;
        min-height: 280px;
    }

    .chart-header {
        padding: 1rem;
    }

        .chart-header h6 {
            font-size: 0.9rem;
            margin-bottom: 0.25rem;
        }

        .chart-header p {
            font-size: 0.8rem;
        }

    .chart-card .card-body {
        padding: 1rem !important;
    }

    /* Stat cards mobile optimization */
    .stat-card {
        border-radius: 10px;
        margin-bottom: 12px;
    }

        .stat-card .card-body {
            padding: 1rem !important;
        }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .stat-value {
        font-size: 1.5rem;
        margin-bottom: 3px;
    }

    .stat-label {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .stat-trend {
        font-size: 0.7rem;
        margin-top: 5px;
    }

    .percentage-text {
        font-size: 0.6em !important;
    }

    /* Sector cards mobile */
    .sector-card {
        padding: 1.5rem 1rem;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .sector-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .sector-count {
        font-size: 1.75rem;
        margin: 0.25rem 0;
    }

    .sector-card h5 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .sector-card p {
        font-size: 0.85rem;
    }

    /* Row spacing */
    .row.g-4 {
        gap: 0.75rem !important;
    }

    .row.mt-4, .row.mt-5 {
        margin-top: 1.5rem !important;
    }

    /* Buttons */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .btn-sm {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }

    /* KPI Cards mobile */
    .kpi-card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .kpi-value {
        font-size: 1.5rem;
        margin-bottom: 0.35rem;
    }

    .kpi-label {
        font-size: 0.75rem;
    }

    /* Table responsiveness */
    .table-responsive {
        border-radius: 8px;
        margin-top: 10px;
    }

    .table {
        font-size: 0.85rem;
    }

        .table thead th {
            font-size: 0.8rem;
            padding: 0.75rem 0.5rem;
        }

        .table tbody td {
            padding: 0.75rem 0.5rem;
        }

    /* Hide certain elements on mobile if needed */
    .d-none.d-md-block {
        display: none !important;
    }
}

/* Small Mobile Devices (575px and below) */
@media (max-width: 576px) {
    /* Chart containers for small phones */
    .chart-container {
        height: 250px !important;
        min-height: 250px;
    }

    /* Further compression for small phones */
    .stat-card .d-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .stat-icon {
        margin-bottom: 10px;
        margin-right: 0 !important;
    }

    .ms-3 {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    /* Sector cards stack better */
    .col-md-4 {
        margin-bottom: 10px;
    }

    .sector-count {
        font-size: 1.5rem;
    }

    /* KPI grid adjustments */
    .row.text-center .col-4 {
        padding: 0.5rem 0.25rem;
    }

    .kpi-value {
        font-size: 1.25rem;
    }

    .kpi-label {
        font-size: 0.7rem;
    }

    /* Button full width on small screens */
    .btn-modern, .btn-lg {
        width: 100%;
        margin-top: 10px;
    }

    /* Reduce padding in cards */
    .chart-card .card-body {
        padding: 0.75rem !important;
    }

    .p-4 {
        padding: 0.75rem !important;
    }

    /* Table text sizes */
    .table {
        font-size: 0.75rem;
    }

    .tx-medium, .tx-normal {
        font-size: 0.75rem !important;
    }
}

/* Extra Small Devices (375px and below) */
@media (max-width: 375px) {
    .chart-container {
        height: 220px !important;
        min-height: 220px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .sector-count {
        font-size: 1.35rem;
    }

    .kpi-value {
        font-size: 1.1rem;
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .chart-container {
        height: 220px !important;
    }

    .stat-card .card-body {
        padding: 0.75rem !important;
    }

    .sector-card {
        padding: 1rem;
    }
}

/* Utility classes for mobile */
@media (max-width: 768px) {
    .mobile-mb-2 {
        margin-bottom: 0.5rem !important;
    }

    .mobile-text-center {
        text-align: center !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    /* Ensure cards don't overflow */
    .card, .chart-card, .stat-card, .sector-card {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix for long text */
    .stat-label, .kpi-label {
        word-break: break-word;
        hyphens: auto;
    }

    /* Scrollable tables on mobile */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .chart-card, .stat-card, .sector-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
}

/* Print styles */
@media print {
    .chart-card, .stat-card, .sector-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .chart-container {
        height: 250px !important;
    }
}
