/**
 * assets/css/kefir.css - Основные стили мессенджера
 * Мессенджер "КЭФИР"
 */

/* ==================== ПЕРЕМЕННЫЕ ==================== */
:root {
    --primary: #7C3AED;
    --primary-dark: #6D28D9;
    --primary-light: rgba(124, 58, 237, 0.08);
    --primary-glow: rgba(124, 58, 237, 0.25);
    --secondary: #10B981;
    --accent: #F59E0B;
    
    /* Backgrounds */
    --bg: #F8F9FC;
    --bg-gradient: linear-gradient(135deg, #F8F9FC 0%, #F1F5F9 100%);
    --surface: #FFFFFF;
    --surface-hover: #F8FAFC;
    --surface-glass: rgba(255, 255, 255, 0.7);
    
    /* Text */
    --text: #0F172A;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --text-inverse: #FFFFFF;
    
    /* Borders */
    --border: rgba(0, 0, 0, 0.06);
    --border-strong: rgba(0, 0, 0, 0.12);
    
    /* Colors */
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --info: #3B82F6;
    --info-light: rgba(59, 130, 246, 0.1);
    
    /* Shadows - NEW DEPTH SYSTEM */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 25px 80px rgba(0, 0, 0, 0.15);
    --shadow-primary: 0 8px 30px rgba(124, 58, 237, 0.3);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    
    /* Safe areas */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    
    /* Dimensions */
    --sidebar-width: 340px;
    --chat-header-height: 68px;
    --chat-footer-height: 72px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #6D28D9 50%, #5B21B6 100%);
    --gradient-primary-hover: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%);
    --gradient-surface: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%);
    --gradient-bg: linear-gradient(180deg, #F8F9FC 0%, #F1F5F9 100%);
    --gradient-splash: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ==================== ТЁМНАЯ ТЕМА ==================== */
[data-theme="dark"] {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --primary-light: rgba(139, 92, 246, 0.12);
    --primary-glow: rgba(139, 92, 246, 0.3);
    
    /* Dark backgrounds */
    --bg: #0B1122;
    --bg-gradient: linear-gradient(135deg, #0B1122 0%, #0F1729 100%);
    --surface: #151B2D;
    --surface-hover: #1E2640;
    --surface-glass: rgba(21, 27, 45, 0.8);
    
    /* Dark text */
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    --text-inverse: #0F172A;
    
    /* Dark borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    
    /* Dark colors */
    --success: #34D399;
    --success-light: rgba(52, 211, 153, 0.12);
    --warning: #FBBF24;
    --warning-light: rgba(251, 191, 36, 0.12);
    --danger: #F87171;
    --danger-light: rgba(248, 113, 113, 0.12);
    --info: #60A5FA;
    --info-light: rgba(96, 165, 250, 0.12);
    
    /* Dark shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 25px 80px rgba(0, 0, 0, 0.7);
    --shadow-primary: 0 8px 30px rgba(139, 92, 246, 0.4);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);
    
    /* Dark glass */
    --glass-bg: rgba(21, 27, 45, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Dark gradients */
    --gradient-surface: linear-gradient(135deg, rgba(21,27,45,0.9) 0%, rgba(21,27,45,0.5) 100%);
    --gradient-bg: linear-gradient(180deg, #0B1122 0%, #0F1729 100%);
}

/* ==================== БАЗОВЫЕ СТИЛИ ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    transition: background var(--transition), color var(--transition);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== КАРКАС ПРИЛОЖЕНИЯ ==================== */
#app {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    overflow: hidden;
}

#splashScreen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15), transparent 40%), var(--gradient-splash);
    color: #fff;
}

#splashScreen .splash-icon {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
    animation: pulse 1.8s ease-in-out infinite;
}

#splashScreen .splash-title {
    font-size: 34px;
    letter-spacing: 0.5px;
    font-weight: 800;
}

