/* ========== СТИЛИ АВТОРИЗАЦИИ ========== */
#auth-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    background: url("fon.jpg") no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: Arial, sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

#auth-page .logo {
    position: absolute;
    left: -400px; 
    top: 50%;
    transform: translateY(-50%);
    height: 273px;
    opacity: 0;
    z-index: 10;
    animation: logoMove 2.5s forwards cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 25px;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

@keyframes logoMove {
    0% { left: -400px; opacity: 0; }
    100% { left: 15%; opacity: 1; }
}

#auth-page .iphone {
    position: absolute;
    right: -500px;
    top: 50%;
    transform: translateY(-50%) scale(0.75);
    width: 430px;
    height: 880px;
    border: 14px solid #000;
    border-radius: 50px;
    background: #111;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 0;
    animation: iphoneMove 2.5s forwards cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

@keyframes iphoneMove {
    0% { right: -500px; opacity: 0; }
    100% { right: 12%; opacity: 1; }
}

#auth-page .island {
    position: absolute;
    top: 12px;
    width: 120px;
    height: 35px;
    background: #000;
    border-radius: 20px;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

#auth-page .island.unlocked {
    width: 140px;
    background: #1d4ed8;
}

.lock-icon {
    color: #fff;
    font-size: 16px;
    opacity: 1;
    transition: all 0.3s ease;
}

.lock-icon.hidden {
    opacity: 0;
    transform: scale(0);
}

.unlock-icon {
    color: #10b981;
    font-size: 16px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.unlock-icon.visible {
    opacity: 1;
    transform: scale(1);
}

#auth-page .screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fafafa, #eaeaea);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#auth-page .time {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    font-family: "SF Pro Display", Arial, sans-serif;
}

#auth-page .container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#auth-page .auth-box {
    width: 75%;
    max-width: 280px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    text-align: center;
    z-index: 3;
    transform: translateY(-30px);
    animation: authFloat 3s ease-in-out infinite alternate,
               authFade 2s forwards ease-out;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

#auth-page .auth-box:hover {
    transform: translateY(-35px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

@keyframes authFloat {
    0% { transform: translateY(-30px); }
    100% { transform: translateY(-40px); }
}

@keyframes authFade {
    from { opacity: 0; transform: translateY(-10px) translateX(50px) scale(0.9); }
    to { opacity: 1; transform: translateY(-30px) translateX(0) scale(1); }
}

#auth-page .auth-box h2 {
    margin-bottom: 25px;
    font-size: 22px;
    color: #1a1a1a;
    font-weight: 600;
    background: linear-gradient(135deg, #e63946, #ba181b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.input-group {
    position: relative;
    margin: 15px 0;
}

#auth-page .auth-box input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.8);
    color: #333;
    box-sizing: border-box;
}

#auth-page .auth-box input:focus {
    border-color: #e63946;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.15);
    transform: translateY(-2px);
}

#auth-page .auth-box input:hover:not(:focus) {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: all 0.3s ease;
    font-size: 18px;
}

.input-group:has(input:focus) .input-icon {
    color: #e63946;
    transform: translateY(-50%) scale(1.1);
}

.login-btn {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    border: none;
    background: linear-gradient(135deg, #e63946, #ba181b);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.3);
}

.login-btn:hover:not(.loading) {
    background: linear-gradient(135deg, #ba181b, #a4161a);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(230, 57, 70, 0.4);
}

.login-btn:active:not(.loading) {
    transform: translateY(-1px);
}

.login-btn.loading {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    cursor: not-allowed;
}

.btn-text {
    transition: all 0.3s ease;
}

.btn-text.hidden {
    opacity: 0;
    transform: translateY(-20px);
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

.loader.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Часы и дата внизу по центру */
#clock {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-family: "SF Pro Display", Arial, sans-serif;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

#clock .time-large {
    font-size: 72px;
    font-weight: 600;
}

#clock .date {
    margin-top: 5px;
    font-size: 22px;
    font-weight: 400;
}

/* Анимация появления элементов */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 50%, #2c2c2e 100%);
    background-attachment: fixed;
    color: #ffffff;
    overflow-x: hidden;
}

/* Wet asphalt texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(120,120,120,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(100,100,100,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(110,110,110,0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, 
        rgba(60,60,62,0.95) 0%, 
        rgba(44,44,46,0.98) 30%, 
        rgba(28,28,30,0.95) 70%, 
        rgba(60,60,62,0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.logo {
font-size: 24px;
font-weight: 600;
background: linear-gradient(135deg, #fff 0%, #ccc 100%);
background-clip: text;              /* стандартное свойство */
-webkit-background-clip: text;      /* поддержка Chrome/Safari */
color: transparent;                 /* для Firefox */
-webkit-text-fill-color: transparent; /* для WebKit-браузеров */
}

