/**
 * PathLab BPL - Custom Styles
 * 100% Offline Compatible & Modern UI
 */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a4ebd;
    --secondary-color: #0dcaf0;
    --accent-teal: #0ea5e9;
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --sidebar-width: 265px;
}

body {
    background-color: #f8fafc;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   Master App Layout & Sidebar (Office-Use Light Theme)
   ========================================================================== */
.app-layout {
    min-height: 100vh;
    display: flex;
    width: 100%;
    background-color: #f8fafc;
}

.sidebar-wrapper {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: all 0.3s ease;
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.sidebar-wrapper.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.brand-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 3px 8px rgba(13, 110, 253, 0.2);
}

.brand-text {
    font-size: 1.12rem;
    letter-spacing: 0.5px;
    font-weight: 800;
    color: #1e293b;
}

.brand-subtext {
    font-size: 0.72rem;
    letter-spacing: 0.2px;
    color: #64748b;
}

.sidebar-user-card {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.sidebar-nav-container .nav-header {
    color: #64748b !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase;
    padding: 0.85rem 0.75rem 0.35rem 0.75rem !important;
}

.sidebar-nav-container .nav-link {
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155 !important; /* Decent dark menu text */
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
}

.sidebar-nav-container .nav-link i {
    font-size: 1.1rem;
    transition: transform 0.15s ease;
}

.sidebar-nav-container .nav-link:hover {
    background-color: #f1f5f9;
    color: #0f172a !important; /* Darker on hover */
    transform: translateX(2px);
}

.sidebar-nav-container .nav-link:hover i {
    transform: scale(1.1);
}

.sidebar-nav-container .nav-link.active {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important; /* Rich clear dark blue active text */
    font-weight: 600;
    border-left-color: #2563eb;
    box-shadow: none;
}

.sidebar-nav-container .nav-link.active i {
    color: #2563eb !important;
}

.main-wrapper {
    min-width: 0;
    background-color: #f8fafc;
}

.main-header {
    height: 64px;
    z-index: 1020;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Mobile Sidebar Drawer */
@media (max-width: 991.98px) {
    .sidebar-wrapper {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        margin-left: calc(-1 * var(--sidebar-width));
        box-shadow: 0 0 30px rgba(0,0,0,0.15);
    }
    
    .sidebar-wrapper.show-mobile {
        margin-left: 0;
    }
}

/* ==========================================================================
   Login Page Specific Styles
   ========================================================================== */
.login-body {
    background: radial-gradient(circle at 10% 20%, rgba(13, 110, 253, 0.9) 0%, rgba(15, 23, 42, 0.95) 90%), #0f172a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.login-bg-decor {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.login-bg-decor-1 {
    width: 350px;
    height: 350px;
    background: rgba(13, 202, 240, 0.25);
    top: -50px;
    left: -50px;
}

.login-bg-decor-2 {
    width: 400px;
    height: 400px;
    background: rgba(13, 110, 253, 0.25);
    bottom: -80px;
    right: -80px;
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    z-index: 1;
    overflow: hidden;
}

.login-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    box-shadow: 0 10px 20px -5px rgba(13, 110, 253, 0.4);
    margin: 0 auto 1rem auto;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    color: #64748b;
    font-size: 0.88rem;
}

.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    padding-left: 2.75rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
}

.form-floating > label {
    padding-left: 2.75rem;
    color: #64748b;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 4;
    font-size: 1.15rem;
    pointer-events: none;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: #0d6efd;
}

.btn-login-gradient {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 20px -5px rgba(13, 110, 253, 0.4);
    transition: all 0.25s ease;
}

.btn-login-gradient:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #084298 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 25px -5px rgba(13, 110, 253, 0.5);
}

.demo-pill {
    cursor: pointer;
    font-size: 0.78rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.demo-pill:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ==========================================================================
   Dashboard Components
   ========================================================================== */
.user-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.card-stat {
    border-radius: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ==========================================================================
   Pagination Spacing & Button Styling
   ========================================================================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px; /* Spacing between page number buttons */
    margin: 0;
    list-style: none;
    padding: 0;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-item .page-link {
    border-radius: 8px !important;
    padding: 0.4rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 36px;
    text-decoration: none;
}

.pagination .page-item .page-link:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0d6efd, #0a58ca) !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.35);
}

.pagination .page-item.disabled .page-link {
    color: #94a3b8;
    background-color: #f8fafc;
    border-color: #f1f5f9;
    pointer-events: none;
}
