/* Custom CSS for SCANNER Application */

/* Sidebar Styling */
.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
    border-right: 2px solid rgba(79, 195, 247, 0.2);
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 1rem;
    width: 16.66667%;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.25rem 0.5rem;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.1), rgba(255, 152, 0, 0.1));
    color: #495057;
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-light-blue), var(--accent-blue));
    color: white;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.sidebar .nav-item {
    margin-bottom: 0.5rem;
}

/* User Profile */
.sidebar-profile {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.avatar-circle {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-light-blue), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.initials {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.user-info {
    padding: 0.75rem;
}

.user-info h6 {
    margin-bottom: 0;
    font-size: 0.85rem;
}

.user-info .text-muted {
    font-size: 0.75rem;
}

/* Main content area */
.main-content {
    margin-left: 16.66667%; /* Adjust based on sidebar width */
    padding: 0;
    min-width: 0;
    flex: 1;
}

.content {
    flex: 1;
    min-width: 0;
    background-color: #ffffff;
    padding: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .main-content {
        margin-left: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        width: 60px;
        min-width: 60px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-logo img {
        max-width: 40px;
    }
    
    .sidebar .nav-link span,
    .sidebar-profile .user-info h6,
    .sidebar-profile .user-info span {
        display: none;
    }
    
    .sidebar .nav-link i {
        font-size: 1.25rem;
    }
}

/* Card styling */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
}

/* Table styling */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

/* Button styling */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-group .btn {
    border-radius: 0;
}

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

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

/* Badge styling */
.badge {
    font-weight: 500;
    font-size: 0.75em;
}

/* Form styling */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: 0.375rem;
}

/* Alert styling */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Progress bar styling */
.progress {
    height: 8px;
    border-radius: 4px;
}

/* Statistics cards */
.stats-card {
    border-left: 4px solid var(--primary-light-blue);
    transition: transform 0.2s ease-in-out;
}

.stats-card:hover {
    transform: translateY(-2px);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Navigation breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Header border */
.border-bottom {
    border-bottom: 2px solid #dee2e6 !important;
}

/* Custom spacing */
.pt-3 { padding-top: 1rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

/* Responsive adjustments */
@media (min-width: 768px) {
    .col-md-9.ms-sm-auto {
        margin-left: auto !important;
    }
    
    .col-lg-10 {
        flex: 0 0 auto;
        width: 83.33333333%;
    }
}

/* Fix for sidebar positioning */
@media (min-width: 768px) {
    .sidebar {
        width: 16.66667%;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
    }
    
    .main-content {
        margin-left: 16.66667%;
        width: calc(100% - 16.66667%);
        min-height: 100vh;
    }
}

/* Ensure proper content spacing */
.container-fluid {
    padding: 0;
}

.container-fluid .row {
    margin: 0;
}

/* Better responsive behavior */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        z-index: 1050;
        width: 250px;
        height: 100vh;
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}