.header-buttons {
    display: flex;
    gap: 15px;
}

.glass-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.glass-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.glass-btn:hover::before {
    left: 100%;
}

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    height: calc(100vh - 70px);
    background: rgba(28,28,30,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    box-shadow: 8px 0 32px rgba(0,0,0,0.3);
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

.sidebar-toggle {
    position: absolute;
    top: 20px;
    right: -45px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    color: #ffffff;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.sidebar-menu {
    list-style: none;
    margin-top: 20px;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateX(5px);
}

.logout-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 15px;
    background: rgba(255,59,48,0.15);
    border: 1px solid rgba(255,59,48,0.3);
    border-radius: 12px;
    color: #ff3b30;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255,59,48,0.25);
    box-shadow: 0 4px 20px rgba(255,59,48,0.2);
}

/* Main content */
.main-content {
    margin-left: 280px;
    margin-top: 70px;
    padding: 30px;
    min-height: calc(100vh - 70px);
    transition: margin-left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-content.expanded {
    margin-left: 40px;
}

/* Dashboards */
.dashboards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-card {
    width: 100%;
    height: 150px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.dashboard-card:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    transform: translateY(-5px);
}

.dashboard-title {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
    font-weight: 500;
}

.dashboard-value {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.dashboard-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* Search and controls */
.controls {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.search-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(0,122,255,0.5);
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select {
    padding: 10px 15px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    background: rgba(255,255,255,0.12);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .slider {
    background: rgba(0,122,255,0.8);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Clients table */
.clients-table {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.table-header {
    background: rgba(255,255,255,0.08);
    padding: 20px;
    display: grid;
    grid-template-columns: 60px 100px 150px 120px 100px 120px 120px 100px 150px 120px 120px 120px 100px 80px;
    gap: 15px;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.client-row {
    padding: 20px;
    display: grid;
    grid-template-columns: 60px 100px 150px 120px 100px 120px 120px 100px 150px 120px 120px 120px 100px 80px;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    font-size: 14px;
}

.client-row:hover {
    background: rgba(255,255,255,0.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.client-row:last-child {
    border-bottom: none;
}

.client-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.status-online {
    color: #30D158;
    font-weight: 500;
}

.status-offline {
    color: #FF453A;
    font-weight: 500;
}

.chat-btn {
    padding: 8px 16px;
    background: rgba(0,122,255,0.15);
    border: 1px solid rgba(0,122,255,0.3);
    border-radius: 8px;
    color: #007AFF;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
}

.chat-btn:hover {
    background: rgba(0,122,255,0.25);
    box-shadow: 0 4px 12px rgba(0,122,255,0.2);
}

/* Telegram Chat Styles */
.telegram-chat-container {
    position: fixed;
    top: 70px;
    right: 0;
    bottom: 0;
    width: 400px;
    background: rgba(28,28,30,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 998;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -8px 0 32px rgba(0,0,0,0.3);
}

.telegram-chat-container.active {
    transform: translateX(0);
}

.telegram-chat-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.telegram-chat-title {
    font-size: 18px;
    font-weight: 600;
}

.telegram-close-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.telegram-close-btn:hover {
    background: rgba(255,255,255,0.12);
}

.telegram-chat-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.telegram-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.telegram-message.sent {
    background: #0A84FF; /* Синий цвет как в iMessage */
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.telegram-message.received {
    background: rgba(255,255,255,0.1);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

.telegram-chat-input {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.telegram-input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.telegram-message-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    color: #ffffff;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 120px;
}

.telegram-send-btn {
    width: 40px;
    height: 40px;
    background: rgba(0,122,255,0.2);
    border: 1px solid rgba(0,122,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.telegram-send-btn:hover {
    background: rgba(0,122,255,0.3);
}

/* Кнопка смайлов */
.telegram-emoji-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}

.telegram-emoji-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

/* Окно выбора смайлов */
.emoji-picker {
    position: absolute;
    bottom: 70px;
    right: 20px;
    width: 300px;
    height: 200px;
    background: rgba(44,44,46,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    overflow-y: auto;
    display: none;
}

.emoji-picker.show {
    display: grid;
}

.emoji-item {
    font-size: 20px;
    cursor: pointer;
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.emoji-item:hover {
    background: rgba(255,255,255,0.1);
}

/* Telegram sidebar search */
.telegram-search-container {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.telegram-search-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
}

.telegram-search-input:focus {
    outline: none;
    border-color: rgba(0,122,255,0.5);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 90px;
    right: 30px;
    background: rgba(28,28,30,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 16px 20px;
    z-index: 10000;
    min-width: 300px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-close {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

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

/* Карточный вид клиентов */
.clients-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    display: none;
}

.client-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    width: 250px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.client-card:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.client-avatar-card {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
    border: 2px solid rgba(0,122,255,0.5);
}

.client-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
    text-align: center;
    color: #ffffff;
}

.client-status {
    font-size: 0.85rem;
    margin-bottom: 10px;
    position: relative;
    padding-left: 14px;
}

.client-status.online::before,
.client-status.offline::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 3px;
}

.client-status.online::before {
    background: #30D158;
    box-shadow: 0 0 6px #30D158;
}

.client-status.offline::before {
    background: rgba(255,255,255,0.5);
    box-shadow: 0 0 4px rgba(255,255,255,0.5);
}

.client-info {
    width: 100%;
    margin-top: 10px;
}

.client-info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

.client-info-row:last-child {
    border-bottom: none;
}

.client-info-label {
    color: rgba(255,255,255,0.7);
}

.client-info-value {
    color: #ffffff;
    font-weight: 500;
}

/* Стили для раздела истории запросов чата */
.chat-history-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.chat-history-pair {
    position: relative;
    border-radius: 28px;
    padding: 12px 12px 18px 12px;
    background: linear-gradient(180deg, rgba(15, 23, 51, 0.8), rgba(11, 18, 40, 0.8));
    border: 1px solid rgba(48, 61, 100, 0.6);
    box-shadow: 0 12px 36px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.03);
    display: grid;
    grid-template-columns: 1fr 68px 1fr;
    align-items: stretch;
    gap: 0;
    overflow: visible;
    transition: transform .18s ease, border-color .18s ease;
}

.chat-history-pair:hover {
    transform: translateY(-6px);
}

.chat-history-mini {
    background: linear-gradient(180deg, rgba(15, 24, 54, 0.8), rgba(11, 19, 41, 0.8));
    border-radius: 16px;
    border: 1px solid rgba(45, 57, 100, 0.45);
    margin: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 160px;
    box-shadow: 0 6px 18px rgba(0,0,0,.45);
}

.chat-history-mini.left {
    margin-left: 18px;
}

.chat-history-mini.right {
    margin-right: 18px;
}

.chat-history-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    background: linear-gradient(180deg, #202948, #0f1630);
    border: 3px solid transparent;
    position: relative;
    isolation: isolate;
    flex: 0 0 auto;
    overflow: hidden;
}

.chat-history-avatar::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    padding: 4px;
    background: conic-gradient(#ff8a00, #ff2d55, #a64dff, #00e0ff, #58ff8a, #ff8a00);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: .95;
    -webkit-mask-composite: xor;
}

.chat-history-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-history-mini .title {
    font-weight: 800;
    font-size: 15px;
    margin: 0;
}

.chat-history-mini .sub {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: -4px;
}

.chat-history-kvs {
    width: 100%;
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.chat-history-kv {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    min-height: 20px;
}

.chat-history-kv .lbl {
    min-width: 90px;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.chat-history-kv .val {
    font-weight: 800;
    font-size: 13px;
    color: #ffffff;
    word-break: break-word;
    flex: 1;
}

.chat-history-arrow {
    display: grid;
    place-items: center;
}

.chat-history-arrow svg {
    width: 44px;
    height: 44px;
    opacity: .95;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,.5));
}

.chat-history-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    background: rgba(12, 18, 40, 0.8);
    border: 2px solid rgba(80, 90, 140, 0.3);
    position: relative;
    overflow: hidden;
}

.chat-history-status-badge.done {
    color: #ffffff;
    background: rgba(0, 180, 120, 0.25);
    border-color: rgba(0, 255, 150, 0.4);
}

.chat-history-status-badge.pending {
    color: #ffffff;
    background: rgba(200, 140, 0, 0.25);
    border-color: rgba(255, 200, 40, 0.4);
}

.chat-history-status-badge.rejected {
    color: #ffffff;
    background: rgba(180, 40, 40, 0.25);
    border-color: rgba(255, 85, 85, 0.4);
}

/* Стили для кнопки прикрепления файлов в Telegram */
.telegram-file-input-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255,255,255,0.7);
    font-size: 16px;
}

.telegram-file-input-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

.telegram-file-input {
    display: none;
}

.telegram-drag-drop-area {
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    margin: 10px 0;
    display: none;
}

.telegram-drag-drop-area.active {
    border-color: rgba(0,122,255,0.5);
    background: rgba(0,122,255,0.1);
    color: rgba(0,122,255,0.8);
}

.telegram-drag-drop-area.show {
    display: block;
}

/* Стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(44,44,46,0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 25px;
    width: 400px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #ffffff;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
}

.modal-close:hover {
    background: rgba(255,255,255,0.12);
}

.bank-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.bank-item {
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.bank-item:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.bank-icon {
    font-size: 20px;
}

.bank-name {
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboards {
        grid-template-columns: 1fr;
    }
    
    .table-header,
    .client-row {
        display: none;
    }
    
    .mobile-table {
        display: block;
    }

    .telegram-chat-container {
        width: 100%;
    }

    .chat-history-pair {
        grid-template-columns: 1fr;
    }
    
    .chat-history-arrow {
        display: none;
    }

    .bank-grid {
        grid-template-columns: 1fr;
    }

    .emoji-picker {
        width: 250px;
        right: 10px;
    }
}

/* Стили для SMS Manager */
#view-sms-manager * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#view-sms-manager {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
    background: transparent;
}

#view-sms-manager .container {
    max-width: 1400px;
    margin: 0 auto;
}

#view-sms-manager .header {
    text-align: center;
    margin-bottom: 30px;
}

#view-sms-manager .title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

#view-sms-manager .controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: center;
}

#view-sms-manager .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

#view-sms-manager .btn-primary {
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: white;
}

#view-sms-manager .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}
.status-fix-needed {
background: linear-gradient(45deg, #f56565, #e53e3e);
color: white;
border: 2px solid #fc8181;
}

#view-sms-manager .btn-secondary {
    background: linear-gradient(45deg, #6c7b7f, #4a5568);
    color: white;
}

#view-sms-manager .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 123, 127, 0.4);
}

#view-sms-manager .btn-success {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    font-size: 12px;
    padding: 8px 16px;
}

#view-sms-manager .btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

#view-sms-manager .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#view-sms-manager .btn-sending {
    background: linear-gradient(45deg, #ed8936, #dd6b20) !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

#view-sms-manager .search-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(45, 55, 72, 0.6);
    padding: 8px 16px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid #4a5568;
}

#view-sms-manager .search-input {
    padding: 10px 15px;
    border: 2px solid #4a5568;
    border-radius: 6px;
    background: #2d3748;
    color: #e0e0e0;
    font-size: 14px;
    width: 250px;
    transition: all 0.3s ease;
}

#view-sms-manager .search-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

#view-sms-manager .search-input::placeholder {
    color: #a0aec0;
}

#view-sms-manager .search-label {
    color: #a0aec0;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

#view-sms-manager .filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

#view-sms-manager .filter-select {
    padding: 10px 15px;
    border: 2px solid #4a5568;
    border-radius: 6px;
    background: #2d3748;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#view-sms-manager .filter-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

#view-sms-manager .loading {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

#view-sms-manager .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #2d3748;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#view-sms-manager .table-container {
    background: rgba(45, 55, 72, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

#view-sms-manager .table {
    width: 100%;
    border-collapse: collapse;
}

#view-sms-manager .table th {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    color: #ffffff;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #1a202c;
}

#view-sms-manager .table td {
    padding: 14px 12px;
    border-bottom: 1px solid #4a5568;
    vertical-align: top;
}

#view-sms-manager .table tr:hover {
    background: rgba(74, 144, 226, 0.1);
}

