/* Основной контейнер */
.fuel-monitor-container {
    max-width: 500px;
    margin: 10px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Обертка для строки + деталей */
.fuel-station-wrapper {
    margin-bottom: 4px;
    border-radius: 6px;
    overflow: hidden;
}

/* ===== СТРОКИ ЗАПРАВОК ===== */
.fuel-station-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.06);
    min-height: 28px;
    gap: 3px 6px;
}

/* ===== ЦВЕТА ЗАПРАВОК ===== */

/* Лукойл — красно-белый градиент */
.fuel-station-row.station-red {
    background: linear-gradient(135deg, #ef4444 0%, #ffffff 100%);
    border-left: 4px solid #dc2626;
}

/* Газпром — голубой градиент */
.fuel-station-row.station-blue {
    background: linear-gradient(135deg, #79c1ff 0%, #ffffff 100%);
    border-left: 4px solid #008cff;
}

/* UNKoil — сине-жёлтый градиент */
.fuel-station-row.station-darkblue {
    background: linear-gradient(135deg, #1e3a5f 0%, #fbbf24 100%);
    border-left: 4px solid #1e3a5f;
}

/* Текст на тёмном фоне */
.fuel-station-row.station-darkblue .station-time,
.fuel-station-row.station-darkblue .station-header,
.fuel-station-row.station-darkblue .confirm-btn {
    color: #ffffff;
}

.fuel-station-row.station-darkblue .confirm-btn {
    border-color: rgba(255,255,255,0.3);
}

.fuel-station-row.station-darkblue .confirm-btn:hover {
    background: rgba(255,255,255,0.2);
}

.fuel-station-row.station-darkblue .confirm-info {
    color: #fbbf24 !important;
}

.fuel-station-row:hover {
    transform: translateX(2px);
    opacity: 0.9;
}

.fuel-station-row.active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 6px;
}

/* Иконка колонки */
.station-icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}

/* ===== ВЕРХНЯЯ СТРОКА (заголовок) ===== */
.station-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px 6px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.station-header-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
}

.station-header-right {
    display: flex;
    align-items: center;
    gap: 4px 6px;
    flex-wrap: nowrap;
    margin-left: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
}

.station-time {
    font-size: 11px;
    color: #4b5563;
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.confirm-info {
    font-size: 10px;
    color: #1a1a1a !important;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== КНОПКА ПОДТВЕРЖДЕНИЯ ===== */
.confirm-btn {
    background: transparent;
    border: 1px solid #22c55e;
    color: #22c55e;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.6;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 40px;
    justify-content: center;
    height: 20px;
}

.confirm-btn:hover {
    background: #22c55e;
    color: white;
    transform: scale(1.03);
}

.confirm-btn:active {
    transform: scale(0.95);
}

/* ===== ДЕТАЛИ ЗАПРАВКИ (нижняя строка) ===== */
.station-details {
    display: none;
    width: 100%;
    padding: 3px 0 2px 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    border-top: 1px solid rgba(0,0,0,0.06);
    margin: 0;
    min-height: 24px;
}

.station-details.visible {
    display: flex;
}

/* Бейджи топлива */
.fuel-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
}

.fuel-badge.fuel-100 { 
    background: #8b5cf6; 
    color: white; 
}

.fuel-badge.fuel-95 { 
    background: #3b82f6; 
    color: white; 
}

.fuel-badge.fuel-92 { 
    background: #22c55e; 
    color: white; 
}

.fuel-badge.fuel-dt { 
    background: #1a1a1a; 
    color: #ffffff; 
}

.fuel-badge.no-fuel { 
    background: #ef4444; 
    color: white; 
}

/* Очередь */
.queue-info {
    font-size: 10px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,0.7);
    padding: 1px 5px;
    border-radius: 4px;
}

/* Въезд закрыт */
.entrance-closed {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    background: #dc2626;
    color: white;
}

/* ===== БЕНЗОВОЗ ===== */
.fuel-truck-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.6;
    background: #f59e0b;
    color: #1a1a1a;
    border: 1px solid #d97706;
}

/* ===== ЛАЙК ===== */
.like-container {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    cursor: pointer;
    padding: 1px 5px;
    border-radius: 4px;
    transition: background 0.2s;
    background: rgba(255,255,255,0.5);
}

