html {
    min-height: 100%;
    position: relative;
}
body {
    height: 100%;
}
label {
    width: 130px;
    text-align: right;
}
select {
    height: 36px;
}
input:invalid {
    border: 1px solid red;
}
input:valid {
    border: 1px solid green;
}
input.btn {
    border: none;
}
select:invalid {
    border: 1px solid red;
}
select:valid {
    border: 1px solid green;
}
.toolbar-filters {
    margin-bottom: 15px;
}
.toolbar-filters button {
    margin-left: 10px;
}
.btn .fas,
.btn.fas:hover {
    color: #fff;
    margin-right: 5px;
}
table {
    font-size: 0.8em;
}
td.center {
    text-align: center;
}
.table.edit_form th {
    font-size: 1.5em;
    font-weight: normal;
    text-align: right;
}
.table.edit_form td {
    text-align: left;
}
/* Table Filters */
.dropdown-menu {
    box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.25);
}
.table-filter i.fas {
    display: none;
}
.table-filter i.fas.on {
    display: inline;
}
.time_col {
    display: none;
}
/* Links */
a {
    color: #007bff;
    text-decoration: none;
    background-color: transparent;
}
a.fas {
    color: #44e;
}
textarea.form-control {
    height: 10em;
}
input[type="file"].form-control {
    padding: 0.2rem 0.25rem;
}
input[type="file"].done {
    float: right;
    width: 90%;
}
.status_done {
    display: none;
}
.status_done i.fas {
    float: left;
    font-size: 2em;
    position: relative;
    top: 10px;
    left: 10px;
    color: green;
}
.status_done span {
    line-height: 40px;
    padding-left: 24px;
    font-size: 1.2em;
}
.status_loading {
    display: none;
    float: left;
}
.status_loading span {
    position: relative;
    top: -8px;
}
.info_pickup {
    width: 100%;
    height: 150px;
    border: 1px #ccc solid;
    border-radius: 2px;
    padding: 10px;
    margin-bottom: 20px;
    display: none;
}

.table.edit_form th {
    width: 300px;
}
.table.edit_form td input,
.table.edit_form td select,
.table.edit_form td textarea {
    width: 500px;
}
div.calc_row {
    position: relative;
    top: -5px;
    padding: 10px 20px;
    float: right;
    background: rgb(82, 82, 82);
    color: white;
}
div.calc_row i {
    color: white;
}

td.value_distribution {
    min-width: 84px;
}
td.value_distribution input {
    width: 60px;
    display: none;
}
td.value {
    min-width: 80px;
}
#diff.red {
    color: rgb(255, 98, 71);
}
#diff.green {
    color: rgb(0, 255, 0);
}

tr.archived {
    background: #eee;
}
td a.icon,
td i.fas {
    margin: 0px;
    height: 20px;
    line-height: 20px;
}
.separator_headding {
    color: #e33;
    border-bottom: solid 2px #e33;
}
.navbar.fixed-top form {
    width: 100%;
}
.navbar .form-control {
    padding: 0.75rem 1rem;
    border-width: 0;
    border-radius: 0;
}
.form-control-dark {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}
[role="main"] {
    padding-top: 48px;
}
.container {
    margin: 0;
    max-width: none;
}
.sidebar .nav-link {
    font-weight: 500;
    color: #333;
}
.sidebar .nav-link.active {
    color: #007bff;
}
.sidebar .fa-calendar-day {
    font-size: 1.3em;
}
.sidebar .fa-file-invoice-dollar {
    font-size: 1.3em;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
}
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
}
*,
::after,
::before {
    box-sizing: border-box;
}
.sidebar .cog {
    display: none;
    background: rgba(0, 0, 0, 0.1);
}

#map {
    height: 500px;
}
/* Side Bar styles */
.sidebar-sticky ul {
    padding: 0;
}
.nav-item {
    list-style: none;
}
.nav-item:hover {
    background-color: #eee;
}
.nav-item a {
    display: block;
    padding: 10px;
}
i.fas {
    font-size: 1em;
    color: #343a40;
    width: 25px;
    text-align: center;
    margin-right: 5px;
}
.fa-trash:hover {
    color: red;
}
.toolbar-filters label {
    width: auto;
    margin-right: 10px;
}
.date_filters {
    border-left: 1px solid #eee;
    padding-left: 10px;
}
.toolbar-filters label,
.toolbar-filters input {
    vertical-align: center;
    height: 36px;
    float: left;
    width: auto;
}
.toolbar-filters input[type="date"] {
    width: 135px;
    margin-right: 10px;
}
.toolbar-filters label {
    padding-top: 4px;
}
.filters {
    margin-right: 10px;
    margin-left: 5px;
}
.filters #country {
    max-width: 100px;
}
.modal-backdrop {
    background-color: rgba(255, 255, 255, 0.99);
    opacity: 1;
}
.modal-content {
    background: none;
    border: none;
}
.modal-body {
    min-height: 300px;
}

.date-title {
    color: #343a40;
    float: left;
    position: absolute;
    left: 105px;
    top: -10px;
    background: white;
    font-size: small;
    font-weight: bold;
    padding: 0px 5px;
}
.date-title.hasta {
    left: 250px;
}

html,
body.nonav {
    height: 100%;
}

body.nonav {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    padding-bottom: 20px;
    background-color: #f5f5f5;
}

.form-signin {
    width: 100%;
    max-width: 330px;
    padding: 15px;
    margin: auto;
}
.form-signin .checkbox {
    font-weight: 400;
}
.form-signin .form-control {
    position: relative;
    box-sizing: border-box;
    height: auto;
    padding: 10px;
    font-size: 16px;
}
.form-signin .form-control:focus {
    z-index: 2;
}
.form-signin input[type="email"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.float-left {
    float: left;
}

/* Mobile Navigation Styles */
.navbar-toggler {
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    margin: 0;
    z-index: 1050;
    order: -1;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    content: "";
    background: no-repeat center center;
    background-size: 100% 100%;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile sidebar - hidden by default on small screens */
@media (max-width: 767.98px) {
    .navbar {
        flex-wrap: nowrap;
    }

    .sidebar {
        position: fixed;
        top: 48px;
        left: -100%;
        width: 80%;
        max-width: 280px;
        height: calc(100vh - 48px);
        transition: left 0.3s ease-in-out;
        z-index: 1040;
        overflow-y: auto;
    }

    .sidebar.show {
        left: 0;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    }

    body.sidebar-open::after {
        content: "";
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1030;
        transition: opacity 0.3s ease-in-out;
    }

    .navbar-brand {
        margin-left: 0;
        padding-left: 0.5rem;
        font-size: 0.9rem;
    }

    .navbar-brand img {
        width: 24px;
        height: 24px;
    }

    main[role="main"] {
        margin-left: 0 !important;
        width: 100%;
    }

    .navbar form {
        display: none;
    }

    .dark-mode-toggle {
        display: none;
    }

    .navbar-nav {
        flex-direction: row;
    }
}

/* Ensure sidebar is visible on larger screens */
@media (min-width: 768px) {
    .navbar-toggler {
        display: none;
    }

    .sidebar {
        display: block !important;
    }
}
