﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F5F7FC;
    color: #1A1F36;
    line-height: 1.5;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #0A1628 0%, #0F1D3A 100%);
    z-index: 100;
    overflow-y: auto;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 28px 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

    .sidebar-logo h2 {
        color: white;
        font-size: 1.3rem;
        font-weight: 700;
    }

    .sidebar-logo span {
        color: #3B82F6;
    }

    .sidebar-logo p {
        color: #6B85B0;
        font-size: 0.7rem;
        margin-top: 4px;
    }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 12px;
    color: #A3B5D6;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

    .nav-item i {
        width: 22px;
    }

    .nav-item.active {
        background: rgba(59, 130, 246, 0.15);
        color: #3B82F6;
    }

    .nav-item:hover:not(.active) {
        background: rgba(255, 255, 255, 0.05);
        color: white;
    }
.main-content {
    padding: 24px 32px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    overflow-x: auto;
}
    .main-content:not(.with-sidebar) {
        margin-left: 0 !important;
    }
    .main-content.with-sidebar {
        margin-left: 260px;
    }
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    position: sticky;
    top: 0;
    background: #F5F7FC;
    z-index: 50;
    padding: 12px 0;
}

.page-title {
    cursor: pointer;
    transition: opacity 0.2s;
}

    .page-title:hover {
        opacity: 0.8;
    }

    .page-title h1 {
        font-size: 1.5rem;
        font-weight: 600;
        color: #1A1F36;
    }

    .page-title p {
        font-size: 0.75rem;
        color: #6B85B0;
        margin-top: 4px;
    }

.user-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notif-icon {
    position: relative;
    font-size: 1.2rem;
    color: #5A6D89;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

    .notif-icon:hover {
        background: #E2E8F0;
    }

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #DC2626;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
}

.help-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.15s;
}

    .help-icon:hover {
        background: #E2E8F0;
    }

    .help-icon i {
        font-size: 18px;
        color: #64748B;
    }

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 6px 16px 6px 12px;
    border-radius: 40px;
    border: 1px solid #E8ECF4;
    cursor: pointer;
    transition: all 0.2s;
}

    .user-profile:hover {
        border-color: #3B82F6;
        background: #F8FAFE;
    }

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1A1F36;
    white-space: nowrap;
}

.logout-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #5A6D89;
    cursor: pointer;
    transition: all 0.2s;
}

    .logout-btn:hover {
        background: #FEF2F2;
        color: #DC2626;
    }

/* Оверлей для мобильного меню */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    cursor: pointer;
}

/* Кнопка мобильного меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-right: 16px;
    z-index: 1001;
}

    .menu-toggle:hover {
        background: rgba(59, 130, 246, 0.1);
        color: #2563EB;
    }
/* ========== ПАНЕЛЬ ФИЛЬТРОВ ========== */
.filter-bar {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    border: 1px solid #E8ECF4;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .filter-group label {
        font-size: 0.65rem;
        font-weight: 600;
        color: #6B85B0;
        text-transform: uppercase;
    }

.filter-input,
.filter-select {
    padding: 8px 14px;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    font-size: 0.8rem;
    background: #F8FAFE;
    min-width: 160px;
    font-family: inherit;
}

    .filter-input:focus,
    .filter-select:focus {
        outline: none;
        border-color: #3B82F6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    }

/* ========== ПЕРЕКЛЮЧАТЕЛИ (Активные/Архив) ========== */
.archive-toggle {
    display: inline-flex;
    gap: 0;
    background: #F0F2F5;
    border-radius: 40px;
    padding: 4px;
}

.toggle-btn {
    padding: 6px 20px;
    border: none;
    background: transparent;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    color: #5A6D89;
    transition: all 0.15s ease;
}

    .toggle-btn.active {
        background: white;
        color: #3B82F6;
    }

/* ========== КНОПКИ ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: #3B82F6;
    color: white;
}

    .btn-primary:hover {
        background: #2563EB;
        transform: translateY(-1px);
    }

.btn-outline {
    background: transparent;
    border: 1px solid #CBD5E1;
    color: #475569;
}

    .btn-outline:hover {
        background: #F8FAFE;
        border-color: #3B82F6;
        color: #3B82F6;
    }

.btn-success {
    background: #10B981;
    color: white;
}

.btn-danger {
    background: #EF4444;
    color: white;
}

.btn-warning {
    background: #F59E0B;
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.7rem;
    border-radius: 40px;
}

.btn-link {
    background: none;
    border: none;
    color: #3B82F6;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 4px 8px;
}

.w-100 {
    width: 100%;
}

.btn i {
    color: #1E293B;
}

.btn-primary i,
.btn-success i,
.btn-danger i,
.btn-warning i {
    color: white;
}

.btn-outline i {
    color: #1E293B;
}

.btn-outline:hover i {
    color: #3B82F6;
}

/* ========== ТАБЛИЦЫ ========== */
.table-container {
    background: white;
    border-radius: 20px;
    border: 1px solid #E8ECF4;
    overflow-x: auto;
    position: relative;
}

    .table-container::-webkit-scrollbar {
        height: 5px;
    }

    .table-container::-webkit-scrollbar-track {
        background: #E2E8F0;
        border-radius: 3px;
    }

    .table-container::-webkit-scrollbar-thumb {
        background: #3B82F6;
        border-radius: 3px;
    }

.requests-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 600px;
}

    .requests-table th {
        padding: 14px 20px;
        text-align: left;
        background: #F8FAFE;
        color: #5A6D89;
        font-weight: 600;
        border-bottom: 1px solid #E8ECF4;
    }

    .requests-table td {
        padding: 14px 20px;
        border-bottom: 1px solid #F0F2F6;
        color: #1A1F36;
    }

    .requests-table tr:hover td {
        background: #F8FAFE;
    }

.request-row {
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 48px;
    color: #94A3B8;
}

.table-footer {
    padding: 12px 20px;
    background: #F8FAFE;
    border-top: 1px solid #E8ECF4;
    font-size: 0.75rem;
    color: #5A6D89;
    text-align: right;
    border-radius: 0 0 20px 20px;
}

