/* SAL Dashboard - Main Stylesheet */

:root {
    --primary-color: #266bc2; /* Link Blue */
    --secondary-color: #03193b; /* Dark Blue */
    --success-color: #02a189; /* OK Green */
    --danger-color: #f63838; /* Alert Red */
    --warning-color: #ebf20e; /* Highlight Green */
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #03193b; /* Dark Blue - same as secondary for consistency */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 60px;
    --box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --border-radius: 10px;
    --font-family: 'Archivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Base Styling */
body {
    font-family: var(--font-family);
    background-color: #edf0f5; /* Lighter shade to complement dark blue */
    margin: 0;
    padding: 0;
    color: #333;
    min-height: 100vh;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: #ffffff; /* Changed from dark blue gradient to white */
    color: #333; /* Changed text color from white to dark gray */
    height: 100vh;
    position: fixed;
    transition: width var(--transition-speed);
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Lighter shadow for white sidebar */
}

.sidebar-header {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.sidebar-logo {
    height: 50px;
    width: auto;
    max-width: calc(100% - 30px);
    object-fit: contain;
    transition: all var(--transition-speed);
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.sidebar-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Legacy h3 styling kept for any remaining text elements */
.sidebar-header h3 {
    margin: 0;
    font-weight: 600;
    color: var(--primary-color); /* Changed from white to primary blue */
    letter-spacing: 0.5px;
}

/* User info section - now at the bottom */
.user-info {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1); /* Changed from light border to dark */
    margin-top: auto; /* Push to bottom of flex container */
    background: #f8f9fa; /* Light gray background instead of dark gradient */
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-details {
    flex-grow: 1;
}

.user-details p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #333; /* Changed from white to dark gray */
}

#logout-btn {
    font-size: 12px;
    padding: 5px 10px;
    margin-top: 6px;
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2); /* Darker border for light background */
    color: #333; /* Dark text */
    transition: all 0.2s ease;
}

#logout-btn:hover {
    background-color: rgba(0, 0, 0, 0.05); /* Light gray hover */
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin: 0;
    padding: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #333; /* Changed from white to dark gray */
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-menu a:hover {
    background-color: rgba(0, 0, 0, 0.05); /* Changed to light gray */
    color: var(--primary-color); /* Blue text on hover */
    border-left: 3px solid var(--primary-color);
}

.sidebar-menu a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #666; /* Slightly darker color for icons */
}

.sidebar-menu li.active a {
    background-color: rgba(38, 107, 194, 0.1); /* Light blue background */
    color: var(--primary-color); /* Blue text */
    border-left: 3px solid var(--primary-color); /* Blue border */
}

.sidebar-menu li.active a i {
    color: var(--primary-color); /* Blue icon */
}

/* Main Content Styling */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed);
    min-height: 100vh;
    background-color: #edf0f5; /* Lighter shade to complement dark blue */
}

.content-container {
    padding: 30px;
}

/* More compact container for dashboard */
.dashboard-page + .content-container,
.dashboard-page .content-container {
    padding: 20px;
}

.page-title {
    margin-bottom: 30px;
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.page-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color); /* Link Blue */
    border-radius: 10px;
}

/* Content Pages */
.content-page {
    display: none;
}

.content-page.active {
    display: block;
}

/* Card Styling */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(3, 25, 59, 0.1); /* Dark Blue shadow */
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    font-weight: 600;
    padding: 18px 20px;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.card-body {
    padding: 20px;
}

/* Statistics Cards */
.stat-card {
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    border-bottom: 3px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-card:nth-child(1) {
    border-bottom: 3px solid var(--primary-color); /* Link Blue */
}

.stat-card:nth-child(2) {
    border-bottom: 3px solid var(--success-color); /* OK Green */
}

.stat-card:nth-child(3) {
    border-bottom: 3px solid var(--warning-color); /* Highlight Green */
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), #1a5099); /* Darker shade of Link Blue */
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, var(--success-color), #017566); /* Darker shade of OK Green */
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #c7cc0b); /* Darker shade of Highlight Green */
}

