
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
  }
  
  .container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
  }
  
  /* Шапка */
  header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  header h1 {
    font-size: 22px;
    font-weight: 600;
  }
  
  .user-info {
    font-size: 13px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .user-info .role-badge {
    background: rgba(255,255,255,0.25);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  /* Навигация */
  .main-nav {
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
    padding: 0 20px;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .nav-btn {
    background: none;
    border: none;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
  }
  
  .nav-btn:hover {
    color: #667eea;
    background: #f8f9ff;
  }
  
  .nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
  }
  
  /* Основной контент */
  main {
    padding: 30px;
    min-height: calc(100vh - 200px);
  }
  
  .screen {
    display: none;
    animation: fadeIn 0.3s ease;
  }
  
  .screen.active {
    display: block;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .screen h2 {
    font-size: 22px;
    margin-bottom: 8px;
    color: #333;
  }
  
  .screen > p {
    color: #666;
    margin-bottom: 20px;
  }
  
  /* Быстрые действия */
  .quick-actions {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 8px;
    border: 1px solid #e0e5ff;
  }
  
  .quick-actions h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #444;
  }
  
  .action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
  }
  
  .action-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: inherit;
  }
  
  .action-btn:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
  }
  
  .action-btn .icon {
    font-size: 32px;
  }
  
  .action-btn span:last-child {
    font-size: 13px;
    color: #444;
    font-weight: 500;
  }
  
  /* Футер */
  footer {
    padding: 15px 30px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #888;
    font-size: 12px;
  }
  
  /* Уведомления */
  .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 350px;
  }
  
  .notification.success { background: #4caf50; }
  .notification.error { background: #f44336; }
  .notification.info { background: #2196f3; }
  .notification.warning { background: #ff9800; }
  
  @keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
  
  /* Загрузка */
  .loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
  }
  
  .loading-overlay .loading {
    width: 40px;
    height: 40px;
    border-width: 4px;
  }
  
  /* Скрытие элементов */
  .hidden { display: none !important; }
  
  /* Скроллбар */
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
  }
  
  /* Шапка экрана с кнопкой */
  .screen-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
  }
  
  .screen-header h2 { margin-bottom: 4px; }
  .screen-header p { color: #666; font-size: 13px; }
  
  /* Панель фильтров */
  .filters-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
  }
  
  .filters-bar input,
  .filters-bar select {
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    background: white;
  }
  
  .filters-bar input { flex: 1; min-width: 200px; }
  .filters-bar input:focus,
  .filters-bar select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
  }
  
  /* Обёртка таблицы с горизонтальным скроллом */
  .table-wrapper {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
  }
  
  .employees-table {
    min-width: 900px;
  }
  
  .actions-cell {
    display: flex;
    gap: 5px;
    justify-content: flex-start;
  }
  
  /* Модальное окно */
  .modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
  }
  
  .modal.hidden { display: none; }
  
  .modal-content {
    background: white;
    border-radius: 10px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.2s ease;
  }
  
  @keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  
  .modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
  }
  
  .modal-header h3 {
    font-size: 18px;
    color: #333;
  }
  
  .modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    padding: 0 5px;
  }
  
  .modal-close:hover { color: #333; }
  
  form { padding: 24px; }
  
  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .form-field label {
    font-size: 12px;
    color: #555;
    font-weight: 500;
  }
  
  .form-field input,
  .form-field select {
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
  }
  
  .form-field input:focus,
  .form-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
  }
  
  .form-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #fafbff;
    border-radius: 6px;
    border: 1px solid #e0e5ff;
  }
  
  .form-section h4 {
    font-size: 13px;
    margin-bottom: 10px;
    color: #444;
  }
  
  .checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
  }
  
  .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
  }
  
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
  }
  
  /* Кнопки */
  .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f0f0;
    color: #333;
  }
  
  .btn:hover {
    background: #e0e0e0;
  }
  
  .btn-primary {
    background: #667eea;
    color: white;
  }
  
  .btn-primary:hover {
    background: #5568d3;
  }
  
  .btn-danger {
    background: #f44336;
    color: white;
  }
  
  .btn-danger:hover {
    background: #d32f2f;
  }
  
  .btn-sm {
    padding: 5px 10px;
    font-size: 12px;
  }
  
  /* Настройки */
  .settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
  }
  
  .settings-section {
    background: #fafbff;
    border: 1px solid #e0e5ff;
    border-radius: 8px;
    padding: 20px;
  }
  
  .settings-section h3 {
    font-size: 15px;
    margin-bottom: 15px;
    color: #444;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e5ff;
  }
  
  .form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
  }
  
  .form-row label {
    font-size: 13px;
    color: #555;
    flex: 1;
  }
  
  .form-row input,
  .form-row select {
    width: 140px;
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
  }
  
  .form-row input:focus,
  .form-row select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
  }
  
  /* Таблица данных */
  .data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
  }
  
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
  }
  
  .data-table th {
    background: #f5f7ff;
    font-weight: 600;
    color: #444;
  }
  
  .data-table tbody tr:hover {
    background: #fafbff;
  }
  
  .add-user-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
  }
  
  .add-user-form input,
  .add-user-form select {
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
  }
  
  .add-user-form input:focus,
  .add-user-form select:focus {
    outline: none;
    border-color: #667eea;
  }
  
  /* График */
  .chart-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    position: relative;
  }
  
  /* Матричная таблица с тепловой картой */
  .matrix-table-wrapper {
    overflow: auto;
    max-height: 600px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    position: relative;
  }
  
  .matrix-table {
    font-size: 11px;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;
  }
  
  .matrix-table th,
  .matrix-table td {
    border: 1px solid #e8e8e8;
    padding: 5px 4px;
    text-align: center;
    min-width: 42px;
    max-width: 42px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .matrix-table th {
    background: #f5f7ff;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  /* Фиксация первого столбца (Дата) */
  .matrix-table td.date-cell,
  .matrix-table th.date-header {
    position: sticky;
    left: 0;
    z-index: 15;
    background: #e8ecff !important;
    text-align: left;
    font-weight: 600;
    min-width: 100px;
    max-width: 100px;
    padding-left: 8px;
  }
  
  .matrix-table th.date-header {
    z-index: 20;
    background: #dce3ff !important;
  }
  
  /* Ячейки тепловой карты */
  .matrix-cell {
    transition: background-color 0.2s;
  }
  
  .matrix-table tbody tr:hover td {
    filter: brightness(0.92);
  }
  
  .matrix-table tbody tr:hover td.date-cell {
    filter: none;
    background: #dce3ff !important;
  }


    /* Форма ввода данных за день */
  .daily-input-section {
    background: #fafbff;
    border: 1px solid #e0e5ff;
    border-radius: 8px;
    padding: 20px;
  }
  
  .daily-input-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #444;
  }
  
  .daily-input-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
  }
  
  .daily-input-form .form-field {
    margin: 0;
  }
  
  .hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
  }
  
  .hour-input {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .hour-input label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
  }
  
  .hour-input input {
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    font-family: inherit;
  }
  
  .hour-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
  }

    /* Страница Прогноз */
  .forecast-content .screen-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  
  .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
  }
  
  .status-badge.saved {
    background: #ffebee;
    color: #c62828;
  }
  
  .status-badge.ready {
    background: #e8f5e9;
    color: #2e7d32;
  }
  
  .saved-info {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
  }
  
  .forecast-params {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 20px;
    background: #fafbff;
    border: 1px solid #e0e5ff;
    border-radius: 8px;
  }
  
  .forecast-params .form-field {
    margin: 0;
    min-width: 150px;
  }
  
  .forecast-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
  }
  
  .btn-success {
    background: #4caf50;
    color: white;
  }
  
  .btn-success:hover {
    background: #388e3c;
  }
  
  .btn-warning {
    background: #ff9800;
    color: white;
  }
  
  .btn-warning:hover {
    background: #f57c00;
  }
  
  .btn-info {
    background: #2196f3;
    color: white;
  }
  
  .btn-info:hover {
    background: #1976d2;
  }
  
  .events-section {
    background: #fafbff;
    border: 1px solid #e0e5ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
  }
  
  .events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .events-header h3 {
    font-size: 16px;
    margin: 0;
  }
  
  .forecast-summary {
    display: flex;
    gap: 20px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 25px;
  }
  
  .forecast-summary div {
    font-size: 14px;
  }
  
  .matrix-section {
    margin-top: 25px;
  }
  
  .matrix-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  /* Модалка точности */
  .accuracy-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .accuracy-card {
    background: #fafbff;
    border: 1px solid #e0e5ff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
  }
  
  .accuracy-card .label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
  }
  
  .accuracy-card .value {
    font-size: 22px;
    font-weight: 700;
    color: #333;
  }
  
  .accuracy-card .sub {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
  }