#splashScreen.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.login-screen {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top right, rgba(124,58,237,0.24), transparent 40%),
                radial-gradient(circle at bottom left, rgba(16,185,129,0.18), transparent 36%),
                var(--bg-gradient);
}

.login-card {
    width: min(440px, 100%);
    background: var(--surface-glass);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: var(--shadow-xl);
    padding: 30px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: fadeInScale .35s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 10px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-primary);
}

.login-header h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
}

.login-header p {
    margin: 6px 0 0;
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 12px;
}

.login-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.login-form input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.btn-login {
    width: 100%;
    margin-top: 8px;
    border: none;
    border-radius: 14px;
    padding: 13px 16px;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-primary);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-primary);
}

.btn-login:hover {
    transform: translateY(-1px);
}

.login-error {
    display: none;
    margin-top: 12px;
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
}

.login-footer-link {
    text-align: center;
    margin-top: 16px;
}

.login-footer-link a {
    font-weight: 600;
}

/* ==================== СКРОЛЛБАР - REDESIGNED ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==================== АНИМАЦИИ - NEW ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(4); opacity: 0; }
}

/* ==================== КНОПКИ - REDESIGNED ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--border-strong);
}

.btn-outline-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--border-strong);
}

.btn-outline-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.05);
}

/* ==================== САЙДБАР - REDESIGNED ==================== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform var(--transition), background var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-glow) 0%, transparent 50%, var(--primary-glow) 100%);
    opacity: 0.3;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--gradient-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
}

.user-card:hover {
    background: var(--surface-hover);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    animation: shimmer 3s infinite;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
}

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

.user-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}

.user-info small {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.theme-switcher {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.theme-switcher-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-switcher-btn {
    min-width: 92px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    font-weight: 500;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transform: scaleY(0);
    transition: transform var(--transition-fast);
}

.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    transition: transform var(--transition-fast);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item small {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 12px;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--gradient-primary);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--gradient-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==================== ОСНОВНОЙ КОНТЕНТ ==================== */
.main-content {
    flex: 1;
    overflow: hidden;
    background: var(--bg-gradient);
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 85% 10%, rgba(124,58,237,0.08), transparent 38%),
                radial-gradient(circle at 20% 90%, rgba(16,185,129,0.06), transparent 35%);
}

.page-content {
    display: none;
    height: 100%;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    position: relative;
    z-index: 1;
}

.page-content.active {
    display: block;
}

.page-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.page-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
}

.page-header small {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

/* ==================== ЧАТЫ - REDESIGNED ==================== */
.chat-layout {
    display: flex;
    height: 100%;
    gap: 0;
}

.chat-list-panel {
    width: 360px;
    min-width: 320px;
    max-width: 420px;
    border-right: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
}

.chat-list-panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-glow) 0%, transparent 50%, var(--primary-glow) 100%);
    opacity: 0.2;
}

.chat-search-wrap {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
}

.chat-search-box {
    position: relative;
}

.chat-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
}

.chat-search-input {
    width: 100%;
    padding: 11px 78px 11px 40px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.chat-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.chat-search-shortcut {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-secondary);
    padding: 3px 7px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.chat-search-results {
    border-bottom: 1px solid var(--border);
    max-height: 210px;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent);
}

