/* Основные стили страницы */
.dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shift-opening, .cash-register, .actions, .sales, .repairs, .warranty-search{
    width: 80%;
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
    text-align: center;
}

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

h1 {
    margin-bottom: 0px;
    font-size: 1em;
    color: #333;

}

/* Стили кнопок */
button.btn-submit, button.btn-close-shift, button.btn-toggle {
    padding: 10px 20px;
    font-size: 1em;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button.btn-close-shift{
width:100%;
}

button.btn-submit:hover, button.btn-close-shift:hover, button.btn-toggle:hover {
    background-color: #0056b3;
}

/* Скрытые блоки для статистики, продаж и ремонтов */
.hidden {
    display: none;
}

.details, .sales-details, .repairs-details {
    margin-top: 15px;
    text-align: left;
    font-size: 0.9em;
}

/* Анимация плавного открытия */
@keyframes slideDown {
    0% { max-height: 0; opacity: 0; }
    100% { max-height: auto; opacity: 1; }
}

.details, .sales-details, .repairs-details {
    overflow-y: auto;
    max-height: 0px;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.details.show, .sales-details.show, .repairs-details.show {
    max-height: 400px;
    opacity: 1;
    overflow-y: auto;
}

/* Стили кнопки закрытия смены */
button.btn-close-shift {
    background-color: #dc3545; /* Красный цвет */
}

button.btn-close-shift:hover {
    background-color: #b02a37; /* Более тёмный красный цвет при наведении */
}

.content-container {
    max-width: 1200px;
    width: max-content;
    margin: 0 auto;
    padding: 20px;
}

 /* Стиль контейнера поиска */
    .warranty-search {
        border: 1px solid #ddd;
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 8px;
    }

    .warranty-table {
        display: inline-block;
        width: 100%;
        border-collapse: collapse;
        overflow: auto;
    }

    .warranty-table th, .warranty-table td {
        border: 1px solid #ddd;
        padding: 8px;
    }

    .warranty-table th {
        background-color: #f2f2f2;
    }

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

    .modal-content {
        background-color: #fff;
        margin: 15% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 100%;
        border-radius: 8px;
    }

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

    .close:hover, .close:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }
/* Стили для модального окна */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed; /* Фиксированное положение */
    z-index: 1; /* Поверх других элементов */
    left: 0%;
    top: 0%;
    width: 100%;
    height: 100%;
    max-width: 100%; /* Максимальная ширина */
    overflow: auto; /* Добавляем прокрутку, если содержимое не помещается */
    background-color: rgba(0, 0, 0, 0.4); /* Полупрозрачный фон */
}

/* Стили для контента модального окна */
.modal-content {
    background-color: #fff;
    margin:0 auto;
    border-radius: 8px;
    width: 100%; /* Ограничиваем ширину, чтобы содержимое не выходило за пределы */
    max-width: 600px; /* Максимальная ширина */
    box-sizing: border-box;

}
.modalCaption
/* Стили для кнопки закрытия */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

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

/* Заголовок */
h3 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

/* Стили для всех полей ввода и выпадающих списков */
input[type="text"], input[type="number"], select {
    width: 100%; /* Занимает всю доступную ширину */
    padding: 10px;
    font-size: 16px; /* Увеличиваем шрифт */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Учитываем padding и border в ширину */
    margin-bottom: 15px; /* Отступ между полями */
}

/* Стили для меток (label) */
label {
    font-size: 16px;
    margin-bottom: 8px;
    display: block; /* На новой строке */
    font-weight: bold;
}

/* Стили для кнопки создания гарантии */
#createWarrantyButton {
    background-color: #4CAF50; /* Зеленый фон */
    color: white;
    font-size: 16px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%; /* Кнопка на всю ширину */
    box-sizing: border-box;
}

#createWarrantyButton:disabled {
    background-color: #ccc; /* Серый цвет для неактивной кнопки */
    cursor: not-allowed;
}

/* Стили для выпадающего списка (select) */
select {
    -webkit-appearance: none; /* Убираем стандартный стиль выпадающего списка */
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><polygon points="0,0 10,0 5,7" fill="gray"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px; /* Подстраиваем размер */
    padding-right: 30px; /* Оставляем место для стрелки */
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

/* Стили для результатов поиска */
/* Скрытие подсказок по умолчанию */
.search-results {
    display: none; /* Подсказки скрыты по умолчанию */
    width:max-content;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
    background-color: #f9f9f9;
}

.search-results div {
    padding: 10px;
    cursor: pointer;
}

.search-results div:hover {
    background-color: #ddd;
}

/* Стили для скрытия раздела выбора ремонта */
#repairSelectSection {
    margin-bottom: 20px;
}

@media (max-width: 768px) {


.shift-opening, .cash-register, .actions, .sales, .repairs, .warranty-search {
    width: 110%;
    max-width: 700px;
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
    text-align: center;
}

}