/**
 * Основные стили системы учета производства
 * Строгий деловой стиль
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    color: #333;
}

/* Контейнеры */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 30px;
}

/* Заголовки */
h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

h2 {
    color: #555;
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

h3 {
    color: #555;
    font-size: 18px;
    margin-bottom: 10px;
}

/* Формы */
.form-section {
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

input[type="date"],
input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-add {
    background-color: #17a2b8;
    color: white;
}

.btn-add:hover {
    background-color: #138496;
}

.btn-link {
    background: none;
    color: #4CAF50;
    padding: 5px 10px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Таблицы */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

table input,
table select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Действия */
.actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Информационные блоки */
.info-box {
    background-color: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-box p {
    margin: 0;
    color: #1976D2;
    font-size: 14px;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

/* Служебные классы */
.required {
    color: #dc3545;
}

.help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Фильтры и поиск */
.filters {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.filters .form-row {
    margin-bottom: 10px;
}

.filters .form-row:last-child {
    margin-bottom: 0;
}
