/* === Основной стиль и структура === */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
    color: #334e68;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* === Кнопки === */
.button,
button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3e7dd3;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.button:hover,
button:hover {
    background-color: #2f65b0;
}

button.mark-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ccc !important;
    color: #666 !important;
    border: 1px solid #aaa;
}

/* Вариации кнопок */
.button.primary {
    background-color: #3e7dd3;
    color: white;
}
.button.primary:hover {
    background-color: #2f65b0;
}

.button.secondary {
    background-color: #f0f4f8;
    color: #334e68;
}
.button.secondary:hover {
    background-color: #e1e7ed;
}

/* === Модальные окна === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 65, 85, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal {
    background: white;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
    color: #334e68;
}

.close-button {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
}
.close-button:hover {
    color: #888;
}

.modal-body label {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    color: #334e68;
}

.modal-body input,
.modal-body select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-top: 6px;
    box-sizing: border-box;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* === Сообщения об ошибке и успехе === */
.error {
    color: #d64545;
    background: #fbeaea;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.toast-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #c8e6c9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out, fadeOut 0.3s ease-in-out 4s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
    }
}

/* === Формы === */
form input[type="email"],
form input[type="text"],
form input[type="password"],
form input[type="time"],
form input[type="number"],
form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

/* === Заголовки и тексты === */
h1, h2, h3 {
    color: #334e68;
    margin-bottom: 15px;
}

p.description {
    font-size: 15px;
    color: #627d98;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .modal {
        padding: 20px;
    }
    .modal-header h2 {
        font-size: 18px;
    }
    .button,
    .button.primary,
    .button.secondary {
        font-size: 13px;
        padding: 9px 16px;
    }
}
/* Время работы */
.calendar-cell .entry-info .time-entry {
    font-size: 13px;
}
/* Общее время дня */
.calendar-cell .entry-info strong {
    font-size: 14px;
}
/* Статусы (Отпуск, Командировка и т.д.) */
.calendar-cell .entry-info .status-label {
    font-size: 13px;
}
/* Праздники */
.holiday-label { 
    font-size: 18px; 
    line-height: 1.2; 
    margin-top: 4px; 
    display: block; 
}
.holiday-label small { 
    font-size: 13px; 
    font-weight: 600;
}
/* Тултип праздника */
td[data-holiday] { position: relative; }
td[data-holiday]:hover::after {
    content: attr(data-holiday);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}
/* Комментарий */
.calendar-cell .comment-indicator {
    font-size: 12px;
    color: #666;
}
