:root {
    --primary-color: #3498DB;
    --secondary-color: #2ECC71;
    --text-color: #34495E;
    --light-bg: #ECF0F1;
    --dark-bg: #2C3E50;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    font-size: 0.9375rem; /* Reduced base font size (15px) */
}

.login-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Use min-height instead of height to prevent content overflow */
}

.navbar {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid #E0E0E0;
    padding: 1rem 1.5rem; /* Menambah padding untuk navbar */
}

.navbar-brand {
    font-weight: 600;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}


.card-title {
    color: var(--primary-color);
}

.badge {
    font-size: 0.9em;
    padding: 0.5em 0.8em;
    border-radius: 0.5rem;
}


/* New styles for data display */

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .display-6 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }

}

/* Styles for action buttons */
.dashboard-actions .action-button {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Dashboard specific styles */
.dashboard-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08); /* Soft shadow for dashboard cards */
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.12);
}

.dashboard-card .card-body {
    padding: 2rem; /* More internal padding for dashboard cards */
}

.dashboard-card .card-title {
    font-size: 1.2rem; /* Larger title for dashboard cards */
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.dashboard-card .card-text {
    font-size: 3rem; /* Larger numbers for dashboard cards */
    font-weight: 700;
    margin-bottom: 1rem;
}

.dashboard-cards .btn {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
}

/* Quick Actions Specific Styles */
.quick-actions {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08); /* Soft shadow for quick actions card */
}

.quick-actions .card-body {
    padding: 2rem; /* More internal padding */
}

.quick-actions .card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.quick-actions .btn-outline-primary {
    border-width: 2px;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.quick-actions .btn-outline-primary:hover {
    transform: translateY(-2px);
}

@media (max-width: 767.98px) {
    .dashboard-card .card-text {
        font-size: 2rem; /* Smaller font size on mobile */
    }
}

/* New styles for data display */
.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 2px solid var(--primary-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: var(--light-bg);
}

.table .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Form styling */
.form-label {
    font-weight: 500;
    color: var(--text-color);
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Card styling */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.15); /* Slightly more pronounced shadow */
    overflow: hidden; /* Ensures badge corners are rounded */
}

/* Login Card Specific Styles */
.login-card {
    max-width: 550px; /* Lebar lebih besar untuk tampilan yang lebih luas, konsisten untuk semua form */
    width: 100%;
    padding: 0 !important; /* Remove padding from the card itself as body-padding handles it */
    background: #ffffff; /* Ensure white background */
    border-radius: 1.5rem; /* More rounded corners */
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1); /* Softer, larger shadow */
    animation: fadeIn 0.5s ease-out; /* Simple fade-in animation */
}

.login-card .card-body {
    padding: 2.5rem; /* More internal padding */
}

.login-card .form-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.login-card .form-control {
    border-radius: 0.75rem; /* More rounded input fields */
    padding: 1rem 1.25rem; /* Larger input fields */
    border: 1px solid #e0e0e0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.3rem rgba(52, 152, 219, 0.2); /* Softer focus shadow */
}

.login-card .btn-primary {
    padding: 1rem 1.5rem; /* Larger button */
    font-size: 1.1rem;
    border-radius: 0.75rem;
    background: linear-gradient(45deg, #3498DB, #2980b9); /* Gradient button */
    border: none;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15); /* Button shadow */
    transition: all 0.3s ease;
}

.register-card {
    max-width: 500px;
    width: 100%;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #2980b9, #3498DB); /* Reverse gradient on hover */
}

.login-card .alert {
    border-radius: 0.75rem;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* New style for login title background */
.login-title-bg {
    background-color: #2196F3; /* A shade of sea blue */
    color: #FFFFFF;
    padding: 1.5rem 0; /* Adjusted padding to make it look more like a button */
    border-radius: 0.75rem; /* Full rounded corners */
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem; /* Keep some space below the title */
    display: flex; /* Use flexbox for centering content */
    justify-content: center;
    align-items: center;
    text-align: center; /* Ensure text is centered */
    flex-direction: column; /* Stack icon and text vertically if needed, though for a single line, it just centers */
}

.card-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.alert {
    border-radius: 0.75rem;
    z-index: 1050; /* Ensure it's above most elements, including modals */
    position: relative; /* Needed for z-index to work */
}

/* Sidebar styles */
body.admin-layout {
    min-height: 100vh;
    background-color: #f8f9fa;
    overflow-y: auto; /* Allow scrolling for the main content */
}
.wrapper {
    display: flex;
    min-height: 100vh;
    overflow: hidden; /* Prevent scrolling on the wrapper itself */
}
.sidebar {
    width: 280px;
    min-width: 280px;
    background: #343a40;
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    overflow-y: auto; /* Allow sidebar content to scroll if it overflows */
    z-index: 1000;
}
.sidebar .nav-link {
    color: #adb5bd;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex; /* Menggunakan flexbox untuk penataan ikon dan teks */
    align-items: center; /* Menyusun secara vertikal di tengah */
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #fff;
    background: #495057;
}
.sidebar .nav-link .fas { /* Mengubah .fa menjadi .fas untuk Font Awesome 6 */
    margin-right: 15px; /* Mengurangi margin untuk spasi yang lebih baik */
    width: 20px; /* Menetapkan lebar tetap untuk ikon */
    text-align: center; /* Pusatkan ikon jika perlu */
}
.sidebar .sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #495057;
}
.sidebar .sidebar-header h3 {
    color: #fff;
}
body.admin-layout .content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
    
}