.stat-icon.bg-danger {
    background: linear-gradient(135deg, var(--danger-color), #d82e2e); /* Darker shade of Alert Red */
}

/* Table Styling */
.table {
    margin-bottom: 0;
    border-spacing: 0;
}

.table thead {
    background-color: #f8f9fa;
}

.table th {
    font-weight: 600;
    border-top: none;
    color: #3b4863;
    font-size: 0.875rem;
    padding: 12px 15px;
}

.table td {
    vertical-align: middle;
    padding: 12px 15px;
    border-color: #f0f0f0;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}

/* Product Card Styling */
.product-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 180px;
    object-fit: contain;
    padding: 20px;
    background-color: #fcfcfc;
}

/* Product Price Styling */
.product-price-container {
    margin-bottom: 8px;
}

.product-price {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color); /* Link Blue */
    margin-bottom: 8px;
}

.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-weight: normal;
    font-size: 14px;
    margin-right: 5px;
}

.product-store {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.product-availability {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0;
}

.product-availability.in-stock {
    color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.product-availability.out-of-stock {
    color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--danger-color); /* Alert Red */
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: rotate(0deg);
    border: 1px solid rgba(255,255,255,0.3);
}

/* Dashboard specific product card styles */
#dashboard-products-preview .product-card {
    margin-bottom: 0;
}

#dashboard-products-preview .product-img {
    height: 120px;
    padding: 10px;
}

#dashboard-products-preview .card-body {
    padding: 12px;
}

#dashboard-products-preview .card-title {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 5px;
}

#dashboard-products-preview .product-price {
    font-size: 15px;
    margin-bottom: 4px;
}

#dashboard-products-preview .product-store {
    font-size: 12px;
    margin-bottom: 4px;
}

#dashboard-products-preview .product-availability {
    font-size: 11px;
    padding: 2px 6px;
}

/* Make other dashboard elements more compact */
.dashboard-page .card-header {
    padding: 15px 20px;
}

.dashboard-page .card-body {
    padding: 15px;
}

.dashboard-page .table th,
.dashboard-page .table td {
    padding: 10px 15px;
}

/* Form Controls */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.form-label {
    font-weight: 500;
    color: #3b4863;
}

.form-text {
    color: #6c757d;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 5px;
    padding: 8px 16px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color); /* Link Blue */
    border-color: var(--primary-color); /* Link Blue */
}

.btn-primary:hover {
    background-color: #1e5aa3; /* Darker Link Blue */
    border-color: #1a5099; /* Even darker Link Blue */
}

.btn-outline-primary {
    color: var(--primary-color); /* Link Blue */
    border-color: var(--primary-color); /* Link Blue */
}

.btn-outline-primary:hover {
    background-color: var(--primary-color); /* Link Blue */
    border-color: var(--primary-color); /* Link Blue */
}

/* Badges */
.badge {
    padding: 0.4em 0.6em;
    font-weight: 500;
    border-radius: 4px;
}

.badge.bg-success {
    background-color: var(--success-color) !important; /* OK Green */
}

.badge.bg-danger {
    background-color: var(--danger-color) !important; /* Alert Red */
}

.badge.bg-primary {
    background-color: var(--primary-color) !important; /* Link Blue */
}

.badge.bg-warning {
    background-color: var(--warning-color) !important; /* Highlight Green */
    color: #000 !important; /* Black text for better contrast on bright yellow/green */
}

