/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5eb;
}

h1 {
    color: #2c3e50;
    font-size: 2em;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.stat-card.positive {
    border-left: 4px solid #27ae60;
}

.stat-card.negative {
    border-left: 4px solid #e74c3c;
}

.stat-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Фильтры */
.filters {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.85em;
    font-weight: 600;
    color: #2c3e50;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95em;
    min-width: 150px;
}

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

.filter-group .btn {
    padding: 8px 20px;
}

/* Таблица */
.table-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow-x: auto;
    margin-bottom: 30px;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.records-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e1e5eb;
}

.records-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.records-table tr:hover {
    background: #f8f9fa;
}

.records-table .received {
    color: #27ae60;
    font-weight: 600;
}

.records-table .used {
    color: #e74c3c;
    font-weight: 600;
}

.comment-cell {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #3498db;
    color: white;
}

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

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

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-edit:hover {
    background: #e67e22;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.btn-sm {
    font-size: 0.8em;
}

/* Формы */
.record-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    max-width: 900px;
    margin: 20px 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s;
}

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

/* Алerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert ul {
    list-style: none;
    padding-left: 0;
}

/* Fuel stats */
.fuel-stats {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.fuel-stats h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Адаптивность */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
        min-width: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .records-table {
        font-size: 0.85em;
    }
    
    .records-table th,
    .records-table td {
        padding: 8px 6px;
    }
    
    .comment-cell {
        max-width: 80px;
    }
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.role-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.viewer {
    background: #e8f0fe;
    color: #1a73e8;
}

.role-badge.editor {
    background: #fef3e2;
    color: #e37400;
}

.role-badge.admin {
    background: #fce8e6;
    color: #d93025;
}
/* Добавить в css/style.css */
.btn-group {
    display: inline-flex;
    gap: 5px;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-group .btn:last-child {
    border-radius: 0 6px 6px 0;
}

.btn-group .btn:only-child {
    border-radius: 6px;
}

.import-container {
    position: relative;
    display: inline-block;
}

.import-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.import-container:hover .btn {
    background: #7f8c8d;
}
}