.like-container:hover {
    background: rgba(255,255,255,0.9);
}

.like-container.liked {
    background: #fecaca;
}

.like-icon {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.2s;
}

.like-container:hover .like-icon {
    transform: scale(1.2);
}

.like-count {
    font-size: 10px;
    font-weight: 600;
    color: #374151;
}

/* ===== КНОПКА "ВНЕСТИ ДАННЫЕ" ===== */
.fuel-actions {
    text-align: center;
    margin-top: 4px;
}

.fuel-edit-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 4px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fuel-edit-btn:hover {
    background: #2563eb;
}

/* ===== МОДАЛЬНОЕ ОКНО (общее) ===== */
.fuel-modal {
    display: none !important;
    position: fixed !important;
    z-index: 99999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    animation: fadeIn 0.25s ease !important;
    -webkit-backdrop-filter: blur(2px) !important;
    backdrop-filter: blur(2px) !important;
}

.fuel-modal.show {
    display: block !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fuel-modal-content {
    background: white !important;
    margin: 25% auto !important;
    padding: 20px !important;
    border-radius: 12px !important;
    max-width: 340px !important;
    position: relative !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
    box-sizing: border-box !important;
}

.fuel-modal-close {
    position: absolute;
    right: 12px;
    top: 6px;
    font-size: 22px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.fuel-modal-close:hover {
    color: #333;
}

.fuel-modal-content h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #333;
    text-align: center;
}

.fuel-modal-content input[type="password"] {
    width: 100% !important;
    max-width: 280px !important;
    padding: 8px 12px !important;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    margin: 6px auto !important;
    display: block !important;
    box-sizing: border-box !important;
}

.fuel-modal-content input[type="password"]:focus {
    border-color: #3b82f6;
    outline: none;
}

.fuel-modal-content button {
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    display: block;
    margin: 0 auto;
}

.fuel-modal-content button:hover {
    background: #16a34a;
}

.fuel-error-message {
    color: #dc2626;
    margin-top: 8px;
    display: none;
    font-size: 13px;
    text-align: center;
}

/* ===== МОДАЛЬНОЕ ОКНО ПОДТВЕРЖДЕНИЯ ===== */
.fuel-confirm-modal .fuel-modal-content {
    max-width: 360px !important;
}

.fuel-confirm-modal .fuel-modal-content p {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

#fuel-confirm-name {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 12px;
}

#fuel-confirm-name:focus {
    border-color: #3b82f6;
    outline: none;
}

