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

body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a2e;
    color: #fff;
}

.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2d3e50;
    color: #fff;
    padding: 20px;
}

.sidebar h2 {
    margin-bottom: 30px;
    font-size: 22px;
    text-align: center;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    display: block;
    padding: 2px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: #1a2739;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    background-color: #4e4e75;
    padding: 20px;
    overflow-y: auto;
}

.top-nav {
    background-color: #3d3d4e;
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid #292933;
}

.top-nav .user-info {
    font-size: 16px;
}

.content {
    padding: 20px;
}

.content h1 {
    margin-bottom: 20px;
    font-size: 28px;
}

.content p {
    margin-bottom: 20px;
}

.cards {
    display: flex;
    gap: 20px;
}

.card {
    background-color: #1a2739;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    width: 47%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.card p {
    font-size: 24px;
    font-weight: bold;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #1a1a2e;
}

.login-box {
    background-color: #16213e;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #fff;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #fff;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #0f3460;
    background-color: #0f3460;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
}

.input-group input:focus {
    border-color: #2c7eea;
    outline: none;
    background-color: #0f3460;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #4d9eee;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-login:hover {
    background-color: #2c7eea;
}

/* List Page Styles */
.table-container {
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #16213e;
    color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.table thead {
    background-color: #0f3460;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}

.table th {
    font-weight: bold;
    color: #f47f30;
}

.table th a {
    font-weight: bold;
    color: #f47f30;
}

.table th a:hover {
    border-bottom: 2px solid #f49b5a; /* Underline effect on hover */
}

.table th a:focus,
.table th a:active {
    outline: none;
    color: #f86b06;
    border-bottom: 2px solid #f86b06;
}

.table tr:hover {
    background-color: #1f4068;
}

.table td {
    color: #fff;
}

.btn-edit {
    display: inline-block;
    margin-top: 5px;
    padding: 8px 12px;
    background-color: #00b4d8;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-edit:hover {
    background-color: #0077b6;
    color: #fff;
}

.btn-delete {
    padding: 8px 12px;
    background-color: #e94560;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-delete:hover {
    background-color: #d63447;
}

/* Filter */

.filter-form {
    display: block;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}

.filter-form.hidden {
    opacity: 0;
    max-height: 0;
}

.filter-form.expanded {
    opacity: 1;
    max-height: 500px;
}

.show-hide-filter {
    color: #00b4d8;
    font-size: 14px;
    border-bottom: 1px dashed;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    cursor: pointer;
    position: relative;
    top: -10px;
}

.show-hide-filter:hover {
    color: #0077b6;
    border-bottom: 1px dashed #00b4d8;
}

/* Document Styles */
.document-items-container {
    position: relative; /* Add relative positioning to the container */
}

.document-items-popup {
    display: none;
    position: absolute; /* Change to absolute positioning */
    top: 60%; /* Position below the container */
    background-color: #4d9eee;
    color: #f3f3f3;
    min-width: 180px;
    padding: 2px;
    border: 1px solid #b8b8b8;
    list-style-position: inside;
    z-index: 100; /* Ensure popup appears above other elements */
}

.document-items-container:hover .document-items-popup {
    display: block;
}

.document-container {
    background-color: #16213e;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 95%;
    margin: 20px auto;
}

.document-show {
    display: inline-block;
    vertical-align: middle;
    width: 60%
}

.document-options {
    display: inline-block;
    width: 35%;
    vertical-align: top;
}

.document-options fieldset,
.document-with-form-show fieldset {
    padding: 15px;
    margin-bottom: 30px;
}

.document-options fieldset legend,
.document-with-form-show fieldset legend {
    background-color: #e0e0e0;
    padding: 3px 10px;
    color: #16213e;
    border-radius: 5px;
}

.document-with-form {
    display: inline-block;
    width: 55%;
    vertical-align: top;
}

.document-with-form-show {
    display: inline-block;
    padding-left: 20px;
    vertical-align: middle;
    width: 43%
}

.bill-act-success {
    padding: 5px;
    background-color: #79e3a1;
    margin-bottom: 10px;
    color: #555555;
}

.bill-act-need-action {
    padding: 5px;
    background-color: #f39841;
    margin-bottom: 10px;
    color: #555555;
}

.btn-print {
    padding: 15px 20px 15px 50px;
    background: #ed913d url("../images/icons/print-9jwRpru.svg") 10px / 30px 30px no-repeat;
    color: #efefef;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-print:hover {
    background-color: #b66016;
}

.btn-edit-with-icon {
    display: inline-block;
    padding: 15px 20px 15px 40px;
    margin-right: 10px;
    background: #5a9af4 url("../images/icons/edit-YH72T_5.svg") 7px / 25px 25px no-repeat;
    color: #efefef;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-edit-with-icon:hover, .btn-edit-with-icon:active {
    color: #efefef;
    background-color: #2161bd;
    text-decoration: none;
    border-bottom: none;
}

.btn-copy {
    display: inline-block;
    padding: 15px 20px 15px 40px;
    margin-right: 10px;
    background: #5a9af4 url("../images/icons/copy-g8T1SDx.svg") 5px / 30px 30px no-repeat;
    color: #efefef;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-copy:hover, .btn-copy:active {
    color: #efefef;
    background-color: #2161bd;
    text-decoration: none;
    border-bottom: none;
}

.btn-pdf {
    display: inline-block;
    padding: 15px 20px 15px 40px;
    margin-right: 10px;
    background: #1ebcd8 url("../images/icons/pdf-YcYXpux.svg") 5px / 30px 30px no-repeat;
    color: #efefef;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-pdf:hover, .btn-pdf:active {
    color: #efefef;
    background-color: #1998ac;
    text-decoration: none;
    border-bottom: none;
}

.btn-word {
    display: inline-block;
    padding: 15px 20px 15px 40px;
    margin-right: 10px;
    background: #1ebcd8 url("../images/icons/word-Q22uGd2.svg") 5px / 30px 30px no-repeat;
    color: #efefef;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-word:hover, .btn-word:active {
    color: #efefef;
    background-color: #1998ac;
    text-decoration: none;
    border-bottom: none;
}

/* Form Styles */
.form-container {
    background-color: #16213e;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 95%;
    margin: 20px auto;
}

.form-container-filter {
    background-color: #16213e;
    padding: 20px 20px 5px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    margin: 20px auto;
}

.form-container h1 {
    color: #fff;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

fieldset.form-group {
    padding: 20px;
}

.form-group label {
    color: #fff;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #0f3460;
    border: 1px solid #0f3460;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #45b0e9;
    outline: none;
    background-color: #0f3460;
}

.form-roles {
    display: flex;
    gap: 10px;
    color: #fff;
}

.form-group input.contract-number-field {
    width: 100px;
}

.form-group .btn-save {
    padding: 12px 20px;
    background-color: #e94560;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.form-group .btn-save:hover {
    background-color: #d63447;
}

.form-group .form-check {
    width: 30%;
}

.form-group .one-row {
    display: inline-block;
    padding-right: 10px;
}

.form-group .one-row-long {
    display: inline-block;
    padding-right: 10px;
    width: 25%;
}

.form-group .one-row.item-name {
    width: 60%;
}

.form-group .one-row.item-quantity {
    width: 5%;
}

.form-group .one-row.item-price {
    width: 10%;
}

.form-group .one-row.item-total {
    width: 10%;
}

.form-group .one-row .btn-item-remove {
    width: 20px;
    height: 20px;
    border: none;
    background-color: #e46969;
    border-radius: 5px;
    color: #ffffff;
}

.form-group .contract-service-code {
    display: inline-block;
    padding-left: 0;
    margin-left: -10px;
    padding-right: 10px;
}

.form-group .disabled {
    background-color: grey;
    pointer-events: none;
}

/* Error Messages */
.form-group .form-error-message {
    color: #e94560;
    font-size: 12px;
    margin-top: 5px;
}

.form-group .btn-search {
    padding: 12px 20px;
    background-color: #4d9eee;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.form-group .btn-search:hover {
    background-color: #2c7eea;
}

/* Error Messages */
.form-group .form-error-message {
    color: #e94560;
    font-size: 12px;
    margin-top: 5px;
}

.collection-total {
    text-align: right;
}

.company-info {
    width: 100%;
    max-width: 600px;
    text-align: center;
    background-color: #1f4163;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin: 20px auto;
    color: #d5dfdf
}
.company-info div {
    padding: 5px;
}
.company-info span {
    color: #98a5a5;
}

.add-btn {
    display: block;
    padding: 12px 20px;
    margin-top: 20px;
    background-color: #19a542;
    color: #d5dfdf;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.add-btn:hover {
    background-color: #148133;
    color: #e5f4f4;
    border: none;
}

.add-btn:focus,
.add-btn:active {
    background-color: #148133;
    color: #e5f4f4;
    border: none;
}

span.payment-in {
    color: #14dc4c;
    font-weight: bold;
    font-size: 18px;
}

/* Notifications */
.messages .alert {
    position: absolute;
    right: 0;
    width: 20rem;
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.messages .alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb
}

.messages .alert-warning {
    color: #b01232;
    background-color: #e8bcc5;
    border-color: #bd9daf
}

@keyframes fadeOut {
    0%, 60% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.messages .fade-out {
    animation: fadeOut 5s forwards;
}

/* Pagination */
.pagination {
    justify-content: space-between;
    font-size: 1rem;
    margin-top: 1rem;
    margin-left: 4rem;
    margin-right: 4rem;
}

.pagination, .pagination-list {
    align-items: center;
    display: flex;
    text-align: center;
    flex-wrap: wrap;
}

.pagination.is-centered .pagination-previous {
    order: 1;
}

.pagination.is-centered .pagination-next {
    order: 3;
}

.pagination.is-centered .pagination-list {
    justify-content: center;
    order: 2;
}

.pagination-link.is-disabled, .pagination-link[disabled], .pagination-next.is-disabled, .pagination-next[disabled], .pagination-previous.is-disabled, .pagination-previous[disabled] {
    box-shadow: none;
    color: #7a7a7a;
    opacity: .5;
}

.pagination-next, .pagination-previous {
    background-color: #dbdbdb;
    border-color: #dbdbdb;
    padding-left: .75em;
    padding-right: .75em;
    white-space: nowrap;
}

.pagination-link, .pagination-next, .pagination-previous {
    border-color: #dbdbdb;
    color: #363636;
    min-width: 2.5em;
    height: 2.5em;
    border-radius: 4px;
    display: inline-flex;
    line-height: 2.5em;
}

ul.pagination-list {
    list-style: none;
}

.pagination-link {
    background-color: #fff;
}

.pagination-link, .pagination-next, .pagination-previous {
    font-size: 1em;
    justify-content: center;
    margin: .25rem;
    text-align: center;
}

.pagination-link.is-current {
    background-color: orange;
    border-color: orange;
    color: #fff;
}

/* TomSelect */
.ts-control {
    border-color: #45b0e9 !important;
    outline: none !important;
    color: #fff !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    background-color: color-mix(#0f3460, #0e2e55, 60%) !important;
    background-image: linear-gradient(to bottom, #0f3460, #0e2e55) !important;
    padding: 10px !important;
}

.ts-control > input {
    color: white !important;
    font-size: 16px !important;
}

.ts-dropdown-content {
    background-color: rgba(191, 220, 246, 0.35);
}

.ts-dropdown .active {
    background-color: #a2d6f5 !important;
    color: #495c68;
}

/* Basic link style */
a {
    color: #00b4d8; /* Light blue color */
    text-decoration: none;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

a:hover {
    color: #0077b6; /* Darker blue on hover */
    border-bottom: 2px solid #00b4d8; /* Underline effect on hover */
}

/* Active and focused link */
a:focus,
a:active {
    outline: none;
    color: #e94560; /* Light red for focus or active state */
    border-bottom: 2px solid #e94560; /* Red underline on active */
}

/* Disabled links */
a[disabled] {
    pointer-events: none;
    color: #6c757d; /* Grey color for disabled state */
    border-bottom: 2px solid transparent;
}

.company-display {
    border-bottom: 2px dotted;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-box {
        padding: 20px;
    }

    .cards {
        flex-direction: column;
    }

    .card {
        width: 100%;
    }

    .users-table th,
    .users-table td {
        padding: 10px;
    }

    .btn-edit,
    .btn-delete {
        padding: 6px 10px;
    }

    .form-container {
        padding: 20px;
    }
}