/* FAT ERP - Custom CSS
   Project: FAT Lighting Manufacturing ERP
   Version: 1.0
   Description: Custom styles for the ERP dashboard and UI
*/

/* Body and layout */
body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
    overflow-x: hidden;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: calc(100vh - 56px);
    width: 250px;
    background: linear-gradient(135deg, #2c3e50, #1a2a3a);
    padding-top: 1rem;
    overflow-y: auto;
    z-index: 1030;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar .nav-link {
    color: #bdc3c7;
    padding: 0.6rem 1.25rem;
    margin: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #ffffff;
    background-color: #3498db;
}

.sidebar .nav-link i {
    width: 1.5rem;
}

.sidebar .sidebar-header {
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sidebar collapsed (desktop) */
.sidebar.sidebar-collapsed {
    width: 80px;
}
.sidebar.sidebar-collapsed .sidebar-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
}
.sidebar.sidebar-collapsed .nav-link {
    padding: 0.6rem 0.5rem;
    text-align: center;
}
.sidebar.sidebar-collapsed .nav-link i {
    display: block;
    margin-right: 0 !important;
    margin-bottom: 0.25rem;
}
.sidebar.sidebar-collapsed .nav-link .ms-auto {
    display: none;
}
.sidebar.sidebar-collapsed .sidebar-text {
    display: none;
}

/* Navbar styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-custom-css{
    display: none !important;
}

@media (max-width: 800px){
    .nav-custom-css{
        display: inline-block !important;
    }
}

/* Main content area (when sidebar is visible) */
.main-content {
    margin-left: 240px;
    padding: 1.5rem;
    min-height: calc(100vh - 60px);
}

/* Main content area (when sidebar is collapsed) */
.main-content-expanded {
    margin-left: 80px;
    padding: 1.5rem;
    min-height: calc(100vh - 60px);
}

/* Footer styles */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    margin-left: 240px;
}

.footer-expanded {
    margin-left: 80px;
}

/* Card styles */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card .card-body {
    padding: 1.25rem;
}

.card .card-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.card .card-text {
    color: #7f8c8d;
    font-size: 0.875rem;
}

.recent-activity-cus-css{
    height: 300px !important;
    max-height: 300px !important;
    overflow: scroll;
}

/* Dashboard placeholder cards */
.placeholder-card {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
}

.placeholder-card .card-body {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
}

/* Toast message positioning */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1.5rem;
    z-index: 1080;
}

/* Loader overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Login page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-box .login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-box .login-header h2 {
    color: #2c3e50;
    font-weight: 600;
}

.login-box .login-header .logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background-color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.75rem;
}

/* Status badges */
.badge-status {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
}

/* ============================================================ */
/* Mobile Responsiveness                                         */
/* ============================================================ */

/* Tablet and below (991px and under) */
@media (max-width: 991.98px) {
    /* Sidebar becomes overlay on tablet */
    .sidebar {
        width: 280px;
        margin-left: -280px;
        transition: all 0.3s ease;
    }

    .sidebar.show {
        margin-left: 0;
    }

    /* Main content and footer shift to full width */
    .main-content,
    .main-content-expanded {
        margin-left: 0;
    }

    .footer,
    .footer-expanded {
        margin-left: 0;
    }
}

/* Mobile and below (767px and under) */
@media (max-width: 767.98px) {
    /* Sidebar overlay for mobile */
    .sidebar {
        width: 100%;
        max-width: 280px;
        margin-left: -100%;
    }

    .sidebar.show {
        margin-left: 0;
    }

    /* Ensure main content is not hidden behind sidebar */
    .main-content,
    .main-content-expanded {
        margin-left: 0;
        padding: 1rem;
    }

    .footer,
    .footer-expanded {
        margin-left: 0;
    }

    /* Responsive heading sizes */
    .main-content h2.h4 {
        font-size: 1.25rem;
    }

    /* Table responsive fix - ensure horizontal scroll */
    .table-responsive {
        margin-bottom: 1rem;
    }

    /* Stack action buttons vertically on small screens */
    .btn-group.btn-group-sm,
    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-group.btn-group-sm .btn,
    .btn-group .btn {
        margin-bottom: 0.25rem;
        width: 100%;
    }
}

/* Very small screens (480px and under) */
@media (max-width: 480px) {
    .sidebar {
        max-width: 100%;
    }

    .login-box {
        padding: 1.5rem;
    }
}

/* Sidebar backdrop overlay for mobile */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1020;
}

/* ============================================================ */
/* Filter Forms - Responsive Scroll                             */
/* ============================================================ */

/* Filter forms: horizontal scroll on small screens to prevent
   awkward wrapping of filter fields */
.filter-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    /* Grid-based filter forms (row g-3) - columns don't wrap, scroll instead */
    .filter-scroll {
        flex-wrap: nowrap !important;
        padding-bottom: 0.25rem;
    }
    .filter-scroll > [class*="col"] {
        flex: 0 0 auto !important;
        width: auto !important;
    }
    /* Simple search input-group - prevent wrapping */
    .filter-scroll .input-group {
        flex-wrap: nowrap !important;
    }
}

/* On desktop, allow filter forms to wrap normally if they overflow */
.filter-scroll .row {
    flex-wrap: wrap;
}

/* ============================================================
   Language switch (Google Website Translator) — hide Google's
   own banner/toolbar; we drive translation with our own
   English | हिंदी links instead.
   ============================================================ */
#google_translate_element,
.goog-te-banner-frame,
.goog-te-gadget-icon {
    display: none !important;
}
body {
    top: 0 !important;
    position: static !important;
}
.goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