/* ========== БЕЙДЖИ ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-new {
    background: #F1F5F9;
    color: #475569;
}

.badge-progress {
    background: #EFF6FF;
    color: #2563EB;
}

.badge-waiting {
    background: #F5F3FF;
    color: #7C3AED;
}

.badge-done {
    background: #ECFDF5;
    color: #059669;
}

.badge-delayed {
    background: #FEF3C7;
    color: #B45309;
}

.badge-emergency {
    background: #FEF2F2;
    color: #DC2626;
}
/* ========== ДЕТАЛИ ЗАЯВКИ ========== */
.detail-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #E8ECF4;
    margin-bottom: 24px;
    overflow: hidden;
}

.detail-card-header {
    padding: 16px 24px;
    background: #FFFFFF;
    border-bottom: 1px solid #E8ECF4;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .detail-card-header i {
        font-size: 1rem;
        color: #5A6D89;
    }

    .detail-card-header h3 {
        margin: 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #1A1F36;
    }

.detail-card-body {
    padding: 24px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-info-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1E293B;
    word-break: break-word;
}

    .detail-info-value.phone {
        font-family: monospace;
        font-size: 0.9rem;
        color: #3B82F6;
    }

.detail-description {
    background: #F8FAFE;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border-left: 3px solid #3B82F6;
}

    .detail-description strong {
        display: block;
        margin-bottom: 10px;
        font-size: 0.75rem;
        font-weight: 600;
        color: #64748B;
        text-transform: uppercase;
    }

    .detail-description p {
        margin: 0;
        font-size: 0.85rem;
        line-height: 1.5;
        color: #334155;
    }

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

    .detail-actions .btn i {
        margin-right: 6px;
    }

.detail-info-value .priority-normal,
.detail-info-value .priority-high,
.detail-info-value .priority-emergency {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.detail-info-value .priority-emergency {
    background: #FEF2F2;
    color: #DC2626;
}

.detail-info-value .priority-high {
    background: #FEF3C7;
    color: #B45309;
}

.detail-info-value .priority-normal {
    background: #F1F5F9;
    color: #475569;
}

/* ========== ДЕДЛАЙНЫ ========== */
.deadline-overdue {
    color: #DC2626;
    font-weight: 500;
}

.deadline-warning {
    color: #F59E0B;
    font-weight: 500;
}

.deadline-completed {
    color: #10B981;
}

.overdue-icon {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.7rem;
    cursor: help;
}

/* ========== ИСТОРИЯ ========== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 14px 0;
    border-left: 2px solid #E2E8F0;
    margin-left: 16px;
    padding-left: 28px;
    position: relative;
}

    .timeline-item:last-child {
        border-left-color: transparent;
    }

.timeline-dot {
    position: absolute;
    left: -9px;
    top: 18px;
    width: 12px;
    height: 12px;
    background: #CBD5E1;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #E2E8F0;
}

.timeline-item:first-child .timeline-dot {
    background: #3B82F6;
    box-shadow: 0 0 0 2px #DBEAFE;
}

.timeline-date {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94A3B8;
    min-width: 140px;
}

.timeline-status {
    font-weight: 600;
    font-size: 0.8rem;
    color: #1E293B;
    min-width: 160px;
}

.timeline-comment {
    font-size: 0.75rem;
    color: #64748B;
    flex: 1;
}

.timeline-user {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94A3B8;
    min-width: 130px;
}

/* ========== ФОРМЫ ========== */
.form-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #E8ECF4;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.form-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #F8FAFE;
    border-bottom: 1px solid #E8ECF4;
}

    .form-header h3 {
        margin: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.1rem;
        font-weight: 600;
    }

.form-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        font-size: 0.75rem;
        font-weight: 600;
        color: #1A1F36;
        margin-bottom: 6px;
        display: block;
    }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: #3B82F6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    }

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.error-message {
    color: #DC2626;
    font-size: 0.75rem;
    margin-top: 12px;
    text-align: center;
}

/* ========== ФОТОГАЛЕРЕЯ ========== */
.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 8px 0;
}

.gallery-item {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #F8FAFE;
}

    .gallery-item:hover {
        transform: scale(1.03);
        border-color: #3B82F6;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .gallery-item .delete-btn {
        position: absolute;
        top: 6px;
        right: 6px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border: none;
        border-radius: 50%;
        width: 22px;
        height: 22px;
        font-size: 11px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s;
    }

        .gallery-item .delete-btn:hover {
            background: #DC2626;
        }

.upload-area {
    border: 2px dashed #CBD5E1;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #FFFFFF;
    margin-top: 16px;
}

    .upload-area:hover {
        border-color: #3B82F6;
        background: #F8FAFE;
    }

    .upload-area i {
        font-size: 1.8rem;
        color: #94A3B8;
        margin-bottom: 8px;
        display: block;
    }

    .upload-area span {
        font-size: 0.85rem;
        font-weight: 500;
        color: #334155;
    }

    .upload-area small {
        display: block;
        font-size: 0.7rem;
        color: #94A3B8;
        margin-top: 6px;
    }
/* ========== УВЕДОМЛЕНИЯ ========== */
.notification-panel {
    position: absolute;
    top: 70px;
    right: 30px;
    width: 360px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    border: 1px solid #E8ECF4;
    z-index: 200;
    overflow: hidden;
}

.notification-header {
    padding: 14px 20px;
    background: #F8FAFE;
    border-bottom: 1px solid #E8ECF4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-list {
    max-height: 360px;
    overflow-y: auto;
}

.notification-item {
    padding: 14px 20px;
    border-bottom: 1px solid #F0F2F6;
    cursor: pointer;
    transition: background 0.15s;
}

    .notification-item:hover {
        background: #F8FAFE;
    }

    .notification-item.unread {
        background: #EFF6FF;
    }

.notification-title {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 0.7rem;
    color: #5A6D89;
}

