@import url('https://cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    margin: 0;
}

header {
    background-color: #007bff;
    padding: 20px;
    color: #fff;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.container {
  /*  max-width: 1200px;
    margin: 0 auto;*/
    padding: 20px;
}

/*button {
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #cdcdcd;
}*/

.error {
    color: red;
    margin-top: 10px;
}

h1, h2, h3 {
    text-align: center;
    color: #333;
}

p {
    text-align: center;
    color: #555;
}

/* Login form styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #fff;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.login-container label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.login-container input[type="text"],
.login-container input[type="email"],
.login-container input[type="password"],
.login-container input[type="number"],
.login-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.login-container textarea {
    resize: vertical; /* Allows vertical resizing */
}

.login-container button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #0056b3;
}

/* DataTables styles */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #333;
    margin: 5px;
}

table.dataTable {
    border-collapse: collapse;
    width: 100%;
    margin: 0px auto;
    background-color: #fff;
    font-size: 13px;
}

table.dataTable thead th {
    background-color: #343a40;
    color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    font-weight: 500;
    text-align: left;
    border-radius: 8px;
}

table.dataTable tbody tr {
    border: 1px solid #ddd;
}

table.dataTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

table.dataTable tbody tr:nth-child(even) {
    background-color: #fff;
}

table.dataTable tbody tr:hover {
    background-color: #f7ed9c;
}

table.dataTable tbody td a {
    padding: 0px;
    color: #333;
}

.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter {
    display: inline-block;
    width: auto;
    margin-right: 30px;
    margin-left: 30px;
    vertical-align: middle;
}

.dataTables_wrapper .dataTables_length {
    padding-left: 10px;
    float: left;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
    text-align: right;
    padding-right: 10px;
}

.dataTables_wrapper .dataTables_info {
    clear: none;
    display: inline-block;
    float: left;
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 30px;
}

.dataTables_wrapper .dataTables_paginate {
    float: right;
    margin-top: 10px;
    margin-bottom: 20px;
    padding-right: 30px;
}


/* Footer styles */
footer {
    width: 100%;
    background-color: #343a40;
    color: #fff;
    text-align: center;
    padding: 10px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 14px;
    color: #fff;
}

/* Form styles */
.form-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #fff;
}

.form-container label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container input[type="number"],
.form-container textarea,
.form-container input[type="checkbox"],
.form-container select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.form-container textarea {
    resize: vertical; /* Allows vertical resizing */
}

