/* Основные стили темы Default */

/* Переменные CSS */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Стили для фильтров в админке */
.input-group .form-select {
    border-color: var(--primary-color);
}

.input-group .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-group-text {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: 500;
}

/* Модальные окна */
.modal-dialog.modal-lg,
.modal-dialog.modal-xl {
    max-height: 90vh;
}

.modal-dialog.modal-lg .modal-content,
.modal-dialog.modal-xl .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-dialog.modal-lg .modal-body,
.modal-dialog.modal-xl .modal-body {
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 120px); /* Вычитаем высоту header и footer */
}

/* Специальные стили для модального окна просмотра фото */
.modal-dialog.modal-xl .modal-body,
.modal-dialog.modal-lg .modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-dialog.modal-xl .modal-body img,
.modal-dialog.modal-lg .modal-body img {
    width: auto;
    height: calc(90vh - 150px); /* Высота фото равна высоте окна минус header и footer */
    max-width: 100%;
    object-fit: contain;
}

/* Специальный класс для фотографий в модальном окне */
#modalPhoto {
    width: auto !important;
    height: calc(100vh - 150px) !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

/* Простой просмотрщик фото */
.photo-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-viewer-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
}

.photo-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10000;
}

.photo-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.photo-viewer-download {
    position: absolute;
    top: 20px;
    right: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10000;
}

.photo-viewer-download:hover {
    background: rgba(255, 255, 255, 0.3);
}

.photo-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10000;
}

.photo-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.photo-viewer-prev {
    left: 30px;
}

.photo-viewer-next {
    right: 30px;
}

.photo-viewer-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-dialog.modal-lg .modal-content,
    .modal-dialog.modal-xl .modal-content {
        max-height: 95vh;
    }
    
    .modal-dialog.modal-lg .modal-body,
    .modal-dialog.modal-xl .modal-body {
        max-height: calc(95vh - 100px);
    }
    
    .modal-dialog.modal-xl .modal-body img,
    .modal-dialog.modal-lg .modal-body img {
        height: calc(95vh - 120px); /* На мобильных высота фото также равна высоте окна */
        max-width: 100%;
    }
    
    #modalPhoto {
        height: calc(95vh - 120px) !important;
        max-width: 100% !important;
    }
    
    /* Адаптация просмотрщика фото для мобильных */
    .photo-viewer-close,
    .photo-viewer-download {
        top: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .photo-viewer-close {
        right: 10px;
    }
    
    .photo-viewer-download {
        right: 60px;
    }
    
    .photo-viewer-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .photo-viewer-prev {
        left: 15px;
    }
    
    .photo-viewer-next {
        right: 15px;
    }
    
    .photo-viewer-image {
        max-width: 95%;
        max-height: 95%;
    }
    
    .modal-header .d-flex {
        flex-wrap: wrap;
        gap: 1rem !important;
    }
    
    .modal-header .btn-group {
        flex-wrap: wrap;
    }
    
    /* Адаптация новых карточек для мобильных */
    .feedback-header {
        flex-direction: row;
        gap: 12px;
        text-align: left;
        padding: 12px !important;
        justify-content: flex-start;
        align-items: center;
    }
    
    .feedback-header-left,
    .feedback-header-right {
        width: auto;
        justify-content: flex-start;
    }
    
    .feedback-header-right {
        flex-direction: column;
        gap: 8px;
    }
    
    .feedback-body {
        padding: 12px !important;
    }
    
    .feedback-footer {
        flex-direction: column;
        gap: 6px;
        padding: 10px !important;
        text-align: center;
    }
    
    
    .feedback-actions-right {
        justify-content: center;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .user-meta {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
}

/* Общие стили */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Навигация — компактная, без фона, по ширине основного блока */
.navbar {
    background: transparent !important;
    box-shadow: none;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    box-sizing: border-box;
}

.navbar-toggler {
    border: 1px solid rgba(30, 58, 95, 0.3);
    padding: 0.25rem 0.5rem;
    color: #1e3a5f;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231e3a5f' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-collapse {
    margin-left: auto;
    flex-basis: 100%;
}

/* Ширина навбара как у .container на разных экранах */
@media (min-width: 576px) { .navbar { max-width: 540px; } }
@media (min-width: 768px) { .navbar { max-width: 720px; } }
@media (min-width: 992px) { .navbar { max-width: 960px; } }
@media (min-width: 1200px) { .navbar { max-width: 1140px; } }
@media (min-width: 1400px) { .navbar { max-width: 1320px; } }

.navbar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}
.navbar-brand-toggler {
    flex-wrap: nowrap;
    min-width: 0;
}
.navbar-brand-toggler .navbar-brand {
    flex-shrink: 1;
    min-width: 0;
}
.navbar-brand-toggler .navbar-toggler {
    flex-shrink: 0;
    margin-left: auto !important;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1rem;
}

.navbar-brand .navbar-logo,
.navbar-brand .navbar-brand-icon {
    height: 40px;
    width: auto;
}

.navbar-brand .navbar-logo {
    object-fit: contain;
}

.navbar-brand .navbar-brand-icon {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
}

.navbar .navbar-brand {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    color: #1e3a5f !important;
}
.navbar .navbar-brand small {
    color: #5a6c7d !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.35rem 0.75rem !important;
    border-radius: 5px;
    margin: 0 0.2rem;
    color: #1e3a5f !important;
}

.nav-link:hover {
    background-color: rgba(30, 58, 95, 0.08);
    color: #0f2744 !important;
}

.nav-link.active {
    background-color: rgba(30, 58, 95, 0.12) !important;
    color: #0f2744 !important;
    font-weight: 600;
}

/* Карточки */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fff !important;
    background-color: #fff !important;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

/* Формы */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s, box-shadow 0.3s;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

/* Обратная связь */
.feedback-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff !important;
}

.feedback-card .card-body {
    flex: 1;
}

.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.photo-gallery img {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.photo-gallery img:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Модальные окна */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

/* Админ панель */
.admin-sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--dark-color), #495057);
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    transition: all 0.3s;
    border-radius: 8px;
    margin: 0.2rem 0;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    transform: translateX(5px);
}

/* Таблицы */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Бейджи */
.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

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

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

