/* Стили от дипсик */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333333;
    margin: 0;
    padding-top: 14vh;
    line-height: 1.6;

}
.map-container {
            position: fixed;
            top: 0;
            right: 0;
            width: 50vw;
            height: 100vh;
            z-index: 10;



}

#map {
            width: 100%;
            height: 100%;
}
/* Для контейнера с кнопками и  селект выбор отделов */
.controls-container {
    position: fixed;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    display: none;
   /* display: flex;*/
    height: 8vh; /* Фиксируем высоту*/
    gap: 1vw;
    transition: all 0.5s ease;
    z-index: 100;
    align-items: center;
    justify-content: center;
}
/* Стили при активации (после нажатия) */
.controls-container.moved-up {
    top: 3vh;
    left: 25%;
    transform: translateX(-50%);

}
select option:disabled {
  color: #ccc;
  background-color: #f8f8f8;
}

#otdel-type-select {
    padding: 10px 15px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    margin-right: 10px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    flex: 1 1 auto;
}

#otdel-type-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.otdel-btn {
    padding: 10px 15px;

    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.otdel-btn:hover {
    background-color: #f8f9fa;
}

.tbl {
            top: 0;
            left: 0;
            width: 50vw;
            height: 100vh;
            z-index: 10;

            background: white;
}





        /* Стили для маркеров */
        .marker-container {
            background: transparent;
            border: none;
        }

        .custom-marker_l {
            width: 12px;
            height: 12px;
            background: #ff4757;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            transition: transform 0.2s;
            position: relative;
        }

        .custom-marker_l:hover {
            transform: scale(1.2);
            cursor: pointer;
        }

        .flag-container {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }

        .flag-icon {
            font-size: 14px;
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }
/* Стили для кнопок с эмодзи */
button {
    font-size: 1.2em;
    padding: 5px;
    margin: 0 3px;
    cursor: pointer;
    background: none;
    border: none;
    border-radius: 6px;
}

.person-icon {
    font-size: 1.4em;
    margin: 0 10px;
    display: inline-block;
}

/* Анимация движения */
.person-icon.active {
    animation: walk 1.5s ease-in-out infinite;
}

@keyframes walk {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* Стили для статусов */
button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

button.vacation-btn,
button.sick-btn {
    opacity: 0.5;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

button.vacation-btn.active {
    opacity: 1;
    filter: none;
    transform: scale(1.1);
}

button.sick-btn.active {
    opacity: 1;
    filter: none;
    transform: scale(1.1);
}

/* Стили для попапов */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 101;
}

.popup-content {
    background: white;
    margin: 5% auto;
    width: 90%;
    max-height: 90%;
    overflow: auto;

}


#timesheet-data table {
    border-collapse: collapse;
    margin: 10px 0;
}

#timesheet-data td, #timesheet-data th {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#session-info .session {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#session-info .total {
    margin-top: 20px;
    font-weight: bold;
    color: #2c3e50;
}

#session-info hr {
    margin: 15px 0;
    border-color: #eee;
}


/* Стили для таблицы */
.tbl {
    width: 100%;
    border-collapse: collapse;
    margin: 1vh 0 1vh; /* top | horizontal | bottom */
    position: relative; /* Добавляем для контроля позиции */

    /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);*/
}
.tbl th, .tbl td {
    display: table-cell; /* Оставить стандартное поведение */
    padding: 1vh 1vh;    /* Желаемые отступы */
}
.tbl th > div, .tbl td > div {
    display: flex;      /* Флекс для содержимого */
    align-items: center;
    flex-wrap: nowrap;
    gap: 1vh;
    overflow-x: auto;
    padding: 1vh 0;

}
.tbl tr:hover {
    background-color: #f8f9fa;
}
.btn-down {

    align-items: center;
    flex-wrap: nowrap;
    gap: 8px; /* Фиксированный отступ вместо vh */
    padding: 8px 0; /* Фиксированные отступы */
    overflow-x: auto; /* Защита от переполнения */
    justify-content: center;

}
#metla, #regis, #archiv, #btn-Timesheet {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2em;
    transition: transform 0.2s ease;
    background-color: transparent;
}

#metla:hover, #archiv:hover, #btn-Timesheet:hover, #regis:hover {
    transform: scale(1.1);
    background-color: #f8f9fa;
}

#month-picker {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 130px;
    font-size: 0,9em;
    background-color: transparent;
}


/* Дополнительные эффекты для современного вида */
select, button, input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

* {
    box-sizing: border-box;
}

button:focus, input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}



