@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

html, body {
    background: #f6f6f6;
    font-family: 'Roboto', sans-serif;
    height: 100%;
    min-height: 100%;
}

/**************************************/
/* Footer "Always bottom of page"     */

.wrapper {
    min-height: 100%;
    position: relative;

    /** Footer height plus 24 px */
    padding-bottom: 90px;
}

.footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    overflow: hidden;

    /** 66 pixels as total height */
    height: 40px;
    padding: 8px 16px;
}

/**************************************/
/* Footer                             */

.footer {
    background: #303030;
    color: #FFFFFF;
}

/**************************************/
/* Navbar */

.navbar {
    border-top: solid 4px #85be64;
    border-bottom: solid 1px #85be64;
}

.navbar .navbar-brand {
    padding: 8px 16px;
}

.navbar .navbar-brand > img {
    height: 40px;
}

.container, .card {
    border-radius: 7px;
    box-shadow: 0 0 2px 1px rgba(181, 181, 181, 0.4);
}

/**************************************/
/* Navbar */

.card, .container {
    background: #FFFFFF;
    border-radius: 7px;
    box-shadow: 0 0 2px 1px rgba(181, 181, 181, 0.4);
    margin-top: 16px;
}

/**************************************/
/* Colors */

.color-gray-dark {
    color: #5e5d5d;
}

.color-blue {
    color: #007bff;
}

.invoice-blue{
    color: #08498e;
}

.color-green{
    color: #40eb13;
}
.color-red{
    color: #eb1313;
}
.autocomplete-suggestions { border: 1px solid #999; background: #FFF; overflow: auto; }
.autocomplete-suggestion { padding: 2px 5px; white-space: nowrap; overflow: hidden; }
.autocomplete-selected { background: #F0F0F0; }
.autocomplete-suggestions strong { font-weight: normal; color: #22b3d5; }
.autocomplete-group { padding: 2px 5px; }
.autocomplete-group strong { display: block; border-bottom: 1px solid #fefefe; }

.no-print {
    background-color: #e8e8e8;
    padding: 10px;
    border: none;
}

/* Print-specific styles */
@media print {
    .no-print {
        display: none;
    }
    .page-break-added {
        page-break-after: always !important;
    }
}

.input-error {
    border-color: red;
}

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

.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.container{
    position: relative !important;
}

@media (min-width: 1200px) {
    .container {
        max-width: 95% !important;
    }
}

/* Progress Circle Wrapper */
.progress-circle {
    position: relative;
    width: 50px;
    height: 50px;
    margin: auto;
}

/* The SVG itself */
.circle-svg {
    transform: rotate(-90deg); /* Rotate to make the progress start from the top */
    width: 100%;
    height: 100%;
}

/* Background Circle */
.circle-bg {
    fill: none; /* No fill for the center */
    stroke: #e6e6e6; /* Light gray track */
    stroke-width: 3.8; /* Width of the track */
}

/* Progress Circle */
.circle-progress {
    fill: none; /* No fill for the center */
    stroke: #4caf50; /* Green for progress */
    stroke-width: 3.8; /* Width of the progress stroke */
    stroke-linecap: round; /* Rounded ends for the progress stroke */
    stroke-dasharray: 0, 100; /* Default: 0% progress */
    transition: stroke-dasharray 0.3s ease; /* Smooth animation for progress changes */
}

/* Text in the Center */
.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #333; /* Text color */
    background: transparent; /* Clear background */
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.highlighted-row {
    background-color: rgba(255, 0, 0, 0.2) !important; /* Light red background */
    color: darkred !important;
}

.sort-icon {
    margin-left: 5px;
    cursor: pointer;
    color: gray;
}

.sort-icon:hover {
    color: black;
}

.fa-sort-up,
.fa-sort-down {
    color: black;
}

/* Modern Table Styles */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 7px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    border-radius: 7px;
    overflow: hidden;
}

/* Table Header */
thead {
    font-weight: bold;
    text-transform: uppercase;
    background: #f8f9fa; /* Light gray */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    font-size: small !important;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    position: relative;
}

thead th.sortable {
    cursor: pointer;
    transition: color 0.2s;
}

thead th.sortable:hover {
    color: #333;
}

/* Table Rows */
tbody tr {
    transition: background 0.3s ease;
}

tbody tr:nth-child(even) {
    background: #f8f9fa;
}

tbody tr:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Table Cells */
td {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    color: #333;
}

/* Responsive Table */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tbody tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #ddd;
        display: flex;
        flex-direction: column;
    }

    td {
        display: flex;
        justify-content: space-between;
        padding: 8px 12px;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #333;
    }
}

/* Ensure dropdown-submenu appears properly on hover or trigger */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
}

.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus-within > .dropdown-menu {
    display: block;
}

.nav-item.dropdown:hover > .dropdown-menu {
    display: block;
}

/* Ensure submenu is hidden by default */
.dropdown-submenu > .dropdown-menu {
    position: absolute;
    top: 0;
    right: 100%;
    margin-top: 0;
    margin-right: 0.25rem;
    z-index: 1050;
    display: none;
    transition: opacity 0.15s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

/* Show submenu on hover */
.dropdown-submenu:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    pointer-events: auto;
}