#view-sms-manager .message-cell {
    max-width: 400px;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 13px;
}

#view-sms-manager .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
}

#view-sms-manager .status-pending {
    background: linear-gradient(45deg, #ed8936, #dd6b20);
    color: white;
}

#view-sms-manager .status-completed {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
}

#view-sms-manager .no-data {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
    font-size: 18px;
}

#view-sms-manager .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#view-sms-manager .notification.show {
    transform: translateX(0);
}

#view-sms-manager .notification.success {
    background: linear-gradient(45deg, #48bb78, #38a169);
}

#view-sms-manager .notification.error {
    background: linear-gradient(45deg, #f56565, #e53e3e);
}

#view-sms-manager .search-result-info {
    margin: 15px 0;
    padding: 10px 15px;
    background: rgba(74, 144, 226, 0.1);
    border-left: 4px solid #4a90e2;
    border-radius: 4px;
    font-size: 14px;
    color: #a0aec0;
}

@media (max-width: 768px) {
    #view-sms-manager .controls {
        flex-direction: column;
        align-items: center;
    }
    
    #view-sms-manager .search-group {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    #view-sms-manager .search-input {
        width: 100%;
    }
    
    #view-sms-manager .filter-group {
        flex-direction: column;
    }
    
    #view-sms-manager .table-container {
        overflow-x: auto;
    }
    
    #view-sms-manager .table {
        min-width: 800px;
    }
}
/* Стили для анкет */
.ankets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.anket-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.anket-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.anket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6c63ff, #764ba2, #667eea);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anket-card:hover::before {
    opacity: 1;
}

 .anket-photo-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
}