.notification-date {
    font-size: 0.6rem;
    color: #94A3B8;
    margin-top: 4px;
}

/* ========== ЛОГИН ========== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.login-card {
    background: white;
    border-radius: 24px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #0A1628, #0F1D3A);
    padding: 32px;
    text-align: center;
}

.login-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

    .login-logo span {
        color: #3B82F6;
    }

.login-header p {
    color: #6B85B0;
    font-size: 0.8rem;
    margin-top: 8px;
}

.login-body {
    padding: 32px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #F8FAFE;
}

    .input-group i {
        color: #6B85B0;
        width: 20px;
    }

    .input-group input {
        border: none;
        background: transparent;
        flex: 1;
        font-size: 0.85rem;
        font-family: inherit;
    }

        .input-group input:focus {
            outline: none;
        }

.login-footer {
    padding: 20px 32px;
    background: #F8FAFE;
    border-top: 1px solid #E8ECF4;
}

.test-data {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.7rem;
    color: #6B85B0;
    text-align: center;
}

/* ========== ПРОФИЛЬ ========== */
.profile-full-container {
    background: #F5F7FC;
    min-height: calc(100vh - 120px);
    border-radius: 24px;
}

.profile-mini-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px 28px;
    border-radius: 20px;
    border: 1px solid #E8ECF4;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.profile-mini-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.profile-mini-info {
    flex: 1;
}

    .profile-mini-info h2 {
        font-size: 1.2rem;
        font-weight: 600;
        color: #1A1F36;
        margin: 0 0 4px;
    }

.profile-mini-meta {
    display: flex;
    gap: 16px;
    font-size: 0.7rem;
    color: #6B85B0;
}

    .profile-mini-meta i {
        margin-right: 4px;
    }

.profile-mini-actions {
    margin-left: auto;
}

.profile-role-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
}

    .profile-role-badge[data-role="Resident"] {
        background: #EFF6FF;
        color: #3B82F6;
    }

    .profile-role-badge[data-role="Executor"] {
        background: #FEF3C7;
        color: #B45309;
    }

    .profile-role-badge[data-role="Manager"] {
        background: #ECFDF5;
        color: #059669;
    }

.profile-full-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.profile-full-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #E8ECF4;
    overflow: hidden;
}

.profile-full-card-header {
    padding: 16px 20px;
    background: #F8FAFE;
    border-bottom: 1px solid #E8ECF4;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1A1F36;
}

    .profile-full-card-header i {
        font-size: 1rem;
        color: #3B82F6;
    }

.profile-full-card-body {
    padding: 20px;
}

.profile-full-field {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #F0F2F6;
}

    .profile-full-field:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

.profile-full-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #6B85B0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

    .profile-full-field-label i {
        font-size: 0.7rem;
    }

.profile-full-field-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1A1F36;
    word-break: break-word;
}

.apartment-item {
    font-size: 0.8rem;
    padding: 4px 0;
    color: #4B5563;
}

.profile-full-desc {
    font-size: 0.7rem;
    color: #6B85B0;
    margin-bottom: 16px;
    line-height: 1.4;
}

.profile-full-btn {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 0.8rem;
}

.profile-full-password-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-full-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    padding: 10px 14px;
    background: #F8FAFE;
    transition: all 0.2s;
}

    .profile-full-input-group:focus-within {
        border-color: #3B82F6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    }

    .profile-full-input-group i {
        color: #6B85B0;
        width: 16px;
        font-size: 0.8rem;
    }

.profile-full-input {
    border: none;
    background: transparent;
    flex: 1;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
}

    .profile-full-input::placeholder {
        color: #A3B5D6;
    }
/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
}

#userModal .modal-content {
    max-width: 600px;
    width: 95%;
}

#houseDetailModal .modal-content {
    max-width: 700px;
    width: 95%;
}

.modal-content > div {
    padding: 24px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #E8ECF4;
}

    .modal-buttons .btn {
        padding: 8px 20px;
        border-radius: 40px;
    }

/* Модальное окно для фото */
.modal-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

    .modal-gallery.active {
        display: flex;
    }

.modal-gallery-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-gallery img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.modal-gallery-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modal-gallery-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.modal-gallery-prev,
.modal-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 32px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modal-gallery-prev:hover,
    .modal-gallery-next:hover {
        background: rgba(0, 0, 0, 0.8);
    }

.modal-gallery-prev {
    left: -70px;
}

.modal-gallery-next {
    right: -70px;
}

/* ========== ДАШБОРД ========== */
.dashboard-container {
    padding: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
}

.period-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.period-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748B;
}

.period-btn {
    padding: 6px 14px;
    border: 1px solid #E2E8F0;
    background: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
}

    .period-btn:hover {
        border-color: #3B82F6;
        color: #3B82F6;
    }

    .period-btn.active {
        background: #3B82F6;
        border-color: #3B82F6;
        color: white;
    }

.dashboard-date-range {
    font-size: 0.7rem;
    color: #64748B;
    background: #F1F5F9;
    padding: 4px 12px;
    border-radius: 20px;
}

/* KPI карточки */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.kpi-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    padding: 20px;
    text-align: center;
}

.kpi-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0F172A;
}

.kpi-unit {
    font-size: 0.8rem;
    font-weight: 400;
    color: #64748B;
}

.kpi-progress {
    margin-top: 10px;
    height: 4px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
}

    .kpi-progress .progress-bar {
        height: 100%;
        background: #3B82F6;
        border-radius: 4px;
    }

/* Второй ряд KPI */
.kpi-subrow {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-subcard {
    background: white;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    padding: 14px;
    text-align: center;
}

.kpi-sub-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: #64748B;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.kpi-sub-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0F172A;
}

.kpi-sub-small {
    font-size: 0.6rem;
    color: #64748B;
    margin-top: 4px;
}

/* Блок прогнозов */
.forecast-panel {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    margin-bottom: 24px;
    overflow: hidden;
}