/* Animation for status badge */
.pulse {
    animation: pulse 1.5s infinite;
}

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

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    margin-bottom: 1rem;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
        padding: 0;
    }
    
    .sidebar-header {
        padding: 15px 5px;
        min-height: 60px;
    }
    
    .sidebar-logo,
    .sidebar-header h3, 
    .sidebar-menu a span,
    .user-details {
        display: none;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
    
    .sidebar-menu a {
        padding: 15px 0;
        justify-content: center;
    }
    
    .sidebar-menu a i {
        margin-right: 0;
        font-size: 18px;
    }
    
    .user-info {
        justify-content: center;
        padding: 10px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    #logout-btn {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        transition: transform var(--transition-speed) ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-header {
        padding: 20px 15px;
        min-height: 80px;
        justify-content: center;
    }
    
    .sidebar-logo,
    .sidebar-header h3, 
    .sidebar-menu a span,
    .user-details {
        display: block;
    }
    
    /* Adjust logo size for mobile but keep it prominent */
    .sidebar-logo {
        height: 45px;
        max-width: 100%;
    }
    
    .sidebar-menu a {
        padding: 16px 20px;
        justify-content: flex-start;
    }
    
    .sidebar-menu a i {
        margin-right: 12px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-container {
        padding: 20px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    #logout-btn {
        display: block;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Modal Styling - Brand Consistent */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: var(--font-family);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 1rem 1.5rem;
}

/* Brand-specific modal headers */
.modal-header.bg-success {
    background-color: var(--success-color) !important;
    border-color: var(--success-color);
}

.modal-header.bg-info {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color);
}

.modal-header.bg-danger {
    background-color: var(--danger-color) !important;
    border-color: var(--danger-color);
}

/* Custom brand colors for content */
.text-success-brand {
    color: var(--success-color) !important;
}

.text-info-brand {
    color: var(--primary-color) !important;
}

.bg-success-brand {
    background-color: var(--success-color) !important;
}

.bg-info-brand {
    background-color: var(--primary-color) !important;
}

.progress-bar.bg-success-brand {
    background-color: var(--success-color) !important;
}

.progress-bar.bg-info-brand {
    background-color: var(--primary-color) !important;
}

/* Card headers in modals */
.modal-body .card-header.bg-success {
    background-color: var(--success-color) !important;
    border-color: var(--success-color);
}

.modal-body .card-header.bg-info {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color);
}

/* Spinner colors */
.spinner-border.text-success-brand {
    color: var(--success-color) !important;
}

.spinner-border.text-info-brand {
    color: var(--primary-color) !important;
}

/* Button styling consistency */
.btn-outline-success-brand {
    color: var(--success-color);
    border-color: var(--success-color);
    background-color: transparent;
}

