/* LIMS Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1E40AF; /* Deep Blue */
    --accent-color: #3B82F6;  /* Bright Blue */
    --success-color: #10B981; /* Green */
    --danger-color: #EF4444;  /* Red */
    --warning-color: #F59E0B; /* Yellow/Amber */
    --light-bg: #F3F4F6;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Utilities */
.text-primary-custom { color: var(--primary-color) !important; }
.bg-primary-custom { background-color: var(--primary-color) !important; }
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.btn-primary-custom:hover {
    background-color: #1e3a8a; /* Darker shade */
    color: white;
}

/* Global Card Styling (Premium Aesthetic) */
.card, .card-custom, .profile-card, .detail-card, .auth-card {
    background: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover, .card-custom:hover, .profile-card:hover, .detail-card:hover, .auth-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color, #1E40AF);
}

.card-header, .card-footer {
    background-color: transparent;
    border-bottom: 1px solid #e2e8f0;
}
.card-footer {
    border-bottom: none;
    border-top: 1px solid #e2e8f0;
}

/* Global Table Styling (Premium Aesthetic) */
.table {
    margin-top: 1rem !important;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: white;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f1f5f9;
    padding: 1rem;
    border-top: none;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.95rem;
}

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

.table tbody tr:hover td {
    background-color: #f8fafc;
}

/* DataTables Global Overrides */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #cbd5e1;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.25rem 1.75rem 0.25rem 0.75rem;
    margin: 0 0.25rem;
    background-position: right 0.5rem center;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.5rem !important;
    border: none !important;
    padding: 0.4em 0.8em !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #EFF6FF !important;
    color: var(--primary-color) !important;
    font-weight: 600;
    border: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: none !important;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
}

@media (min-width: 992px) {
    .sidebar {
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
    }
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

.sidebar .nav-link {
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: #EFF6FF; /* Light blue bg */
    border-right: 3px solid var(--primary-color);
}

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

.sidebar-logo h4 {
    color: var(--primary-color);
    margin: 0;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Status Badges */
.badge-status-approved {
    background-color: #D1FAE5;
    color: #065F46;
}
.badge-status-rejected {
    background-color: #FEE2E2;
    color: #991B1B;
}
.badge-status-pending {
    background-color: #FEF3C7;
    color: #92400E;
}

/* Laravel Pagination */
nav[aria-label="Pagination Navigation"] {
    margin-top: 1rem;
}
nav[aria-label="Pagination Navigation"] svg {
    width: 20px;
    height: 20px;
}
nav[aria-label="Pagination Navigation"] span,
nav[aria-label="Pagination Navigation"] a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin: 0 2px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
}
nav[aria-label="Pagination Navigation"] a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
nav[aria-label="Pagination Navigation"] span[aria-current="page"] > span {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
nav[aria-label="Pagination Navigation"] span[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Responsive */
@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .sidebar {
        z-index: 1045;
    }
}

/* Analytics Page Styles */
.sidebar-right {
    border-left: 1px solid #e5e7eb;
    background-color: #f9fafb;
    width: 300px;
    flex-shrink: 0;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

/* Ensure main content handles flex correctly for analytics layout */
.main-content.analytics-layout {
    padding: 0 !important;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
}
