body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #ECEFF1;
}

.container {
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin-bottom: 20px;
}

h2 {
    color: #333;
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.input-group > div,
.settings-button {
    flex-basis: 100%;
    margin-bottom: 10px;
}

.settings-button {
    text-align: right;
}

.input-select-group,
.input-hours-group {
    flex-grow: 1;
    min-width: 150px;
}

.input-select-group {
    display: flex;
    align-items: center;
}

.input-hours-group {
    flex-direction: column;
}

.quick-hours {
    display: flex;
    gap: 5px;
    justify-content: center;
    padding: 10px 0;
}

.quick-hour {
    padding: 5px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quick-hour:hover {
    background-color: #e8e8e8;
}

.button {
    width: 100%;
    padding: 10px;
    background-color: #6200ea;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #3700b3;
}

.input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #CCC;
    border-radius: 4px;
    box-sizing: border-box;
}

.input-field:focus {
    border-color: #6200ea;
    box-shadow: 0 0 0 2px rgba(98, 0, 234, 0.2);
    outline: none;
}

.input-field::placeholder {
    color: #aaa;
}

/* Стили таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #CCC;
}

th {
    background-color: #EEE;
    color: #333;
    padding: 10px;
    text-align: left;
}

td {
    padding: 10px;
    text-align: left;
}

.table-container {
    overflow-x: auto;
}

#overallTotal {
    text-align: center;
    font-size: 18px;
    color: #444;
}

/* Стили Select2 */
.select2-container--default .select2-selection--single {
    border-color: #6200ea;
    border-radius: 4px;
    padding: 6px;
    height: 40px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #444;
    line-height: 28px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #888 transparent transparent transparent;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #888 transparent;
}

.select2-container--default .select2-results>.select2-results__options {
    max-height: 200px;
    overflow-y: auto;
}

/* Стили модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: fit-content;
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Стили загрузчика */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loadingSpinner {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптация под мобильные устройства */
@media screen and (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }

    .input-select-group,
    .input-hours-group {
        flex-basis: 100%;
    }

    .settings-button {
        order: -1;
        text-align: left;
    }

    .quick-hours {
        justify-content: space-between;
    }

    .button {
        width: auto;
        margin-top: 10px;
    }
}