.anket-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.anket-card:hover .anket-photo {
    transform: scale(1.1);
}

.anket-status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid rgba(28, 28, 30, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.anket-status-online {
    background: #30D158;
    animation: anket-pulse 2s infinite;
}

.anket-status-offline {
    background: #FF453A;
}

@keyframes anket-pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.anket-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anket-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 5px;
}

.anket-username {
    font-size: 14px;
    color: rgba(0, 122, 255, 0.8);
    text-align: center;
    margin-bottom: 15px;
    font-weight: 500;
}

.anket-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.anket-info-row:last-child {
    border-bottom: none;
}

.anket-info-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anket-info-value {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.anket-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anket-status-online-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.anket-status-offline-badge {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Анимация появления анкет */
.anket-card {
    opacity: 0;
    transform: translateY(20px);
    animation: anket-fadeInUp 0.5s ease forwards;
}

.anket-card:nth-child(1) { animation-delay: 0.1s; }
.anket-card:nth-child(2) { animation-delay: 0.2s; }
.anket-card:nth-child(3) { animation-delay: 0.3s; }
.anket-card:nth-child(4) { animation-delay: 0.4s; }
.anket-card:nth-child(n+5) { animation-delay: 0.5s; }

@keyframes anket-fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для анкет */
@media (max-width: 768px) {
    .ankets-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .anket-photo-container {
        height: 250px;
    }
}
/* Стили для раздела Настройки */
#view-settings {
    color: #fff;
    display: block;
}
#view-settings .settings-overlay {
    padding: 20px;
}

