@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

        :root {
            /* Обновленные цвета по вашим требованиям */
            --bg-main: #000920;
            --bg-card: #000C28;
            
            --text-main: #ffffff;
            --text-muted: #8b96a8;
            --accent-gradient: linear-gradient(90deg, #6b66ff 0%, #8755ff 100%);
            --accent-color: #6b66ff;
            --border-color: rgba(255, 255, 255, 0.05);
            --sidebar-width: 300px;
            
            /* Единые отступы по краям экрана */
            --page-padding-x: 60px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', sans-serif;
        }

        body {
            background-color: var(--bg-main);
            color: var(--text-main);
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* --- LAYOUT STRUCTURE --- */
        .layout-wrapper {
            display: flex;
            flex: 1;
        }

        /* --- SIDEBAR --- */
        .sidebar {
            width: var(--sidebar-width);
            background-color: var(--bg-main);
            padding: 40px 30px 40px var(--page-padding-x);
            display: flex;
            flex-direction: column;
            border-right: 1px solid var(--border-color);
        }

        .logo {
            display: flex;
            align-items: center;
            font-size: 20px;
            font-weight: 700;
            letter-spacing: 1px;
            margin-bottom: 50px;
        }

        .logo span:first-child {
            color: #4a86ff;
            font-size: 28px;
            margin-right: 5px;
        }

        .nav-menu {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .nav-item {
            padding: 12px 20px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-muted);
            transition: all 0.3s ease;
        }

        .nav-item.active {
            background: var(--accent-gradient);
            color: var(--text-main);
        }

        .nav-item:hover:not(.active) {
            background-color: var(--bg-card);
            color: var(--text-main);
        }

        .app-download-widget {
            margin-top: auto;
            background-color: var(--bg-card);
            border-radius: 16px;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 15px;
            position: relative;
            overflow: hidden;
        }

        .app-download-widget::before {
            content: '';
            position: absolute;
            top: -20px;
            left: -20px;
            width: 80px;
            height: 80px;
            background: rgba(107, 102, 255, 0.1);
            filter: blur(20px);
        }

        .app-icon {
            font-size: 32px;
            font-weight: 700;
            color: #4a86ff;
            z-index: 1;
        }

        .app-info {
            z-index: 1;
        }

        .app-info p {
            font-size: 11px;
            color: var(--text-muted);
            line-height: 1.4;
        }
        
        .app-info p span {
            color: var(--text-main);
            font-weight: 600;
        }

        /* --- MAIN CONTENT --- */
        .main-content {
            flex: 1;
            padding: 40px var(--page-padding-x) 40px 40px;
            display: flex;
            flex-direction: column;
            gap: 30px;
        }

        /* Header */
        header {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 30px;
            padding-bottom: 25px;
            border-bottom: 1px solid var(--border-color);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 25px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .header-actions span {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .header-actions span:hover {
            color: var(--text-main);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .avatar {
            width: 40px;
            height: 40px;
            background-color: #d9d9d9;
            border-radius: 50%;
        }

        .user-info h4 {
            font-size: 14px;
            font-weight: 600;
        }

        .user-info p {
            font-size: 12px;
            color: var(--text-muted);
        }

        /* Welcome Card */
        .welcome-card {
            background: linear-gradient(135deg, var(--bg-card) 0%, rgba(13, 24, 60, 0.4) 100%);
            border-radius: 20px;
            padding: 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            overflow: hidden;
            border: 1px solid var(--border-color);
        }

        .welcome-text h1 {
            font-size: 28px;
            margin-bottom: 12px;
        }

        .welcome-text p {
            font-size: 14px;
            color: var(--text-muted);
            max-width: 500px;
            line-height: 1.5;
        }

        .welcome-illustration {
            width: 150px;
            height: 150px;
            background: radial-gradient(circle, rgba(74,134,255,0.1) 0%, transparent 70%);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Traffic Section */
        .traffic-section {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .traffic-section h3 {
            font-size: 16px;
        }

        .progress-bar-container {
            width: 100%;
            height: 8px;
            background-color: var(--bg-card);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-bar-fill {
            width: 100%;
            height: 100%;
            background: var(--accent-gradient);
            border-radius: 4px;
        }

        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
        }

        .stat-card {
            background-color: var(--bg-card);
            padding: 25px;
            border-radius: 16px;
        }

        .stat-card h2 {
            font-size: 24px;
            margin-bottom: 8px;
        }

        .stat-card p {
            font-size: 12px;
            color: var(--text-muted);
        }

        /* Action Grid */
        .action-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 20px;
        }

        .action-card {
            background-color: var(--bg-card);
            padding: 25px;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .action-card h3 {
            font-size: 15px;
            margin-bottom: 20px;
        }

        /* Optimal Server */
        .server-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .server-flag {
            width: 40px;
            height: 25px;
            background-color: #d9d9d9;
            border-radius: 4px;
        }

        .server-details h4 {
            font-size: 13px;
        }

        .server-details p {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .ping {
            margin-left: auto;
            font-size: 13px;
            font-weight: 600;
        }

        /* Fast Connection */
        .connection-input {
            display: flex;
            background-color: var(--bg-main);
            border-radius: 8px;
            padding: 10px 15px;
            align-items: center;
        }

        .connection-input input {
            background: transparent;
            border: none;
            color: var(--text-muted);
            width: 100%;
            outline: none;
            font-size: 12px;
        }

        .connection-input .raw-btn {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-main);
            cursor: pointer;
        }

        /* Gift Card */
        .gift-card {
            position: relative;
            overflow: hidden;
        }

        .gift-card p {
            font-size: 12px;
            color: var(--text-muted);
            max-width: 150px;
            line-height: 1.4;
        }
        
        .gift-illustration {
            position: absolute;
            right: 15px;
            bottom: 15px;
            width: 60px;
            height: 60px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
        }

        /* Share Banner */
        .share-banner {
            background: var(--accent-gradient);
            border-radius: 16px;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .share-content {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .share-icon {
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
        }

        .share-content h2 {
            font-size: 20px;
            font-weight: 600;
        }

        .btn-invite {
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.3s;
        }

        .btn-invite:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        /* --- GLOBAL FOOTER --- */
        .global-footer {
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 25px var(--page-padding-x);
            font-size: 12px;
            color: var(--text-muted);
            background-color: var(--bg-main);
        }

        .footer-right {
            display: flex;
            gap: 30px;
        }
        
        .footer-right a {
            color: var(--text-muted);
            text-decoration: none;
            transition: color 0.2s;
        }
        
        .footer-right a:hover {
            color: var(--text-main);
        }

        .auth-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: #000920; }
        .auth-card { width: min(100%, 520px); padding: 34px; border: 1px solid var(--border-color); border-radius: 20px; background: var(--bg-card); box-shadow: 0 20px 70px rgba(0,0,0,.4); text-align: center; }
        .auth-card h1 { font-size: 26px; margin-bottom: 10px; } .auth-card p { color: var(--text-muted); line-height: 1.5; margin-bottom: 22px; }
        .auth-command { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; background: #000920; border: 1px solid var(--border-color); border-radius: 12px; }
        .auth-command code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: #fff; font-size: 14px; }
        .auth-command button, .auth-retry { border: 0; border-radius: 9px; padding: 11px 15px; color: #fff; background: var(--accent-gradient); font: inherit; font-weight: 600; cursor: pointer; }
        .auth-status { min-height: 24px; margin: 18px 0 0; font-size: 13px; } .auth-status.error { color: #ff8e8e; }
        /* The cabinet stays visually locked independently from the overlay. */
        .layout-wrapper, .global-footer { display: none; }
        body.cabinet-unlocked .layout-wrapper { display: flex; }
        body.cabinet-unlocked .global-footer { display: flex; }