/* Адаптивность */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-toggler {
        margin-left: auto;
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar {
        position: relative;
        z-index: 1030;
    }
    
    .navbar-brand-toggler {
        position: relative;
        z-index: 1040;
        gap: 1rem;
        /* padding-left: 0.5rem; */
        /* padding-right: 0.5rem; */
    }
    .navbar-brand {
        margin-right: 0.5rem;
    }
    .navbar-toggler {
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin-left: 0;
        padding: 3.25rem 1.5rem 1rem;
        text-align: right;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
        z-index: 1035;
        border-radius: 0 0 10px 10px;
        overflow-y: auto;
        max-height: 100vh;
    }
    
    .navbar-nav {
        margin-left: auto;
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        font-size: 1.1rem;
        padding: 0.8rem 1rem !important;
        margin: 0.3rem 0 !important;
        border-radius: 8px;
        display: block;
        width: 100%;
        text-align: center;
        background-color: rgba(30, 58, 95, 0.06);
        color: #1e3a5f !important;
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(30, 58, 95, 0.12);
        color: #0f2744 !important;
        transform: translateX(-5px);
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0; /* Убираем скругления, если карточка прилегает к краям */
    }
    
    .photo-gallery img {
        max-width: 80px;
        max-height: 80px;
    }
    
    /* Предотвращение выхода изображений за пределы экрана */
    img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }
    
    /* Адаптация видео и iframe */
    video,
    iframe,
    embed,
    object {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Адаптация форм */
    .form-control,
    .form-select {
        box-sizing: border-box;
    }
    
    /* Мобильная версия на всю ширину */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0rem;
    }
    .container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .container-fluid {
        padding: 0 8px !important;
    }
    
    /* Предотвращение горизонтального скролла только для body */
    body {
        overflow-x: hidden;
    }
    
    /* Ограничение ширины только для медиа-элементов */
    img, video, iframe, embed, object {
        max-width: 100%;
        height: auto;
    }
    
    /* Убеждаемся, что контент виден */
    .container,
    .container-fluid,
    .feedback-form-container,
    .card,
    .row {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Убираем отступы для мобильных */
    .row {
        /* margin-left: -5px !important; */
        /* margin-right: -5px !important; */
    }
    
    .col-xs-12,
    .col-md-10,
    .col-md-2 {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    
    /* Форма на всю ширину */
    .feedback-form-container {
        margin: 0 !important;
        padding: 10px !important; /* Небольшой внутренний отступ для формы, чтобы текст не лип к экрану */
    }
    
    /* Карточки отзывов на всю ширину */
    .feedback-card,
    .feedback-card-modern,
    .feedback-card-public {
        margin: 0 0 1rem 0 !important;
        border-radius: 0 !important;
        border-right: none !important;
        border-left: none !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
    }
    
    /* Админ панель на всю ширину */
    .admin-panel {
        margin: 5px 0 !important;
        padding: 10px !important;
    }
    
    /* Таблицы на всю ширину */
    .table-responsive {
        margin: 0 !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table td,
    .table th {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Модальные окна на всю ширину */
    .modal-dialog {
        margin: 0.25rem !important;
        max-width: calc(100% - 0.5rem) !important;
    }
    
    /* Минимальные отступы для страницы отзывов */
    .feedback-page {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .feedback-page .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .feedback-page .row {
        /* margin-left: 0 !important; */
        /* margin-right: 0 !important; */
    }
    
    .feedback-page .col-lg-10,
    .feedback-page .col-xl-8 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Исправление кнопок на странице успешной отправки */
    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .form-actions .submit-btn,
    .form-actions .view-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 !important;
        text-align: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-actions .submit-btn.me-3,
    .form-actions .view-btn {
        margin-right: 0 !important;
    }
}

/* Утилиты */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--info-color)) 1;
}

/* Стили для упрощенной формы отзывов */
/* Серый фон с изображением на всю страницу */
body {
    background: 
        linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(233, 236, 239, 0.8) 100%),
        url('/themes/default/img/fon.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.feedback-page {
    padding: 1.5rem 0;
}

.feedback-form-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.15);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: none;
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem 2rem 2rem;
    margin: -1.5rem -1.5rem 2rem -1.5rem;
    border-radius: 15px 15px 0 0;
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 15px 15px 0 0;
}