.chat-search-placeholder {
    padding: 22px 14px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.chat-list-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gradient-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chat-list-header span {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.chat-list-header .btn {
    padding: 6px 10px;
}

.chat-list-body {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.chat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: width var(--transition-fast);
}

.chat-item:hover {
    background: var(--surface-hover);
    transform: translateX(2px);
}

.chat-item:hover::before {
    width: 3px;
}

.chat-item.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.chat-item.unread {
    background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
}

.chat-item-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
    position: relative;
}

.chat-item-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.chat-item-msg {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.chat-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 48px;
    gap: 6px;
}

.chat-item-time {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.chat-item-meta .badge {
    min-width: 22px;
    text-align: center;
}

.chat-item-status {
    font-size: 11px;
    line-height: 1;
    letter-spacing: -1px;
    font-weight: 700;
}

.chat-item-status.is-sent {
    color: var(--text-tertiary);
}

.chat-item-status.is-read {
    color: var(--info);
}

.chat-item.unread .chat-item-name {
    color: var(--primary);
    font-weight: 700;
}

.chat-item.unread .chat-item-msg {
    color: var(--text);
    font-weight: 500;
}

.online-dot {
    width: 12px;
    height: 12px;
    background: var(--success);
    border: 2px solid var(--surface);
    border-radius: var(--radius-full);
    position: absolute;
    bottom: 0;
    right: 0;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

/* ==================== ОКНО ЧАТА - REDESIGNED ==================== */
.chat-window {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-gradient);
    position: relative;
}

.chat-window.hidden {
    display: none;
}

/* ==================== ПУСТОЕ СОСТОЯНИЕ ЧАТА ==================== */
.chat-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.4s ease;
}

.chat-empty-state.hidden {
    display: none;
}

.chat-empty-icon {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: var(--primary);
    background: var(--primary-light);
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.chat-empty-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.chat-empty-state p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.chat-window-header {
    padding: 14px 18px;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 5;
}

.chat-window-head-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
    flex: 1;
}

.chat-window-head-meta strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-window-head-meta small {
    font-size: 12px;
    color: var(--text-secondary);
}

.chat-window-head-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-window-head-actions .btn-icon {
    width: 36px;
    height: 36px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 24px;
    background:
        radial-gradient(circle at 2px 2px, rgba(148, 163, 184, 0.16) 1px, transparent 0) 0 0 / 20px 20px,
        var(--bg-gradient);
}

.messages-day-divider {
    position: sticky;
    top: 10px;
    z-index: 2;
    width: max-content;
    margin: 12px auto 16px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

/* ==================== СООБЩЕНИЯ - REDESIGNED ==================== */
.message-row {
    display: flex;
    margin-bottom: 10px;
}

.message-row.grouped {
    margin-top: -4px;
}

.message-row-in {
    justify-content: flex-start;
}

.message-row-out {
    justify-content: flex-end;
}

.message-bubble {
    max-width: min(74%, 680px);
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.message-bubble:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.message-out {
    margin-left: auto;
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
}

.message-out::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    background: var(--primary-dark);
    background: color-mix(in srgb, var(--primary-dark) 80%, transparent);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    border-bottom-right-radius: 3px;
}

.message-out:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.message-in {
    margin-right: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-left-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.message-in::after {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    clip-path: polygon(0 0, 100% 100%, 0 100%);
    border-bottom-left-radius: 3px;
}

.message-grouped.message-out,
.message-grouped.message-in {
    border-radius: 14px;
}

.message-grouped::after {
    display: none;
}

.message-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.message-out .message-sender {
    color: rgba(255, 255, 255, 0.8);
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 6px;
    display: block;
    text-align: right;
}

.message-image {
    max-width: 280px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow);
}

.message-image:hover {
    transform: scale(1.02);
}

.message-video {
    max-width: 280px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ==================== ПОЛЕ ВВОДА - REDESIGNED ==================== */
.chat-input-area {
    padding: 14px 16px;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
    position: sticky;
    bottom: 0;
    z-index: 5;
}

.chat-input-area input,
.message-input {
    flex: 1;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    padding: 12px 18px;
    font-size: 15px;
    outline: none;
    transition: all var(--transition-fast);
    background: var(--bg);
    color: var(--text);
}

.chat-input-area input:focus,
.message-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    background: var(--surface);
}

.btn-send {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    font-size: 17px;
    transition: all var(--transition);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-send:hover {
    background: var(--gradient-primary-hover);
    transform: scale(1.06) translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-send:active {
    transform: scale(0.96);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==================== ЭМОДЗИ ПИКЕР ==================== */
.emoji-picker {
    position: fixed;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    z-index: 1000;
    max-width: 340px;
    border: 1px solid var(--border);
    animation: fadeInScale 0.2s ease;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-item {
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all var(--transition-fast);
}

.emoji-item:hover {
    background: var(--primary-light);
    transform: scale(1.2);
}

/* ==================== ПЕЧАТЬ ==================== */
@media print {
    .sidebar, .chat-footer, .chat-header, .message-actions {
        display: none !important;
    }
    
    .messages-container {
        overflow: visible !important;
    }
}

/* ==================== ПЛЕЙСХОЛДЕРЫ - REDESIGNED ==================== */
.page-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

.page-placeholder i {
    font-size: 90px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.page-placeholder h3 {
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 24px;
    color: var(--text);
}

.page-placeholder p {
    color: var(--text-secondary);
    max-width: 400px;
    font-size: 15px;
    line-height: 1.6;
}

/* ==================== КОШЕЛЁК - REDESIGNED ==================== */
.wallet-page {
    padding: 24px;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.wallet-balance-card {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-primary);
    position: relative;
    overflow: hidden;
}

.wallet-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
}

.wallet-balance-card small {
    opacity: 0.85;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.wallet-balance-card h2 {
    margin: 8px 0;
    font-weight: 800;
    font-size: 36px;
    position: relative;
    z-index: 1;
}

.wallet-coins {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.wallet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.wallet-credit-score {
    font-size: 16px;
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.wallet-credit-score strong {
    font-weight: 700;
    color: var(--primary);
    font-size: 24px;
}

/* ==================== НАСТРОЙКИ - REDESIGNED ==================== */
.settings-page {
    padding: 24px;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.settings-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.settings-card h6 {
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.settings-item {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
}

.settings-item:hover {
    background: var(--surface-hover);
}

.settings-item strong {
    font-weight: 600;
    color: var(--text);
}

/* ==================== ПЕРЕКЛЮЧАТЕЛЬ (TOGGLE SWITCH) ==================== */
.theme-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 26px;
    transition: background var(--transition-fast);
}

.theme-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-toggle input:checked + .theme-toggle-slider {
    background: var(--primary);
}

.theme-toggle input:checked + .theme-toggle-slider::before {
    transform: translateX(20px);
}

/* ==================== ПОДАРКИ - REDESIGNED ==================== */
.gift-message {
    text-align: center;
    padding: 16px;
    animation: fadeInScale 0.5s ease;
}

.gift-animation {
    font-size: 56px;
    animation: giftBounce 1.5s ease infinite;
}

@keyframes giftBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(-5deg); }
    75% { transform: scale(1.15) rotate(5deg); }
}

.transfer-message {
    text-align: center;
    padding: 16px;
    background: var(--gradient-surface);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.transfer-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.loan-message {
    padding: 16px;
    background: var(--gradient-surface);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.loan-message pre {
    font-family: inherit;
    white-space: pre-wrap;
    margin: 0;
    color: var(--text);
}

/* ==================== МОДАЛЬНЫЕ ОКНА - REDESIGNED ==================== */
.modal-content {
    border-radius: var(--radius-xl) !important;
    border: none !important;
    box-shadow: var(--shadow-xl) !important;
    background: var(--surface) !important;
    animation: fadeInScale 0.3s ease;
}

.modal-header {
    border-bottom: 1px solid var(--border) !important;
    padding: 24px !important;
    background: var(--surface) !important;
}

.modal-body {
    padding: 24px !important;
    background: var(--surface) !important;
}

.modal-footer {
    border-top: 1px solid var(--border) !important;
    padding: 20px 24px !important;
    background: var(--surface) !important;
}

/* ==================== ТОСТЫ - REDESIGNED ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    border-radius: var(--radius-lg) !important;
    margin-bottom: 0 !important;
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: var(--shadow-lg) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== РЕАКЦИИ - REDESIGNED ==================== */
.reactions-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    padding: 10px 16px;
    display: flex;
    gap: 6px;
    z-index: 1000;
    border: 1px solid var(--glass-border);
}

.reaction-item {
    font-size: 24px;
    padding: 6px;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.reaction-item:hover {
    transform: scale(1.4);
    background: var(--primary-light);
}

/* ==================== ОТВЕТ НА СООБЩЕНИЕ - REDESIGNED ==================== */
.reply-preview {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary);
    transition: all var(--transition-fast);
}

.reply-preview:hover {
    transform: translateX(4px);
}

/* ==================== ПОЛНОЭКРАННЫЙ ПРОСМОТР ==================== */
.image-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.image-fullscreen img {
    max-width: 95%;
    max-height: 95%;
    border-radius: var(--radius);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

/* ==================== УЧЕБНЫЕ ПОДСКАЗКИ ==================== */
.tutorial-tooltip {
    position: absolute;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    max-width: 350px;
    animation: tutorialBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--border);
}

@keyframes tutorialBounce {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
        width: 85%;
        max-width: 350px;
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .chat-list-panel {
        width: 100%;
        max-width: 100%;
        border-right: none;
    }
    
    .chat-layout {
        flex-direction: column;
    }
    
    .chat-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        background: var(--bg);
    }
    
    .chat-messages {
        padding: 12px 10px;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .message-out::after,
    .message-in::after {
        display: none;
    }
    
    .chat-search-shortcut {
        display: none;
    }
    
    .chat-search-input {
        padding-right: 14px;
    }
    
    .chat-window-head-actions .btn-icon:nth-child(1) {
        display: none;
    }
    
    .chat-empty-state {
        display: none !important;
    }
    
    .page-placeholder i {
        font-size: 70px;
    }
    
    .wallet-balance-card h2 {
        font-size: 28px;
    }
    
    .messages-day-divider {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    :root {
        --sidebar-width: 100%;
    }
    
    .message-image {
        max-width: 200px;
    }
    
    .message-video {
        max-width: 200px;
    }
    
    .login-card {
        padding: 28px;
    }
    
    .wallet-balance-card {
        padding: 24px;
    }
}

/* ==================== УТИЛИТЫ ==================== */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rw-xl {
    border-radius: var(--radius-xl);
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideUp 0.3s ease;
}

/* ==================== КНОПКА МЕНЮ (МОБИЛЬНЫЕ) ==================== */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--surface);
    cursor: pointer;
    font-size: 22px;
    color: var(--text);
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1001;
    box-shadow: var(--shadow);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
}

/* ==================== УТИЛИТАРИЧЕСКИЕ КЛАССЫ ==================== */
.text-muted {
    color: var(--text-secondary) !important;
}

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

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

/* ==================== ИНФО-СТРАНИЦЫ (Займы, Кредиторы и т.д.) ==================== */
.info-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.info-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.info-page-header h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-page-header h3 i {
    color: var(--primary);
}

.info-page-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-cards-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.info-mini-card {
    flex: 1;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.info-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.info-mini-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.info-mini-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-mini-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

/* ==================== КРЕДИТОРЫ ==================== */
.lenders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.lender-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.lender-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.lender-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    background: var(--gradient-primary);
}

.lender-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.lender-rate {
    color: var(--success);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.lender-meta {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 14px;
}

/* ==================== ПОДАРКИ ==================== */
.gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.gift-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.gift-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.gift-emoji {
    font-size: 40px;
    margin-bottom: 8px;
}

.gift-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.gift-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

/* ==================== КОНТАКТЫ ==================== */
.contacts-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.contact-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

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

.contact-info strong {
    display: block;
    font-weight: 600;
    font-size: 15px;
}

.contact-info small {
    color: var(--text-secondary);
    font-size: 13px;
}


