.chart-container {
    flex: 1 1 auto;
    position: relative
}

.button-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10
}

.toggle-button {
    background-color: #176ad8;
    color: #fffef7;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin: 0 5px;
    transition: background-color .3s ease
}

.toggle-button:focus,
.toggle-button:hover {
    background-color: #0f4ea8
}

.toggle-button:focus {
    outline: none
}

.welcome-message {
    font-size: 20px;
    font-weight: 400;
    color: #666;
    margin: 0
}

.data-update-tile {
    padding: 0 !important;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0
}

.chart-container {
    width: 100%;
    max-width: 100%;
    height: 400px;
    margin-top: 20px
}

canvas {
    display: block
}

@media (max-width:768px) {
    .data-update-tile {
        padding: 15px
    }
}

.login-container,
.verify-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
    text-align: center
}

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 40px
}

.otp-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center
}

.otp-box,
.otp-input {
    width: 100%;
    margin-bottom: 20px;
    text-align: center
}

.otp-box,
.otp-button,
.otp-input {
    padding: 15px;
    border: 1px solid #000;
    border-radius: 5px;
    font-size: 16px
}

.otp-button {
    width: 220px;
    background-color: #000;
    color: #fff;
    cursor: pointer;
    transition: background-color .3s ease
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px
}

.otp-box {
    width: 50px;
    height: 50px;
    font-size: 18px;
    text-align: center;
    border: 1px solid #000;
    border-radius: 5px
}

@media (min-width:768px) {

    .login-container,
    .verify-container {
        padding: 0
    }

    .otp-box,
    .otp-button,
    .otp-input {
        font-size: 18px
    }
}

@media (max-width:480px) {
    .logo {
        width: 100px;
        margin-bottom: 30px
    }

    .otp-box {
        width: 40px;
        height: 40px;
        font-size: 16px
    }

    .otp-button {
        width: 180px;
        font-size: 14px
    }
}

.overlay-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
    z-index: 1000;
    align-items: center;
    justify-content: center
}

.modal-content {
    width: 80%;
    max-width: 800px;
    height: 80vh;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .3);
    flex-direction: column
}

.close-modal,
.modal-content {
    background-color: #fff;
    display: flex
}

.close-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 24px;
    cursor: pointer;
    border: 2px solid #333;
    color: #333;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    transition: background-color .3s, color .3s
}

.close-modal:hover {
    background-color: #333;
    color: #fff
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px
}

.modal-tab {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none
}

.modal-tab.active {
    background: #fff;
    font-weight: 700;
    border-bottom: 2px solid #333
}

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%
}

.modal-body,
.modal-section {
    width: 100%;
    flex: 1;
    overflow: hidden
}

.modal-section {
    display: none;
    position: relative;
    display: flex
}

.modal-section.active {
    display: flex;
    flex-direction: column;
    flex: 1
}

.filter-modal-content,
.sort-modal-content,
.tagging-modal-content {
    display: flex;
    flex: 1;
    gap: 10px;
    overflow: hidden
}

.filter-sidebar {
    width: 35%;
    background-color: #f5f5f5;
    border-right: 1px solid #ddd;
    padding: 10px;
    overflow-y: auto
}

#filter-categories {
    list-style: none;
    padding: 0;
    margin: 0
}

.filter-category {
    padding: 10px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background-color .3s
}

.filter-category.active {
    background-color: #e0e0e0;
    font-weight: 700;
    color: #007bff
}

#sort-options,
#tagging-options,
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    margin-bottom: 60px
}

#filter-values {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1
}

#sort-levels {
    display: flex;
    flex-direction: column;
    gap: 15px
}

.sort-level-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd
}

.sort-level-label {
    font-weight: 700;
    text-align: left
}

.sort-column,
.sort-order {
    width: 100%;
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9f9f9
}

#add-sort-level {
    padding: 10px;
    font-size: 14px;
    color: #007bff;
    background: #f0f8ff;
    border: 1px dashed #007bff;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color .3s, color .3s;
    align-self: center;
    margin-top: 10px
}

#add-sort-level:hover {
    background-color: #007bff;
    color: #fff
}

