/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Общий стиль для всех кнопок с текстом */
.btn-with-text {
    display: flex !important; /* или inline-flex */
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

/* Применить к навигационным кнопкам */
.nav-btn,
.action-btn,
.filter-btn,
.reset-btn,
.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Шапка */
.header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header .logo h1 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #3498db; /* Мягкий синий цвет для JobMaster */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-weight: 500;
    color: #bdc3c7;
}

.logout-form {
    display: inline;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Формы */
.form-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.form-container h2 {
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
    font-weight: 400;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.submit-btn {
    width: 100%;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* Таблица с фиксированной шапкой */
.table-container {
    margin-top: 30px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    position: relative;
}

.table-wrapper {
    position: relative;
}

.shifts-table {
    width: 100%;
    border-collapse: collapse;
}

.shifts-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #2c3e50;
}

.shifts-table thead th {
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid #34495e;
}

.shifts-table tbody tr {
    border-bottom: 1px solid #eef1f3;
    transition: background-color 0.2s;
}

.shifts-table tbody tr:hover {
    background-color: #f5f7fa;
}

.shifts-table td {
    padding: 12px 15px;
    vertical-align: middle;
    color: #555;
}

.shifts-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.shifts-table tbody tr:nth-child(even):hover {
    background-color: #f0f3f5;
}

/* Фильтры */
.filter-row {
    background-color: #f1f5f8;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-row td {
    padding: 5px;
}

.filter-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
}

.filter-input:focus {
    outline: none;
    border-color: #3498db;
}

/* Выпадающий список для фильтра профессий */
.filter-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

.date-filter {
    display: flex;
    gap: 10px;
}

.date-filter input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.date-filter input:focus {
    outline: none;
    border-color: #3498db;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.filter-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.filter-btn:hover {
    background-color: #2980b9;
}

.reset-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.reset-btn:hover {
    background-color: #7f8c8d;
}

/* Сортировка */
.sort-btn {
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    margin-left: 5px;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.sort-btn:hover {
    color: #3498db;
}

.sort-active {
    color: #3498db;
}

/* Информация о записях */
.info-bar {
    margin: 20px 0;
    padding: 15px 20px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #3498db;
}

.info-bar strong {
    color: #2c3e50;
}

/* Главная страница */
.main-content {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.main-content h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 400;
}

.main-content p {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.action-btn {
    background-color: #3498db;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    min-width: 180px;
}

.action-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.action-btn.logout {
    background-color: #e74c3c;
}

.action-btn.logout:hover {
    background-color: #c0392b;
}

/* Сообщения */
.messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    color: white;
    animation: slideIn 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    max-width: 350px;
}

.message.success {
    background-color: #27ae60;
    border-left: 4px solid #219653;
}

.message.error {
    background-color: #e74c3c;
    border-left: 4px solid #c0392b;
}

.message.info {
    background-color: #3498db;
    border-left: 4px solid #2980b9;
}

.message.warning {
    background-color: #f39c12;
    color: #fff;
    border-left: 4px solid #d68910;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Заголовки */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 400;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* Стили для пустых состояний */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.empty-state p {
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .user-info {
        width: 100%;
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .date-filter {
        flex-direction: column;
    }

    .table-container {
        max-height: 400px;
    }

    .shifts-table {
        font-size: 0.9rem;
    }

    .shifts-table th,
    .shifts-table td {
        padding: 8px;
    }
}
/* Стили для кнопки скачивания */
.download-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.3s;
    text-decoration: none;
}

.download-btn:hover {
    background-color: #2980b9;
    color: white;
    text-decoration: none;
}

.download-btn svg {
    fill: currentColor;
    margin-right: 5px;
}

/* Уведомления */
.export-notification,
.download-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.export-notification {
    background-color: #3498db;
    color: white;
}

.download-notification {
    background-color: #27ae60;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}