.forecast-header {
    padding: 14px 20px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .forecast-header i {
        font-size: 1rem;
        color: #3B82F6;
    }

    .forecast-header span {
        font-size: 0.75rem;
        font-weight: 600;
        color: #475569;
        text-transform: uppercase;
    }

    .forecast-header small {
        font-size: 0.65rem;
        color: #94A3B8;
        margin-left: auto;
    }

.forecast-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px;
}

.forecast-item {
    flex: 1;
    text-align: center;
}

.forecast-divider {
    width: 1px;
    height: 60px;
    background: #E2E8F0;
}

.forecast-value {
    font-size: 2rem;
    font-weight: 700;
    color: #F59E0B;
}

.forecast-period {
    font-size: 0.6rem;
    color: #94A3B8;
    margin-top: 4px;
}

/* Аналитика */
.analytics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
}

    .analytics-card.full-width {
        grid-column: span 2;
    }

.analytics-card-header {
    padding: 14px 20px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

.analytics-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
}

.analytics-card-body {
    padding: 20px;
}

/* Статусы */
.status-grid-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #F8FAFC;
    border-radius: 8px;
}

.status-name-dashboard {
    font-size: 0.75rem;
    font-weight: 500;
    color: #0F172A;
}

.status-count-dashboard {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3B82F6;
    background: white;
    padding: 2px 8px;
    border-radius: 16px;
}

/* Воронка категорий */
.funnel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.funnel-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.funnel-rank {
    width: 28px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748B;
}

.funnel-name {
    flex: 1;
    font-size: 0.8rem;
    color: #0F172A;
}

.funnel-bar {
    width: 80px;
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
}

.funnel-bar-fill {
    height: 100%;
    background: #3B82F6;
    border-radius: 3px;
}

.funnel-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748B;
    min-width: 40px;
    text-align: right;
}

/* Список домов */
.houses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.house-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.house-rank {
    width: 24px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748B;
}

.house-name {
    flex: 1;
    font-size: 0.75rem;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.house-bar {
    width: 80px;
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
}

.house-bar-fill {
    height: 100%;
    background: #EF4444;
    border-radius: 3px;
}

.house-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748B;
    min-width: 35px;
    text-align: right;
}

/* Рейтинг исполнителей */
.executors-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.executor-rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #F8FAFC;
    border-radius: 10px;
}

.executor-rank-num {
    width: 28px;
    height: 28px;
    background: #3B82F6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
}

.executor-info {
    flex: 1;
}

.executor-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #0F172A;
}

.executor-stats {
    font-size: 0.65rem;
    color: #64748B;
}

.executor-bar {
    width: 80px;
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
}

.executor-bar-fill {
    height: 100%;
    background: #10B981;
    border-radius: 3px;
}

.executor-time {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748B;
    min-width: 45px;
    text-align: right;
}

/* ========== ОТЧЁТЫ ========== */
.report-filters-modern {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #E8ECF4;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

    .filter-group-modern label {
        font-size: 0.7rem;
        font-weight: 600;
        color: #6B85B0;
        text-transform: uppercase;
    }

.form-select-modern,
.form-input-modern {
    padding: 10px 14px;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #F8FAFE;
}

    .form-select-modern:focus,
    .form-input-modern:focus {
        outline: none;
        border-color: #3B82F6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    }

.date-range {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F8FAFE;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    padding: 4px 12px;
}

.date-input-modern {
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 0.85rem;
    font-family: inherit;
}

    .date-input-modern:focus {
        outline: none;
    }

.date-separator {
    color: #94A3B8;
    font-size: 0.85rem;
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
    align-items: flex-end;
}

.btn-primary-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-primary-modern:hover {
        background: #2563EB;
        transform: translateY(-1px);
    }

.btn-outline-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: #475569;
    border: 1px solid #CBD5E1;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-outline-modern:hover {
        background: #F8FAFE;
        border-color: #3B82F6;
        color: #3B82F6;
    }

.additional-filters {
    padding-top: 20px;
    border-top: 1px solid #F0F2F6;
}

.report-summary {
    background: #F8FAFC;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #E2E8F0;
    font-size: 0.85rem;
    color: #1E293B;
}

    .report-summary strong {
        color: #0F172A;
        font-weight: 600;
    }

.report-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

    .report-table th {
        background: #F8FAFC;
        padding: 10px 12px;
        text-align: left;
        font-weight: 600;
        color: #475569;
        border-bottom: 1px solid #E2E8F0;
    }

    .report-table td {
        padding: 10px 12px;
        border-bottom: 1px solid #F1F5F9;
        color: #1E293B;
    }

    .report-table tr:hover td {
        background: #F8FAFC;
    }

.priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

.priority-emergency {
    background: #FEF2F2;
    color: #DC2626;
}

.priority-high {
    background: #FEF3C7;
    color: #B45309;
}

.priority-normal {
    background: #F1F5F9;
    color: #475569;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    background: #F1F5F9;
    color: #475569;
}

.report-result {
    background: white;
    border-radius: 16px;
    border: 1px solid #E8ECF4;
    overflow: auto;
    max-height: 500px;
}

/* ========== ЖУРНАЛ ДЕЙСТВИЙ ========== */
.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

    .logs-table th {
        padding: 12px 16px;
        text-align: left;
        background: #F8FAFE;
        color: #5A6D89;
        font-weight: 600;
        border-bottom: 1px solid #E8ECF4;
    }

    .logs-table td {
        padding: 10px 16px;
        border-bottom: 1px solid #F0F2F6;
        color: #1A1F36;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .logs-table th:nth-child(1) {
        width: 160px;
    }

    .logs-table th:nth-child(2) {
        width: 180px;
    }

    .logs-table th:nth-child(3) {
        width: 200px;
    }

    .logs-table th:nth-child(4) {
        width: auto;
    }

    .logs-table tr:hover td {
        background: #F8FAFE;
    }

.logs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #F8FAFE;
    border-top: 1px solid #E8ECF4;
    border-radius: 0 0 20px 20px;
}

.logs-info {
    font-size: 0.7rem;
    color: #6B85B0;
}

