/* Дополнительные мобильные стили для админ-панели ЖКХ */

/* Мобильная версия главной страницы (лендинг) */
@media (max-width: 992px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(253, 251, 248, 0.96);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(28, 36, 53, 0.08);
    }

    .header-container {
        padding: 12px 16px;
        gap: 12px;
    }

    .logo {
        gap: 10px;
    }

    .logo-mark {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 0.95rem;
        line-height: 1.1;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 16px;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
        flex-direction: column;
        gap: 10px;
    }

    .nav.is-open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 12px;
        border-radius: 12px;
        background: #f8fafc;
    }

    .header-actions {
        margin-left: auto;
    }

    .header-actions .btn {
        padding: 10px 14px;
        font-size: 0.85rem;
        border-radius: 12px;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .hero {
        padding: 96px 0 56px;
    }

    .hero .container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-content {
        text-align: left;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.18;
    }

    .hero p {
        font-size: 1.02rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-image img {
        border-radius: 20px;
        max-height: 240px;
        max-width: 100%;
        object-fit: cover;
    }

    .section {
        padding: 64px 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .about-content,
    .services-grid,
    .testimonials-grid,
    .cases-grid,
    .features-grid,
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .about-image {
        margin-top: 6px;
    }

    .preview-composition {
        gap: 12px;
    }

    .preview-shot {
        border-radius: 14px;
    }

    .preview-shot-main {
        max-height: 210px;
    }

    .preview-shot-dashboard {
        max-height: 150px;
    }

    .preview-shot-chat {
        max-height: 200px;
        display: none;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .stat-item {
        padding: 14px;
        border-radius: 16px;
    }

    .card {
        border-radius: 20px;
        padding: 22px;
    }

    .contact .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .contact-container {
        grid-template-columns: 1fr !important;
        gap: 18px;
        padding: 18px;
        border-radius: 22px;
    }

    .contact-info,
    .contact-form {
        width: 100%;
        min-width: 0;
    }

    .contact-item {
        align-items: flex-start;
        gap: 12px;
    }

    .contact-item a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .contact-form {
        padding: 16px;
        border-radius: 16px;
    }

    .contact-form .form-group {
        margin-bottom: 14px;
    }

    .contact-form input,
    .contact-form textarea {
        width: 100%;
        font-size: 16px;
        margin-bottom: 0;
    }

    .contact-form .btn {
        width: 100%;
        justify-content: center;
    }

    .footer {
        padding: 32px 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Улучшенная типографика для мобильных */
@media (max-width: 768px) {
    /* Базовые настройки */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        -webkit-touch-callout: none;
    }
    
    /* Улучшенные touch-таргеты */
    .btn, .form-control, .form-select, .badge {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Улучшенная читаемость */
    body {
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .preview-shot-dashboard {
        display: none;
    }

    .preview-shot-main {
        max-height: 190px;
    }

    .preview-shot-chat {
        max-height: 185px;
    }
    
    /* Улучшенные модальные окна */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-content {
        border-radius: 16px;
        border: none;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }
    
    .modal-header {
        border-radius: 16px 16px 0 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-bottom: none;
        padding: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        border-top: 1px solid #f0f0f0;
        padding: 1rem 1.5rem;
        border-radius: 0 0 16px 16px;
    }
    
    /* Улучшенные алерты */
    .alert {
        border-radius: 12px;
        border: none;
        padding: 1rem 1.25rem;
        margin-bottom: 1rem;
    }
    
    .alert-info {
        background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
        color: #0c5460;
    }
    
    .alert-success {
        background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
        color: #155724;
    }
    
    .alert-warning {
        background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
        color: #856404;
    }
    
    .alert-danger {
        background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
        color: #721c24;
    }
    
    /* Улучшенные тосты */
    .toast {
        border-radius: 12px;
        border: none;
        box-shadow: 0 8px 32px rgba(0,0,0,0.15);
        backdrop-filter: blur(10px);
    }
    
    .toast-header {
        border-radius: 12px 12px 0 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .toast-body {
        padding: 1rem 1.25rem;
    }
    
    /* Улучшенные спиннеры загрузки */
    .spinner-border {
        width: 3rem;
        height: 3rem;
        border-width: 0.3em;
    }
    
    .loading {
        padding: 3rem 1rem !important;
    }
    
    /* Улучшенная навигация */
    .navbar-brand {
        font-size: 1.1rem !important;
        font-weight: 600;
    }
    
    /* Улучшенные карточки статистики */
    .stats-card,
    .card.bg-warning,
    .card.bg-info,
    .card.bg-success,
    .card.bg-danger {
        transition: all 0.3s ease;
    }
    
    .stats-card:hover,
    .card.bg-warning:hover,
    .card.bg-info:hover,
    .card.bg-success:hover,
    .card.bg-danger:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    
    /* Улучшенные фильтры */
    .btn-group .btn {
        border-radius: 8px !important;
        margin: 0.1rem;
        transition: all 0.2s ease;
    }
    
    .btn-group .btn:hover {
        transform: translateY(-1px);
    }
    
    .btn-group .btn.active {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    /* Улучшенные поля ввода */
    .form-control:focus,
    .form-select:focus {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2) !important;
    }
    
    /* Улучшенная нижняя панель */
    .bottom-tabs {
        backdrop-filter: blur(10px);
        background: rgba(255,255,255,0.95);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    }
    
    .bottom-tabs .tab-btn {
        transition: all 0.2s ease;
        border-radius: 8px;
        margin: 0.25rem;
    }
    
    .bottom-tabs .tab-btn:hover {
        background: rgba(13, 110, 253, 0.1);
        transform: translateY(-1px);
    }
    
    .bottom-tabs .tab-btn.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    /* Анимации появления */
    .request-card {
        animation: slideInUp 0.3s ease-out;
    }
    
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Улучшенная прокрутка */
    .mobile-cards {
        scroll-behavior: smooth;
    }
    
    /* Улучшенные состояния загрузки */
    .request-card.loading {
        opacity: 0.7;
        pointer-events: none;
    }
    
    .request-card.loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        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); }
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .request-card {
        margin-bottom: 12px;
        padding: 12px;
    }
    
    .request-card .card-header {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    
    .request-card .request-number {
        font-size: 1rem;
    }
    
    .request-card .card-field {
        margin-bottom: 6px;
        font-size: 0.85rem;
    }
    
    .request-card .field-label {
        width: 70px;
        font-size: 0.8rem;
    }
    
    .request-card .card-actions {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .request-card .btn-action {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .bottom-tabs .tab-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.2rem;
    }
    
    .bottom-tabs .tab-btn i {
        font-size: 0.9rem;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding-bottom: 60px;
    }
    
    .bottom-tabs {
        height: 60px;
    }
    
    .bottom-tabs .tab-btn {
        padding: 0.3rem 0.2rem;
        font-size: 0.75rem;
    }
    
    .bottom-tabs .tab-btn i {
        font-size: 0.9rem;
        margin-bottom: 0.1rem;
    }
    
    .request-card {
        margin-bottom: 10px;
        padding: 10px;
    }
    
    .navbar {
        padding: 0.3rem 1rem;
    }
    
    .row.mb-4 {
        margin-bottom: 0.5rem !important;
    }
}

/* Темная тема (если поддерживается системой) */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .request-card {
        background: #2d3748;
        color: #e2e8f0;
        border-left-color: #4a5568;
    }
    
    .request-card .field-label {
        color: #a0aec0;
    }
    
    .request-card .field-value {
        color: #e2e8f0;
    }
    
    .bottom-tabs {
        background: rgba(45, 55, 72, 0.95);
        border-top-color: #4a5568;
    }
    
    .bottom-tabs .tab-btn {
        color: #a0aec0;
    }
    
    .bottom-tabs .tab-btn:hover {
        background: rgba(102, 126, 234, 0.2);
    }
}

/* Высокая плотность пикселей */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .request-card {
        box-shadow: 0 1px 6px rgba(0,0,0,0.12);
    }
    
    .btn {
        box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    }
}