/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #27ae60;
    --primary-dark: #219a52;
    --secondary-color: #f39c12;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --border-color: #bdc3c7;
    --sidebar-width: 280px;
    --header-height: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    line-height: 1.6;
    color: #333;
}

/* Стили авторизации */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('../uploads/wheat-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    padding: 20px;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.auth-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.checkbox {
    display: flex;
    align-items: center;
}

.checkbox label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox input {
    width: auto;
    margin-right: 0.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--gray-color);
}

/* Основной layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Сайдбар */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header .logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-info {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.user-details strong {
    display: block;
    font-size: 1.1rem;
}

.user-role {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: capitalize;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--primary-color);
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.nav-item.logout {
    color: var(--danger-color);
    border-left-color: transparent;
}

.nav-item.logout:hover {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger-color);
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 1rem 0;
}

/* Основной контент */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: #f8f9fa;
    min-height: 100vh;
}

.content-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-header h1 {
    color: var(--dark-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.current-date {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Карточки */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: var(--dark-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

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

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.primary {
    border-left: 4px solid var(--primary-color);
}

.stat-card.success {
    border-left: 4px solid var(--success-color);
}

.stat-card.warning {
    border-left: 4px solid var(--warning-color);
}

.stat-card.info {
    border-left: 4px solid var(--info-color);
}

.stat-card.mini {
    padding: 1.5rem;
}

.stat-icon {
    font-size: 3rem;
    margin-right: 1.5rem;
    opacity: 0.8;
}

.stat-info h3 {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    color: var(--dark-color);
    font-size: 2rem;
    font-weight: 700;
}

/* Сетка контента */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Таблицы */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
}

tr:hover {
    background: #f8f9fa;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gray-color);
    color: white;
}

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

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Формы */
.form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Сетка техники */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.vehicle-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.vehicle-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-placeholder {
    font-size: 4rem;
    opacity: 0.7;
}

.vehicle-placeholder.large {
    font-size: 6rem;
}

.vehicle-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    color: var(--success-color);
}

.status-maintenance {
    color: var(--warning-color);
}

.status-inactive {
    color: var(--danger-color);
}

.vehicle-info {
    padding: 1.5rem;
}

.vehicle-info h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.vehicle-type {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.vehicle-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.vehicle-specs {
    margin-bottom: 1.5rem;
}

.spec {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.spec-label {
    color: var(--gray-color);
    font-weight: 600;
}

.spec-value {
    color: var(--dark-color);
    font-weight: 600;
}

.vehicle-actions {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    display: flex;
    gap: 0.5rem;
}

/* Индикатор топлива */
.fuel-gauge {
    margin: 1rem 0;
}

.gauge-background {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #f1c40f, #e74c3c);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.gauge-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-color);
    font-weight: 600;
}

.fuel-gauge.large .gauge-background {
    height: 30px;
}

.fuel-gauge.preview .gauge-background {
    height: 15px;
}

/* Детали техники */
.vehicle-detail {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.detail-image {
    flex: 0 0 300px;
}

.detail-image img {
    width: 100%;
    border-radius: 15px;
}

.detail-info {
    flex: 1;
}

.detail-row {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: var(--gray-color);
}

.detail-value {
    flex: 1;
    color: var(--dark-color);
}

/* Оповещения */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

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

.alert.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Бейджи ролей */
.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.role-admin {
    background: #ffeaa7;
    color: #856404;
}

.role-engineer {
    background: #a5d8ff;
    color: #1864ab;
}

.role-refueler {
    background: #d3f9d8;
    color: #2b8a3e;
}

/* Состояние пустоты */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-color);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Фильтры */
.filter-form {
    width: 100%;
}

/* Предпросмотр заправки */
.fuel-preview {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.preview-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-info p {
    margin: 0;
    font-weight: 600;
}

/* Чарт */
.chart-container {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .content {
        margin-left: 0;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .vehicle-detail {
        flex-direction: column;
    }
    
    .detail-image {
        flex: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* Улучшенная типографика */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

small {
    color: var(--gray-color);
    font-size: 0.8rem;
}

/* Кастомные скроллбары */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Утилиты */
.no-data {
    text-align: center;
    color: var(--gray-color);
    font-style: italic;
    padding: 2rem;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Улучшенные стили для резервуаров */
.tanks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tank-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.tank-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2ecc71, #3498db, #9b59b6);
}

.tank-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.tank-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.tank-title h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark-color);
    font-size: 1.4rem;
    font-weight: 700;
}

.tank-location {
    color: var(--gray-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tank-status {
    flex-shrink: 0;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-maintenance {
    background: #fff3cd;
    color: #856404;
}

.status-empty {
    background: #f8d7da;
    color: #721c24;
}

.tank-content {
    margin-bottom: 2rem;
}

.tank-fuel-info {
    margin-bottom: 2rem;
}

.fuel-type {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    text-align: center;
}

.tank-capacity-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.capacity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.capacity-item .label {
    color: var(--gray-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.capacity-item .value {
    font-weight: 700;
    color: var(--dark-color);
}

.capacity-item .value.highlight {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.capacity-item .value.warning {
    color: var(--warning-color);
}

.capacity-item .value.success {
    color: var(--success-color);
}

.tank-gauge-section {
    margin-bottom: 1.5rem;
}

.fuel-gauge.large {
    margin: 1.5rem 0;
}

.gauge-background.large {
    height: 35px;
    border-radius: 17px;
    position: relative;
}

.gauge-text.large {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.75rem;
}

.gauge-success {
    background: linear-gradient(90deg, #2ecc71, #27ae60, #229954);
}

.gauge-warning {
    background: linear-gradient(90deg, #f39c12, #e67e22, #d35400);
}

.gauge-danger {
    background: linear-gradient(90deg, #e74c3c, #c0392b, #a93226);
}

.low-fuel-warning {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.tank-notes {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #ffc107;
    margin-top: 1.5rem;
}

.tank-notes strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

.tank-notes p {
    margin: 0;
    color: #856404;
    line-height: 1.5;
}

.tank-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 2px solid #f8f9fa;
}

/* Общий индикатор */
.overall-gauge {
    text-align: center;
    padding: 2rem;
}

.gauge-background.large {
    max-width: 600px;
    margin: 0 auto 1rem;
}

/* Список резервуаров на дашборде */
.tanks-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.tank-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.tank-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.tank-info p {
    margin: 0 0 0.5rem 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.tank-stats {
    display: flex;
    gap: 1rem;
}

.fuel-type {
    color: var(--primary-color);
    font-weight: 600;
}

.fuel-amount {
    color: var(--success-color);
    font-weight: 700;
}

.tank-gauge {
    flex: 0 0 200px;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .tanks-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

@media (max-width: 768px) {
    .tanks-grid {
        grid-template-columns: 1fr;
    }
    
    .tank-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .tank-capacity-info {
        grid-template-columns: 1fr;
    }
    
    .tank-actions {
        flex-direction: column;
    }
    
    .tank-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tank-gauge {
        flex: 1;
        width: 100%;
    }
}

/* Анимации */
.tank-card {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшенные формы */
.receipt-preview {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border: 2px dashed #dee2e6;
}

.preview-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-info p {
    margin: 0;
    font-weight: 600;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Улучшенные алерты */
.alert.warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
}

.alert.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
}

.alert.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
}
/* Новые стили для улучшенного дашборда */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Стили для списка активностей */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.activity-title strong {
    color: var(--dark-color);
    font-size: 1rem;
}

.activity-amount {
    font-weight: 700;
    color: var(--primary-color);
}

.activity-amount.success {
    color: var(--success-color);
}

.activity-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0.25rem;
}

.activity-time {
    color: var(--dark-color);
    font-weight: 600;
}

.activity-user {
    font-size: 0.8rem;
    color: var(--gray-color);
    font-style: italic;
}

/* Стили для списка предупреждений */
.warning-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.warning-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
    transition: all 0.3s ease;
}

.warning-item:hover {
    background: #ffeaa7;
    transform: translateX(5px);
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
}

.warning-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.warning-title strong {
    color: #856404;
    font-size: 1rem;
}

.warning-percentage {
    font-weight: 700;
    color: #e74c3c;
}

.warning-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #856404;
    margin-bottom: 0.5rem;
}

.fuel-amount {
    font-weight: 600;
}

.fuel-gauge.small .gauge-background {
    height: 8px;
}

/* Стили для списка обслуживания */
.maintenance-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.maintenance-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
    transition: all 0.3s ease;
}

.maintenance-item:hover {
    background: #ffeaa7;
    transform: translateX(5px);
}

.maintenance-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.maintenance-content {
    flex: 1;
}

.maintenance-title {
    margin-bottom: 0.5rem;
}

.maintenance-title strong {
    color: #856404;
    font-size: 1rem;
}

.maintenance-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #856404;
}

.maintenance-type {
    font-weight: 600;
    color: #e67e22;
}

/* Стили для распределения топлива */
.fuel-distribution {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fuel-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.fuel-type-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fuel-type-name {
    font-weight: 600;
    color: var(--dark-color);
}

.fuel-type-amount {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.fuel-type-count {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Сообщения об успехе */
.success-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #d4edda;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.success-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.success-content strong {
    color: #155724;
    display: block;
    margin-bottom: 0.25rem;
}

.success-content p {
    color: #155724;
    margin: 0;
    opacity: 0.8;
}

/* Улучшенный предпросмотр в формах */
.preview-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.preview-item span {
    color: var(--gray-color);
    font-weight: 600;
}

.preview-item strong {
    color: var(--dark-color);
}

.preview-item strong.success {
    color: var(--success-color);
}

.preview-item strong.error {
    color: var(--danger-color);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-column {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .activity-title,
    .activity-details,
    .warning-title,
    .warning-details,
    .maintenance-details {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .preview-item {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .success-message {
        flex-direction: column;
        text-align: center;
    }
}

/* Анимации */
.activity-item,
.warning-item,
.maintenance-item,
.fuel-type-item {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* Стили для миниатюр техники */
.vehicle-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.vehicle-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
}

.activity-image,
.maintenance-image {
    flex-shrink: 0;
}

/* Обновленные стили для элементов с картинками */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.maintenance-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
    transition: all 0.3s ease;
}

/* Адаптивность для миниатюр */
@media (max-width: 768px) {
    .vehicle-thumb {
        width: 40px;
        height: 40px;
    }
    
    .activity-item,
    .maintenance-item {
        gap: 0.75rem;
        padding: 0.75rem;
    }
}

/* Улучшенные стили для предпросмотра в формах */
.refuel-preview {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 2px solid #dee2e6;
}

.preview-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.preview-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.preview-item span {
    color: var(--gray-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.preview-item strong {
    color: var(--dark-color);
    font-size: 1rem;
}

.preview-item strong.success {
    color: var(--success-color);
    font-weight: 700;
}

.preview-item strong.error {
    color: var(--danger-color);
    font-weight: 700;
}

/* Улучшенные стили для форм */
.form-group input:invalid,
.form-group select:invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input:valid,
.form-group select:valid {
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* Анимации для улучшения UX */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Стили для улучшенных уведомлений */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideDown 0.3s ease;
}

.alert::before {
    font-size: 1.5rem;
}

.alert.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
}

.alert.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Компактный дизайн для дашборда */

/* Компактные списки */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: all 0.2s ease;
}

.compact-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

/* Миниатюры техники */
.vehicle-mini {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #dee2e6;
    flex-shrink: 0;
}

.vehicle-mini.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2rem;
}

.compact-image {
    flex-shrink: 0;
}

.compact-content {
    flex: 1;
    min-width: 0;
}

.compact-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.vehicle-name {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fuel-amount {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.compact-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.tank-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.compact-time {
    color: var(--dark-color);
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Статус-бейдж */
.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.status-badge.maintenance {
    background: #fff3cd;
    color: #856404;
}

/* Мини-сетка резервуаров */
.tanks-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tank-mini-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tank-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tank-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tank-mini-header h4 {
    margin: 0;
    font-size: 0.85rem;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.fuel-type-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.tank-mini-info {
    margin-bottom: 0.5rem;
}

.current-fuel {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

.capacity {
    color: var(--gray-color);
    font-size: 0.8rem;
}

.fuel-gauge.mini {
    margin: 0.5rem 0;
}

.fuel-gauge.mini .gauge-background {
    height: 6px;
    border-radius: 3px;
}

.tank-mini-percentage {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* Список приёмок */
.receipts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.receipt-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--success-color);
}

.receipt-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.receipt-content {
    flex: 1;
    min-width: 0;
}

.receipt-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.receipt-tank {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.receipt-amount {
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.receipt-amount.success {
    color: var(--success-color);
}

.receipt-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.receipt-supplier {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.receipt-date {
    color: var(--dark-color);
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Список предупреждений */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid transparent;
}

.alert-item.warning {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.alert-item.info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.alert-details {
    font-size: 0.8rem;
    color: var(--gray-color);
}

/* Состояния для пустых блоков */
.empty-state.mini,
.success-state.mini {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray-color);
}

.empty-state.mini .empty-icon,
.success-state.mini .success-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-state.mini p,
.success-state.mini p {
    margin: 0;
    font-size: 0.9rem;
}

.success-state.mini {
    color: var(--success-color);
}

/* Адаптивность для компактного дизайна */
@media (max-width: 1200px) {
    .tanks-mini-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .tanks-mini-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .compact-title,
    .receipt-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .fuel-amount,
    .receipt-amount {
        align-self: flex-end;
    }
    
    .compact-details,
    .receipt-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
    }
    
    .compact-time,
    .receipt-date {
        margin-left: 0;
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .tanks-mini-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicle-mini {
        width: 35px;
        height: 35px;
    }
    
    .compact-item,
    .receipt-item,
    .alert-item {
        padding: 0.6rem;
        gap: 0.6rem;
    }
}

/* Анимации для компактных элементов */
.compact-item,
.tank-mini-card,
.receipt-item,
.alert-item {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшенная цветовая схема для индикаторов */
.gauge-success {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.gauge-warning {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.gauge-danger {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

/* Минималистичные тени */
.compact-item,
.tank-mini-card,
.receipt-item,
.alert-item {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.compact-item:hover,
.tank-mini-card:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
/* Стили для детальной страницы техники */
.vehicle-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.detail-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.detail-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: var(--gray-color);
}

.detail-value {
    flex: 1;
    color: var(--dark-color);
    font-weight: 500;
}

/* Статистика в деталях техники */
.stats-grid.mini {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card.mini {
    padding: 1.5rem;
}

.stat-card.mini .stat-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.stat-card.mini .stat-info h3 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.stat-card.mini .stat-number {
    font-size: 1.5rem;
}

/* Таймлайн информация */
.timeline-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
}

.timeline-label {
    color: var(--gray-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-value {
    color: var(--dark-color);
    font-weight: 700;
}

/* Адаптивность для детальной страницы */
@media (max-width: 968px) {
    .vehicle-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .detail-image {
        text-align: center;
    }
    
    .detail-image img {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .detail-label {
        flex: none;
    }
    
    .stats-grid.mini {
        grid-template-columns: 1fr 1fr;
    }
    
    .timeline-info {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-grid.mini {
        grid-template-columns: 1fr;
    }
    
    .stat-card.mini {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card.mini .stat-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Улучшенные стили для таблицы */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

tr:hover {
    background: #f8f9fa;
}

/* Стили для пустого состояния */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-color);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.empty-state p {
    margin-bottom: 1.5rem;
}
.license-plate {
    background: #f1c40f;
    color: #2c3e50;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-family: monospace;
    font-size: 0.9em;
}

.vehicle-specs .license-plate {
    background: #3498db;
    color: white;
}