* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 30px;
}

/* Авторизация */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
}

h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
}

h1 {
    text-align: center;
    color: #667eea;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

button, .btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    margin-left: 10px;
}

.btn-danger {
    background: #dc3545;
}

.btn-success {
    background: #28a745;
}

.btn-warning {
    background: #ffc107;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-warning:hover {
    background: #e0a800;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-weight: 500;
    color: #667eea;
}

/* Табы */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 20px;
    background: #667eea;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.tab:hover {
    background: #e9ecef;
    color: #667eea;
}

.tab.active {
    background: #f8f9fa;
    color: #667eea;
    border-color: #667eea;
}

/* Контент табов */
.tab-content {
    display: none;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.tab-content.active {
    display: block;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th {
    background: #667eea;
    color: white;
    font-weight: 500;
    padding: 12px;
    text-align: left;
}

td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

tr:hover {
    background: #f8f9fa;
}

tr.discrepancy {
    background: #fff3cd;
}

tr.discrepancy:hover {
    background: #ffe69c;
}

/* Стили для фильтров отчетов */
.filters {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 12px;
    font-weight: 500;
}

.filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-row{
    display: flex; 
    gap: 15px; 
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group{
    min-width: 200px;
    padding-bottom: 10px;
}

.name{
    min-width: 410px;
}

.form-row1{
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.form-group1{
    min-width: 242px;
}

/* Стили для отчета */
#reportContent {
    margin-top: 20px;
}

#reportContent table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#reportContent th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 500;
}

#reportContent td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
}

#reportContent tr:hover {
    background: #f8f9fa;
}

#reportContent tr.discrepancy {
    background: #fff3cd;
}

#reportContent tr.discrepancy:hover {
    background: #ffe69c;
}

.summary-item {
    padding: 15px;
    border-radius: 8px;
    color: white;
    text-align: center;
}

.summary-item .label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.summary-item .value {
    font-size: 20px;
    font-weight: bold;
}

/* Сообщения */
#message, .error-message, .success-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
}

.error-message, .error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message, .success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.info-message {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Карточки */
.summary-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 5px;
}

.summary-item .label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.summary-item .value {
    font-size: 24px;
    font-weight: bold;
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        width: 100%;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}

/* Меню на главной */
.menu {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.menu .btn {
    min-width: 150px;
    text-align: center;
}

/* Ссылки */
a {
    color: #667eea;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Импорт файлов */
.file-input {
    padding: 10px 0;
    width: 100%;
}

/* add-item-form */
.add-item-form {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #b8daff;
}

.add-item-form h3 {
    margin-bottom: 15px;
    color: #004085;
    font-size: 18px;
}

.add-item-form label {
    display: block;
    margin-bottom: 5px;
    color: #004085;
    font-weight: 500;
}

.add-item-form input,
.add-item-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #b8daff;
    border-radius: 4px;
    font-size: 14px;
}

.add-item-form input:focus,
.add-item-form select:focus {
    outline: none;
    border-color: #004085;
    box-shadow: 0 0 0 2px rgba(0,64,133,0.1);
}

/* filter-row */
.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

/* filter-actions */
.filter-actions {
    display: flex;
    gap: 10px;
}

/* message */
.message {
    margin-top: 10px;
    font-size: 14px;
}

/* loading-indicator */
.loading-indicator {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-content p {
    margin-top: 10px;
}

/* report-content */
.report-content {
    margin-top: 20px;
}

/* report-placeholder */
.report-placeholder {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* summary-card */
.summary-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.summary-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.summary-card p {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-card pre {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 13px;
    overflow-x: auto;
}

/* action-buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}