/* ПВЗ Инспектор - Пользовательские стили */

:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

/* Общие стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

.min-vh-100 {
    min-height: 100vh !important;
}

/* Карточки */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Кнопки */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
}

/* Навигационная панель */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Формы */
.form-floating > .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.2s ease-in-out;
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

/* Алерты */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

/* Прогресс бар */
.progress {
    border-radius: 10px;
    height: 8px;
}

.progress-bar {
    border-radius: 10px;
}

/* Бейджи */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Модальные окна */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

/* Специальные стили для PWA */
.pwa-install-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 300px;
}

@media (max-width: 768px) {
    .pwa-install-banner {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Статистические карточки */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

.stats-card .stats-label {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Чек-лист стили */
.checklist-container {
    max-width: 600px;
    margin: 0 auto;
}

.checklist-item {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.checklist-question {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.checklist-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.answer-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.answer-btn {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 3px solid transparent;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
}

.answer-btn-yes {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-color: #28a745;
}

.answer-btn-yes:hover,
.answer-btn-yes.active {
    background: #28a745;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.answer-btn-no {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: white;
    border-color: #dc3545;
}

.answer-btn-no:hover,
.answer-btn-no.active {
    background: #dc3545;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Загрузка фото */
.photo-upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.2s ease-in-out;
    cursor: pointer;
}

.photo-upload-area:hover {
    border-color: var(--primary-color);
}

.photo-upload-area.dragover {
    border-color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.photo-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Геолокация */
.geolocation-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.875rem;
}

/* Прогресс проверки */
.inspection-progress {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .checklist-item {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .answer-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .stats-card .stats-number {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .photo-upload-area {
        padding: 1rem;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Темная тема (опционально) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #ffffff;
    }
    
    .card {
        background-color: #1e1e1e;
        color: #ffffff;
    }
    
    .form-control,
    .form-select {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #ffffff;
    }
    
    .form-control:focus,
    .form-select:focus {
        background-color: #2d2d2d;
        border-color: var(--primary-color);
        color: #ffffff;
    }
    
    .modal-content {
        background-color: #1e1e1e;
        color: #ffffff;
    }
    
    .navbar-dark {
        background-color: #1a1a1a !important;
    }
    
    .list-group-item {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #ffffff;
    }
}

/* Печать */
@media print {
    .navbar,
    .btn,
    .modal,
    .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white !important;
    }
}

/* Утилиты */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

.border-start-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-start-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-start-danger {
    border-left: 4px solid var(--danger-color) !important;
}

.border-start-warning {
    border-left: 4px solid var(--warning-color) !important;
}