.btn-outline-success-brand:hover {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-info-brand {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-info-brand:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Product info styling in modals */
.modal-body .product-info {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.modal-body .product-info:hover {
    background-color: #f1f3f4;
    border-color: #dee2e6;
}

.modal-body .product-info img {
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.modal-body .product-info img:hover {
    transform: scale(1.02);
    border-color: #dee2e6;
}

/* Progress bar styling */
.modal-body .progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    margin: 1rem 0;
}

.modal-body .progress-bar {
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Alert styling in modals */
.modal-body .alert {
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
}

.modal-body .alert-success {
    background-color: rgba(2, 161, 137, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.modal-body .alert-danger {
    background-color: rgba(246, 56, 56, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.modal-body .alert-warning {
    background-color: rgba(235, 242, 14, 0.1);
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.modal-body .alert-info {
    background-color: rgba(38, 107, 194, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

/* Modal footer button styling */
.modal-footer .btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive modal adjustments */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-header,
    .modal-footer {
        padding: 1rem;
    }

    .modal-body .product-info img {
        max-width: 80px;
    }
}

/* Delete Job Modal Specific Styling */
#deleteJobModal .modal-content {
    border: 2px solid var(--danger-color);
}

#deleteJobModal .modal-header {
    background-color: var(--danger-color) !important;
    border-color: var(--danger-color);
}

#deleteJobModal .job-details {
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#deleteJobModal .job-details .row {
    margin-bottom: 0.5rem;
}

#deleteJobModal .job-details .row:last-child {
    margin-bottom: 0;
}

#deleteJobModal .alert-warning {
    background-color: rgba(246, 56, 56, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

#deleteJobModal .modal-body i.fa-trash-alt {
    color: var(--danger-color);
}

#deleteJobModal #confirm-delete-btn {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
    font-weight: 600;
}

#deleteJobModal #confirm-delete-btn:hover {
    background-color: #e02d2d;
    border-color: #e02d2d;
    transform: translateY(-1px);
}

#deleteJobModal #confirm-delete-btn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: none;
}

.dashboard-page .page-title {
    margin-bottom: 20px;
    font-size: 24px;
}

/* Reduce overall margins and spacing for dashboard */
.dashboard-page .row {
    margin-bottom: 15px;
}

.dashboard-page .row:last-child {
    margin-bottom: 0;
}

/* Make stat cards more compact */
.dashboard-page .stat-card .card-body {
    padding: 15px;
}

.dashboard-page .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
}

.dashboard-page .stat-card h2 {
    font-size: 28px;
}

.dashboard-page .stat-card .card-title {
    font-size: 14px;
    margin-bottom: 5px;
}

/* Truncate long text in tables */
.dashboard-page .table td {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Additions for Progress Visualization */

/* Spinning Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-icon {
    display: inline-block; /* Needed for transform */
    animation: spin 1.5s linear infinite;
    margin-left: 8px; /* Space it from the text */
}

/* Pulsing Effect for Card */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.pulse-card {
    animation: pulse-border 2s infinite;
    border-color: rgba(0, 123, 255, 0.5); /* Optional: slightly highlight border */
}

/* Smooth Progress Bar Transition */
#progress-bar {
    transition: width 0.6s ease;
}

/* Ensure badge alignment with potential icon */
#job-status-card .card-header > div {
    display: flex;
    align-items: center;
}

/* Smooth Indeterminate Progress Bar Animation */
@keyframes indeterminate-progress {
    0% { transform: translateX(-100%) scaleX(0.5); }
    50% { transform: translateX(0%) scaleX(0.3); } /* Moves across */
    100% { transform: translateX(100%) scaleX(0.5); }
}

#progress-bar.indeterminate {
    position: relative;
    overflow: hidden; /* Hide the animation spilling out */
    background-color: #e9ecef; /* Ensure base color is visible */
    width: 100% !important; /* Override inline style width */
}

#progress-bar.indeterminate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%; 
    background-color: var(--primary-color);
    animation: indeterminate-progress 2s infinite linear;
    transform-origin: left;
    border-radius: inherit; /* Match parent rounding */
}

/* Custom Error Message Styling */
#error-message {
    background-color: rgba(220, 53, 69, 0.1); /* Lighter red background */
    color: #842029; /* Darker red text (similar to Bootstrap $danger-text-emphasis) */
    border: 1px solid rgba(220, 53, 69, 0.2); /* Softer border */
    padding: 1rem; /* Adjust padding if needed */
    display: flex; /* Align icon and text */
    align-items: center;
    min-height: 60px; /* Ensure minimum height even when empty */
}

#error-message i {
    font-size: 1.1rem; /* Slightly larger icon */
    vertical-align: middle; /* Align icon better if text wraps */
}

#error-message span {
    display: inline-block; /* Ensure span is always displayed */
    margin-left: 10px; /* Space after the icon */
}

/* Jobs table scrollable container */
#jobs-page .table-responsive {
    max-height: 70vh; /* 70% of viewport height */
    overflow-y: auto;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

#jobs-page .table {
    margin-bottom: 0; /* Remove bottom margin from table inside scrollable container */
}

#jobs-page thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa; /* Light background for sticky header */
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Subtle shadow for the sticky header */
}

/* Smooth scrollbar for better UX */
#jobs-page .table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#jobs-page .table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#jobs-page .table-responsive::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

#jobs-page .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Search highlighting */
.search-highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 1px 3px;
    border-radius: 3px;
}

