* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; transition: background .3s, color .3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== СВЕТЛАЯ ТЕМА (НЕЖНО-ГОЛУБАЯ) ===== */
body.theme-light { 
    background: #e8f4f8; 
    color: #1a2332; 
}
body.theme-light .header { 
    background: rgba(235, 247, 251, 0.92); 
    backdrop-filter: blur(20px); 
    border-bottom: 1px solid rgba(37,99,235,.08); 
}
body.theme-light .apartment-card { 
    background: #eaf5f9; 
    border: 1px solid rgba(37,99,235,.06); 
}
body.theme-light .apartment-card:hover { 
    border-color: #4f8cf7; 
    box-shadow: 0 8px 30px rgba(37,99,235,.08); 
    background: #edf7fb;
}
body.theme-light .hero { 
    background: linear-gradient(135deg, #4f8cf7, #7bb3f0, #a8d0f5); 
}
body.theme-light .price { 
    color: #4f8cf7; 
}
body.theme-light .theme-btn { 
    background: #dcecf2; 
    color: #1a2332; 
}
body.theme-light .theme-btn.active { 
    background: #4f8cf7; 
    color: #fff; 
}
body.theme-light .features span { 
    background: #dcecf2; 
}
body.theme-light .footer { 
    background: #eaf5f9; 
    border-top: 1px solid rgba(37,99,235,.06); 
}
body.theme-light .badge-top { 
    background: #4f8cf7; 
}
body.theme-light .badge-floor { 
    background: rgba(0,0,0,.6); 
}
body.theme-light .apartment-image { 
    background-color: #dcecf2; 
}
body.theme-light .apartment-image .no-image { 
    color: #94a3b8; 
}
body.theme-light .filter-panel { 
    background: #eaf5f9; 
    border-color: rgba(37,99,235,.06); 
}
body.theme-light .filter-group input[type="number"] { 
    background: #f0f8fb; 
    border-color: rgba(37,99,235,.08); 
}
body.theme-light .filter-toggle-btn { 
    border-color: rgba(79,140,247,.3); 
}
body.theme-light .filter-toggle-btn:hover { 
    background: #dcecf2; 
}
body.theme-light .filter-reset { 
    background: rgba(239,68,68,.08); 
}
body.theme-light .filter-reset:hover { 
    background: rgba(239,68,68,.15); 
}
body.theme-light .detail-info-item { 
    background: #eaf5f9; 
    border-color: rgba(37,99,235,.04); 
}
body.theme-light .detail-main-photo-wrapper { 
    background: #dcecf2; 
}
body.theme-light .detail-thumbnail { 
    border-color: rgba(37,99,235,.1); 
}
body.theme-light .detail-thumbnail.active { 
    border-color: #4f8cf7; 
}
body.theme-light .apartment-detail { 
    background: #eaf5f9; 
    border-color: rgba(37,99,235,.06); 
}
body.theme-light .panel-card { 
    background: #eaf5f9; 
    border-color: rgba(37,99,235,.06); 
}
body.theme-light .form input, 
body.theme-light .form textarea { 
    background: #f0f8fb; 
    border-color: rgba(37,99,235,.08); 
}
body.theme-light .login-box { 
    background: #eaf5f9; 
}
body.theme-light .login-form input { 
    background: #f0f8fb; 
    border-color: rgba(37,99,235,.08); 
}
body.theme-light .photo-manager-box { 
    background: rgba(37,99,235,.04); 
}
body.theme-light .photo-item { 
    border-color: rgba(37,99,235,.08); 
}
body.theme-light .photo-item:hover { 
    border-color: #4f8cf7; 
}
body.theme-light .detail-stat { 
    background: rgba(79,140,247,.06); 
    border-color: rgba(79,140,247,.08); 
}
body.theme-light .detail-stat:hover { 
    background: rgba(79,140,247,.1); 
}
body.theme-light .detail-info-grid { 
    border-color: rgba(37,99,235,.06); 
}
body.theme-light .detail-price-block { 
    border-color: rgba(37,99,235,.06); 
}
body.theme-light .detail-description { 
    color: #1a2332; 
}
body.theme-light .detail-description p { 
    color: #2a3a4a; 
}
body.theme-light .address { 
    color: #4a6a7a; 
}
body.theme-light .apartment-header h3 { 
    color: #1a2332; 
}
body.theme-light .section-head h2 { 
    color: #1a2332; 
}
body.theme-light .section-head span { 
    color: #5a7a8a; 
}
body.theme-light .copyright { 
    color: #5a7a8a; 
}
body.theme-light .detail-info h1 { 
    color: #1a2332; 
}
body.theme-light .detail-address { 
    color: #4a6a7a; 
}
body.theme-light .detail-info-label { 
    color: #5a7a8a; 
}
body.theme-light .detail-info-value { 
    color: #4f8cf7; 
}
body.theme-light .detail-stat-label { 
    color: #5a7a8a; 
}
body.theme-light .detail-stat-value { 
    color: #4f8cf7; 
}
body.theme-light .detail-counter { 
    background: rgba(0,0,0,.6); 
    color: #fff; 
}
body.theme-light .modal-overlay { 
    background: rgba(0,0,0,.92); 
}
body.theme-light .modal-close { 
    color: #fff; 
}
body.theme-light .modal-nav { 
    background: rgba(255,255,255,.15); 
    color: #fff; 
}
body.theme-light .modal-nav:hover { 
    background: rgba(255,255,255,.25); 
}
body.theme-light .modal-counter { 
    color: rgba(255,255,255,.5); 
}
body.theme-light .empty-state i { 
    color: #b0c8d0; 
}
body.theme-light .empty-state h3 { 
    color: #1a2332; 
}
body.theme-light .empty-state p { 
    color: #5a7a8a; 
}
body.theme-light .alert.success { 
    background: #d4edda; 
    color: #155724; 
    border-color: #c3e6cb; 
}
body.theme-light .alert.error { 
    background: #f8d7da; 
    color: #721c24; 
    border-color: #f5c6cb; 
}
body.theme-light .logo-text { 
    color: #1a2332; 
}
body.theme-light .logo-text span { 
    color: #4f8cf7; 
}
body.theme-light .logo-svg { 
    color: #4f8cf7; 
}
body.theme-light .btn-outline { 
    border-color: rgba(79,140,247,.3); 
    color: #4f8cf7; 
}
body.theme-light .btn-outline:hover { 
    background: #4f8cf7; 
    color: #fff; 
}
body.theme-light .btn-primary { 
    background: #4f8cf7; 
    color: #fff; 
}
body.theme-light .btn-primary:hover { 
    background: #3b7beb; 
}
body.theme-light .btn-logout { 
    background: rgba(239,68,68,.1); 
    color: #ef4444; 
}
body.theme-light .btn-logout:hover { 
    background: #ef4444; 
    color: #fff; 
}
body.theme-light .btn-edit { 
    background: #22c55e; 
    color: #fff; 
}
body.theme-light .btn-edit:hover { 
    background: #16a34a; 
}
body.theme-light .btn-danger { 
    background: #ef4444; 
    color: #fff; 
}
body.theme-light .btn-danger:hover { 
    background: #dc2626; 
}
body.theme-light .btn-photo { 
    background: #4f8cf7; 
    color: #fff; 
}
body.theme-light .btn-photo:hover { 
    background: #3b7beb; 
}
body.theme-light .apartment-item { 
    border-color: rgba(37,99,235,.06); 
}
body.theme-light .apt-info strong { 
    color: #1a2332; 
}
body.theme-light .apt-info p { 
    color: #4a6a7a; 
}
body.theme-light .apt-info small { 
    color: #5a7a8a; 
}
body.theme-light .panel-card h2 { 
    color: #1a2332; 
}
body.theme-light .panel-card h2 i { 
    color: #4f8cf7; 
}
body.theme-light .form label { 
    color: #1a2332; 
}
body.theme-light .form small { 
    color: #5a7a8a; 
}
body.theme-light .login-header p { 
    color: #4a6a7a; 
}
body.theme-light .login-footer a { 
    color: #4f8cf7; 
}
body.theme-light .login-footer a:hover { 
    text-decoration: underline; 
}
body.theme-light .detail-thumbnails::-webkit-scrollbar-thumb { 
    background: #4f8cf7; 
}
body.theme-light .detail-thumbnails::-webkit-scrollbar-track { 
    background: #dcecf2; 
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.theme-dark { 
    background: #0f172a; 
    color: #e8edf5; 
}
body.theme-dark .header { 
    background: rgba(15,23,42,.9); 
    backdrop-filter: blur(20px); 
    border-bottom: 1px solid rgba(255,255,255,.06); 
}
body.theme-dark .apartment-card { 
    background: #1a2332; 
    border: 1px solid rgba(255,255,255,.06); 
}
body.theme-dark .apartment-card:hover { 
    border-color: #4f8cf7; 
    box-shadow: 0 8px 30px rgba(79,140,247,.1); 
}
body.theme-dark .hero { 
    background: linear-gradient(135deg, #0f172a, #1a2332); 
    border-bottom: 1px solid rgba(255,255,255,.04); 
}
body.theme-dark .price { 
    color: #7bb3f0; 
}
body.theme-dark .theme-btn { 
    background: #1a2332; 
    color: #94a3b8; 
}
body.theme-dark .theme-btn.active { 
    background: #4f8cf7; 
    color: #fff; 
}
body.theme-dark .features span { 
    background: #0f172a; 
}
body.theme-dark .footer { 
    background: #0f172a; 
    border-top: 1px solid rgba(255,255,255,.04); 
}
body.theme-dark .address { 
    color: #94a3b8; 
}
body.theme-dark .badge-top { 
    background: #4f8cf7; 
}
body.theme-dark .apartment-image { 
    background-color: #1a2332; 
}
body.theme-dark .apartment-image .no-image { 
    color: #3a4a5a; 
}
body.theme-dark .filter-panel { 
    background: rgba(255,255,255,.03); 
    border-color: rgba(255,255,255,.06); 
}
body.theme-dark .filter-group input[type="number"] { 
    background: rgba(0,0,0,.3); 
    border-color: rgba(255,255,255,.06); 
    color: #e8edf5; 
}
body.theme-dark .filter-toggle-btn { 
    border-color: rgba(79,140,247,.2); 
}
body.theme-dark .filter-toggle-btn:hover { 
    background: rgba(79,140,247,.05); 
}
body.theme-dark .filter-reset { 
    background: rgba(239,68,68,.08); 
}
body.theme-dark .filter-reset:hover { 
    background: rgba(239,68,68,.15); 
}
body.theme-dark .detail-info-item { 
    background: rgba(255,255,255,.03); 
    border-color: rgba(255,255,255,.04); 
}
body.theme-dark .detail-main-photo-wrapper { 
    background: #0f172a; 
}
body.theme-dark .detail-thumbnail { 
    border-color: rgba(255,255,255,.06); 
}
body.theme-dark .detail-thumbnail.active { 
    border-color: #7bb3f0; 
}
body.theme-dark .apartment-detail { 
    background: #1a2332; 
    border-color: rgba(255,255,255,.06); 
}
body.theme-dark .panel-card { 
    background: #1a2332; 
    border-color: rgba(255,255,255,.06); 
}
body.theme-dark .form input, 
body.theme-dark .form textarea { 
    background: #0f172a; 
    border-color: rgba(255,255,255,.06); 
    color: #e8edf5; 
}
body.theme-dark .login-box { 
    background: #1a2332; 
}
body.theme-dark .login-header p { 
    color: #94a3b8; 
}
body.theme-dark .login-form input { 
    background: #0f172a; 
    border-color: rgba(255,255,255,.06); 
    color: #e8edf5; 
}
body.theme-dark .photo-manager-box { 
    background: rgba(255,255,255,.03); 
}
body.theme-dark .photo-item { 
    border-color: rgba(255,255,255,.06); 
}
body.theme-dark .photo-item:hover { 
    border-color: #7bb3f0; 
}
body.theme-dark .detail-stat { 
    background: rgba(79,140,247,.06); 
    border-color: rgba(79,140,247,.08); 
}
body.theme-dark .detail-stat:hover { 
    background: rgba(79,140,247,.12); 
}
body.theme-dark .detail-info-grid { 
    border-color: rgba(255,255,255,.06); 
}
body.theme-dark .detail-price-block { 
    border-color: rgba(255,255,255,.06); 
}
body.theme-dark .detail-info-icon { 
    color: #7bb3f0; 
}
body.theme-dark .detail-info-value { 
    color: #7bb3f0; 
}
body.theme-dark .detail-stat-value { 
    color: #7bb3f0; 
}
body.theme-dark .detail-thumbnails::-webkit-scrollbar-thumb { 
    background: #7bb3f0; 
}
body.theme-dark .detail-thumbnails::-webkit-scrollbar-track { 
    background: #1a2332; 
}
body.theme-dark .logo-text span { 
    color: #7bb3f0; 
}
body.theme-dark .logo-svg { 
    color: #7bb3f0; 
}
body.theme-dark .btn-outline { 
    border-color: rgba(79,140,247,.2); 
    color: #7bb3f0; 
}
body.theme-dark .btn-outline:hover { 
    background: #4f8cf7; 
    color: #fff; 
}
body.theme-dark .btn-primary { 
    background: #4f8cf7; 
    color: #fff; 
}
body.theme-dark .btn-primary:hover { 
    background: #3b7beb; 
}
body.theme-dark .btn-logout { 
    background: rgba(239,68,68,.08); 
    color: #ef4444; 
}
body.theme-dark .btn-logout:hover { 
    background: #ef4444; 
    color: #fff; 
}
body.theme-dark .btn-edit { 
    background: #22c55e; 
    color: #fff; 
}
body.theme-dark .btn-edit:hover { 
    background: #16a34a; 
}
body.theme-dark .btn-danger { 
    background: #ef4444; 
    color: #fff; 
}
body.theme-dark .btn-danger:hover { 
    background: #dc2626; 
}
body.theme-dark .btn-photo { 
    background: #4f8cf7; 
    color: #fff; 
}
body.theme-dark .btn-photo:hover { 
    background: #3b7beb; 
}
body.theme-dark .apartment-item { 
    border-color: rgba(255,255,255,.06); 
}
body.theme-dark .panel-card h2 i { 
    color: #7bb3f0; 
}
body.theme-dark .login-footer a { 
    color: #7bb3f0; 
}
body.theme-dark .detail-counter { 
    background: rgba(0,0,0,.6); 
    color: #fff; 
}
body.theme-dark .modal-overlay { 
    background: rgba(0,0,0,.92); 
}
body.theme-dark .modal-close { 
    color: #fff; 
}
body.theme-dark .modal-nav { 
    background: rgba(255,255,255,.15); 
    color: #fff; 
}
body.theme-dark .modal-nav:hover { 
    background: rgba(255,255,255,.25); 
}
body.theme-dark .modal-counter { 
    color: rgba(255,255,255,.5); 
}
body.theme-dark .alert.success { 
    background: rgba(34,197,94,.12); 
    color: #86efac; 
    border-color: rgba(34,197,94,.15); 
}
body.theme-dark .alert.error { 
    background: rgba(239,68,68,.12); 
    color: #fca5a5; 
    border-color: rgba(239,68,68,.15); 
}

/* ===== ОБЩИЕ СТИЛИ ===== */
.header { padding: 12px 0; position: sticky; top: 0; z-index: 100; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.header-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(0,0,0,.04); }
body.theme-dark .theme-toggle { background: rgba(255,255,255,.04); }
.theme-btn { width: 36px; height: 36px; border: none; border-radius: 8px; cursor: pointer; transition: all .2s; font-size: 14px; }
.theme-btn:hover { transform: scale(1.05); }

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.logo-svg { width: 44px; height: 44px; flex-shrink: 0; transition: all .3s; }
.logo-text { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }

/* ===== ГЕРОЙ ===== */
.hero { padding: 60px 0 80px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -30%; right: -10%; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
.hero::after { content: ''; position: absolute; bottom: -30%; left: -10%; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.05); pointer-events: none; }
.hero-content { position: relative; z-index: 1; }
.hero-badge { display: inline-block; padding: 6px 20px; border-radius: 100px; background: rgba(255,255,255,.15); font-size: 13px; font-weight: 600; margin-bottom: 20px; backdrop-filter: blur(10px); }
.hero h1 { font-size: 48px; font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.hero p { font-size: 18px; opacity: .85; max-width: 500px; margin: 0 auto 40px; }
.hero-stats { display: flex; justify-content: center; gap: 50px; }
.stat-number { font-size: 34px; font-weight: 700; display: block; }
.stat-label { font-size: 13px; opacity: .7; }

/* ===== СЕКЦИЯ ===== */
.section-head { display: flex; justify-content: space-between; align-items: center; padding: 40px 0 20px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { font-size: 26px; font-weight: 700; }
.section-head span { font-size: 14px; opacity: .6; }

/* ===== ФИЛЬТРЫ ===== */
.filter-toggle-btn { padding: 8px 20px; border: 1px solid; border-radius: 10px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; transition: all .2s; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.filter-panel { display: none; padding: 20px 24px; border-radius: 12px; margin-bottom: 24px; border: 1px solid; }
.filter-panel.active { display: block; animation: slideDown .3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.filter-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 120px; }
.filter-group label { font-size: 13px; font-weight: 500; opacity: .6; }
.filter-group input[type="number"] { padding: 8px 12px; border-radius: 8px; border: 1px solid; font-size: 14px; width: 100%; transition: all .2s; }
.filter-group input[type="number"]:focus { outline: none; border-color: #4f8cf7; }
.filter-actions { flex: 0 0 auto; min-width: auto; }
.filter-reset { padding: 8px 20px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all .2s; display: flex; align-items: center; gap: 6px; height: 40px; white-space: nowrap; }

/* ===== КАРТОЧКИ ===== */
.apartments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding-bottom: 60px; }
.apartment-card { border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: all .3s; display: block; }
.apartment-card:hover { transform: translateY(-6px); }
.apartment-image { height: 200px; background-size: cover; background-position: center; position: relative; }
.apartment-image .no-image { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 40px; }
.badge-floor { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 100px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(4px); }
.badge-top { position: absolute; top: 12px; left: 80px; padding: 4px 12px; border-radius: 100px; color: #fff; font-size: 11px; font-weight: 600; }
.apartment-body { padding: 16px 18px 18px; }
.apartment-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.apartment-header h3 { font-size: 17px; font-weight: 600; line-height: 1.3; }
.price { font-size: 19px; font-weight: 700; white-space: nowrap; }
.address { font-size: 14px; opacity: .6; margin-bottom: 10px; display: flex; align-items: center; gap: 4px; }
.features { display: flex; gap: 6px; flex-wrap: wrap; }
.features span { font-size: 13px; padding: 3px 12px; border-radius: 100px; display: flex; align-items: center; gap: 4px; }

/* ===== ДЕТАЛЬНАЯ ===== */
.apartment-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-radius: 16px; padding: 30px; border: 1px solid; margin-top: 20px; }
.detail-gallery { display: flex; flex-direction: column; gap: 12px; width: 100%; overflow: hidden; }
.detail-main-photo-wrapper { position: relative; width: 100%; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; }
.detail-main-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.detail-main-photo img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.detail-main-photo.no-image { display: flex; align-items: center; justify-content: center; }
.detail-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); backdrop-filter: blur(8px); color: #fff; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; z-index: 2; }
.detail-nav:hover { background: rgba(0,0,0,.7); }
.detail-nav-prev { left: 12px; }
.detail-nav-next { right: 12px; }
.detail-counter { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); backdrop-filter: blur(8px); padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; z-index: 2; }
.detail-thumbnails-wrapper { width: 100%; overflow: hidden; }
.detail-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; scrollbar-width: thin; }
.detail-thumbnails::-webkit-scrollbar { height: 4px; }
.detail-thumbnail { width: 80px; height: 80px; flex-shrink: 0; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: all .2s; }
.detail-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumbnail:hover { opacity: .8; }

.detail-info { display: flex; flex-direction: column; gap: 16px; }
.detail-info h1 { font-size: 28px; font-weight: 700; }
.detail-address { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.detail-price-block { display: flex; align-items: baseline; gap: 4px; padding: 12px 0; border-top: 1px solid; border-bottom: 1px solid; }
.detail-price { font-size: 32px; font-weight: 700; }
.detail-price-label { font-size: 16px; opacity: .5; }

.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid; border-bottom: 1px solid; }
.detail-info-item { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 10px; border: 1px solid; }
.detail-info-icon { font-size: 18px; width: 28px; }
.detail-info-item div { display: flex; flex-direction: column; }
.detail-info-label { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.detail-info-value { font-size: 16px; font-weight: 600; }

.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid; border-bottom: 1px solid; }
.detail-stat { border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: all .2s; border: 1px solid; }
.detail-stat:hover { transform: translateY(-2px); }
.detail-stat-icon { font-size: 22px; margin-bottom: 4px; }
.detail-stat-value { font-size: 24px; font-weight: 700; }
.detail-stat-label { font-size: 12px; margin-top: 2px; }

.detail-description { margin-top: 4px; }
.detail-description h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.detail-description p { line-height: 1.7; }

.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* ===== ФУТЕР ===== */
.footer { padding: 30px 0; }
.footer-content { display: flex; flex-direction: column; align-items: center; }
.copyright { font-size: 13px; opacity: .5; }

/* ===== ПАНЕЛЬ ===== */
.panel-main { padding: 20px 0 40px; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel-card { padding: 24px; border-radius: 16px; border: 1px solid; }
.panel-card h2 { font-size: 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.panel-card h2 i { opacity: .7; }

.apartment-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid; gap: 12px; }
.apartment-item:last-child { border-bottom: none; }
.apartment-item p { font-size: 14px; opacity: .6; margin: 2px 0; }
.apartment-item small { font-size: 12px; opacity: .4; }
.item-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ===== ФОРМЫ ===== */
.form .form-group { margin-bottom: 16px; }
.form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.form input, .form textarea { width: 100%; padding: 10px 14px; border-radius: 10px; font-size: 14px; transition: all .2s; font-family: inherit; border: 1px solid; }
.form input:focus, .form textarea:focus { outline: none; border-color: #4f8cf7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form small { font-size: 12px; opacity: .5; display: block; margin-top: 4px; }
input[type="file"][multiple] { padding: 10px; border: 2px dashed rgba(79,140,247,.3); border-radius: 10px; background: rgba(79,140,247,.03); cursor: pointer; width: 100%; }
input[type="file"][multiple]:hover { border-color: #4f8cf7; background: rgba(79,140,247,.06); }

/* ===== КНОПКИ ===== */
.btn-primary { padding: 10px 24px; border: none; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79,140,247,.25); }
.btn-block { width: 100%; justify-content: center; padding: 14px; }
.btn-danger { padding: 6px 12px; border: none; border-radius: 8px; cursor: pointer; transition: all .2s; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.btn-danger:hover { transform: scale(1.05); }
.btn-edit { padding: 6px 12px; border: none; border-radius: 8px; cursor: pointer; transition: all .2s; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.btn-edit:hover { transform: scale(1.05); }
.btn-logout { padding: 8px 18px; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: 14px; transition: all .2s; display: inline-flex; align-items: center; gap: 6px; }
.btn-logout:hover { color: #fff; }
.btn-outline { padding: 8px 18px; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: 14px; transition: all .2s; border: 1px solid; display: inline-flex; align-items: center; gap: 6px; }
.btn-outline:hover { color: #fff; }
.btn-photo { padding: 6px 12px; border: none; border-radius: 8px; cursor: pointer; transition: all .2s; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.btn-photo:hover { transform: scale(1.05); }

/* ===== ФОТО МЕНЕДЖЕР ===== */
.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.photo-item { position: relative; width: 80px; height: 80px; border-radius: 10px; overflow: hidden; border: 2px solid; cursor: grab; transition: all .2s; }
.photo-item:hover { transform: scale(1.02); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .photo-number { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; padding: 1px 8px; border-radius: 4px; }
.photo-item .photo-main-badge { position: absolute; top: 4px; left: 4px; background: #4f8cf7; color: #fff; font-size: 9px; padding: 1px 8px; border-radius: 4px; font-weight: 600; }
.photo-item .photo-del { position: absolute; top: 4px; right: 4px; background: rgba(239,68,68,.9); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 11px; cursor: pointer; display: none; align-items: center; justify-content: center; }
.photo-item:hover .photo-del { display: flex; }
.photo-item.dragging { opacity: .4; }
.photo-manager-box { border-radius: 12px; padding: 16px; margin: 8px 0 16px; }
.photo-hint { font-size: 12px; opacity: .5; margin-bottom: 10px; }

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; backdrop-filter: blur(10px); z-index: 9999; align-items: center; justify-content: center; padding: 20px; animation: modalFadeIn .25s ease; }
@keyframes modalFadeIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
.modal-content { position: relative; width: 100%; max-width: 900px; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.modal-close { position: absolute; top: -50px; right: 0; background: none; border: none; font-size: 28px; cursor: pointer; transition: all .2s; z-index: 10; opacity: .6; }
.modal-close:hover { opacity: 1; transform: rotate(90deg); }
.modal-image-wrapper { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }
.modal-image-wrapper img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.modal-nav { position: absolute; top: 50%; transform: translateY(-50%); backdrop-filter: blur(8px); border: none; border-radius: 50%; width: 48px; height: 48px; font-size: 20px; cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; }
.modal-nav:hover { background: rgba(255,255,255,.25); }
.modal-nav-prev { left: 16px; }
.modal-nav-next { right: 16px; }
.modal-counter { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 500; }

/* ===== ЛОГИН ===== */
.login-page { background: linear-gradient(135deg, #4f8cf7, #7bb3f0); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-wrapper { width: 100%; max-width: 400px; }
.login-box { padding: 40px; border-radius: 20px; box-shadow: 0 20px 60px rgba(79,140,247,.2); }
.login-header { text-align: center; margin-bottom: 30px; }
.login-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.login-header h1 { font-size: 28px; font-weight: 800; }
.login-header p { font-size: 14px; margin-top: 4px; }
.login-form .form-group { margin-bottom: 18px; }
.login-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.login-form input { width: 100%; padding: 12px 16px; border: 2px solid; border-radius: 12px; font-size: 15px; transition: all .2s; }
.login-form input:focus { border-color: #4f8cf7; outline: none; box-shadow: 0 0 0 4px rgba(79,140,247,.08); }
.login-footer { text-align: center; margin-top: 20px; }
.login-footer a { text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.login-footer a:hover { text-decoration: underline; }

/* ===== АЛЕРТЫ ===== */
.alert { padding: 14px 20px; border-radius: 12px; margin-bottom: 20px; font-weight: 500; }

/* ===== ПУСТО ===== */
.empty-state { text-align: center; padding: 60px 20px; grid-column: 1 / -1; }
.empty-state i { font-size: 48px; opacity: .15; display: block; margin-bottom: 12px; }
.empty-state h3 { font-size: 20px; margin-bottom: 4px; }
.empty-state p { opacity: .5; }

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .hero { padding: 40px 0 60px; }
    .hero h1 { font-size: 32px; }
    .hero-stats { gap: 30px; flex-wrap: wrap; }
    .apartments-grid { grid-template-columns: 1fr; }
    .panel-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .container { padding: 0 16px; }
    .login-box { padding: 28px 20px; }
    .apartment-detail { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
    .detail-main-photo { height: 280px; }
    .detail-info h1 { font-size: 22px; }
    .detail-price { font-size: 26px; }
    .detail-info-grid { grid-template-columns: 1fr; }
    .detail-stats { grid-template-columns: 1fr 1fr; }
    .filter-row { flex-direction: column; gap: 12px; align-items: stretch; }
    .filter-group { min-width: auto; }
    .filter-actions { flex: 1; }
    .filter-reset { width: 100%; justify-content: center; }
    .filter-toggle-btn { font-size: 13px; padding: 6px 14px; }
    .detail-nav { width: 34px; height: 34px; font-size: 14px; }
    .detail-nav-prev { left: 8px; }
    .detail-nav-next { right: 8px; }
    .detail-thumbnail { width: 64px; height: 64px; }
    .modal-nav { width: 38px; height: 38px; font-size: 16px; }
    .modal-nav-prev { left: 8px; }
    .modal-nav-next { right: 8px; }
    .modal-image-wrapper img { max-height: 70vh; }
    .modal-close { top: -44px; font-size: 24px; }
    .modal-counter { bottom: -34px; font-size: 12px; }
}
@media (max-width: 480px) {
    .logo-svg { width: 36px; height: 36px; }
    .logo-text { font-size: 18px; }
    .hero h1 { font-size: 26px; }
    .apartment-image { height: 160px; }
    .detail-main-photo { height: 220px; }
    .detail-thumbnail { width: 52px; height: 52px; }
    .detail-nav { width: 30px; height: 30px; font-size: 12px; }
    .detail-nav-prev { left: 6px; }
    .detail-nav-next { right: 6px; }
    .detail-counter { font-size: 11px; padding: 3px 12px; bottom: 8px; }
    .detail-stats { grid-template-columns: 1fr; gap: 8px; }
    .detail-stat { padding: 10px 12px; }
    .detail-stat-value { font-size: 20px; }
    .detail-stat-icon { font-size: 18px; }
    .filter-panel { padding: 14px 16px; }
    .modal-nav { width: 32px; height: 32px; font-size: 13px; }
    .modal-nav-prev { left: 4px; }
    .modal-nav-next { right: 4px; }
    .modal-image-wrapper img { max-height: 60vh; }
    .modal-close { top: -38px; font-size: 20px; }
}