.remove-sort-level {
    padding: 6px 10px;
    font-size: 12px;
    color: red;
    background: none;
    border: 1px solid red;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .3s, color .3s
}

.remove-sort-level:hover {
    background-color: red;
    color: #fff
}

.filter-actions,
.sort-actions,
.tagging-actions {
    display: flex;
    width: 100%;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    position: absolute;
    bottom: 0;
    background: #fff
}

.apply-sort,
.apply-tagging,
.filter-action-button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color .3s, color .3s;
    color: #007bff;
    background: none;
    border: 1px solid #007bff
}

.apply-sort:hover,
.apply-tagging:hover,
.filter-action-button:hover {
    background-color: #007bff;
    color: #fff
}

#reset-filter,
#reset-sort,
#reset-tagging {
    background: none;
    color: #f39c12;
    border: 1px solid #f39c12
}

#reset-filter:hover,
#reset-sort:hover,
#reset-tagging:hover {
    background-color: #f39c12;
    color: #fff
}

#cancel-filter,
#cancel-sort,
#cancel-tagging {
    background: none;
    color: #d9534f;
    border: 1px solid #d9534f
}

#cancel-filter:hover,
#cancel-sort:hover,
#cancel-tagging:hover {
    background-color: #d9534f;
    color: #fff
}

.filter-checkbox {
    margin-bottom: 4px;
    font-size: 16px;
    color: #555;
    display: flex;
    align-items: center
}

.filter-checkbox input[type=checkbox] {
    margin-right: 8px
}

.tagging-option-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px
}

.tagging-label {
    width: 150px;
    font-weight: 700;
    text-align: left
}

.tagging-input {
    flex: 1;
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9f9f9
}

input[type=date].form-control {
    max-width: 200px;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    transition: border-color .3s ease, box-shadow .3s ease
}

input[type=date].form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 4px rgba(0, 123, 255, .5);
    outline: none
}

.horizontal-form {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px
}

.horizontal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.horizontal-form label {
    font-weight: 700;
    margin-bottom: 4px
}

@media (max-width:768px) {
    input[type=date].form-control {
        font-size: 16px
    }

    .filter-sidebar {
        width: 100%
    }

    .filter-category {
        font-size: 14px
    }

    .horizontal-form {
        flex-direction: column;
        gap: 16px
    }
}

.vertical-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background-color: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-items: flex-start;
    padding-top: 20px;
    overflow-y: auto;
    transition: transform .3s ease;
    z-index: 1000
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%
}

.nav-item {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    position: relative
}

.nav-item a {
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    width: 100%;
    display: block;
    transition: color .3s ease
}

.nav-item a:hover {
    color: #fc0
}

.logo-item a {
    pointer-events: none
}

.nav-logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 20px;
    display: block
}

.horizontal-nav {
    position: sticky;
    top: 0;
    width: 100%;
    background: none;
    color: #000;
    padding: 10px 20px;
    justify-content: space-between;
    z-index: 999
}

.horizontal-nav,
.page-title {
    display: flex;
    align-items: center
}

.page-title {
    flex-grow: 1
}

.page-title h1 {
    font-size: 24px;
    color: #333;
    margin: 0;
    font-weight: 800
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px
}

.icon-button {
    position: relative;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    width: 40px;
    height: 40px
}

.icon-button,
.notification-counter {
    display: flex;
    align-items: center;
    justify-content: center
}

.notification-counter {
    position: absolute;
    top: -3px;
    right: -3px;
    background-color: red;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 20px;
    height: 20px;
    line-height: 1
}

.notification-counter,
.profile-circle {
    color: #fff;
    border-radius: 50%;
    font-weight: 700
}

.profile-circle {
    width: 40px;
    height: 40px;
    background-color: #333;
    justify-content: center;
    font-size: 16px;
    cursor: pointer
}

.profile-circle,
.profile-container {
    display: flex;
    align-items: center;
    position: relative
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background-color: #fff;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
    z-index: 1000;
    min-width: 100px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .3s ease, transform .3s ease
}

.profile-container:hover .profile-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0)
}

.profile-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0
}

.profile-dropdown li {
    padding: 10px
}