/* показатели мобильной версии
@media (max-width: 768px) {


    #otdel-type-select, .otdel-btn {
        width: 100%;
        margin: 5px 0;
    }

    .otdel-btn {
        margin-top: 10px;
    }

    .tbl {
        font-size: 14px;
    }
}*/

/* старые показатели мобильной версии 768px */
/* Стили для мобильной версии
@media (max-width: 919px) {*/
    .desktop-select {
        display: none;
    }

    .mobile-select {
            display: inline-flex;
            gap: 1vw;
    }
/* Обманка селектов*/
     .select-wrapper {
        position: relative;
        width: 36px;
        height: 36px;
    }

    .mobile-select select, .archive-date {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0; /* Делаем селект невидимым */
        z-index: 10; /* Помещаем поверх иконки */
        cursor: pointer;
        font-size: 16px; /* Увеличиваем для удобства касания */
    }

    .select-icon {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5em;
        pointer-events: none; /* Пропускаем события через иконку к селекту */
    }
    /* Индикатор выбранного значения */
    .select-wrapper.selected::after {
        content: "✓";
        position: absolute;
        bottom: -5px;
        right: -5px;
        font-size: 0.7em;
        background: green;
        color: white;
        border-radius: 50%;
        width: 15px;
        height: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 11;
    }



    /* Индикатор выбранного значения */
    select option:checked {
        font-weight: bold;
        background-color: #e6f7ff;
    }

/* стили для календаря обманки во всех режимах */
    .date-wrapper {
        position: relative;
        width: 36px;
        height: 36px;
    }

    .archive-date {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0; /* Делаем селект невидимым */
        z-index: 10; /* Помещаем поверх иконки */
        cursor: pointer;
        font-size: 16px; /* Увеличиваем для удобства касания */
    }

    .archive-date-icon {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5em;
        pointer-events: none; /* Пропускаем события через иконку к селекту */
    }
/* Стили для окна авторизации */
.modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(3px);
}
.modal-overlay_r {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(3px);
}
.modal-content {
            background: white;
            padding: 40px;
            border-radius: 16px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
            position: relative;
            animation: modalOpen 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
            width: 60%;
            max-width: 500px;
            transform-origin: center;
}

.modal-content.vaporize {
            animation: vaporize 0.7s ease-out forwards;
}

.close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            cursor: pointer;
            font-size: 28px;
            color: #666;
            transition: transform 0.2s;
}

.close-btn:hover {
            transform: rotate(90deg);
            color: #333;
}

.login-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-top: 30px;
}

.input_ {
            padding: 14px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.3s;
}

.input_:focus {
            border-color: #007bff;
            outline: none;
}

.button_ {
            padding: 14px;
            background: linear-gradient(135deg, #007bff, #0056b3);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 600;
            letter-spacing: 0.5px;
            transition: transform 0.2s, opacity 0.2s;
}

.button_:hover {
            transform: translateY(-2px);
            opacity: 0.9;
}

@keyframes modalOpen {
            from {
                transform: scale(0.8) translateY(20px);
                opacity: 0;
            }
            to {
                transform: scale(1) translateY(0);
                opacity: 1;
            }
}

@keyframes vaporize {
            0% {
                transform: translateY(0) scale(1);
                filter: blur(0) opacity(1);
            }
            50% {
                transform: translateY(-20px) scale(0.95);
                filter: blur(5px) opacity(0.8);
            }
            100% {
                transform: translateY(-40px) scale(0.9);
                filter: blur(20px) opacity(0);
            }
}

@keyframes blackHole {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(0.3) rotate(180deg); opacity: 0.5; }
            100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.modal-content.blackHole {
            animation: blackHole 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

@keyframes accordion {
            0% { transform: scaleY(1); opacity: 1; }
            30% { transform: scaleY(0.8); opacity: 0.8; }
            60% { transform: scaleY(1.1); opacity: 0.5; }
            100% { transform: scaleY(0); opacity: 0; }
}

.modal-content.accordion {
            animation: accordion 0.9s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
            transform-origin: top center;
}

@keyframes horizontalFold {
            0% { transform: scaleX(1); opacity: 1; }
            50% { transform: scaleX(0.1); opacity: 0.5; }
            100% { transform: scaleX(0); opacity: 0; }
}

.modal-content.horizontalFold {
            animation: horizontalFold 0.6s ease-in-out forwards;
}

@keyframes paperPlane {
            0% { transform: translateY(0) rotate(0deg); opacity: 1; }
            100% { transform: translateY(500px) rotate(45deg) scale(0.5); opacity: 0; }
}

.modal-content.paperPlane {
            animation: paperPlane 1.2s ease-in forwards;
            transform-origin: top right;
}
@media (max-width: 768px) {
            .modal-content {
                width: 90%;
                padding: 25px;
            }

            .close-btn {
                top: 15px;
                right: 15px;
                font-size: 24px;
            }
}

/* конец Стили для окна авторизации */
/* Добавьте эти стили в существующий файл */

.content-wrapper {
    position: relative;
    z-index: 2;
    background: white;
}

/* Для десктопов */
@media (min-width: 769px) {
    .content-wrapper {
        width: 50%;
        transition: width 0.3s ease;
    }

    .map-hidden .content-wrapper {
        width: 100%;
    }

    #map-container {
        width: 50%;
    }

    .map-hidden #map-container {
        display: none;
    }
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .controls-container {
        flex-wrap: wrap;
    }

    .controls-container select {
        flex: 1 1 60%;
    }

    .controls-container button {
        flex: 1 1 20%;
    }

    .content-wrapper {
        width: 100%;
        margin-bottom: 50vh; /* Оставляем место для карты */
    }

    .tbl {
        width: 100%;
        overflow-x: auto;
    }

    .mobile-map .content-wrapper {
        margin-bottom: 0;
    }

    .mobile-map #map-container {
        height: 50vh;
    }
}