.confirm-submit-btn {
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.confirm-submit-btn:hover {
    background: #16a34a;
}

.confirm-cancel-btn {
    background: #e5e7eb;
    color: #333;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.confirm-cancel-btn:hover {
    background: #d1d5db;
}

.confirm-error {
    color: #dc2626;
    margin-top: 10px;
    display: none;
    text-align: center;
    font-size: 13px;
}

/* ===== ДЛЯ НЕАВТОРИЗОВАННЫХ ===== */
.fuel-stations-compact .fuel-station-row {
    justify-content: center;
    padding: 8px 12px;
    min-height: 36px;
}

.fuel-stations-compact .station-time {
    white-space: normal;
    text-align: center;
    flex: 1;
}

/* ===== ФОРМА РЕДАКТИРОВАНИЯ ===== */
.fuel-edit-container {
    max-width: 480px;
    width: 100%;
    margin: 16px auto;
    padding: 16px 20px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.fuel-edit-container h2 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 12px;
    width: 100%;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 12px;
    color: #333;
}

.form-group select,
.form-group input[type="text"] {
    width: 100% !important;
    padding: 6px 8px !important;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.form-group select:focus,
.form-group input[type="text"]:focus {
    border-color: #3b82f6;
    outline: none;
}

.fuel-checkboxes-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.fuel-checkboxes-row label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    cursor: pointer;
}

.fuel-extra {
    margin-top: 4px;
}

.fuel-extra label {
    color: #4b5563;
}

.fuel-checkboxes input[type="checkbox"] {
    width: 15px;
    height: 15px;
}

.fuel-hint {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
}

.form-message {
    margin-top: 8px;
    padding: 6px;
    border-radius: 4px;
    font-size: 12px;
}

.fuel-edit-container .button {
    width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.fuel-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 480px) {
    .fuel-station-row {
        padding: 4px 8px;
        min-height: 24px;
        font-size: 12px;
        border-radius: 4px;
        gap: 2px 4px;
    }
    
    .station-icon {
        font-size: 13px;
    }
    
    .station-header {
        gap: 2px 4px;
        flex-wrap: wrap;
    }
    
    .station-header-left {
        flex: 1 1 auto;
        min-width: 80px;
    }
    
    .station-header-right {
        flex: 0 1 auto;
        margin-left: 0;
    }
    
    .station-time {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .confirm-info {
        font-size: 9px;
        white-space: nowrap;
    }
    
    .confirm-btn {
        font-size: 9px;
        padding: 0 6px;
        min-width: 32px;
        height: 18px;
        border-radius: 8px;
        line-height: 1.4;
    }
    
    .station-details {
        padding: 2px 0 2px 0;
        gap: 3px;
        min-height: 20px;
    }
    
    .fuel-badge {
        font-size: 9px;
        padding: 0 5px;
        border-radius: 8px;
    }
    
    .queue-info {
        font-size: 9px;
        padding: 0 4px;
    }
    
    .entrance-closed {
        font-size: 9px;
        padding: 0 5px;
    }
    
    .fuel-truck-badge {
        font-size: 9px;
        padding: 0 6px;
        border-radius: 8px;
    }
    
    .like-container {
        padding: 1px 4px;
    }
    
    .like-icon {
        font-size: 11px;
    }
    
    .like-count {
        font-size: 9px;
    }
    
    .fuel-actions {
        margin-top: 3px;
    }
    
    .fuel-edit-btn {
        padding: 3px 12px;
        font-size: 11px;
    }
    
    /* ===== ФОРМА НА МОБИЛЬНЫХ ===== */
    .fuel-edit-container {
        max-width: 100%;
        margin: 10px 8px;
        padding: 12px 14px 16px;
        box-sizing: border-box;
    }
    
    .fuel-edit-container h2 {
        font-size: 16px;
        padding-bottom: 8px;
    }
    
    .fuel-checkboxes-row {
        gap: 4px 8px;
    }
    
    .fuel-checkboxes-row label {
        font-size: 11px;
    }
    
    .form-group select,
    .form-group input[type="text"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }
    
    .fuel-edit-container .button {
        font-size: 14px !important;
        padding: 12px !important;
    }
    
    /* ===== МОДАЛЬНОЕ ОКНО НА МОБИЛЬНЫХ ===== */
    .fuel-modal-content {
        margin: 30% 16px !important;
        padding: 20px !important;
    }
    
    .fuel-modal-content input[type="password"] {
        font-size: 16px !important;
        padding: 10px 12px !important;
        max-width: 100% !important;
    }
    
    .fuel-modal-content button {
        padding: 10px 20px !important;
        font-size: 16px !important;
        width: 100% !important;
    }
    
    .fuel-confirm-modal .fuel-modal-content {
        max-width: 100% !important;
        margin: 30% 16px !important;
    }
    
    .fuel-confirm-modal .fuel-modal-content input[type="text"] {
        font-size: 16px !important;
        padding: 10px 12px !important;
    }
    
    .confirm-submit-btn,
    .confirm-cancel-btn {
        font-size: 14px !important;
        padding: 10px 16px !important;
        flex: 1;
    }
}

/* ===== Teboil — сине-красный градиент ===== */
.fuel-station-row.station-teboil {
    background: linear-gradient(135deg, #73b0ff 0%, #ef4444 100%);
    border-left: 4px solid #dc2626;
}

.fuel-station-row.station-teboil .station-time,
.fuel-station-row.station-teboil .station-header,
.fuel-station-row.station-teboil .confirm-btn {
    color: #ffffff;
}

.fuel-station-row.station-teboil .confirm-btn {
    border-color: rgba(255,255,255,0.3);
}

.fuel-station-row.station-teboil .confirm-btn:hover {
    background: rgba(255,255,255,0.2);
}

.fuel-station-row.station-teboil .confirm-info {
    color: #fbbf24 !important;
}