﻿/* --- COMPACT THEME FIXES --- */

/* 1. Reduce Header Spacing */
.section-header {
    margin-bottom: 10px !important; /* Reduced from 25px */
    padding-bottom: 5px !important;
    font-size: 20px;
}

/* 2. Tighter Panels */
.card-panel {
    padding: 15px !important; /* Reduced padding inside white boxes */
    margin-bottom: 15px !important; /* Reduced gap between boxes */
}

/* 3. Compact Labels & Inputs */
.form-label {
    margin-bottom: 2px !important; /* Tighter label-to-input gap */
    font-size: 12px !important;
}

.modern-input, .modern-select, .btn-action {
    height: 32px !important; /* Reduced height for compact look */
    font-size: 13px !important;
    padding: 4px 8px !important;
}

/* 4. Read-Only Input Style (For Customer Details) */
.input-readonly {
    background-color: #e9ecef !important; /* Light gray background */
    color: #495057;
    cursor: default;
    border: 1px solid #ced4da;
}


/* --- Page Specific Styles --- */
/* 1. Header Styling (Matches your preferred look) */
.page-title {
    color: #333;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 3px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 15px;
    margin-top: 10px;
}

/* 2. Section Panels */
.custom-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 15px; /* Compact spacing */
    padding: 15px;
}

.section-label {
    color: #007bff; /* Blue text like your screenshot */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 2px;
    display: block;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}



/* 3. Form Labels */
.lbl-text {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 2px;
}

/* 4. Read-Only Inputs (Gray Background) */
.input-readonly {
    background-color: #e9ecef !important;
    cursor: default;
}

/* 5. Calendar Fix */
.cal-style .ajax__calendar_container {
    z-index: 99999;
    background: #fff;
    border: 1px solid #999;
}

.cal-style table, .cal-style tr, .cal-style td {
    padding: 0;
    border: none;
    margin: 0;
}

.cal-style .ajax__calendar_day {
    padding: 5px;
    text-align: center;
}

/* 6. Compact Grid */
.compact-grid th {
    background-color: #007bff;
    color: white;
    padding: 8px;
    font-size: 13px;
}

.compact-grid td {
    padding: 6px;
    font-size: 12px;
}

/* --- WHITE THEME STYLES --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9; /* Very light gray background for content */
    color: #333;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

/* --- Sidebar (White Background) --- */
#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: #ffffff; /* WHITE Background */
    color: #333;
    transition: all 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    border-right: 1px solid #e1e4e8;
}

    #sidebar.active {
        margin-left: -260px;
    }

.sidebar-header {
    padding: 15px;
    background: #ffffff;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.sidebar-user {
    display: flex;
    align-items: center; /* Centers icon and text vertically */
    padding: 15px 20px; /* Adds breathing room */
    border-bottom: 1px solid #eaeaea; /* Optional: adds a nice separator line */
    overflow: hidden; /* Ensures no content bleeds out */
}

    .sidebar-user i {
        font-size: 24px; /* Makes the icon a bit larger */
        margin-right: 12px; /* Keeps the icon "alag" (spaced) from the text */
        color: #4a5568; /* A professional grey/blue color */
        flex-shrink: 0; /* IMPORTANT: Prevents the icon from shrinking when the name is very long */
    }

.user-info {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    /* These 3 lines create the "..." effect for long text */
    white-space: nowrap; /* Forces text to stay on one single line */
    overflow: hidden; /* Hides any text that goes beyond the width */
    text-overflow: ellipsis; /* Adds the "..." at the end */

    flex-grow: 1; /* Allows the text block to fill the remaining space */
}

/* Sidebar Links (Dark Text on White) */
#sidebar ul.components {
    padding: 10px 0;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 14px;
    display: block;
    color: #555; /* Dark Gray Text */
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

    #sidebar ul li a:hover {
        color: #007bff;
        background: #f1f7ff; /* Light Blue Hover */
        border-left: 4px solid #007bff;
    }

#sidebar ul li.active > a {
    color: #007bff; /* Blue Active Text */
    background: #e6f2ff; /* Light Blue Active Background */
    border-left: 4px solid #007bff;
    font-weight: 600;
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #888;
}

#sidebar ul li a:hover i,
#sidebar ul li.active > a i {
    color: #007bff;
}

/* --- Navbar (Light) --- */
.navbar {
    padding: 10px 20px;
    background: #ffffff; /* White Navbar */
    border-bottom: 1px solid #e1e4e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.navbar-btn {
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

    .navbar-btn:hover {
        background: #eee;
    }

.user-info-label {
    font-weight: 600;
    color: #333; /* Dark Text */
    margin-right: 15px;
    font-size: 14px;
}

.btn-logout {
    background-color: transparent;
    color: #dc3545; /* Red Text */
    border: 1px solid #dc3545; /* Red Border */
    padding: 6px 15px;
    border-radius: 20px; /* Rounded pill shape */
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .btn-logout:hover {
        background-color: #dc3545;
        color: white;
        text-decoration: none;
        box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
    }

.navbar-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #555;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

    .navbar-btn:hover {
        background: #e2e6ea;
    }

/* --- Main Content Area --- */
#content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f4f6f9;
}

.main-content-area {
    /* padding: 20px;*/
    flex: 1;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -260px;
    }

        #sidebar.active {
            margin-left: 0;
        }
}

.flatpickr-calendar {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    border: 1px solid #eee !important;
}

.flatpickr-day.selected {
    background: #007bff !important;
    border-color: #007bff !important;
}




/*============================================    Login ==============*/
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
}

.login-container {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Left Side - Image & Branding */
.login-banner {
    flex: 1.5;
    background: url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 37, 63, 0.9) 0%, rgba(37, 99, 235, 0.8) 100%);
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

    .banner-content h1 {
        font-weight: 700;
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .banner-content p {
        font-size: 1.2rem;
        opacity: 0.9;
    }

/* Right Side - Login Form */
.login-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.brand-logo {
    color: #0d253f;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    display: block;
    text-decoration: none;
}

/*.form-control {
    height: 50px;
    padding-left: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

    .form-control:focus {
        box-shadow: none;
        border-color: #2563eb;
        background-color: #fff;
    }*/

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #6c757d;
}


.btn-custom {
    background-color: #0d253f;
    color: white;
    height: 50px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(13, 37, 63, 0.2);
}

    .btn-custom:hover {
        background-color: #1a4b7c;
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(13, 37, 63, 0.3);
        color: white;
    }

.form-label {
    font-weight: 500;
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .login-banner {
        display: none;
    }
}



 /*1. Lock the Body and Form so the whole page NEVER scrolls */
html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;  
}

form#form1 {
    height: 100%;
}

/* 2. Make the wrapper a Flex container that fills the screen */
.wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

 /*3. Make the Sidebar scrollable independently */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    height: 100vh;
    overflow-y: auto;  
    background: #fff;  
    border-right: 1px solid #ddd;
}

     /*Hide scrollbar for sidebar (optional, looks cleaner) */
    #sidebar::-webkit-scrollbar {
        width: 5px;
    }

    #sidebar::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }

/* 4. Make the Content area a Flex Column */
#content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; 
}

 /*5. Keep the Top Navbar fixed at the top */
.navbar {
    flex-shrink: 0;  
    z-index: 1000;
}

 /*6. Make ONLY the ContentPlaceHolder scrollable */
.main-content-area {
    flex-grow: 1;
    overflow-y: auto; 
    overflow-x: hidden;
    padding: 5px;  
    background: #f4f7f6;  
}