/* Special case for highlighted text inside badges */
.badge .search-highlight {
    background-color: rgba(255, 255, 255, 0.6);  /* Semi-transparent white */
    color: inherit;  /* Use the badge text color */
}

/* Update sidebar toggle button for white background */
#sidebar-toggle {
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #333;
}

#sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Search highlight */
.search-highlight {
    background-color: rgba(255, 222, 50, 0.4);
    padding: 2px 0;
    border-radius: 2px;
    font-weight: 500;
}

/* Product Action Button Group Styling */
.product-card .card-footer .btn-group {
    display: flex;
    width: 100%;
}

.product-card .card-footer .btn-group .btn {
    flex: 1;
    font-size: 11px;
    padding: 6px 4px;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .card-footer .btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.product-card .card-footer .btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.product-card .card-footer .btn-group .btn i {
    font-size: 10px;
    margin-right: 3px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .product-card .card-footer .btn-group .btn {
        font-size: 10px;
        padding: 5px 3px;
    }
    
    .product-card .card-footer .btn-group .btn i {
        font-size: 9px;
        margin-right: 2px;
    }
}

/* Hover effects for the new buttons */
.product-card .card-footer .btn-outline-success:hover {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.product-card .card-footer .btn-outline-info:hover {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
}

/* Product Action Modals Styling */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: none;
    border-radius: 0 0 15px 15px;
    padding: 1.5rem;
    background-color: #f8f9fa;
}

/* Product info card in modals */
.product-info {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.product-info:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-info img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.product-info img:hover {
    transform: scale(1.05);
}

/* Progress bar animations */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Success/Error icons animation */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-body .fas.fa-check-circle,
.modal-body .fas.fa-times-circle {
    animation: bounceIn 0.6s ease-out;
}

/* Loading spinner styling */
.spinner-border {
    animation-duration: 0.75s;
}

/* Alert styling in modals */
.modal-body .alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
}

.modal-body .alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.modal-body .alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.modal-body .alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.modal-body .alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Button hover effects in modals */
.modal-footer .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive modal adjustments */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }
    
    .product-info img {
        max-width: 80px !important;
    }
}

/* Mobile Sidebar Toggle Button (positioned outside sidebar) */
.mobile-toggle-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.mobile-toggle-btn:hover {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transform: scale(1.05);
}

/* Hide mobile toggle on larger screens */
@media (min-width: 768px) {
    .mobile-toggle-btn {
        display: none !important;
    }
}

/* Mobile overflow prevention */
@media (max-width: 767.98px) {
    /* Prevent horizontal overflow on mobile */
    body {
        overflow-x: hidden;
    }
    
    /* Ensure all containers respect viewport width */
    .container,
    .container-fluid,
    .main-content,
    .content-container {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Prevent cards from overflowing */
    .card,
    .stat-card {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure rows don't overflow */
    .row {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
    
    /* Prevent columns from overflowing */
    [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure card content doesn't overflow */
    .card-body,
    .card-header,
    .card-footer {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    /* Fix table overflow in cards */
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
    }
    
    /* Prevent button groups from overflowing */
    .btn-group {
        max-width: 100%;
        flex-wrap: wrap;
    }
    
    /* Ensure input groups don't overflow */
    .input-group {
        max-width: 100%;
        flex-wrap: wrap;
    }
    
    /* Override fixed max-widths that cause overflow */
    .input-group[style*="max-width"] {
        max-width: 100% !important;
    }
    
    /* Make search inputs more mobile-friendly */
    .input-group input {
        min-width: 0;
        flex: 1;
    }
    
    /* Fix dropdown menus on mobile */
    .dropdown-menu {
        max-width: 100vw;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Reduce padding on mobile to prevent overflow */
    .content-container {
        padding: 15px !important;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 12px !important;
    }
    
    /* Ensure buttons don't overflow */
    .btn-group .btn {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    /* Fix table responsiveness */
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
        word-break: break-word;
    }
} 