.logs-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    color: #3B82F6;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s;
}

    .pagination-btn:hover:not(:disabled) {
        background: #EFF6FF;
    }

    .pagination-btn:disabled {
        color: #CBD5E1;
        cursor: not-allowed;
    }

.logs-pagination span {
    font-size: 0.7rem;
    color: #5A6D89;
}

/* ========== СПРАВОЧНАЯ СИСТЕМА ========== */
.help-container {
    display: flex;
    background: white;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    min-height: 500px;
    overflow: hidden;
}

/* Левая панель с содержанием */
.help-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #E2E8F0;
    padding: 20px;
    overflow-y: auto;
}

/* Поиск в справке */
.help-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-bottom: 20px;
    font-family: inherit;
}

.help-search:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Пункты оглавления */
.help-toc-item {
    padding: 8px 12px;
    margin: 2px 0;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: all 0.15s;
    color: #1E293B;
}

.help-toc-item:hover {
    background: #F1F5F9;
}

.help-toc-item.active {
    background: #EFF6FF;
    color: #3B82F6;
}

/* Правая панель с содержимым */
.help-article {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: white;
}

/* Заголовки в статье */
.help-article h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 16px;
}

.help-article h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #1E293B;
    margin: 20px 0 12px;
}

.help-article p {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 12px;
}

.help-article ul,
.help-article ol {
    margin: 8px 0 16px 24px;
}

.help-article li {
    font-size: 0.8rem;
    color: #475569;
    margin: 4px 0;
}

.help-article .step {
    background: #F8FAFC;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0;
    border-left: 3px solid #3B82F6;
}

.help-article .step-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #0F172A;
}

.help-article .note {
    background: #FFFBEB;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0;
    border-left: 3px solid #F59E0B;
}
/* ========== СТИЛИ ДЛЯ ДЕТАЛЬНОГО ОТЧЁТА ПО ЗАЯВКЕ ========== */
.request-report-container {
    padding: 20px;
    background: white;
    border-radius: 16px;
}

.report-header-modern {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #3B82F6;
}

    .report-header-modern h2 {
        font-size: 1.4rem;
        margin-bottom: 8px;
        color: #1A1F36;
    }

    .report-header-modern .report-meta {
        font-size: 0.7rem;
        color: #6B85B0;
    }

.report-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.report-card {
    background: #F8FAFC;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.report-card-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6B85B0;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.report-card-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1A1F36;
}

.report-card-sub {
    font-size: 0.7rem;
    color: #6B85B0;
    margin-top: 4px;
}

.report-times-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.time-card {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.time-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #6B85B0;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.time-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1A1F36;
}

.time-status {
    font-size: 0.7rem;
    margin-top: 6px;
}

.status-times-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.status-time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #F8FAFC;
    border-radius: 8px;
}

.status-name {
    font-size: 0.75rem;
    color: #1A1F36;
}

.time-value {
    font-weight: 600;
    color: #3B82F6;
}

.report-description {
    background: #F8FAFC;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

    .report-description h4 {
        font-size: 0.8rem;
        margin-bottom: 8px;
        color: #1A1F36;
    }

    .report-description p {
        font-size: 0.85rem;
        line-height: 1.5;
        color: #334155;
    }

.report-history {
    margin-bottom: 24px;
}

    .report-history h4 {
        font-size: 0.8rem;
        margin-bottom: 16px;
        color: #1A1F36;
    }

.report-attachments {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
}

    .report-attachments h4 {
        font-size: 0.8rem;
        margin-bottom: 12px;
        color: #1A1F36;
    }

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.attachment-item {
    background: #F8FAFC;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
}

    .attachment-item img {
        max-width: 100%;
        max-height: 120px;
        border-radius: 4px;
    }

.attachment-caption {
    font-size: 0.7rem;
    color: #6B85B0;
    margin-top: 4px;
}

/* Печатная версия */
@media print {
    .request-report-container {
        padding: 0;
    }

    .attachments-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .attachment-item img {
        max-height: 180px;
    }
}

@media (max-width: 768px) {
    .report-cards-grid,
    .report-times-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-times-grid {
        grid-template-columns: 1fr;
    }
}
/* Печатная версия отчёта — фото на всю страницу */
@media print {
    .request-report-container {
        padding: 0;
        margin: 0;
    }

    /* Скрываем миниатюры, показываем полноразмерные фото */
    .gallery {
        display: none !important;
    }

    /* Добавляем полноразмерные фото для печати */
    .request-report-container::after {
        content: '';
        display: block;
        page-break-before: always;
    }

    /* Принтерная версия фото — каждое на отдельной странице */
    .print-attachments {
        display: block !important;
    }

    .print-attachment-page {
        page-break-after: always;
        text-align: center;
        margin-top: 50px;
    }

        .print-attachment-page img {
            max-width: 100%;
            max-height: 90vh;
            object-fit: contain;
        }
}
/* Принудительное отображение фото при печати */
@media print {
    .gallery {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
        margin: 20px 0 !important;
        page-break-inside: avoid;
    }

    .gallery-item {
        display: block !important;
        width: 150px !important;
        text-align: center !important;
        page-break-inside: avoid;
    }

        .gallery-item img {
            width: 100% !important;
            height: auto !important;
            border: 1px solid #ddd !important;
            border-radius: 8px !important;
        }

    .mt-4, .mt-3 {
        margin-top: 20px !important;
    }

    /* Разворачиваем все свёрнутые блоки */
    .detail-card, .report-attachments {
        display: block !important;
        overflow: visible !important;
    }
}
/* ========== СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА СМЕНЫ НОМЕРА ========== */
#changePhoneModal .modal-content {
    max-width: 450px;
    padding: 0;
}

    #changePhoneModal .modal-content > div {
        padding: 24px;
    }

#changePhoneModal .form-group {
    margin-bottom: 20px;
}

    #changePhoneModal .form-group label {
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        color: #1A1F36;
        margin-bottom: 8px;
    }

#changePhoneModal .form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #F8FAFE;
}

    #changePhoneModal .form-control:focus {
        outline: none;
        border-color: #3B82F6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    }

