/* LTC Pipeline - Custom Style Sheet */

:root {
    --primary-color: #2664F5;
    --primary-hover: #1b51d0;
    --sidebar-width: 260px;
    --font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: #f8fafc;
    color: #1e293b;
    overflow-x: hidden;
}

/* Sidebar Custom Styling */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
    background-color: #2664F5 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #ffffff !important;
    opacity: 0.9;
    border-radius: 8px;
    margin: 3px 0;
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #ffffff !important;
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.18);
}

.sidebar .nav-link.active {
    color: #2664F5 !important;
    background-color: #ffffff !important;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 700;
}

/* Main Dashboard Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.07);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

/* Form Styles */
.form-control, .form-select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #2664F5;
    box-shadow: 0 0 0 4px rgba(38, 100, 245, 0.15);
}

/* Button & Color Utility Overrides */
.btn-primary, .bg-primary {
    background-color: #2664F5 !important;
    border-color: #2664F5 !important;
    color: #ffffff !important;
}

.btn-primary {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #1b51d0 !important;
    border-color: #1b51d0 !important;
    box-shadow: 0 4px 12px rgba(38, 100, 245, 0.3) !important;
}

.btn-outline-primary {
    color: #2664F5 !important;
    border-color: #2664F5 !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: #2664F5 !important;
    border-color: #2664F5 !important;
    color: #ffffff !important;
}

.text-primary {
    color: #2664F5 !important;
}

.border-primary {
    border-color: #2664F5 !important;
}

/* Auth / Login Page styling */
.auth-wrapper {
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(98, 114, 251, 0.1) 0%, rgba(204, 211, 245, 0.1) 90.1%), #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Custom Table Layouts */
.table {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    color: #475569;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* ==========================================================================
   Mobile Responsiveness & Layout Overrides
   ========================================================================== */

/* Mobile Sidebar & Off-canvas Drawer */
@media (max-width: 991.98px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed !important;
        top: 0;
        left: -280px;
        bottom: 0;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        height: 100vh !important;
        z-index: 1060;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .sidebar.show {
        left: 0 !important;
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    .content-wrapper {
        width: 100% !important;
        min-width: 100% !important;
    }

    .container-fluid {
        padding: 1rem !important;
    }
}

/* Card & Table Mobile Polishing */
@media (max-width: 767.98px) {
    .card {
        border-radius: 10px !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    .table th, .table td {
        white-space: nowrap;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem;
    }

    /* Modal Responsive Bounds */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 14px !important;
    }

    .modal-body {
        max-height: 75vh;
        overflow-y: auto;
    }
    
    /* Touch-friendly Filter Pill Scrolling */
    .filter-pills-scroll {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 4px;
    }
    
    .filter-pills-scroll::-webkit-scrollbar {
        height: 3px;
    }
}