#view-settings .security-container {
    margin: 0 auto;
    max-width: 600px;
}


#view-settings .security-container {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

#view-settings .security-header {
    margin-bottom: 25px;
}
#view-settings .logout-section {
    display: flex;
    flex-direction: column; /* вертикально */
    align-items: flex-start; /* выравнивание по левому краю */
    gap: 15px; /* расстояние между кнопками */
    margin-top: 30px;
}

.change-password-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0,122,255,0.3);
    background: rgba(0,122,255,0.15);
    color: #0A84FF;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    width: 100%;              /* растянуть по контейнеру */
    justify-content: center;  /* текст по центру */
}

.change-password-btn:hover {
    background: rgba(0,122,255,0.25);
    box-shadow: 0 4px 12px rgba(0,122,255,0.2);
}

#view-settings .logout-section .logout-btn {
    position: static;   /* убираем absolute */
    width: 100%;        /* растянуть по контейнеру */
    text-align: center; /* текст по центру */
}


.settings-overlay {
    min-height: calc(100vh - 70px);
    background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 50%, #2c2c2e 100%);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px; /* Отступ сверху для центрирования */
}

.security-container {
    max-width: 500px;
    width: 100%;
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.security-header {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(45, 55, 72, 0.8) 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.refresh-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg);
}

.security-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.security-subtitle {
    font-size: 14px;
    color: #a0a0a0;
    font-weight: 400;
}

.security-content {
    padding: 0;
}

.info-item {
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: #888888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.info-icon {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    opacity: 0.7;
}

.info-value {
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    word-break: break-all;
    line-height: 1.4;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.last-activity-time {
    color: #10b981;
    font-weight: 500;
}

.device-info {
    display: flex;
    align-items: center;
}

.device-icon {
    font-size: 16px;
    margin-right: 8px;
}

.change-password-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.change-password-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.logout-section {
    padding: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-section .logout-btn {
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.logout-section .logout-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.2);
}

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

/* Модальное окно смены пароля */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 14px;
    color: #a0a0a0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: #888888;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-hint {
    font-size: 12px;
    margin-top: 6px;
    transition: color 0.2s ease;
}

.form-hint.success {
    color: #10b981;
}

.form-hint.error {
    color: #dc2626;
}

.form-hint.info {
    color: #a0a0a0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.refresh-btn.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Адаптивность для настроек */
@media (max-width: 768px) {
    .settings-overlay {
        padding: 15px 10px;
        padding-top: 20px;
    }
    
    .security-container {
        margin: 0;
        max-width: none;
    }
    
    .info-item {
        padding: 20px 24px;
    }
    
    .logout-section {
        padding: 24px;
    }

    .modal {
        margin: 20px;
        width: calc(100% - 40px);
    }

    .modal-actions {
        flex-direction: column;
    }
}