/* Path: /home3/yzkaromd/erp.sesautomations.com/assets/css/style.css */
body {
    background-color: #f8f9fa;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    max-width: 450px;
    width: 100%;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.login-card .card-header {
    background-color: var(--bs-primary);
    color: white;
    text-align: center;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    padding: 1.5rem;
}


/* ============================================= */
/* === Admin Dashboard Layout Styles         === */
/* ============================================= */

body {
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.dashboard-wrapper {
    min-height: 100vh;
}

.sidebar-wrapper {
    width: 260px;
    transition: margin-left 0.3s;
}

.sidebar-wrapper .sidebar-heading {
    padding: 1.2rem 1.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-wrapper .list-group-item {
    border: none;
    padding: 1rem 1.25rem;
}

.sidebar-wrapper .list-group-item-action:hover,
.sidebar-wrapper .list-group-item-action:focus {
    background-color: #495057 !important; /* Darker hover for dark sidebar */
}

.page-content-wrapper {
    min-width: 0;
    width: 100%;
}

/* Styles for the KPI cards on the dashboard */
.card.border-left-primary { border-left: .25rem solid #4e73df !important; }
.card.border-left-success { border-left: .25rem solid #1cc88a !important; }
.card.border-left-info { border-left: .25rem solid #36b9cc !important; }
.card.border-left-warning { border-left: .25rem solid #f6c23e !important; }

.text-xs { font-size: .8rem; }


/* --- Admin Dashboard Layout Styles --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
}

#sidebar-wrapper {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1a1e23 0%, #0d1117 100%);
    color: #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 3px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.sidebar-heading {
    padding: 1.25rem 1.5rem;
    background-color: #13171d;
    border-bottom: 1px solid #2d3741;
}

.sidebar-heading strong {
    font-size: 1.25rem;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.list-group-item {
    background: transparent;
    border: none;
    color: #adb5bd;
    border-left: 3px solid transparent;
    padding: 0.9rem 1.5rem;
    transition: all 0.2s;
}

.list-group-item:hover, 
.list-group-item.active {
    background: rgba(255,255,255,0.05);
    color: #0b44d6;
    border-left-color: #4facfe;
}

.list-group-item.active {
    font-weight: 700;
}

.list-group-item i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
}

#page-content-wrapper {
    flex: 1;
    min-width: 0;
    transition: all 0.3s;
}

.navbar-top {
    background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 99;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(120deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

#menu-toggle {
    background: none;
    border: none;
    color: #495057;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -260px;
        position: fixed;
    }
    
    #sidebar-wrapper.active {
        margin-left: 0;
    }
    
    #page-content-wrapper {
        width: 100%;
    }
}

/* In assets/css/style.css */

/* Style for sortable table headers */
th[data-sort] {
    position: relative;
    padding-right: 20px; /* Make space for the icon */
}

th[data-sort] span::after {
    content: "\f0dc"; /* Font Awesome sort icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #cccccc;
    transition: color 0.2s;
}

th[data-sort]:hover span::after {
    color: #333333;
}

/* Style for active sorting column */
th[data-sort].sort-asc span::after {
    content: "\f0de"; /* Font Awesome sort-up icon */
    color: #0d6efd; /* Bootstrap primary color */
}

th[data-sort].sort-desc span::after {
    content: "\f0dd"; /* Font Awesome sort-down icon */
    color: #0d6efd;
}

/* assets/css/style.css */

/* Tag Input Styling */
.tag-input-container {
    border: 1px solid #ced4da;
    border-radius: .25rem;
    padding: .375rem .75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.tag-item {
    background-color: #0d6efd;
    color: white;
    padding: 2px 8px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    font-size: 0.9em;
}
.tag-item .remove-tag {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}
#tagInput {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 0;
}
#tagInput:focus {
    box-shadow: none;
}

/* Image Preview Styling */
.img-preview-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}
.img-preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: .25rem;
}
.remove-img-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
}
/* In assets/css/style.css */

/* Styling for the small product image in the table list */
.product-list-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
    vertical-align: middle;
    border: 1px solid #ddd;
}

/* Styling for the tags display in the product list */
.product-list-tags .badge {
    margin-right: 4px;
    margin-bottom: 4px; /* For wrapping */
    font-weight: 500;
}

/*    */

/* In assets/css/style.css */

/* --- REVISED IMAGE STYLING --- */

/* This is the cell in the table */
.model-number-cell {
    display: flex;
    align-items: center; /* Vertically align image and text */
    gap: 15px; /* Space between image and text */
}

/* This is the container that WRAPS the image */
.product-list-img-container {
    width: 50px;         /* <-- Force the width */
    height: 50px;        /* <-- Force the height */
    flex-shrink: 0;      /* <-- IMPORTANT: Prevents the container from shrinking or growing */
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
    /* overflow: hidden;  This can help contain the image */
}

/* This is the actual <img> tag */
.product-list-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Scales the image to fill the box without distortion */
    display: block;    /* Removes any extra space below the image */
}


/*   */

/* Fix for invisible dropdown options inside a modal */
.modal select.form-select option {
    color: #212529; /* This is Bootstrap's standard dark text color */
    background-color: #ffffff; /* Ensures the background is explicitly white */
}
/*
 * Filepath: /assets/css/style.css
 * Fix for invisible text on hover in customer detail page tabs
*/

/* --- Fix for Contacts List --- */
#contacts-pane .list-group-item:hover,
#contacts-pane .list-group-item:focus {
    background-color: #f8f9fa; /* A standard light grey hover color */
    color: #212529; /* Explicitly set the text color to dark */
}

/* Ensure child elements like <p> and <small> also inherit the dark color on hover */
#contacts-pane .list-group-item:hover *,
#contacts-pane .list-group-item:focus * {
    color: inherit; 
}


/* --- Fix for Machinery List --- */
#machinery-pane .list-group-item:hover,
#machinery-pane .list-group-item:focus {
    background-color: #f8f9fa;
    color: #212529;
}

#machinery-pane .list-group-item:hover *,
#machinery-pane .list-group-item:focus * {
    color: inherit;
}


/* --- Fix for Addresses List (if using list-group) --- */
/* This targets the card inside the address list */
#addresses-pane .card:hover {
    border-color: #0d6efd; /* Highlight with a blue border */
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); /* Add a subtle shadow */
}

/* --- Optional: Improve readability of main customer list hover --- */
/* This makes the hover on your main customer list a bit more subtle */
.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: #f8f9fa; /* Lighter grey for main table hover */
}