#changePhoneModal .modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #E8ECF4;
}

    #changePhoneModal .modal-buttons .btn {
        padding: 8px 20px;
        border-radius: 40px;
    }

#changePhoneModal .btn-link {
    background: none;
    border: none;
    color: #3B82F6;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
}

    #changePhoneModal .btn-link:hover {
        text-decoration: underline;
    }

#changePhoneModal .error-message {
    margin-top: 16px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    text-align: center;
}
/* ========== АВАРИЙНОЕ МОДАЛЬНОЕ ОКНО ========== */
.emergency-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10001;
    justify-content: center;
    align-items: center;
}

.emergency-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    overflow: hidden;
    animation: emergencyModalFadeIn 0.3s ease;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.3);
}

@keyframes emergencyModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.emergency-modal-header {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.emergency-modal-icon {
    font-size: 28px;
}

.emergency-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.emergency-modal-body {
    padding: 24px;
}

.emergency-modal-subtitle {
    font-weight: 600;
    color: #1A1F36;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.emergency-modal-list {
    margin: 0 0 20px 0;
    padding-left: 20px;
}

    .emergency-modal-list li {
        font-size: 0.8rem;
        color: #475569;
        margin: 8px 0;
        line-height: 1.4;
    }

.emergency-modal-contacts {
    background: #FEF2F2;
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
}

.emergency-contact-item {
    font-size: 0.75rem;
    color: #DC2626;
    padding: 4px 0;
    font-weight: 500;
}

.emergency-modal-footer {
    padding: 16px 24px;
    background: #F8FAFC;
    border-top: 1px solid #E8ECF4;
    display: flex;
    justify-content: flex-end;
}

    .emergency-modal-footer .btn-primary {
        background: #DC2626;
        padding: 8px 24px;
    }

        .emergency-modal-footer .btn-primary:hover {
            background: #B91C1C;
        }
/* ========== АВАРИЙНЫЕ ЗАЯВКИ ========== */
.emergency-header {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border-radius: 12px 12px 0 0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.emergency-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

    .emergency-header-left i {
        font-size: 1.1rem;
    }

.emergency-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.emergency-header-right {
    font-size: 0.7rem;
    opacity: 0.9;
}

.emergency-list {
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.emergency-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #FEE2E2;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .emergency-item:last-child {
        border-bottom: none;
    }

    .emergency-item:hover {
        background: #FEE2E2;
        transform: translateX(4px);
    }

.emergency-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.emergency-icon {
    width: 36px;
    height: 36px;
    background: #DC2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.emergency-info {
    flex: 1;
}

.emergency-address {
    font-weight: 600;
    color: #1A1F36;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.emergency-desc {
    font-size: 0.75rem;
    color: #5A6D89;
    line-height: 1.4;
}

.emergency-details {
    display: flex;
    align-items: center;
    gap: 20px;
}

.emergency-time {
    font-size: 0.7rem;
    color: #DC2626;
    font-weight: 600;
    background: #FEE2E2;
    padding: 4px 10px;
    border-radius: 20px;
}

.emergency-badge {
    background: #DC2626;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ========== О СИСТЕМЕ ========== */
.about-container {
    width: 100%;
    padding: 16px 0;
}

.about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E8ECF4;
    position: relative;
}

    .about-header h2 {
        font-size: 1.2rem;
        font-weight: 600;
        color: #1A1F36;
        margin: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

.back-btn {
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

    .about-grid.two-cols {
        grid-template-columns: repeat(2, 1fr);
        margin-bottom: 0;
    }

.about-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #E8ECF4;
}

    .about-card.full-width {
        grid-column: span 2;
        margin-bottom: 20px;
    }

    .about-card h3 {
        font-size: 0.9rem;
        font-weight: 600;
        color: #1A1F36;
        margin-bottom: 14px;
        padding-bottom: 8px;
        border-bottom: 2px solid #3B82F6;
        display: inline-block;
    }

        .about-card h3 i {
            margin-right: 8px;
            color: #3B82F6;
        }

    .about-card p {
        font-size: 0.85rem;
        color: #5A6D89;
        line-height: 1.5;
        margin: 0;
    }

.contact-info p {
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding: 4px 0;
}

    .contact-info p:last-child {
        margin-bottom: 0;
    }

.work-hours {
    font-size: 0.75rem;
    color: #6B85B0;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #F0F2F6;
}

.deadline-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deadline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #F0F2F6;
}

    .deadline-item:last-child {
        border-bottom: none;
    }

.deadline-label {
    font-size: 0.8rem;
    color: #1A1F36;
    flex: 1;
}

.deadline-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #DC2626;
    background: #FEF2F2;
    padding: 2px 12px;
    border-radius: 20px;
    white-space: nowrap;
    margin-left: 12px;
}

.deadline-note {
    font-size: 0.7rem;
    color: #94A3B8;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #F0F2F6;
    text-align: center;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step {
    font-size: 0.8rem;
    color: #1A1F36;
    padding: 4px 0;
}

.rules {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule {
    font-size: 0.8rem;
    color: #5A6D89;
    padding: 4px 0;
    position: relative;
    padding-left: 20px;
}

    .rule:before {
        content: "—";
        position: absolute;
        left: 0;
        color: #3B82F6;
    }

.about-help {
    background: #EFF6FF;
    border-radius: 14px;
    padding: 16px 20px;
    text-align: center;
    border: 1px solid #DBEAFE;
    margin-top: 20px;
}

    .about-help div {
        font-size: 0.85rem;
        color: #1A1F36;
        line-height: 1.4;
    }

.help-link {
    background: none;
    border: none;
    color: #3B82F6;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 0.85rem;
    text-decoration: underline;
}

    .help-link:hover {
        color: #2563EB;
    }

/* ========== СТИЛИ ДЛЯ ВЫПАДАЮЩЕГО СПИСКА ИСПОЛНИТЕЛЕЙ ========== */
#changeExecutorSelect,
.executor-select {
    padding: 8px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    background: #F8FAFE;
    color: #1A1F36;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.2s;
}

    #changeExecutorSelect:focus,
    .executor-select:focus {
        outline: none;
        border-color: #3B82F6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    #changeExecutorSelect:hover,
    .executor-select:hover {
        background: #FFFFFF;
    }

/* ========== КНОПКИ-ИКОНКИ ========== */
.btn-icon-only {
    background: transparent !important;
    border: none !important;
    padding: 6px !important;
    margin: 0 2px !important;
    box-shadow: none !important;
}

    .btn-icon-only i {
        font-size: 1rem;
        color: #64748B;
        transition: color 0.15s;
    }

    .btn-icon-only:hover i {
        color: #3B82F6;
    }

    .btn-icon-only.btn-danger:hover i {
        color: #DC2626;
    }

    .btn-icon-only.btn-success:hover i {
        color: #10B981;
    }

    .btn-icon-only.btn-warning:hover i {
        color: #F59E0B;
    }

/* ========== КВАРТИРЫ В ФОРМАХ ========== */
.apartment-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

    .apartment-row .house-select,
    .apartment-row .apartment-select {
        flex: 1;
        min-width: 150px;
    }

.apartment-row-item:hover {
    background: #F8FAFE;
}

.apartment-row-item .btn {
    opacity: 0.6;
    transition: opacity 0.15s;
}

.apartment-row-item:hover .btn {
    opacity: 1;
}

#apartmentsList {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px;
    background: #F8FAFE;
}

/* ========== СЧЁТЧИКИ ========== */
.requests-count-info,
.users-count-info,
.houses-count-info {
    margin-bottom: 12px;
    padding: 0 4px;
    text-align: left;
}

    .requests-count-info span,
    .users-count-info span,
    .houses-count-info span {
        font-size: 0.7rem;
        color: #6B85B0;
    }

/* ========== ЗАГРУЗКА ========== */
.loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px 30px;
    border-radius: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #E2E8F0;
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== КАРТОЧКИ ========== */
.card {
    background: white;
    border-radius: 20px;
    border: 1px solid #E8ECF4;
    overflow: visible;
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 24px;
    background: #F8FAFE;
    border-bottom: 1px solid #E8ECF4;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* ========== ФОРМА СОЗДАНИЯ ЗАЯВКИ ========== */
.form-full-width {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
}

.form-full-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

.form-full-body {
    padding: 28px;
}

.form-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-full-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #E2E8F0;
}

.info-box {
    background: #EFF6FF;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1E40AF;
}

/* ========== ФУТЕР ========== */
.footer {
    text-align: center;
    padding: 24px;
    color: #6B85B0;
    font-size: 0.7rem;
    border-top: 1px solid #E8ECF4;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

    .footer-links a {
        color: #6B85B0;
        text-decoration: none;
    }

        .footer-links a:hover {
            color: #3B82F6;
        }

/* ========== AI ПОДСКАЗКИ ========== */
.ai-hint {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.ai-hint-success {
    background: #ECFDF5;
    color: #059669;
    border-left: 3px solid #10B981;
}

.ai-hint-warning {
    background: #FEF3C7;
    color: #B45309;
    border-left: 3px solid #F59E0B;
}

.ai-hint-info {
    background: #EFF6FF;
    color: #1D4ED8;
    border-left: 3px solid #3B82F6;
}

.ai-hint-emergency {
    background: #FEF2F2;
    color: #DC2626;
    border-left: 3px solid #DC2626;
}

.ai-hint-loading {
    background: #F3F4F6;
    color: #6B7280;
    border-left: 3px solid #9CA3AF;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
    .main-content {
        padding: 20px;
    }

    .kpi-subrow {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .analytics-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .analytics-card.full-width {
        grid-column: span 1;
    }

    .profile-full-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
/* ========== МОБИЛЬНЫЕ ФИЛЬТРЫ (ДОБАВЛЕНО) ========== */
.filter-row-top,
.filter-row-mid,
.filter-row-bottom {
    display: flex;
    gap: 12px;
    width: 100%;
}

.filter-row-top {
    flex-wrap: nowrap;
}

    .filter-row-top .search-group {
        flex: 1;
        position: relative;
    }

        .filter-row-top .search-group i {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #94A3B8;
            font-size: 14px;
            z-index: 1;
        }

        .filter-row-top .search-group .filter-input {
            padding-left: 36px;
            width: 100%;
        }

.filter-row-mid {
    flex-wrap: wrap;
}

    .filter-row-mid .filter-group {
        flex: 1;
        min-width: 100px;
    }

    .filter-row-mid .filter-select {
        width: 100%;
    }

.filter-row-bottom {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

    .filter-row-bottom .archive-toggle {
        display: flex;
        gap: 4px;
    }

    .filter-row-bottom .btn-outline {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
/* ========== СПРАВОЧНАЯ СИСТЕМА (без поиска) ========== */
.help-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

/* Шапка справки (кнопка назад + заголовок) */
.help-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

    .help-mobile-header h3 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: #1A1F36;
    }

.back-arrow-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #3B82F6;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .back-arrow-btn:hover {
        background: #EFF6FF;
    }

/* Основное содержимое (две колонки) */
.help-main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Оглавление */
.help-toc-wrapper {
    border-bottom: 1px solid #E2E8F0;
    background: white;
    max-height: 250px;
    overflow-y: auto;
}

.help-toc {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.help-toc-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #1E293B;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

    .help-toc-item:hover {
        background: #F8FAFC;
    }

    .help-toc-item.active {
        background: #EFF6FF;
        border-left-color: #3B82F6;
        color: #3B82F6;
        font-weight: 500;
    }

/* Область статьи */
.help-article-wrapper {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: white;
}

.help-article {
    max-width: 100%;
}

    .help-article h1 {
        font-size: 1.3rem;
        font-weight: 600;
        color: #0F172A;
        margin-bottom: 16px;
    }

    .help-article h2 {
        font-size: 1rem;
        font-weight: 600;
        color: #1E293B;
        margin: 20px 0 12px;
    }

    .help-article p {
        font-size: 0.85rem;
        color: #334155;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .help-article ul,
    .help-article ol {
        margin: 8px 0 16px 20px;
    }

    .help-article li {
        font-size: 0.8rem;
        color: #475569;
        margin: 4px 0;
    }

    .help-article .step {
        background: #F8FAFC;
        padding: 12px 16px;
        border-radius: 12px;
        margin: 12px 0;
        border-left: 3px solid #3B82F6;
    }

    .help-article .step-title {
        font-weight: 600;
        margin-bottom: 8px;
        color: #0F172A;
    }

    .help-article .note {
        background: #FFFBEB;
        padding: 12px 16px;
        border-radius: 12px;
        margin: 12px 0;
        border-left: 3px solid #F59E0B;
    }

.help-empty {
    text-align: center;
    color: #94A3B8;
    padding: 40px;
}

/* Десктопная версия (две колонки) */
@media (min-width: 769px) {
    .help-main-content {
        flex-direction: row;
    }

    .help-toc-wrapper {
        width: 280px;
        max-height: none;
        border-bottom: none;
        border-right: 1px solid #E2E8F0;
    }

    .help-article-wrapper {
        flex: 1;
    }

    .help-mobile-header {
        justify-content: space-between;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .filter-bar {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .filter-row-top {
        order: 1;
    }

    .filter-row-mid {
        order: 2;
        flex-direction: column;
        gap: 8px;
    }

        .filter-row-mid .filter-group {
            width: 100%;
        }

    .filter-row-bottom {
        order: 3;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .filter-row-bottom {
        flex-direction: column;
        align-items: stretch;
    }

        .filter-row-bottom .archive-toggle {
            justify-content: center;
        }

        .filter-row-bottom .btn-outline {
            justify-content: center;
        }
}
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .main-content {
        width: 100%;
        margin-left: 0 !important;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }

    .top-bar-left {
        display: flex;
        justify-content: space-between;
        width: 100%;
        align-items: center;
    }

    .page-title h1 {
        font-size: 1.2rem;
    }

    .page-title p {
        font-size: 0.65rem;
    }

    .user-area {
        width: 100%;
        justify-content: flex-end;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-input,
    .filter-select {
        width: 100%;
        min-width: auto;
    }

    .archive-toggle {
        justify-content: center;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

        .table-container::after {
            content: '←→ листайте →';
            display: block;
            position: absolute;
            bottom: 5px;
            right: 10px;
            background: rgba(0, 0, 0, 0.5);
            color: white;
            font-size: 9px;
            padding: 2px 8px;
            border-radius: 20px;
            pointer-events: none;
            z-index: 10;
            white-space: nowrap;
        }

    .requests-table {
        min-width: 550px;
        font-size: 0.7rem;
    }

        .requests-table th,
        .requests-table td {
            padding: 10px 12px;
        }

            .requests-table th:nth-child(8),
            .requests-table td:nth-child(8) {
                display: none;
            }

    .kpi-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kpi-subrow {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .kpi-card,
    .kpi-subcard {
        padding: 12px;
    }

    .kpi-value {
        font-size: 1.3rem;
    }

    .kpi-sub-value {
        font-size: 1rem;
    }

    .week-chart-dashboard {
        height: 120px;
        gap: 6px;
    }

    .week-chart-label {
        font-size: 0.6rem;
    }

    .modal-content {
        width: 95%;
        padding: 16px;
        max-height: 90vh;
    }

    .modal-buttons {
        flex-direction: column;
    }

        .modal-buttons .btn {
            width: 100%;
        }

    .form-two-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-full-header {
        flex-wrap: wrap;
        gap: 10px;
    }

        .form-full-header h3 {
            order: 1;
            font-size: 1rem;
        }

    .profile-full-grid {
        grid-template-columns: 1fr;
    }

    .profile-mini-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-mini-actions {
        margin-left: 0;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group-modern {
        width: 100%;
    }

    .filter-actions {
        margin-left: 0;
        justify-content: stretch;
    }

        .filter-actions button {
            flex: 1;
        }

    .date-range {
        justify-content: center;
    }

    .help-container {
        flex-direction: column;
    }

    .help-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #E2E8F0;
    }

    .help-article {
        padding: 16px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

        .about-grid.two-cols {
            grid-template-columns: 1fr;
        }

    .about-card.full-width {
        grid-column: span 1;
    }

    .deadline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .deadline-value {
        margin-left: 0;
    }

    .notification-panel {
        width: 300px;
        right: 10px;
        left: auto;
    }

    .period-selector {
        flex-wrap: wrap;
    }

    .period-btn {
        padding: 4px 10px;
        font-size: 0.65rem;
    }

    .footer {
        padding: 16px;
        font-size: 0.6rem;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }

    .kpi-subrow {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-name {
        display: none;
    }

    .user-profile {
        padding: 6px 10px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .btn-sm {
        padding: 4px 10px;
    }

    .notification-panel {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
    }

    .forecast-row {
        flex-direction: column;
        gap: 12px;
    }

    .forecast-divider {
        width: 80%;
        height: 1px;
    }

    .forecast-value {
        font-size: 1.5rem;
    }

    .gallery-item {
        width: 70px;
        height: 70px;
    }

    .emergency-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .emergency-details {
        align-self: flex-end;
    }

    .logs-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .detail-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal-gallery-prev {
        left: 10px;
    }

    .modal-gallery-next {
        right: 10px;
    }

    .modal-gallery-close {
        top: 10px;
        right: 10px;
    }
}

/* Скрытие кнопки меню на странице логина */
body:has(#loginPanel[style*="display: flex"]) .menu-toggle {
    display: none !important;
}

/* Утилиты */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-3 {
    margin-bottom: 12px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 24px;
}

.text-muted {
    color: #6B85B0;
}

.text-danger {
    color: #DC2626;
}

.text-success {
    color: #10B981;
}

.text-warning {
    color: #F59E0B;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}