/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Jobie Theme Colors */
    --primary-color: #5d35b0;
    /* Deep Purple */
    --primary-rgb: 93, 53, 176;
    --accent-blue: #4466f2;
    --accent-cyan: #26c6da;
    --accent-green: #00c853;
    --accent-purple: #7e57c2;
    --accent-pink: #ec407a;

    --bg-body: #f4f6f9;
    --sidebar-bg: #4a2b99;
    /* Main Sidebar Color */
    --sidebar-text: #ffffff;
    --card-bg: #ffffff;

    --text-primary: #343a40;
    --text-secondary: #6c757d;

    --card-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);

    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(230, 230, 230, 0.8);

    --sidebar-width: 260px;
    --topbar-height: 70px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* --- Layout System --- */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    z-index: 1000;
}

#sidebar .sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    background: rgba(0, 0, 0, 0.1);
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li {
    padding: 5px 15px;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

#sidebar ul li a:hover,
#sidebar ul li.active a {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

#sidebar ul li a i {
    margin-right: 15px;
    font-size: 1.1rem;
    width: 25px;
    text-align: center;
}

.white-box-icon {
    background: #fff;
    color: var(--sidebar-bg);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

/* Main Content */
#content {
    width: 100%;
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: var(--sidebar-width);
    /* Static sidebar width */
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.search-box {
    background: #f4f6f9;
    border-radius: 50px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    width: 400px;
    transition: all 0.3s;
}

.search-box:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(93, 53, 176, 0.15);
}

.search-box input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-left: 10px;
}

/* User Profile in Topbar */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- Widgets & Cards --- */
.jobie-card {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.jobie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-icon-large {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.widget-card {
    padding: 25px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.widget-card .widget-bg-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 8rem;
    opacity: 0.1;
    transform: rotate(15deg);
}

.widget-purple {
    background: linear-gradient(135deg, #7e57c2 0%, #5d35b0 100%);
}

.widget-blue {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
}

.widget-green {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
}

.widget-orange {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
}

.chart-card {
    padding: 25px;
    background: #fff;
}

/* Tables */
.table-custom thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Legacy Support (Public Page) */
.hero-section {
    padding: 60px 0 40px;
    background: transparent;
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-radius: 10px;
}

/* Z-Index Fixes */
.modal-backdrop {
    z-index: 1060 !important;
}

.modal {
    z-index: 1070 !important;
}

/* Print Styles */
.print-only {
    display: none !important;
}

@media print {

    /* Show print-only elements */
    .print-only {
        display: block !important;
    }

    /* Hide non-essential elements */
    .no-print,
    .navbar,
    .hero-section,
    .icon-box,
    .filter-select,
    .card-header i,
    .topbar,
    #sidebar,
    #sidebarCollapse,
    .search-box,
    .user-info,
    footer,
    button {
        display: none !important;
    }

    /* Layout Adjustments */
    body,
    .wrapper,
    #content {
        background: white !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        color: black !important;
    }

    .container,
    .container-fluid {
        width: 100% !important;
        max-width: none !important;
        padding: 15px !important;
        margin: 0 !important;
    }

    /* Cards Styling for Print - Remove Gradients */
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
        background: white !important;
        margin-bottom: 15px !important;
    }

    .card-header {
        background-color: #f8f9fa !important;
        border-bottom: 2px solid #333 !important;
        color: black !important;
    }

    /* KPI Cards - Make Readable */
    .jobie-card {
        background: white !important;
        border: 2px solid #5d35b0 !important;
        border-left: 5px solid #5d35b0 !important;
        page-break-inside: avoid;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    .jobie-card * {
        color: black !important;
    }

    .jobie-card .card-body {
        padding: 15px !important;
    }

    /* Make small badges visible */
    .badge.rounded-pill {
        display: inline-block !important;
        background: #f0f0f0 !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }

    /* Typography */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: black !important;
        page-break-after: avoid;
    }

    p {
        color: black !important;
    }

    /* Charts - Ensure Visibility */
    .chart-container {
        height: 350px !important;
        max-height: 350px !important;
        page-break-inside: avoid;
        margin-bottom: 20px !important;
    }

    canvas {
        max-height: 350px !important;
        page-break-inside: avoid;
    }

    /* Tables */
    table {
        font-size: 11px !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th,
    td {
        padding: 6px 8px !important;
        border: 1px solid #ddd !important;
        color: black !important;
    }

    thead {
        background-color: #f0f0f0 !important;
    }

    th {
        font-weight: bold !important;
        background-color: #e9ecef !important;
    }

    tbody tr {
        page-break-inside: avoid;
    }

    /* Progress bars in tables */
    .progress {
        background-color: #e9ecef !important;
        border: 1px solid #ccc !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    .progress-bar {
        background-color: #5d35b0 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    /* Text colors for readability */
    .text-secondary,
    .text-muted {
        color: #666 !important;
    }

    .text-primary {
        color: #5d35b0 !important;
    }

    .text-dark {
        color: black !important;
    }

    /* Ensure links are visible */
    a {
        color: black !important;
        text-decoration: none !important;
    }

    /* Page breaks */
    .mb-5 {
        page-break-before: auto;
        page-break-after: auto;
        page-break-inside: avoid;
    }

    /* Specific section breaks */
    #progressTable {
        page-break-inside: auto;
    }

    /* Print header styling */
    .print-only .border-bottom {
        border-bottom: 2px solid #333 !important;
    }

    /* Row spacing */
    .row {
        margin-bottom: 10px !important;
    }
}