.profile-dropdown li a {
    text-decoration: none;
    color: #000;
    display: block;
    width: 100%
}

.profile-dropdown li:hover {
    background-color: #f5f5f5
}

@media (max-width:768px) {
    .vertical-nav {
        width: 100%;
        transform: translateX(-100%)
    }

    .mobile-nav-toggle {
        display: block;
        position: fixed;
        top: 10px
    }

    .vertical-nav.open {
        transform: translateX(0)
    }

    .nav-item {
        border-bottom: none
    }

    .nav-item a {
        font-size: 20px
    }
}

.nav-logo {
    pointer-events: auto
}

.submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 100%
}

.submenu li {
    padding: 8px 0
}

.submenu li a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: block
}

.submenu li a:hover {
    color: #333
}

.flex-wrapper {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    gap: 20px
}

.tile-container {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center
}

.tile {
    flex: 1 1 300px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between
}

.tile h2 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 15px
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px
}

.form-row label {
    flex: 0 0 150px;
    font-weight: 700;
    color: #333
}

.form-row input[type=text],
.form-row textarea {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333
}

.form-row input[type=text][readonly],
.form-row textarea[readonly] {
    background-color: #f0f0f0;
    color: #666;
    border: 1px dashed #bbb;
    cursor: not-allowed
}

#driver-address {
    resize: none;
    height: auto
}

.button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: auto
}

.update-btn {
    padding: 10px 20px;
    background-color: #176ad8;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color .5s ease
}

.update-btn:hover {
    background-color: #0f4ba0
}

.update-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed
}

@media (max-width:768px) {
    .tile-container {
        flex-direction: column;
        align-items: center
    }
}

.error-message {
    color: red;
    font-size: .875em;
    margin-top: 4px
}

.balance-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center
}

.balance-summary .tile {
    flex: 1 1 45%;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    height: auto
}

.balance-summary .tile p {
    margin: 0;
    font-size: 1em;
    color: #333;
    font-weight: 700
}

@media (max-width:768px) {
    .balance-summary {
        flex-direction: column;
        align-items: center
    }

    .balance-summary .tile {
        flex: 1 1 100%
    }
}

body,
html {
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    background-color: #fff;
    width: 100vw
}

.container,
body,
html {
    display: flex;
    height: 100vh
}

.container {
    width: 100%
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 220px
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px
}

@media (max-width:768px) {
    .container {
        flex-direction: column
    }

    .content-wrapper {
        margin-left: 0
    }
}

:root {
    --primary-color: #176ad8;
    --secondary-color: #333;
    --hover-color: #555;
    --border-color: #ddd;
    --light-bg: #f5f5f5;
    --font-color: #333;
    --font-light: #666;
    --font-size-small: 14px;
    --font-size-medium: 16px
}

*,
:after,
:before {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: Arial, sans-serif;
    color: var(--font-color)
}

button,
select {
    font-size: var(--font-size-medium);
    cursor: pointer;
    transition: all .3s ease
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 10px
}

.search-bar {
    flex-grow: 1;
    padding: 8px 12px;
    font-size: var(--font-size-medium);
    border: 1px solid var(--border-color);
    border-radius: 5px
}

.dropdown-buttons {
    display: flex;
    gap: 10px
}

.dropdown-buttons button {
    padding: 8px 16px;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 5px
}

.dropdown-buttons button:hover {
    background-color: var(--hover-color)
}

.table-wrapper {
    overflow: hidden
}

#driver-transactions,
.current-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color)
}

#driver-transactions thead th,
.current-table thead th,
.data-table thead th {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 12px;
    font-size: var(--font-size-medium);
    text-align: left;
    border-bottom: 2px solid var(--hover-color)
}

.current-table thead th {
    background-color: var(--primary-color);
    text-align: center
}

#driver-transactions tbody td,
.current-table tbody td,
.data-table tbody td {
    padding: 12px;
    color: var(--font-color);
    font-size: var(--font-size-small);
    white-space: nowrap;
    border: 1px solid var(--border-color)
}

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

#driver-transactions tbody tr:nth-child(2n),
.current-table tbody tr:nth-child(2n) {
    background-color: #f9f9f9
}