/* Стили для экрана пожеланий */
.wishes-content {
  padding: 20px;
}

.wishes-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  align-items: flex-end;
}

.wishes-table {
  font-size: 14px;
}

.wishes-table select,
.wishes-table input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.wishes-table select:focus,
.wishes-table input:focus {
  outline: none;
  border-color: #1A73E8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
}

.badge-info {
  background: #e3f2fd;
  color: #1976d2;
}

.badge-warning {
  background: #fff3e0;
  color: #f57c00;
}

.badge-success {
  background: #e8f5e9;
  color: #388e3c;
}

.badge-secondary {
  background: #f5f5f5;
  color: #757575;
}

 /* Стили для экрана пожеланий */
.wishes-content {
  padding: 20px;
}

.wishes-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.wishes-table {
  font-size: 14px;
}

.wishes-table select,
.wishes-table input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.wishes-table select:focus,
.wishes-table input:focus {
  outline: none;
  border-color: #1A73E8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.wishes-table select:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
}

.badge-info {
  background: #e3f2fd;
  color: #1976d2;
}

.badge-warning {
  background: #fff3e0;
  color: #f57c00;
}

.badge-success {
  background: #e8f5e9;
  color: #388e3c;
}

.badge-secondary {
  background: #f5f5f5;
  color: #757575;
} 

.wish-custom-shift {
  font-size: 13px;
  padding: 6px 8px;
  border: 1px dashed #1A73E8;
  background: #f8f9fa;
  margin-top: 5px;
  width: 100%;
}

.wish-custom-shift:focus {
  border-style: solid;
  background: #fff;
  outline: none;
  border-color: #1A73E8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}


