.form-header h2 {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.form-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: rgba(255,255,255,0.8);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.form-header p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.form-header .location-info {
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.form-header .location-info .alert {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.form-header .location-info .alert i {
    color: rgba(255,255,255,0.9);
}

.form-header .location-info strong {
    color: white;
    font-weight: 600;
}

.form-header .location-info small {
    color: rgba(255,255,255,0.8);
}

.feedback-form {
    max-width: 100%;
}

/* Компактные стили для полей формы */
.feedback-form .form-control {
    padding: 0.85rem 1.1rem;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.feedback-form .form-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.feedback-form .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.feedback-form .mb-3 {
    margin-bottom: 1.5rem !important;
}

.feedback-form .mb-4 {
    margin-bottom: 1.75rem !important;
}

/* Стили для описания формы */
.form-description {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1rem;
}

.form-description p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.form-group input,
.form-group textarea, .form-select{
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group-recipient {
    margin-bottom: 1.25rem;
}
.form-group-recipient label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.form-group-recipient .form-select {
    padding: 12px 18px;
    font-size: 1rem;
}
.form-group-recipient .form-text {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.form-actions .submit-btn,
.form-actions .view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    text-decoration: none;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    text-decoration: none;
}

.submit-btn:focus,
.submit-btn:active {
    text-decoration: none;
    outline: none;
}

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

/* Большие заметные кнопки пагинации */
.pagination {
    margin: 0;
    gap: 8px;
    justify-content: center;
}

.pagination .page-link {
    color: #4b5563;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    margin: 0;
    min-width: 50px;
    height: 50px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination .page-link:hover {
    color: #1f2937;
    background-color: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.pagination .page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
    color: white;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
}

.pagination .page-item.active .page-link:hover {
    background: #5a67d8;
    border-color: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pagination .page-item.disabled .page-link {
    color: #d1d5db;
    background: #f9fafb;
    border-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination .page-link:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Стрелки навигации - большие и заметные */
.pagination .page-link[aria-label="Предыдущая"],
.pagination .page-link[aria-label="Следующая"] {
    font-size: 1.3rem;
    font-weight: 700;
    width: 50px;
    height: 50px;
    padding: 0;
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.pagination .page-link[aria-label="Предыдущая"]:hover,
.pagination .page-link[aria-label="Следующая"]:hover {
    background: #5a67d8;
    border-color: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Большая кнопка CTA для отзывов */
.feedback-cta-btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 8px;
    background: #667eea;
    border: 1px solid #667eea;
    color: white;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feedback-cta-btn::before {
    content: none;
}

.feedback-cta-btn:hover {
    background: #5a67d8;
    border-color: #5a67d8;
    color: white;
    text-decoration: none;
}

.feedback-cta-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.feedback-cta-btn .fas {
    font-size: 1rem;
}

.view-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
}

.view-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Стили для страницы успешной отправки */
.success-message {
    padding: 2rem 1rem;
}

.success-message .lead {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.6;
}

/* Стили для кастомного чекбокса согласия */
.custom-checkbox-wrapper {
    margin-top: 1.5rem;
    position: relative;
}

.custom-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
    user-select: none;
}

.custom-checkbox-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    height: 22px;
    width: 22px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 2px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.custom-checkbox-label::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.custom-checkbox:checked + .custom-checkbox-label::before {
    background: linear-gradient(145deg, var(--primary-color), #0056b3);
    border-color: var(--primary-color);
    box-shadow: 
        0 4px 8px rgba(0, 123, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.custom-checkbox:checked + .custom-checkbox-label::after {
    transform: rotate(45deg) scale(1);
}

.custom-checkbox:focus + .custom-checkbox-label::before {
    box-shadow: 
        0 0 0 3px rgba(0, 123, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.custom-checkbox-label:hover::before {
    border-color: var(--primary-color);
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.custom-checkbox-text {
    display: inline-block;
    white-space: nowrap;
}

.custom-checkbox-text--error {
    color: #dc3545 !important;
    font-weight: 600;
}

.agreement-error-msg {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.35rem;
}

.agreement-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.agreement-link:hover {
    color: var(--info-color);
    text-decoration: none;
}

/* Стили для карточек отзывов */
.feedback-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    height: auto;
    background: #fff !important;
    background-color: #fff !important;
}

.feedback-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.feedback-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.feedback-card .card-body {
    padding: 1rem;
}

.feedback-content {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}


.btn-group-toggle .btn-check:checked + .btn {
    background-color: var(--bs-btn-color);
    border-color: var(--bs-btn-border-color);
    color: white;
}

.btn-group-toggle .btn-check:checked + .btn-outline-success {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.btn-group-toggle .btn-check:checked + .btn-outline-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.btn-group-toggle .btn-check:checked + .btn-outline-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

.response-preview {
    border-left: 3px solid #28a745;
    font-size: 0.75rem;
    line-height: 1.3;
    max-height: 120px;
    overflow: hidden;
}

/* Стили для фотографий в админ панели */
.admin-photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 4px;
    margin-top: 4px;
    max-width: 100%;
    max-height: 128px;
}

.admin-photo-gallery img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    justify-self: center;
}

.admin-photo-gallery img:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* Стили для галереи с большим количеством фото */
.admin-photo-gallery.has-many-photos {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    max-width: 100%;
    max-height: 140px;
    position: relative;
}

.admin-photo-gallery.has-many-photos img:nth-child(n+5) {
    display: none;
}

.admin-photo-gallery.has-many-photos::after {
    content: "+" attr(data-remaining);
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-photo-gallery.has-many-photos::after:hover {
    background: rgba(0, 123, 255, 0.8);
}

/* Современные стили карточек отзывов */
.feedback-card-modern {
    background: #fff !important;
    background-color: #fff !important;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: visible;
    position: relative;
    z-index: 1;
}
.feedback-card-modern:has(.dropdown.show) {
    z-index: 100;
}

.feedback-card-modern:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Цветовые оттенки карточек по статусам */
.feedback-card-modern.card-approved {
    background: linear-gradient(135deg, #fff 0%, #f8fff9 100%) !important;
    background-color: #fff !important;
    border-left: 4px solid #28a745;
}

.feedback-card-modern.card-pending {
    background: linear-gradient(135deg, #fff 0%, #fffef8 100%) !important;
    background-color: #fff !important;
    border-left: 4px solid #ffc107;
}

.feedback-card-modern.card-rejected {
    background: linear-gradient(135deg, #fff 0%, #fff8f8 100%) !important;
    background-color: #fff !important;
    border-left: 4px solid #dc3545;
}

.feedback-card-modern.card-with-response {
    background: linear-gradient(135deg, #fff 0%, #f8fcff 100%) !important;
    background-color: #fff !important;
    border-left: 4px solid #17a2b8;
}

/* Hover эффекты для цветных карточек */
.feedback-card-modern.card-approved:hover {
    background: linear-gradient(135deg, #fff 0%, #f0fff2 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.15);
}

.feedback-card-modern.card-pending:hover {
    background: linear-gradient(135deg, #fff 0%, #fffdf0 100%);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.15);
}

.feedback-card-modern.card-rejected:hover {
    background: linear-gradient(135deg, #fff 0%, #fff0f0 100%);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.15);
}

.feedback-card-modern.card-with-response:hover {
    background: linear-gradient(135deg, #fff 0%, #f0f9ff 100%);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.15);
}

/* Простое модальное окно для просмотра фото */
.simple-photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.simple-photo-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.simple-photo-modal .modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10000;
}

.simple-photo-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.simple-photo-modal .modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.simple-photo-modal .modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.simple-photo-modal .modal-prev,
.simple-photo-modal .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.simple-photo-modal .modal-prev {
    left: -70px;
}

.simple-photo-modal .modal-next {
    right: -70px;
}

.simple-photo-modal .modal-prev:hover,
.simple-photo-modal .modal-next:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .simple-photo-modal .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .simple-photo-modal .modal-prev {
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .simple-photo-modal .modal-next {
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .simple-photo-modal .modal-content {
        max-width: 95vw;
        max-height: 85vh;
    }
}

/* Заголовок карточки */
.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.feedback-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.feedback-checkbox-wrapper .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.feedback-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feedback-address-block .user-avatar.user-avatar-icon {
    width: auto;
    height: auto;
    min-width: unset;
    background: none !important;
    border: none;
    box-shadow: none;
    color: #6c757d;
    font-size: 13px;
    flex-shrink: 0;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.2;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #6c757d;
}

.phone-number {
    display: flex;
    align-items: center;
    gap: 4px;
}

.phone-number i,
.ip-address i {
    font-size: 1em;
    opacity: 0.85;
}

.ip-address {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.feedback-bar .ip-address {
    font-family: inherit;
}



/* Стили для информации о получателе в футере */
.recipient-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.recipient-label {
    color: #495057;
    font-weight: 600;
}

.recipient-name {
    color: #007bff;
    font-weight: 600;
}

.recipient-position {
    color: #6c757d;
    font-style: italic;
}

/* Стили для компактного блока локации */
.location-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 0 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 1rem;
    margin-bottom: 0rem;
    text-align: center;
    color: #fff!important;
}

.location-badge {
    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    backdrop-filter: blur(10px);
}

.location-address,
.location-phone {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    color: #fff !important;
}

@media (max-width: 768px) {
    .location-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .location-address,
    .location-phone {
        margin-left: 0 !important;
    }
}

.feedback-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: right;
}

.feedback-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.date-primary {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

.date-secondary {
    font-size: 12px;
    color: #6c757d;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.feedback-id .id-label,
.feedback-bar-id .id-label {
    color: #212529;
    font-weight: 500;
}

/* Тело карточки */
.feedback-body {
    padding: 24px;
}

.feedback-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feedback-message {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.message-content {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

/* Фотографии в карточке */
.feedback-photos {
    margin-top: 16px;
}

.photos-header {
    margin-bottom: 12px;
}

.photos-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e9ecef;
    transition: opacity 0.2s ease;
}

.photo-item:hover {
    opacity: 0.8;
}

.photo-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f8f9fa;
    border-radius: 8px;
}

.photo-thumbnail[loading="lazy"] {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: loading-shimmer 1.5s infinite linear;
}

@keyframes loading-shimmer {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}


.photo-number {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.no-photos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #adb5bd;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    text-align: center;
}

.no-photos i {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Ответ на отзыв */
.feedback-response {
    margin-top: 20px;
    background: #e8f4fd;

    padding: 16px;

}

.response-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.response-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.response-info {
    flex-grow: 1;
}

.response-author {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.2;
}

.response-position {
    font-size: 12px;
    color: #6c757d;
}

.response-date {
    font-size: 11px;
    color: #adb5bd;
}

.response-content {
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
}

/* Единый блок карточки отзыва: данные и действия */
.feedback-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px 20px;
    padding: 16px 24px;
    min-width: 0;
    overflow-x: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.feedback-bar-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-family: inherit;
}

.feedback-bar-checkbox .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.feedback-address-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}
.feedback-address-block .address-from {
    flex: 1 1 auto;
    min-width: 0;
}
.feedback-address-block .address-to {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}
.feedback-address-block .user-avatar-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    vertical-align: middle;
}
.feedback-address-block .phone-number {
    display: inline-flex;
}

.feedback-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.feedback-bar-ip {
    white-space: nowrap;
}

.feedback-bar-date {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.feedback-bar-date .date-inline {
    display: inline-flex;
    align-items: center;
    color: #495057;
}
.feedback-bar-date .date-inline:first-child {
    font-weight: 600;
    color: #212529;
}

.feedback-bar-status {
    flex: 0 0 auto;
}

.feedback-bar .status-badge {
    font-size: 13px;
}
.feedback-bar .action-btn {
    font-size: 13px !important;
}
.feedback-bar .action-btn span {
    font-size: inherit;
}
.feedback-bar-actions {
    gap: 8px;
    position: relative;
    z-index: 1050;
}
.feedback-bar-actions .dropdown-menu {
    z-index: 1060 !important;
    min-width: 200px;
}
.feedback-bar-actions .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}
.feedback-bar-actions .dropdown-item i {
    width: 1.25em;
    text-align: center;
    flex-shrink: 0;
}
.feedback-bar-actions .dropdown-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Подвал карточки (оставлен для совместимости, скрыт при использовании feedback-bar) */
.feedback-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
}

.feedback-actions-left {
    display: flex;
    align-items: center;
}

.feedback-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}


.action-btn {
    border-radius: 20px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.action-btn span {
    margin-left: 4px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.photo-info {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}

/* Адаптивность для формы */
@media (max-width: 768px) {
    .feedback-form-container {
        padding: 0 !important;
        margin: 0;
    }
    
    .form-header {
        padding: 1rem 0.75rem 1rem;
        margin: -0.75rem -0.75rem 1rem -0.75rem;
    }
    
    .form-header h2 {
        font-size: 1.8rem;
        margin-top: 2rem;
    }
    
    /* Увеличенный отступ сверху для всех заголовков h2 на мобильной версии */
    h2 {
        margin-top: 2rem !important;
    }
    
    .form-header p {
        font-size: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group-recipient {
        max-width: 100%;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group .form-select {
        padding: 0.9rem 1rem;
    }
    
    .submit-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .custom-checkbox-label {
        font-size: 0.8rem;
        padding-left: 28px;
        line-height: 1.3;
    }
    
    .custom-checkbox-label::before {
        height: 18px;
        width: 18px;
    }
    
    .custom-checkbox-label::after {
        left: 5px;
        top: 2px;
        width: 4px;
        height: 8px;
    }
    
    .custom-checkbox-text {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        line-height: 1.3 !important;
        display: block !important;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
    .custom-checkbox-label {
        font-size: 0.75rem;
        padding-left: 25px;
        line-height: 1.2;
    }
    
    .custom-checkbox-label::before {
        height: 16px;
        width: 16px;
    }
    
    .custom-checkbox-label::after {
        left: 4px;
        top: 1px;
        width: 3px;
        height: 7px;
    }
    
    .custom-checkbox-text {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
    
    /* Увеличенный отступ сверху для заголовков h2 на очень маленьких экранах */
    h2 {
        margin-top: 2rem !important;
    }
}

@media (max-width: 768px) {
    /* Адаптивность карточек отзывов для мобильных */
    .feedback-card .card-header {
        padding: 0.5rem 0.75rem;
    }

    .feedback-card .card-body {
        padding: 0.75rem;
    }

    .feedback-card .col-6 {
        flex: 0 0 auto;
        width: 50%;
    }

    .feedback-card .col-3 {
        flex: 0 0 auto;
        width: 25%;
        text-align: center;
    }

    .feedback-card .col-2 {
        flex: 0 0 auto;
        width: 25%;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .btn-group .btn {
        margin-bottom: 2px;
        margin-left: 0 !important;
        flex: 1;
        min-width: 0;
    }

    .feedback-content {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .admin-photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        max-width: 100%;
        max-height: 112px;
        gap: 3px;
        margin-top: 3px;
    }

    .admin-photo-gallery img {
        width: 52px;
        height: 52px;
    }

    .admin-photo-gallery.has-many-photos::after {
        width: 52px;
        height: 52px;
        font-size: 10px;
    }
}

/* ===== СТИЛИ ПУБЛИЧНЫХ КАРТОЧЕК ОТЗЫВОВ (v3 — медицинский/клинический стиль) ===== */
.feedback-page-title {
    text-align: center;
    color: #667eea;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

.feedback-page-subtitle {
    text-align: center;
    color: #5a6c7d;
    font-size: 0.95rem;
}

.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    align-items: stretch;
}

.feedback-grid .feedback-card-public {
    display: flex;
}

.feedback-card-public.feedback-card-v2 {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.feedback-card-public .feedback-card-inner {
    background: #fff;
    border-radius: 0 0 12px 12px;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid #e9ecff;
    box-shadow: 0 1px 3px rgba(30, 58, 95, 0.04);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.feedback-card-public .feedback-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.feedback-card-public:hover .feedback-card-inner {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08);
    border-color: #c7d2fe;
}

.feedback-header-public {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.user-avatar-public {
    width: 42px;
    height: 42px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.user-info-public {
    flex: 1;
    min-width: 0;
}

.user-name-public {
    margin: 0 0 0.15rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a5f;
}

.feedback-date-public {
    font-size: 0.8rem;
    color: #64748b;
}

.feedback-content-public {
    padding: 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feedback-text-public {
    color: #334155;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.9rem;
}

.feedback-photos-public {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.feedback-photos-public img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.feedback-photos-public img:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.feedback-response-public {
    background: #f5f3ff;
    border-radius: 0;
    padding: 1rem 1.5rem;
}

.feedback-response-public .response-header-public {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.feedback-response-public .response-avatar-public {
    width: 28px;
    height: 28px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.feedback-response-public .response-info-public {
    flex: 1;
    min-width: 0;
}

.feedback-response-public .response-author-public {
    color: #5b21b6;
    font-size: 0.85rem;
    display: block;
}

.feedback-response-public .response-position-public,
.feedback-response-public .response-date-public {
    color: #64748b;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.1rem;
}

.feedback-response-public .response-text-public {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.feedback-card-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.feedback-read-more {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: transparent !important;
    border: 2px solid #667eea !important;
    color: #667eea !important;
}

.feedback-read-more:hover {
    background: #667eea !important;
    border-color: #667eea !important;
    color: #fff !important;
}

/* Адаптивность для публичных карточек v2 */
@media (max-width: 768px) {
    .feedback-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        min-width: 0;
    }
    
    .feedback-card-public .feedback-card-inner {
        padding: 0;
    }
    
    .feedback-header-public,
    .feedback-content-public {
        padding: 0.75rem 1rem;
    }
    
    .feedback-response-public {
        padding: 0.75rem 1rem;
    }
    
    .feedback-card-footer {
        padding: 0.75rem 1rem;
    }
    
    .feedback-photos-public img {
        width: 80px;
        height: 80px;
    }
}

/* ===== Страница одного отзыва (feedback?id=) ===== */
.feedback-page .feedback-page-title {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.feedback-page .feedback-card-public.feedback-card-v2 {
    margin-bottom: 0;
}

.feedback-page .feedback-card-inner {
    border-radius: 0 0 12px 12px;
}

.feedback-page .feedback-text-public {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 0;
}

.feedback-page .feedback-photos-public {
    margin-top: 1rem;
    gap: 0.75rem;
}

.feedback-page .feedback-photos-public img {
    cursor: pointer;
    max-height: 280px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.feedback-page .feedback-response-public {
    margin-top: 0;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .feedback-page .feedback-page-title {
        font-size: 1.75rem;
    }
    
    .feedback-page .feedback-photos-public img {
        max-height: 200px;
    }
    
    .feedback-page .row.mt-4.mb-5 .btn {
        min-height: 44px;
    }
}

/* ===== PRIVACY POLICY STYLES ===== */
.privacy-page {
    background: transparent;
    min-height: 100vh;
    padding: 2rem 0;
}

.privacy-container {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.privacy-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.privacy-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.privacy-header p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

.section {
    margin-bottom: 2rem;
}

.section h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid #007bff;
}

.section h3 {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
}

.section p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.section ul {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.section li {
    margin-bottom: 0.5rem;
}

.highlight {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin: 1rem 0;
}

.contact-info {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
}

.contact-info h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    margin-bottom: 1px;
    transition: background-color 0.2s ease;
}

.contact-item:first-child {
    border-radius: 6px 6px 0 0;
}

.contact-item:last-child {
    border-radius: 0 0 6px 6px;
    margin-bottom: 0;
}

.contact-item:hover {
    background: #f8f9fa;
}

.contact-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 120px;
    margin-right: 1rem;
}

.contact-value {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 500;
}

.contact-value a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.contact-value a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.privacy-content, 
.cookie-content {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ===== HEADER EMBEDDED STYLES ===== */
/* Sticky Footer */
html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
}

/* ===== LOGIN PAGE STYLES ===== */
.login-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== DASHBOARD CARD HOVER STYLES ===== */
.card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-hover:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.card-hover:hover .text-primary {
    color: #0056b3 !important;
}

.card-hover:hover .text-warning {
    color: #e0a800 !important;
}

.card-hover:hover .text-success {
    color: #1e7e34 !important;
}

.card-hover:hover .text-info {
    color: #117a8b !important;
}

.card-hover:hover .text-danger {
    color: #bd2130 !important;
}

.card-hover:hover .text-secondary {
    color: #5a6268 !important;
}

/* Унификация размеров кнопок фильтров в админке */
.d-flex.gap-2.align-items-center.justify-content-end .input-group {
    min-width: 180px !important;
    max-width: 250px !important;
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group .form-select {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group-text {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
    white-space: nowrap;
}

/* Уникальные цвета для каждой кнопки фильтра */
.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(1) .input-group-text {
    background-color: #e3f2fd;
    color: #1976d2;
    border-color: #1976d2;
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(1) .form-select {
    border-color: #1976d2;
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(1) .form-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(2) .input-group-text {
    background-color: #e8f5e8;
    color: #2e7d32;
    border-color: #2e7d32;
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(2) .form-select {
    border-color: #2e7d32;
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(2) .form-select:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(3) .input-group-text {
    background-color: #fff3e0;
    color: #f57c00;
    border-color: #f57c00;
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(3) .form-select {
    border-color: #f57c00;
}

.d-flex.gap-2.align-items-center.justify-content-end .input-group:nth-child(3) .form-select:focus {
    border-color: #f57c00;
    box-shadow: 0 0 0 0.2rem rgba(245, 124, 0, 0.25);
}

/* Адаптивность для фильтров админки */
@media (max-width: 1200px) {
    .d-flex.gap-2.align-items-center.justify-content-end .input-group {
        min-width: 160px !important;
        max-width: 160px !important;
    }
}

@media (max-width: 768px) {
    .d-flex.gap-2.align-items-center.justify-content-end {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    .d-flex.gap-2.align-items-center.justify-content-end .input-group {
        min-width: 140px !important;
        max-width: 140px !important;
        margin-bottom: 0.5rem;
    }
    
    /* Центрирование всего футера */
    footer {
        text-align: center !important;
    }
    
    footer .container {
        text-align: center !important;
    }
    
    footer .row {
        text-align: center !important;
        justify-content: center !important;
    }
    
    footer .row .col-lg-9,
    footer .row .col-lg-3,
    footer .row .col-lg-6,
    footer .row .col-md-6,
    footer .row .col-md-12 {
        text-align: center !important;
    }
    
    footer .row .col-lg-9.text-start,
    footer .row .col-lg-3.text-end {
        text-align: center !important;
    }
    
    footer h5,
    footer h6,
    footer p,
    footer ul,
    footer li {
        text-align: center !important;
    }
    
    footer ul {
        display: inline-block !important;
        text-align: center !important;
    }
    
    footer li {
        text-align: center !important;
    }
    
    /* Предотвращение выхода блоков за пределы экрана */
    footer {
        word-wrap: break-word;
    }
    
    footer .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    footer .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    footer .col-lg-6,
    footer .col-lg-3,
    footer .col-md-6,
    footer .col-md-12 {
        padding-left: 6px !important;
        padding-right: 6px !important;
        margin-bottom: 0.5rem;
    }
    
    /* Предотвращение переполнения текста */
    footer p,
    footer h5,
    footer h6,
    footer a {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Адаптация длинных ссылок и текста */
    footer a {
        white-space: normal;
    }
    
    /* Улучшение отображения списков */
    footer ul {
        padding-left: 0;
        list-style: none;
    }
    
    footer li {
        margin-bottom: 0.5rem;
        word-wrap: break-word;
    }
}

/* ===== ПРИНУДИТЕЛЬНЫЙ БЕЛЫЙ ФОН ДЛЯ КАРТОЧЕК ОТЗЫВОВ ===== */
.feedback-card-public:not(.feedback-card-v2) {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.feedback-card-public .feedback-content-public {
    background: transparent !important;
}

.feedback-card-public:not(.feedback-card-v2) .feedback-header-public {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* ===== СТИЛИ ДЛЯ ОТЗЫВОВ СНЯТЫХ С ОДОБРЕНИЯ ===== */
.feedback-card-modern.card-pending {
    border-left: 4px solid #ffc107;

}

.feedback-card-modern.card-pending .feedback-bar {
    color: #ffffff;
}

.feedback-card-modern.card-pending .status-badge.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ff9800;
    border: 1px solid #ffc107;
}

.feedback-card-modern.card-pending .status-badge.status-pending i {
    color: #ff9800;
}

/* Специальный стиль для отзывов, которые были одобрены, но потом сняты с одобрения */
.feedback-card-modern.card-pending.was-approved {
    border-left: 4px solid #ff5722;
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
}

.feedback-card-modern.card-pending.was-approved .feedback-bar {
    background: linear-gradient(135deg, #ff5722 0%, #e91e63 100%);
}

.feedback-card-modern.card-pending.was-approved .status-badge.status-pending {
    background: rgba(255, 87, 34, 0.2);
    color: #ff5722;
    border: 1px solid #ff5722;
}

.feedback-card-modern.card-pending.was-approved .status-badge.status-pending i {
    color: #ff5722;
}

/* ===== ГЛАВНАЯ СТРАНИЦА (HOME) ===== */
.home-hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.feedback-page .home-hero {
    margin-bottom: 0;
}

.feedback-form-with-hero {
    overflow: hidden;
    border-radius: 15px;
    padding: 0;
}

.feedback-form-with-hero .home-hero {
    border-radius: 15px 15px 0 0;
}

.feedback-form-with-hero .feedback-form-body {
    padding: 3rem 2.5rem;
    background: white;
}

.feedback-form-with-hero .feedback-form-body .form-group {
    margin-bottom: 2rem;
}

.feedback-form-with-hero .feedback-form-body .form-actions {
    margin-top: 2.5rem;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.home-hero .container {
    position: relative;
    z-index: 1;
}

.feedback-form-with-hero .home-hero {
    padding-left: 50px;
}

.home-hero-row {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.home-hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.home-hero-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 0;
    line-height: 1.6;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-hero-primary {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: #5a67d8;
}

.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.9);
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateY(-2px);
}

.home-hero-illustration {
    font-size: 6rem;
    opacity: 0.2;
}

.home-features {
    background: transparent;
}

.home-section-title {
    color: #1e3a5f;
    font-weight: 600;
    font-size: 1.75rem;
}

.home-feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.home-feature-card:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.12);
    border-color: #93c5fd;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.home-feature-card h3 {
    color: #1e3a5f;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.home-feature-card p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.home-cta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2.5rem;
    color: white;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.home-cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.home-cta-text {
    opacity: 0.95;
    margin: 0;
    font-size: 1rem;
}

.home-cta-link {
    color: white;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.home-cta-link:hover {
    color: #e0e7ff;
}

.btn-cta-large {
    background: white;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-cta-large:hover {
    background: #e0e7ff;
    color: #4f46e5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .home-hero-title {
        font-size: 2rem;
    }
    
    .home-hero-subtitle {
        font-size: 1rem;
    }
    
    .home-hero-actions {
        flex-direction: column;
    }
    
    .btn-hero-primary,
    .btn-hero-outline {
        width: 100%;
        text-align: center;
    }
    
    .home-cta-card .row {
        text-align: center;
    }
    
    .home-cta-card .col-lg-4 {
        margin-top: 1rem;
    }
    
    .btn-cta-large {
        width: 100%;
    }
}

/* ===== MATERIALPRO ADMIN STYLES ===== */
.admin-page .mp-stats-card {
    border-radius: 12px;
    transition: all 0.3s ease;
}
.admin-page .mp-stats-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}
.admin-page .mp-icon-wrap {
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-page .card {
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
}
.admin-page .card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}
.admin-page .btn {
    border-radius: 8px;
    font-weight: 500;
}
.admin-page .rounded-3 {
    border-radius: 12px !important;
}

/* Отключить приподнимание при наведении на странице /admin */
.admin-page .card:hover,
.admin-page .card-hover:hover,
.admin-page .btn:hover,
.admin-page .btn-primary:hover,
.admin-page .btn-outline-warning:hover,
.admin-page .btn-outline-success:hover,
.admin-page .btn-outline-primary:hover,
.admin-page .btn-outline-secondary:hover,
.admin-page .btn-outline-info:hover,
.admin-page .action-btn:hover,
.admin-page .feedback-card:hover,
.admin-page .feedback-card-modern:hover {
    transform: none !important;
}

/* ===== РАСШИРЕННАЯ МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
/* Safe area для устройств с вырезами (iPhone X+) */
@supports (padding: max(0px)) {
    .navbar .container { padding-left: max(0.5rem, env(safe-area-inset-left)); padding-right: max(0.5rem, env(safe-area-inset-right)); }
    main.container { padding-left: max(0.5rem, env(safe-area-inset-left)) !important; padding-right: max(0.5rem, env(safe-area-inset-right)) !important; }
}

/* Планшеты и средние экраны */
@media (max-width: 991px) {
    .navbar { max-width: 100%; }
    .navbar-brand .navbar-logo,
    .navbar-brand .navbar-brand-icon {
        height: 40px;
    }
    .feedback-form-with-hero .home-hero { padding: 1rem; }
    .feedback-form-with-hero .feedback-form-body { padding: 1rem 0.75rem; }
    .feedback-form-with-hero .home-hero-row { padding: 0.75rem 0; }
    .admin-content .flex-grow-1 { padding: 1rem; }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    main.container { margin-top: 0.75rem !important; margin-bottom: 0.75rem !important; }
    .feedback-page { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }

    /* Тени для мобильных */
    .feedback-form-container,
    .feedback-form-with-hero {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }
    .card,
    .feedback-card-public .feedback-card-inner {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    .navbar-brand .navbar-logo,
    .navbar-brand .navbar-brand-icon {
        height: 40px;
    }
    .navbar-brand span { font-size: 0.95rem; }
    .navbar-brand small { font-size: 0.6em !important; }
    
    /* Пагинация — компактнее на мобильных */
    .pagination .page-link {
        padding: 10px 12px;
        min-width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }
    .pagination .page-link[aria-label="Предыдущая"],
    .pagination .page-link[aria-label="Следующая"] {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    /* Страница Privacy */
    .privacy-container {
        padding: 1rem 0.75rem;
        margin: 0.5rem 0.25rem;
    }
    .privacy-header h1 { font-size: 1.75rem; }
    .section h2 { font-size: 1.25rem; padding-left: 0.75rem; }
    .contact-item { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .contact-label { min-width: auto; }
    
    /* Минимальный размер touch-целей (44px) для удобства на мобильных */
    .btn:not(.btn-sm), .nav-link, .action-btn {
        min-height: 44px;
    }
    .form-control, .form-select { min-height: 44px; }
    
    /* Главная hero и форма */
    .home-hero-row { padding: 0.75rem 0; }
    .feedback-form-with-hero .feedback-form-body { padding: 0.75rem 1rem 2rem; }
    .feedback-form-with-hero .feedback-form-body .form-group { margin-bottom: 0; }
    .home-hero-title { font-size: 1.5rem; }
    .home-hero-subtitle { font-size: 0.9rem; }
    .home-feature-card { padding: 1rem; }
    .feature-icon { width: 48px; height: 48px; font-size: 1.25rem; }
    .home-cta-card { padding: 1rem 0.75rem 2rem; }
    .home-cta-title { font-size: 1.25rem; }
    
    /* Логин */
    .login-page { padding: 1rem 0.25rem; }
    .login-card { margin: 0 0.25rem; }
}

/* Маленькие смартфоны */
@media (max-width: 576px) {
    main.container { padding-left: 6px !important; padding-right: 6px !important; margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
    .navbar-brand .navbar-logo,
    .navbar-brand .navbar-brand-icon { height: 36px; }
    .navbar-brand span { font-size: 0.85rem; }
    
    .form-header h2 { font-size: 1.5rem; }
    .feedback-form-container { padding: 0 !important; }
    
    .pagination { gap: 4px; flex-wrap: wrap; justify-content: center; }
    .pagination .page-link {
        min-width: 38px;
        height: 38px;
        padding: 8px;
        font-size: 0.875rem;
    }
    .pagination .page-link[aria-label="Предыдущая"],
    .pagination .page-link[aria-label="Следующая"] {
        width: 38px;
        height: 38px;
    }
    
    .feedback-header { padding: 8px 10px !important; flex-wrap: wrap; }
    .feedback-bar {
        padding: 12px 10px !important;
        gap: 10px 8px !important;
        flex-wrap: nowrap;
        align-items: flex-start !important;
    }
    .feedback-bar-checkbox {
        order: 0;
        padding-top: 2px;
    }
    .feedback-bar-checkbox .form-check-input {
        width: 20px;
        height: 20px;
    }
    .feedback-bar-id {
        order: 1;
        font-size: 12px;
    }
    .feedback-bar-id .id-label {
        padding: 2px 6px;
        font-size: 11px;
    }
    .feedback-bar-ip .ip-address {
        font-size: 13px;
    }
    .feedback-bar-date {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        font-size: 12px;
    }
    .feedback-bar-date .date-inline {
        font-size: 13px;
    }
    .feedback-bar-status .status-badge {
        padding: 4px 8px;
        font-size: 13px;
    }
    .feedback-bar-status .status-badge i {
        font-size: inherit;
    }
    .feedback-bar-recipient {
        order: 5;
        width: 100%;
        font-size: 12px;
        padding: 6px 10px;
        background: #f8f9fa;
        border-radius: 6px;
        margin-top: 4px;
    }
    .feedback-bar-recipient .recipient-info {
        display: flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .feedback-bar-actions .action-btn {
        padding: 8px 14px !important;
        font-size: 13px !important;
        min-height: 38px;
        flex: 1;
        max-width: 160px;
    }
    .feedback-bar-actions .action-btn span {
        display: inline;
    }
    .feedback-bar-actions .dropdown-toggle {
        flex: 0 0 auto;
        padding: 8px 12px !important;
    }
    .feedback-body { padding: 10px !important; }
    .feedback-footer { padding: 8px 10px !important; }
    .photos-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
    .feedback-photos-public img { width: 64px; height: 64px; }
    
    .d-flex.gap-2.align-items-center.justify-content-end .input-group {
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* Очень маленькие экраны (iPhone SE и т.п.) */
@media (max-width: 375px) {
    .navbar-brand span { font-size: 0.8rem; }
    .navbar-brand small { display: none; }
    .form-header h2 { font-size: 1.35rem; }
    .home-hero-title { font-size: 1.35rem; }
    .home-hero-subtitle { font-size: 0.85rem; }
    .privacy-header h1 { font-size: 1.5rem; }
    .submit-btn, .view-btn { padding: 0.75rem 1.5rem; font-size: 0.95rem; min-height: 44px; }
    .home-hero-row { padding: 0.5rem 0; }
    .home-feature-card { padding: 0.75rem; }
    .home-section-title { font-size: 1.25rem; }
    
    /* Feedback-bar для очень маленьких экранов */
    .feedback-bar {
        padding: 10px 8px !important;
        gap: 8px 6px !important;
    }
    .feedback-bar-checkbox .form-check-input {
        width: 18px;
        height: 18px;
    }
    .feedback-bar-ip .ip-address {
        font-size: 13px;
    }
    .feedback-bar-date {
        gap: 6px;
    }
    .feedback-bar-date .date-inline {
        font-size: 11px;
    }
    .feedback-bar-status .status-badge {
        padding: 3px 6px;
        font-size: 13px;
    }
    .feedback-bar-status .status-badge i {
        font-size: inherit;
        margin-right: 2px;
    }
    .feedback-bar-recipient {
        font-size: 11px;
        padding: 4px 8px;
    }
    .feedback-bar-actions {
        gap: 6px;
        padding-top: 6px;
    }
    .feedback-bar-actions .action-btn {
        padding: 6px 10px !important;
        font-size: 13px !important;
        min-height: 34px;
    }
    .feedback-bar-actions .action-btn span {
        font-size: inherit;
    }
}

/* ===== ДОПОЛНИТЕЛЬНАЯ МОБИЛЬНАЯ ПРОРАБОТКА ===== */
@media (max-width: 768px) {
    /* Главная: features и CTA */
    .home-features {
        padding: 0.75rem 0 !important;
    }
    section.home-cta {
        padding-top: 2.5rem !important;
        padding-bottom: 5rem !important;
        margin-bottom: 3rem !important;
    }
    .home-section-title { font-size: 1.5rem; margin-top: 2.5rem !important; margin-bottom: 2rem !important; }
    .home-features .row.g-4 { --bs-gutter-y: 1rem; }
    
    /* Список отзывов */
    .feedback-page-title { font-size: 1.75rem; }
    .feedback-page-subtitle { font-size: 0.9rem; }
    .feedback-grid { min-width: 0; overflow: hidden; }
    .feedback-text-public, .user-name-public { word-wrap: break-word; overflow-wrap: break-word; }
    .row.mb-5.pt-4 { margin-bottom: 1.5rem !important; padding-top: 1rem !important; }
    .row.mt-5.mb-5 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
    .feedback-cta-btn { width: 100%; justify-content: center; padding: 12px 20px; min-height: 44px; }
    
    /* Success страница */
    .success-message { padding: 1rem 0.5rem; }
    .success-message .lead { font-size: 1rem; }
    .form-actions .submit-btn, .form-actions .view-btn { min-height: 44px; }
    
    /* Пустая страница отзывов */
    .card.text-center .card-body { padding: 1rem; }
    .card.text-center .btn { min-height: 44px; }
    
    /* Пагинация info */
    .text-center.text-muted.mt-2 small { font-size: 0.8rem; }
}

@media (max-width: 576px) {
    .feedback-page-title { font-size: 1.4rem; }
    .feedback-read-more { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

/* Админка: мобильная адаптация */
@media (max-width: 991px) {
    .admin-content .container-fluid { padding-left: 0.5rem; padding-right: 0.5rem; }
    .admin-content .row.g-3, .admin-content .row.g-4 { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }
    .admin-content .card-body.p-4 { padding: 1rem !important; }
    .admin-content .mp-stats-card h3.fs-1 { font-size: 1.75rem !important; }
    .admin-content .table-responsive { margin: -0.5rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-content .table { font-size: 0.875rem; }
    .admin-content .table th, .admin-content .table td { padding: 0.5rem 0.25rem; white-space: nowrap; }
    .admin-content .btn-outline-warning, .admin-content .btn-outline-success,
    .admin-content .btn-outline-primary, .admin-content .btn-outline-secondary { min-height: 44px; }
}

@media (max-width: 576px) {
    .admin-content .col-md-6 { flex: 0 0 100%; max-width: 100%; }
    .admin-content .mp-stats-card h3.fs-1 { font-size: 1.5rem !important; }
    .admin-content .d-flex.justify-content-between.mb-4 { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
}

/* Превью выбранных фотографий до загрузки */
.photos-preview-wrap {
    margin-top: 0.75rem;
}
.photos-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.photos-preview-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
}
.photos-preview-errors {
    color: var(--danger-color, #dc3545);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}