#driver-transactions tbody tr:nth-child(odd),
.current-table tbody tr:nth-child(odd) {
    background-color: #fff
}

.current-table tbody .empty-row td {
    background-color: #f0f0f0;
    color: #999;
    font-style: italic
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 2px solid var(--border-color);
    color: var(--font-color)
}

.row-count,
.table-footer {
    font-size: var(--font-size-small)
}

.row-count {
    color: var(--font-light)
}

.pagination-controls {
    display: flex;
    gap: 10px;
    align-items: center
}

.pagination-controls button {
    font-size: 18px;
    color: var(--secondary-color);
    background-color: transparent;
    border: none
}

.pagination-controls button:hover {
    font-weight: 700;
    color: #000
}

.pagination-controls button:disabled {
    color: #ccc;
    cursor: not-allowed
}

.status {
    padding: 4px 8px;
    font-size: var(--font-size-small);
    font-weight: 700;
    border-radius: 12px;
    display: inline-block;
    text-align: center
}

.status-active {
    background-color: #e0f7e9;
    color: #1a7f34;
    border: 1px solid #1a7f34
}

.status-inactive {
    background-color: #fdf0e0;
    color: #d35400;
    border: 1px solid #d35400
}

.status-pending {
    background-color: #f0f4f7;
    color: #7f8c8d;
    border: 1px solid #7f8c8d
}

.category {
    padding: 4px 8px;
    font-size: var(--font-size-small);
    font-weight: 700;
    border-radius: 12px;
    display: inline-block;
    text-align: center
}

.category-trip {
    background-color: #f0f0f0;
    color: #000;
    border: 1px solid #000
}

.category-payout {
    background-color: #e0f7e9;
    color: #1a7f34;
    border: 1px solid #1a7f34
}

.category-vbi {
    background-color: #fff7e0;
    color: #b88900;
    border: 1px solid #b88900
}

.category-tds {
    background-color: #fdf0e0;
    color: #d35400;
    border: 1px solid #d35400
}

.category-promotion {
    background-color: #f5f5f5;
    color: #555;
    border: 1px solid #ccc
}

.category-adjustment {
    background-color: #fdd;
    color: #d00000;
    border: 1px solid #d00000
}

.plan {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px
}

.plan-header {
    width: 100%;
    background-color: var(--light-bg);
    padding: 10px;
    font-size: var(--font-size-medium);
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.plan-header:hover {
    background-color: #f0f0f0
}

.plan-content {
    display: none;
    padding: 10px;
    border-top: 1px solid var(--border-color)
}

select {
    appearance: none;
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: var(--font-size-small);
    border-radius: 5px
}

select:hover {
    border-color: var(--hover-color)
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(23, 106, 216, .5)
}

select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed
}

.deposit-classification option[value=deposit] {
    background-color: #e0f7e9;
    color: #1a7f34;
    font-weight: 700
}

.deposit-classification option[value=non-deposit] {
    background-color: #fdd;
    color: #d00000;
    font-weight: 700
}

.data-table tbody td select {
    width: 100%;
    padding: 4px;
    font-size: var(--font-size-small);
    border-radius: 5px;
    text-align: center
}

.deposit-classification {
    min-width: 120px;
    text-align: center;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    font-size: var(--font-size-small);
    border-radius: 5px;
    transition: all .3s ease
}

.deposit-active {
    background-color: #e0f7e9 !important;
    color: #1a7f34 !important;
    font-weight: 700;
    border: 1px solid #1a7f34 !important
}

.download-dropdown {
    position: relative;
    display: inline-block;
}

.download-btn {
    background-color: #007bff;
    /* Your original button color */
    color: white;
    /* Text color */
    border: none;
    padding: 4px 8px;
    font-size: 14px;
    height: auto;
    line-height: 1.2;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 4px;
    /* Keep button rounded */
    transition: background 0.2s;
}

.download-btn:hover {
    background-color: #0056b3;
    /* Darker blue on hover */
}

.download-content {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    border-radius: 5px;
    z-index: 10;
}

.download-content a {
    color: #333;
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.download-content a:hover {
    background-color: #f5f5f5;
}

.download-dropdown:hover .download-content {
    display: block;
}