/* Адаптивность для мобильных устройств */
        @media (max-width: 768px) {
            .map-container {
                position: fixed;
                bottom: 0;
                left: 0;
                width: 100%;
                height: 50%;
                top: auto;
                right: auto;
                z-index: 1000;

            }

            .tbl {
                width: 100%;
                height: 50%;
                margin-right: 0;
                overflow-y: auto;

            }

            .controls-container {
                flex-wrap: wrap;
            }
        }

        @media (max-width: 480px) {
            .controls-container {
                position: fixed;
                top: 25%;
                left: 50%;
                transform: translate(-50%, -50%);
                flex-wrap: nowrap;
            }
            .controls-container.moved-up {
                top: 3vh;
                left: 50%;
                transform: translateX(-50%);
            .map-container {

            }

            .tbl {
                height: 50vh;
                margin-right: 0;
                margin-bottom: 0;
            }
        }

/* Анимация ходьбы для горизонтального расположения
@keyframes walk-horizontal {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(1px) translateY(-1px); }
    50% { transform: translateX(0) translateY(0); }
    75% { transform: translateX(-1px) translateY(-1px); }
    100% { transform: translateX(0) translateY(0); }
}

.fa-walking {
    animation: walk-horizontal 1.5s infinite ease-in-out;
}*/

/* Стили для кружка маркера */
.marker-circle {
    transition: transform 0.2s, box-shadow 0.2s;
}

.marker-circle:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(0, 100, 255, 0.3);
}

/* Стили для иконок работников и заявок*/
.worker-icon {
    transition: transform 0.2s;
}

.worker-icon:hover {
    transform: scale(1.3) translateY(-2px);
}
.zayva-icon {
    transition: transform 0.2s;
}

.zayva-icon:hover {
    transform: scale(1.3) translateY(2px);

}
/* Стили для счетчика работников и заявок  */
.worker-counter, .zayvki-counter {
    background: white;
    border-radius: 3px;
    padding: 0 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.worker-counter:hover, .zayvki-counter:hover {
    transform: scale(1.1);
}

/* Стили для контейнеров */
.workers-container {
    position: relative;
    z-index: 5;
}

.zayvki-container {
    position: relative;
    z-index: 5;
}
/* Стили для popup */
.marker-popup {
    min-width: 250px;
    max-width: 350px;
}

.workers-list, .zayvki-list {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.workers-list::-webkit-scrollbar,
.zayvki-list::-webkit-scrollbar {
    width: 6px;
}

.workers-list::-webkit-scrollbar-track,
.zayvki-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.workers-list::-webkit-scrollbar-thumb,
.zayvki-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.worker-item:hover {
    background-color: #f0f8ff;
}

.zayva-item:hover {
    background-color: #fffaf0;
}

.worker-item {
    transition: background-color 0.2s;
}

.worker-item:hover {
    background-color: #f9f9f9;
}
/* Стили для кнопок редактирования заявок */
.zayvki-list .edit-btn, .zayvki-list .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.2s;
}

.zayvki-list .edit-btn:hover {
    background-color: #2196F3;
    color: white;
}

.zayvki-list .delete-btn:hover {
    background-color: #f44336;
    color: white;
}

.new-zayvka-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 10px;
}

.new-zayvka-btn:hover {
    background-color: #45a049;
}

.create-zayvka-btn-large {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px auto;
}

.create-zayvka-btn-large:hover {
    background-color: #45a049;
}