/* Map specific styles */
#mapid {
    height: 80vh; /* Set a responsive height for the map container */
    width: 100%; /* Ensure it takes full width */
    border-radius: 0.75rem; /* Match card styling */
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

/* Base layout for admin dashboard */
.wrapper {
    display: flex;
    min-height: 100vh; /* Ensure wrapper takes full viewport height */
}

.sidebar {
    width: 250px; /* Default sidebar width */
    background-color: #343a40;
    color: white;
    transition: all 0.3s ease; /* Smooth transition for sidebar changes */
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

.content-wrapper {
    flex-grow: 1; /* Content takes remaining space */
    padding: 20px;
    transition: all 0.3s ease; /* Smooth transition for content changes */
}

/* Hide toggle button by default on larger screens */
#sidebarToggle {
    display: none;
}

/* Media queries for smaller screens (e.g., mobile) */
@media (max-width: 768px) {
    .sidebar {
        position: fixed; /* Fix sidebar position */
        top: 0;
        left: -250px; /* Hide sidebar off-screen by default */
        height: 100vh; /* Full height */
        z-index: 1000; /* Ensure sidebar is on top */
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Add shadow */
        padding-bottom: 20px; /* Added padding to push content up */
    }

    .wrapper.sidebar-toggled .sidebar {
        left: 0; /* Show sidebar when toggled */
    }

    .content-wrapper {
        margin-left: 0; /* Content takes full width */
    }

    /* Show toggle button on small screens */
    #sidebarToggle {
        display: block;
        position: fixed; /* Fix toggle button position */
        top: 10px;
        left: 10px;
        z-index: 1001; /* Ensure button is on top of sidebar */
    }

    /* Adjust content padding when sidebar is open to prevent overlap */
    .wrapper.sidebar-toggled .content-wrapper {
        margin-left: 250px; /* Push content to the right when sidebar is open */
    }
}

@media (min-width: 769px) {
    .content-wrapper {
        margin-left: 250px; /* Push content to the right, matching sidebar width */
    }
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    overflow-y: auto;
}

@media print {
    body {
        margin: 0;
        padding: 0;
        background-color: #fff !important; /* Ensure white background for printing */
        color: #000; /* Ensure black text for readability */
    }

    /* Hide elements not meant for printing */
    .no-print,
    .navbar,
    .sidebar,
    .btn,
    .form-label,
    .form-control,
    .form-select,
    .modal-backdrop,
    .modal-open .modal {
        display: none !important;
    }

    /* Ensure only the report title and table are visible */
    h1 {
        text-align: center;
        margin-top: 20px;
        margin-bottom: 20px;
        color: #000 !important; /* Ensure black color for title */
    }

    .card {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card-body {
        padding: 0 !important;
    }

    /* Table specific print styles */
    .table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 0;
    }

    .table th,
    .table td {
        border: 1px solid #ddd !important; /* Ensure borders are visible */
        padding: 8px;
        vertical-align: top;
        color: #000; /* Ensure black text */
    }

    .table thead th {
        background-color: #f2f2f2 !important; /* Light grey header */
        color: #000 !important;
    }

    .table tbody tr:nth-child(odd) {
        background-color: #f9f9f9 !important; /* Zebra striping */
    }

    .table tbody tr:hover {
        background-color: #f9f9f9 !important; /* Remove hover effect */
    }

    /* Image in table */
    .table img {
        max-height: 50px;
        width: auto;
    }

    /* Ensure links are not underlined or colored */
    a {
        text-decoration: none;
        color: inherit;
    }

    /* Remove any shadows or extra styling */
    .shadow-sm, .shadow {
        box-shadow: none !important;
    }

    /* Adjust font sizes for print readability */
    body, .table td, .table th {
        font-size: 10pt;
    }

    h1 {
        font-size: 18pt;
    }

    /* Page breaks for tables if they span multiple pages */
    .table-responsive {
        overflow: visible !important;
    }
    .table {
        page-break-inside: auto;
    }
    .table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    .table thead {
        display: table-header-group;
    }
    .table tfoot {
        display: table-footer-group;
    }
}

/* Customer Map Page Sticky Header */
.sticky-map-header {
    position: sticky;
    top: 0;
    background-color: #f8f9fa; /* Match body.admin-layout background */
    z-index: 1020;
    padding: 1rem 0;
}