.form-container select {
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="#ccc" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.form-container select:focus {
    border-color: #007bff;
}

.form-container button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.form-container button:hover {
    background-color: #0056b3;
}

.dashboard-item {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-item h3 {
    margin-top: 0;
}

.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-item {
    background: #fff;
    padding: 15px;
    flex: 1 1 calc(33.333% - 20px);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-item h3 {
    margin-top: 0;
}

.dashboard-metric {
    background: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-metric h3 {
    margin-top: 0;
}

.dashboard-metric p {
    font-size: 24px;
    margin: 0;
}

.chart-container {
    position: relative;
    height: 400px;
}

.dashboard-metric {
    background: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-metric h3 {
    margin-top: 0;
}

.dashboard-metric p {
    font-size: 24px;
    margin: 0;
}

.chart-container {
    position: relative;
    height: 400px;
}

/* Adjust table within dashboard items */
.dashboard-item .datatable {
    margin-top: 15px;
    font-size: 12px;
}

/* Ensure charts fit well within dashboard items */
.dashboard-item canvas {
    max-width: 100%;
    height: auto;
}
.settings-form {
    max-width: 96%;
    margin: 50px auto;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #fff;
}

.settings-form h3 {
    margin-top: 20px;
}

.settings-form label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="number"],
.settings-form textarea,
.settings-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.settings-form textarea {
    resize: vertical; /* Allows vertical resizing */
}

.settings-form button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.settings-form button:hover {
    background-color: #0056b3;
}
.add-button {
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.add-button:hover {
    background-color: #218838;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

/* Other styles */

nav ul.showing > li ul {
    display: block;
    position: relative;
    background-color: #0056b3;
}

nav ul.showing > li ul li {
    width: 100%;
    padding-left: 20px; /* Indent submenu items */
}

/* Media Query for smaller screens */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        display: none;
    }

    nav .menu-icon {
        display: block;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        padding: 10px;
    }

    nav ul.showing {
        display: flex;
        flex-direction: column;
    }

    nav ul.showing > li ul {
        display: block;
        position: relative;
        background-color: #007bff;
        padding-left: 20px;
    }

    nav ul.showing > li ul li a {
        padding: 10px;
        background-color: #007bff;
        color: white;
        text-decoration: none;
    }

    nav ul.showing > li ul li a:hover {
        background-color: #0056b3;
    }
}

/* Other styles */

/* Ensure tables are not overflowing their container */
table.dataTable {
    width: 95% !important;
}

/* Optional: Customize the appearance of collapsed rows in responsive mode */
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    padding: 4px;
    margin-right: 10px;
    content: '+';
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    padding: 4px;
    margin-right: 10px;
    content: '-';
}

/* Adjust the input field size */
input[type="text"][name="dispatched_qty"] {
    width: 100px;
    text-align: center;
}

/* Existing styles ... */

input[type="text"][name="dispatched_qty"] {
    width: 100px;
    text-align: center;
    margin-bottom: 10px;
}

select[name="driver_id"] {
    width: auto;
    padding: 5px;
    margin-bottom: 10px;
}

/* Ensure tables are not overflowing their container */
table.dataTable {
    width: 95% !important;
}

/* Optional: Customize the appearance of collapsed rows in responsive mode */
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    padding: 4px;
    margin-right: 10px;
    content: '+';
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    padding: 4px;
    margin-right: 10px;
    content: '-';
}

/* Existing styles ... */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

/* Specific style for Dispatch Qty input */
.dispatch-qty {
    width: 100px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

select[name="driver_id"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

/* Ensure tables are not overflowing their container */
table.dataTable {
    width: 95% !important;
}

/* Optional: Customize the appearance of collapsed rows in responsive mode */
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    padding: 4px;
    margin-right: 10px;
    content: '+';
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    padding: 4px;
    margin-right: 10px;
    content: '-';
}

.order-details {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.order-details p {
    margin: 5px 0;
}

.order-details strong {
    color: #333;
}

.notes-section .buyers-section label {
    display: block;
    margin-bottom: 5px;
}

.notes-section .buyers-section div {
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

input[type="file"] {
    margin-bottom: 15px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.order-details {
    margin-bottom: 20px;
}

.notes-section {
    margin-top: 20px;
}

.notes {
    margin-bottom: 20px;
}

.note {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.note-meta {
    display: block;
    font-size: 0.8em;
    color: #666;
}

textarea {
    width: 100%;
    height: 60px;
    margin-bottom: 10px;
}

button {
    display: inline-block;
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}

.table-container {
    width: 95%;
    margin: 0 auto;
}

.highlight {
    background-color: yellow;
}


.dispatch-qty {
    width: 100px;
    text-align: center;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

select[name="driver_id"] {
    width: auto;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.table-container {
    width: 100%;
    margin: auto;
    overflow-x: auto;
}

.datatable {
    width: 100%;
    border-collapse: collapse;
}

.datatable th, .datatable td {
    padding: 8px 12px;
    border: 1px solid #ddd;
}

.datatable th {
    background-color: #f4f4f4;
}

#orderTableBody {
    display: block;
}

#orderTableBody tr {
    cursor: move;
}

.deadline-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between fields */
}

.deadline-container label {
    margin-right: 5px; /* Small margin between label and field */
}

.deadline-container input[type="date"],
.deadline-container input[type="time"] {
    width: auto; /* Adjust the width of the input fields */
}
.deadline-info {
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    padding: 10px;
    border-radius: 10px; /* Rounded corners */
    margin-top: 10px;
    font-weight: bold;
}

.summary-block {
    width: 22%; /* Adjust this to ensure 4 blocks per row */
    margin: 1%; /* Small margin for spacing between blocks */
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: inline-block;
    vertical-align: top;
    text-align: center;
    box-sizing: border-box; /* Ensures padding and borders are included in width */
}

.summary-section  {
    margin: 20px;
    text-align: center;

}

.summary-block h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.summary-block p {
    font-size: 14px;
    margin: 5px 0;
}

.row {
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px; /* Add some space between rows */
}

.final-block {
    width: 95%;
    margin: 20px auto;
    padding: 25px;
    background-color: #ffeb3b;
    border-radius: 10px;
    text-align: center;
    box-sizing: border-box;
}

.year-selector a {
    text-decoration: none;
    alfign: center;
    padding: 5px;
    margin-right: 5px;
    background-color: #1e90ff;
    color: white;
    border-radius: 4px;
}
