/* =====================================================
   MODAL VISIBILITY FIX V2
   Ensures all modals, including file-modals, are hidden by default.
   ===================================================== */
.modal, .modal-overlay, .file-editor-modal, .modern-modal {
    display: none; /* Varsayılan olarak gizle */
}

.modal.show, .modal-overlay.show, .file-editor-modal.show, .modern-modal.show {
    display: flex; /* JS tarafından gösterildiğinde görünür yap */
}

.modal.hidden {
    display: none !important; /* JS tarafından gizlendiğinde kesinlikle gizli kalmasını sağla */
}

/* =====================================================
   AEKMC PANEL - USER CSS (OPTIMIZED & FIXED V4)
   ===================================================== */

/* =====================================================
   1. BASE & RESET
   ===================================================== */
:root {
    /* OLED Black Theme - Matching Main Site */
    --primary-bg: #0a0a0b;
    --secondary-bg: #1a1a1d;
    --accent-color: #6366f1;
    --secondary-accent: #8b5cf6;
    --text-color: #f5f5f7;
    --muted-text: #8b8b93;
    --input-bg: #2d2d32;
    --border-color: #3a3f52;
    --hover-bg: #2d2d32;
    --sidebar-w: 250px;
    --sidebar-cw: 70px;
    --hdr-h: 60px;
    
    /* Status Colors - Enhanced */
    --status-ready: #10b981;
    --status-developing: #f59e0b;
    --status-compiling: #3b82f6;
    --status-error: #ef4444;
    
    /* Apple-style Design Variables */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition-fast: 0.2s ease-out;
    --transition-medium: 0.3s ease-out;
}

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

html, body {
    height: 100%;
    font: 400 1rem/1.6 'Segoe UI', sans-serif;
    background: var(--primary-bg);
    color: var(--text-color);
}

body.login-page, 
body.register-page {
    background: var(--primary-bg);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Server manager and plugin develop have different layouts */
body:not(.server-manager-layout):not(.plugin-develop-container) .app-container {
    display: flex;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

hr {
    border: 0;
    border-top: 1.5px solid var(--border-color);
    margin: 0;
}

/* =====================================================
   2. LAYOUT & CONTAINERS
   ===================================================== */
.main-content-wrapper {
    flex: 1;
    transition: margin-left .3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: var(--sidebar-w);
}

.main-content {
    flex: 1;
    padding: 2rem;
}

.content-container,
.servers-container,
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.servers-container {
    padding: 2rem;
}

.login-page,
.register-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-page .container,
.register-page .container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--primary-bg);
    padding: 1rem;
}

.login-container,
.register-container {
    background: var(--secondary-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.login-container::before,
.register-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
}

.register-container {
    max-width: 450px;
}

/* =====================================================
   3. COMPONENTS
   ===================================================== */

/* --- Messages & Banners --- */
.success-message,
.info-message,
.warning-message,
.alert {
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.success-message, .alert-success { background: #4caf50; }
.info-message { background: #2196f3; }
.warning-message { background: #ff9800; }

.error-message {
    color: #ff5252;
    text-align: center;
    margin-top: 1rem;
    background: #2e1a1a;
    border: 1px solid #d32f2f;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.error-message.hidden { display: none; }

.login-container .success-message {
    background: #1a2e1a;
    border: 1px solid #2e7d32;
    color: #4caf50;
}

/* --- Buttons --- */
.btn {
    border: none;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn:hover {
    transform: translateY(-1px);
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-primary { 
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent)); 
    color: white; 
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
}
.btn-primary:hover { 
    background: linear-gradient(135deg, var(--secondary-accent), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-secondary { 
    background-color: var(--hover-bg); 
    color: var(--text-color); 
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: var(--transition-medium);
}
.btn-secondary:hover { 
    background-color: var(--accent-color); 
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-1px);
}
.btn-success { 
    background-color: var(--status-ready); 
    color: white; 
    border-radius: var(--border-radius-md);
    transition: var(--transition-medium);
}
.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-danger { 
    background-color: var(--status-error); 
    color: white; 
    border-radius: var(--border-radius-md);
    transition: var(--transition-medium);
}
.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-warning { 
    background-color: var(--status-developing); 
    color: white; 
    border-radius: var(--border-radius-md);
    transition: var(--transition-medium);
}
.btn-warning:hover {
    background-color: #d97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-info { 
    background-color: var(--status-compiling); 
    color: white; 
    border-radius: var(--border-radius-md);
    transition: var(--transition-medium);
}
.btn-info:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.1rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-outline-danger {
    background-color: transparent;
    color: var(--status-error);
    border: 1px solid var(--status-error);
}
.btn-outline-danger:hover {
    background-color: var(--status-error);
    color: white;
}
.btn-telegram { background-color: #0088cc; color: white; }

/* Legacy Button Styles (for compatibility) */
.btn-delete-red, .btn-accent, .btn-upload, .btn-change-inline, .btn-modal-save, .create-server-btn, .register-btn, .login-btn, .modern-btn {
    border: none; cursor: pointer; color: #fff; background: var(--accent-color); border-radius: 5px;
}
.btn-delete-red, .btn-accent, .btn-change-inline { margin-left: 1rem; padding: 0.4rem 1.1rem; font-size: 0.95rem; display: inline-block; margin-top: 1rem; }
.btn-modal-cancel, .btn-modal-save { padding: 0.6rem 1.4rem; border-radius: 5px; cursor: pointer; }
.lang-btn, .create-server-btn, .register-btn, .login-btn { transition: all 0.3s ease; }
.btn-delete-red { background: linear-gradient(90deg, #ff5252, #ff1744); }
.btn-upload { margin-top: 0.7rem; padding: 0.5rem 1.2rem; }
.btn-modal-cancel { background: var(--primary-bg); color: var(--text-color); border: 1px solid var(--border-color); }
.invoice-btn-disabled { opacity: 0.6; cursor: not-allowed; }
.dashboard-action-button, .dashboard-welcome-button { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; background: var(--accent-color); color: white; border-radius: 6px; text-decoration: none; font-weight: 600; transition: background 0.3s; }
.dashboard-welcome-button { padding: 1rem 2rem; font-size: 1.1rem; }
.language-selector { position: fixed; top: 1rem; right: 1rem; z-index: 100; display: flex; gap: 0.5rem; }
.lang-btn { background: var(--secondary-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.lang-btn:hover, .lang-btn.active { background: var(--accent-color); color: white; border-color: var(--accent-color); }
.login-btn, .register-btn { width: 100%; padding: 0.75rem; border-radius: 6px; font-size: 1rem; font-weight: 600; margin-bottom: 1.5rem; }
.login-btn:hover, .register-btn:hover { background: #4a5ba9; transform: translateY(-1px); }
.login-btn:active, .register-btn:active { transform: translateY(0); }
.create-server-btn { padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.create-server-btn:hover { background: #4a5ba9; transform: translateY(-1px); }
.modern-btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
.modern-btn-primary { background: var(--accent-color); color: white; }
.modern-btn-secondary { background: var(--secondary-bg); color: var(--text-color); border: 1px solid var(--border-color); }
.modern-btn:hover { transform: translateY(-1px); }

/* --- Forms & Inputs --- */
.form-group { margin-bottom: 1rem; }
.form-group label, .form-label { display: block; margin-bottom: 0.5rem; color: var(--text-color); font-weight: 600; font-size: 0.95rem; }
.form-group input, .modern-input, .form-input, .form-select { 
    width: 100%; 
    padding: 1rem 1.25rem; 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius-md); 
    background: var(--input-bg); 
    color: var(--text-color); 
    font-size: 1rem; 
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-sm);
}
.form-group input:focus, .form-input:focus { 
    outline: none; 
    border-color: var(--accent-color); 
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}
.input-error { border-color: var(--status-error) !important; }
.form-helper-text { font-size: 0.85rem; color: var(--muted-text); margin-top: 0.25rem; display: block; }
.form-modal-input, .form-modal-textarea, .form-modal-select, .form-modal-input-margin { width: 100%; padding: 0.7rem 1rem; border-radius: 6px; border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-color); font-size: 1rem; }
.form-modal-input { margin-bottom: 1.2rem; }
.form-modal-textarea { min-height: 60px; }
.form-modal-select, .form-modal-input-margin { margin-bottom: 0.7rem; }
.form-avatar-upload { margin-bottom: 1.5rem; text-align: center; }
.form-avatar-label { display: inline-block; cursor: pointer; }
.form-avatar-img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 2px solid var(--accent-color); background: #fff; }
.form-avatar-text { margin-top: 0.5rem; color: var(--muted-text); font-size: 0.95rem; }
.form-avatar-input { display: none; }
.citizenship-selection { margin-bottom: 1.5rem; text-align: center; }
.citizenship-label { display: inline-block; background: var(--input-bg); color: var(--text-color); padding: 0.7rem 1.5rem; border-radius: 8px; margin: 0 0.5rem; cursor: pointer; border: 2px solid var(--border-color); transition: background 0.2s, border 0.2s; }
.citizenship-radio { display: none; }
.citizenship-label-margin { margin-left: 1.5rem; }
.login-form, .register-form { text-align: left; margin-bottom: 1rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.form-check input[type="checkbox"] { width: auto; margin: 0; }
.form-check label { margin: 0; font-size: 0.9rem; cursor: pointer; }
.form-check label a { color: var(--accent-color); text-decoration: underline; transition: color 0.3s ease; }
.form-check label a:hover { color: var(--text-color); }
.modern-input:focus { outline: none; border-color: var(--accent-color); }
.toggle-switch { position: relative; width: 50px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; border-radius: 24px; transition: 0.3s; }
.toggle-slider span { position: absolute; content: ''; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--accent-color); }
.toggle-switch input:checked + .toggle-slider span { transform: translateX(26px); }

/* --- Modals --- */
.modal-content { background: var(--secondary-bg); padding: 2rem 2.5rem; border-radius: 12px; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25); min-width: 320px; max-width: 90vw; position: relative; }
.modal-header { margin-bottom: 1.2rem; font-size: 1.2rem; color: var(--text-color); display: flex; justify-content: space-between; align-items: center; }
.modal-header h2, .modal-header h3 { margin: 0; font-size: 1.2rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; color: var(--muted-text); cursor: pointer; }
.modal-error { color: #ff5252; font-size: 0.95rem; min-height: 1.2em; margin-bottom: 1.2rem; }
.modal-buttons, .modal-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1.5rem; }
.modal-step-display { display: none !important; }
.modern-modal-content { background: var(--primary-bg); border-radius: 12px; border: 1px solid var(--border-color); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); min-width: 400px; max-width: 500px; animation: modalSlideIn 0.3s ease-out; }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modern-modal-header { padding: 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.modern-modal-title { color: var(--text-color); font-weight: 600; font-size: 1.1rem; }
.modern-modal-close { background: none; border: none; color: var(--muted-text); font-size: 1.5rem; cursor: pointer; padding: 0.25rem; line-height: 1; }
.modern-modal-body { padding: 1.5rem; }
.modern-modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-color); display: flex; gap: 0.5rem; justify-content: flex-end; }

/* =====================================================
   4. SECTIONS & PAGES
   ===================================================== */

/* --- Common Sections --- */
.section, .user-data-section, .settings-section, .websites-section { margin-bottom: 2rem; }
.section h1, .section h2, .user-data-section h1, .settings-section h1, .websites-section h2 { font-size: 1.4rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.section-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.section-header h1, .section-header h2 { font-size: 1.4rem; margin: 0; }
.empty-state { padding: 2rem; text-align: center; color: var(--muted-text); background: var(--secondary-bg); border-radius: 8px; }
.empty-state i { font-size: 48px; color: var(--muted-text); margin-bottom: 15px; display: block; }
.empty-state h3 { font-size: 1.3rem; color: var(--text-color); margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 10px; }
.empty-state p:last-of-type { margin-bottom: 20px; }

/* --- Sidebar & Navbar (for non-server-manager pages) --- */
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh; background: var(--secondary-bg); border-right: 1.5px solid var(--border-color); display: flex; flex-direction: column; overflow: hidden; z-index: 200; transition: width .3s; font-size: 1.09rem; }
.sidebar-header { position: relative; padding: 1.2rem 1.5rem; border-bottom: 1.5px solid var(--border-color); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.5px; background: var(--secondary-bg); display: flex; align-items: center; justify-content: center; }
.sidebar-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.sidebar-logo { display: block; height: 40px; margin-right: 10px; }
.sidebar-title-text { color: var(--text-color); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.5px; text-align: center; }
.sidebar-title { display: none; font-size: 1.18rem; font-weight: 700; letter-spacing: 0.5px; color: var(--text-color); }
.sidebar-nav { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0.5rem 0; 
    min-height: 0; 
}

.sidebar-menu { padding-top: 1.2rem; font-size: 1.08rem; }
.sidebar-menu .sidebar-item { margin: .4rem 0; }
.sidebar-link, .navbar-link { display: flex; align-items: center; padding: .8rem 1rem; transition: background .2s; color: var(--text-color); }
.sidebar-link { padding: 1rem 1.7rem; font-size: 1.09rem; border-radius: 7px; gap: 1rem; }
.sidebar-link:hover, .navbar-link:hover, .sidebar-item.active .sidebar-link { background: var(--accent-color); color: #fff; }
.sidebar-item.active .sidebar-link { border-left: 4px solid var(--text-color); }
.sidebar-icon, .navbar-icon { width: 20px; margin-right: .8rem; flex-shrink: 0; text-align: center; }
.sidebar-icon { width: 22px; margin-right: 1rem; font-size: 1.18rem; }
.sidebar-footer { 
    padding: 1.2rem 1.5rem; 
    border-top: 1.5px solid var(--border-color); 
    background: var(--secondary-bg); 
    flex-shrink: 0; 
    margin-top: auto; 
}
.sidebar-actions { margin-top: 1.2rem; }
.user-info .user-avatar img, .user-info .user-avatar i { width: 44px !important; height: 44px !important; font-size: 44px !important; }
.user-details .username { font-size: 1.13rem; font-weight: 600; }
.admin-link { font-size: 1.08rem; font-weight: 700; border-radius: 0 0 var(--border-radius-md) var(--border-radius-md); box-shadow: var(--shadow-sm); transition: var(--transition-fast); z-index: 10; display: block; margin: 0; padding: 1.1rem 0; text-align: center; background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent)); color: #fff; }
.logout-link { display: flex; align-items: center; font-size: .85rem; padding: 0.8rem; margin-top: 0.5rem; background: linear-gradient(90deg, #ff5252, #ff1744) !important; color: #fff !important; border-radius: 8px; transition: all .2s; text-align: center; justify-content: center; }
.logout-link i { margin-right:.4rem; }
.logout-link:hover { background: linear-gradient(90deg, #ff1744, #d32f2f) !important; color: #fff !important; }
.mobile-navbar { display: none; position: fixed; top: 0; left: 0; width: 100%; height: var(--hdr-h); background: var(--secondary-bg); box-shadow: 0 2px 10px rgba(0,0,0,.1); z-index: 202; border-bottom: 1px solid var(--border-color); }
.mobile-navbar-content { display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; height: 100%; }
.mobile-menu-toggle { background: none; border: none; color: var(--text-color); font-size: 1.2rem; padding: 0.5rem; cursor: pointer; border-radius: 4px; transition: background 0.2s; }
.mobile-menu-toggle:hover { background: var(--hover-bg); }
.mobile-navbar-actions { display: flex; align-items: center; gap: 0.5rem; }
.mobile-user-menu { position: relative; }
.mobile-user-toggle { background: none; border: none; color: var(--text-color); font-size: 1.1rem; padding: 0.5rem; cursor: pointer; border-radius: 4px; transition: background 0.2s; display: flex; align-items: center; gap: 0.5rem; }
.mobile-user-toggle:hover { background: var(--hover-bg); }
.mobile-username { font-size: 0.9rem; font-weight: 500; }
.mobile-user-dropdown { position: absolute; top: 100%; right: 0; background: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); min-width: 180px; z-index: 1000; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.2s ease; }
.mobile-user-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-user-dropdown a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: var(--text-color); text-decoration: none; transition: background 0.2s; font-size: 0.9rem; }
.mobile-user-dropdown a:hover { background: var(--hover-bg); }
.mobile-user-dropdown a:first-child { border-radius: 6px 6px 0 0; }
.mobile-user-dropdown a:last-child { border-radius: 0 0 6px 6px; }

/* Desktop Sidebar Notification Badge */
.sidebar-notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff5252, #ff1744);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 8px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

.sidebar-link {
    position: relative;
}

/* Mobile Notification Button */
.mobile-notification-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    padding: 0.6rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.mobile-notification-btn:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
    transform: scale(1.05);
}

.mobile-notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #ff5252, #ff1744);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

/* =====================================================
   DESKTOP NOTIFICATION BELL - TOP RIGHT FIXED
   ===================================================== */
.desktop-notification-bell {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: none; /* Hidden on mobile */
}

.desktop-notification-btn {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.3rem;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    box-shadow: var(--shadow-md);
}

.desktop-notification-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.desktop-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ff5252, #ff1744);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
    border: 2px solid var(--primary-bg);
}

.desktop-notification-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 350px;
    max-width: 400px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-medium);
    overflow: hidden;
}

.desktop-notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.desktop-notification-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desktop-notification-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desktop-mark-all-read-btn,
.desktop-view-all-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 0.4rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
}

.desktop-mark-all-read-btn:hover,
.desktop-view-all-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.desktop-notification-dropdown-content {
    max-height: 400px;
    overflow-y: auto;
}

.desktop-notification-empty {
    text-align: center;
    padding: 2rem 1.25rem;
    color: var(--muted-text);
}

.desktop-notification-empty i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

.desktop-notification-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.desktop-notification-item:hover {
    background: var(--hover-bg);
}

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

.desktop-notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--accent-color);
}

.desktop-notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.desktop-notification-content {
    flex: 1;
    min-width: 0;
}

.desktop-notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.desktop-notification-message {
    font-size: 0.85rem;
    color: var(--muted-text);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.desktop-notification-time {
    font-size: 0.75rem;
    color: var(--muted-text);
    opacity: 0.8;
}

.desktop-notification-unread-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.desktop-notification-see-more {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--hover-bg);
}

.desktop-notification-see-more a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.desktop-notification-see-more a:hover {
    color: var(--secondary-accent);
    text-decoration: underline;
}

/* Desktop Only - Show notification bell */
@media (min-width: 769px) {
    .desktop-notification-bell {
        display: block !important;
    }
}

/* =====================================================
   NOTIFICATION BELL COMPONENT - OLED THEME
   ===================================================== */
.notification-bell-container { position: relative; }

.notification-bell-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    padding: 0.6rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-btn:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #ff5252, #ff1744);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

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

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    max-width: 380px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-medium);
    overflow: hidden;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.notification-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mark-all-read-btn,
.view-all-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 0.4rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
}

.mark-all-read-btn:hover,
.view-all-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.notification-dropdown-content {
    max-height: 400px;
    overflow-y: auto;
}

.notification-empty {
    text-align: center;
    padding: 2rem 1.25rem;
    color: var(--muted-text);
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.notification-item:hover {
    background: var(--hover-bg);
}

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

.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--accent-color);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--muted-text);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--muted-text);
    opacity: 0.8;
}

.notification-unread-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.notification-see-more {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--hover-bg);
}

.notification-see-more a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.notification-see-more a:hover {
    color: var(--secondary-accent);
    text-decoration: underline;
}

/* Notification Priority Colors */
.notification-icon.text-info { color: var(--accent-color); }
.notification-icon.text-warning { color: #f59e0b; }
.notification-icon.text-danger { color: #ef4444; }
.notification-icon.text-muted { color: var(--muted-text); }

/* Mobile Responsive */
@media (max-width: 480px) {
    .notification-dropdown {
        min-width: 280px;
        max-width: calc(100vw - 2rem);
    }
    
    .notification-dropdown-header {
        padding: 0.75rem 1rem;
    }
    
    .notification-item {
        padding: 0.75rem 1rem;
    }
}

/* =====================================================
   NOTIFICATIONS PAGE STYLES - OLED THEME
   ===================================================== */

.notifications-container {
    background: var(--secondary-bg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.notification-filters {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 1.5rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.notification-card {
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.notification-card:last-child {
    border-bottom: none;
}

.notification-card:hover {
    background: var(--hover-bg);
}

.notification-card.unread {
    background: rgba(99, 102, 241, 0.03);
    border-left: 4px solid var(--accent-color);
}

.notification-card.unread::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
}

.notification-card-header {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem 1.5rem 0.75rem;
    gap: 1rem;
}

.notification-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.notification-card-meta {
    flex: 1;
    min-width: 0;
}

.notification-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.notification-card-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--muted-text);
}

.notification-type {
    background: var(--input-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.notification-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mark-read-btn,
.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--input-bg);
    color: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    text-decoration: none;
    font-size: 0.9rem;
}

.mark-read-btn:hover {
    background: var(--status-ready);
    color: #fff;
    transform: scale(1.1);
}

.action-btn:hover {
    background: var(--accent-color);
    color: #fff;
    transform: scale(1.1);
}

.notification-card-content {
    padding: 0 1.5rem 1.25rem 6rem;
}

.notification-card-content p {
    margin: 0;
    color: var(--muted-text);
    line-height: 1.5;
    font-size: 0.95rem;
}

.notification-unread-indicator {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
    animation: pulse 2s infinite;
}

.mark-all-read-page-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    border: none;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mark-all-read-page-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted-text);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.pagination-wrapper {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--hover-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--secondary-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    font-weight: 500;
}

.pagination-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--muted-text);
}

/* Mobile Responsive for Notifications Page */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .notification-card-header {
        padding: 1rem 1rem 0.5rem;
        gap: 0.75rem;
    }
    
    .notification-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .notification-card-content {
        padding: 0 1rem 1rem 4.5rem;
    }
    
    .notification-card-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .notification-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .notification-card-meta {
        order: 1;
        width: 100%;
    }
    
    .notification-card-actions {
        order: 0;
        align-self: flex-end;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .notification-card-content {
        padding: 0 1rem 1rem;
    }
}

.mobile-only-title { display:none; }
.navbar-header { display:flex; justify-content:space-between; align-items:center; padding:0 1rem; height:100% }
.navbar-logo { height:30px; margin-right:8px }
.menu-toggle { background:none; border:none; color:var(--text-color); font-size:1.2rem; cursor:pointer; position:absolute; right:1rem; top:50%; transform:translateY(-50%); display:none; }
.navbar-dropdown { position:absolute; top:var(--hdr-h); left:0; width:100%; max-height:0; overflow:hidden; background:var(--secondary-bg); transition:max-height .3s; box-shadow:0 4px 8px rgba(0,0,0,.1) }
.navbar-dropdown.active { max-height:calc(100vh - var(--hdr-h)); overflow-y:auto; border-top:1px solid var(--border-color) }

/* --- Footer --- */
.main-footer, .panel-footer { background-color: var(--secondary-bg); border-top: 1px solid var(--border-color); color: var(--text-color); }
.main-footer { padding:1rem 0; text-align:center; font-size:.9rem; color:var(--muted-text); margin-top: 2rem; }
.panel-footer { margin-top: auto; padding: 1.5rem 0 1rem; font-size: 0.9rem; }
.footer-content { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 1rem; }
.footer-brand h4 { color: var(--accent-color); margin-bottom: 0.5rem; font-size: 1.1rem; font-weight: 600; }
.footer-brand p { color: var(--muted-text); line-height: 1.4; font-size: 0.85rem; }
.footer-links { display: flex; gap: 2rem; }
.footer-section h5 { color: var(--text-color); margin-bottom: 0.75rem; font-size: 0.95rem; font-weight: 500; }
.footer-section ul li { margin-bottom: 0.4rem; }
.footer-section ul li a, .footer-section ul li span { color: var(--muted-text); text-decoration: none; font-size: 0.85rem; transition: color 0.3s ease; }
.footer-section ul li a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; padding-top: 1rem; border-top: 1px solid var(--border-color); color: var(--muted-text); font-size: 0.8rem; }

/* --- Login/Register Pages --- */
.login-header, .register-header { text-align: center; margin-bottom: 2rem; }
.login-header h1, .register-header h1 { color: var(--text-color); font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.login-header p, .register-header p { color: var(--muted-text); font-size: 1rem; }
.logo { margin-bottom: 1rem; }
.logo-img { height: 50px; width: auto; }
.forgot-password, .register-link, .login-link, .form-footer { text-align: center; }
.forgot-password { margin-bottom: 1rem; }
.register-link, .login-link { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.register-link p, .login-link p { color: var(--muted-text); margin: 0; }
.forgot-password a, .register-link a, .login-link a, .form-footer a { color: var(--accent-color); text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
.forgot-password a { font-size: 0.9rem; }
.forgot-password a:hover, .register-link a:hover, .login-link a:hover, .form-footer a:hover { color: #4a5ba9; text-decoration: underline; }

/* --- User Data Page --- */
.user-info-card { background: var(--secondary-bg); padding: 2rem; border-radius: 8px; border: 1px solid var(--border-color); }
.info-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.info-item:last-child { border-bottom: none; }
.info-label { font-weight: 600; color: var(--muted-text); }
.info-value { color: var(--text-color); }

/* --- Settings Page --- */
.settings-block { margin-bottom: 2.5rem; }
.settings-block-header { margin-bottom: 1.5rem; }
.settings-block-title { font-size: 1.3rem; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.25rem; }
.settings-block-desc { color: var(--muted-text); }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.app-card { background: var(--secondary-bg); padding: 1.5rem; border-radius: 8px; border: 1px solid var(--border-color); display: flex; flex-direction: column; }
.app-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.app-icon { font-size: 2rem; color: var(--accent-color); }
.app-icon .fab.fa-discord { color: #5865F2; }
.app-icon .fab.fa-telegram-plane { color: #0088cc; }
.app-info h3 { margin: 0; font-size: 1.1rem; }
.app-status { font-size: 0.9rem; color: var(--muted-text); }
.app-description { color: var(--muted-text); flex-grow: 1; margin-bottom: 1.5rem; }
.connect-app-btn, .disconnect-app-btn { width: 100%; }
.disconnect-app-btn { background-color: var(--status-error); }
.data-permission-item { display: flex; align-items: center; gap: 1rem; }
.switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(26px); }
.code-container { text-align: center; margin: 2rem 0; }
.code-label { color: var(--muted-text); margin-bottom: 0.5rem; }
.code-display { font-size: 2.5rem; font-weight: 700; letter-spacing: 5px; background: var(--primary-bg); padding: 1rem; border-radius: 8px; border: 1px dashed var(--border-color); }
.code-time { font-size: 0.9rem; color: var(--muted-text); margin-top: 0.5rem; }
.steps-container { margin-top: 1.5rem; }
.steps-header { font-size: 1.1rem; margin-bottom: 1rem; }
.steps-list { list-style-type: decimal; padding-left: 1.5rem; }
.steps-list li { margin-bottom: 0.5rem; }

/* --- Websites & Domains Page --- */
.websites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.create-website-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.create-website-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.website-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.website-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.website-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.website-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.website-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active { background: var(--status-ready); color: #fff; }
.status-pending { background: var(--status-developing); color: #fff; }
.status-suspended { background: var(--status-error); color: #fff; }
.status-maintenance { background: var(--muted-text); color: #fff; }

.website-url {
    color: var(--secondary-accent);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.website-url:hover {
    text-decoration: underline;
}

.website-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--muted-text);
}

.website-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.5rem 1rem;
    border: 1px solid;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--muted-text);
}

.btn-danger {
    background: transparent;
    border-color: var(--status-error);
    color: var(--status-error);
}

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

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--muted-text);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

/* Website modal uses existing modal classes but with specific styling overrides */
#createModal .modal-content {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#createModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#createModal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

#createModal .close-modal {
    background: none;
    border: none;
    color: var(--muted-text);
    font-size: 1.5rem;
    cursor: pointer;
}

#createModal .form-group {
    margin-bottom: 1rem;
}

#createModal .form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

#createModal .form-input, #createModal .form-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.9rem;
}

#createModal .form-input:focus, #createModal .form-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#createModal .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

#createModal .btn-submit {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
}

#createModal .btn-cancel {
    background: transparent;
    color: var(--muted-text);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}

.availability-check {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.availability-available {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-ready);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.availability-unavailable {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.alert {
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-ready);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Plugin Develop Page --- */
.plugin-develop-container { display: flex; flex-direction: column; height: 100vh; background: var(--primary-bg); }
.plugin-develop-container .plugin-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: var(--secondary-bg); border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.plugin-title-section .plugin-title { font-size: 1.3rem; color: var(--text-color); margin: 0; display: flex; align-items: center; gap: 1rem; }
.plugin-develop-container .plugin-status { font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 10px; text-transform: uppercase; }
.plugin-develop-container .plugin-actions { display: flex; align-items: center; gap: 1rem; }
.version-selector { display: flex; align-items: center; gap: 0.5rem; }
.version-label { font-size: 0.9rem; color: var(--muted-text); }
.version-select { background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 4px; padding: 0.3rem 0.5rem; color: var(--text-color); }
.main-workspace { display: grid; grid-template-columns: 280px 1fr 350px; flex-grow: 1; overflow: hidden; }
.files-panel, .file-editor, .ai-chat-panel { display: flex; flex-direction: column; background: var(--secondary-bg); overflow: hidden; }
.files-panel { border-right: 1px solid var(--border-color); }
.ai-chat-panel { border-left: 1px solid var(--border-color); }
.files-header, .file-editor-header, .ai-chat-header { padding: 1rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.files-header h3, .file-editor-header h3, .ai-chat-header h3 { font-size: 1rem; margin: 0; }
.files-list { flex-grow: 1; overflow-y: auto; }
.file-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border-color); }
.file-item:hover, .file-item.active { background: var(--hover-bg); }
.file-info { display: flex; align-items: center; gap: 0.75rem; flex-grow: 1; }
.file-icon { color: var(--accent-color); }
.file-badge { background: var(--accent-color); color: white; font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 4px; }
.file-actions { display: flex; gap: 0.5rem; }
.file-action-btn { background: none; border: none; color: var(--muted-text); cursor: pointer; }
.file-action-btn.danger { color: var(--status-error); }
.file-editor-content { flex-grow: 1; position: relative; }
.file-editor-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--muted-text); }
.file-editor-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.file-editor-textarea { width: 100%; height: 100%; background: var(--primary-bg); border: none; color: var(--text-color); resize: none; padding: 1rem; font-family: 'Courier New', monospace; outline: none; }
.file-editor-textarea.hidden { display: none; }
.file-editor-toolbar { padding: 0.5rem 1rem; border-bottom: 1px solid var(--border-color); display: none; }
.file-editor-toolbar.show { display: flex; }
.ai-messages { flex-grow: 1; overflow-y: auto; padding: 1rem; }
.ai-message { margin-bottom: 1rem; display: flex; gap: 0.75rem; }
.ai-message.user { justify-content: flex-end; }
.ai-message .message-icon { font-size: 1.2rem; }
.ai-message.user .message-icon { color: var(--accent-color); }
.ai-message.ai .message-icon { color: #fff; }
.ai-message div { max-width: 85%; padding: 0.75rem 1rem; border-radius: 12px; line-height: 1.5; }
.ai-message.user div { background: var(--accent-color); color: white; border-bottom-right-radius: 2px; }
.ai-message.ai div { background: var(--hover-bg); color: var(--text-color); border-bottom-left-radius: 2px; }
.ai-input-area { padding: 1rem; border-top: 1px solid var(--border-color); }
.ai-input-container { display: flex; gap: 0.5rem; }
.ai-input { flex-grow: 1; resize: none; padding: 0.75rem; border-radius: 6px; border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-color); }
.version-warning { background: rgba(255, 152, 0, 0.2); color: var(--status-developing); padding: 0.75rem; border-radius: 6px; text-align: center; margin-bottom: 1rem; }

/* --- Server Manager Page --- */
.server-manager-layout { padding: 1rem; }
.server-manager-container { display: flex; height: calc(100vh - 2rem); background: var(--primary-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); }
.server-sidebar { width: 280px; background: var(--secondary-bg); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; flex-shrink: 0; }
.server-header { padding: 1.5rem; border-bottom: 1px solid var(--border-color); }
.server-info { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.server-status-indicator { width: 12px; height: 12px; border-radius: 50%; background: var(--status-ready); }
.server-status-indicator.stopped { background: var(--status-error); }
.server-name { font-size: 1.2rem; font-weight: 600; color: var(--text-color); margin: 0; }
.server-address { font-size: 0.9rem; color: var(--muted-text); font-family: 'Courier New', monospace; }
.back-button { color: var(--muted-text); font-size: 0.9rem; text-decoration: none; }
.back-button:hover { color: var(--text-color); }
.server-nav { flex-grow: 1; overflow-y: auto; padding: 1rem 0; }
.server-nav-item { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1.5rem; color: var(--muted-text); text-decoration: none; transition: all 0.2s; border-left: 3px solid transparent; }
.server-nav-item:hover { background: var(--hover-bg); color: var(--text-color); }
.server-nav-item.active { background: var(--hover-bg); color: var(--text-color); border-left-color: var(--accent-color); font-weight: 600; }
.server-main { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; }
.server-content-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; background: var(--secondary-bg); border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.server-content-title { font-size: 1.3rem; color: var(--text-color); margin: 0; display: flex; align-items: center; gap: 0.75rem; }
.server-actions-bar { display: flex; gap: 0.5rem; }
.server-action-btn { background: var(--hover-bg); color: var(--text-color); border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.server-action-btn:hover { background: var(--accent-color); color: white; }
.server-action-btn:disabled { background: var(--primary-bg); color: var(--muted-text); cursor: not-allowed; }
.server-action-btn.btn-start:hover:not(:disabled) { background: var(--status-ready); }
.server-action-btn.btn-stop:hover:not(:disabled) { background: var(--status-error); }
.server-action-btn.btn-restart:hover:not(:disabled) { background: var(--status-developing); }
.server-content-body { padding: 1.5rem; flex-grow: 1; overflow-y: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--secondary-bg); padding: 1rem; border-radius: 8px; }
.stat-card h4 { font-size: 0.9rem; color: var(--muted-text); margin-bottom: 0.5rem; }
.stat-card .value { font-size: 1.2rem; font-weight: 600; color: var(--text-color); }
.console-container { background: #111318; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; height: 500px; }
.console-header { padding: 0.75rem 1rem; background: var(--secondary-bg); border-bottom: 1px solid var(--border-color); }
.console-title { font-size: 1rem; color: var(--text-color); }
.console-output { flex-grow: 1; overflow-y: auto; padding: 1rem; font-family: 'Courier New', monospace; font-size: 0.9rem; line-height: 1.5; }
.console-line { word-break: break-all; }
.console-line.warn { color: #ffc107; }
.console-line.error { color: #f44336; }
.console-line.info { color: #2196f3; }
.console-line.user-input { color: #82aaff; }
.console-line.system-message { color: var(--accent-color); font-style: italic; }
.console-input-container { display: flex; border-top: 1px solid var(--border-color); }
.console-input { flex-grow: 1; background: transparent; border: none; color: var(--text-color); padding: 0.75rem 1rem; outline: none; }
.console-send { background: var(--accent-color); color: white; border: none; padding: 0 1.5rem; cursor: pointer; }
.content-spacing { text-align: center; padding: 2rem; color: var(--muted-text); }
.file-manager-container { background: var(--secondary-bg); border-radius: 8px; }
.file-manager-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border-color); }
.file-manager-path { font-weight: 600; }
.file-manager-actions { display: flex; align-items: center; gap: 0.5rem; }
.file-list { min-height: 300px; }
.file-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); cursor: pointer; }
.file-item:hover { background: var(--hover-bg); }
.file-item-name { flex-grow: 1; }
.file-item-size { color: var(--muted-text); font-size: 0.9rem; }
.file-item-actions { display: flex; gap: 0.5rem; }
.file-editor-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 10001; align-items: center; justify-content: center; }
.file-editor-modal.show { display: flex; }
.file-editor-content { background: var(--primary-bg); width: 80%; max-width: 900px; height: 80%; border-radius: 12px; display: flex; flex-direction: column; }
.file-editor-header { padding: 1rem; background: var(--secondary-bg); display: flex; justify-content: space-between; align-items: center; }
.file-editor-title { font-weight: 600; }
.file-editor-close { background: none; border: none; color: var(--text-color); font-size: 1.2rem; cursor: pointer; }
.file-editor-body { flex-grow: 1; padding: 0.5rem; }
.file-editor-textarea { width: 100%; height: 100%; background: #111318; border: none; color: var(--text-color); resize: none; outline: none; font-family: 'Courier New', monospace; }
.file-editor-footer { padding: 1rem; background: var(--secondary-bg); text-align: right; }

/* --- Other Pages (Dashboard, Servers, etc.) --- */
.dashboard-summary-section { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.dashboard-card { 
    background: var(--secondary-bg); 
    padding: 2rem 2.5rem; 
    border-radius: var(--border-radius-lg); 
    min-width: 220px; 
    flex: 1; 
    text-align: center; 
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}
.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
    opacity: 0.8;
}
.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}
.dashboard-card-icon { 
    color: var(--accent-color); 
    background: rgba(99, 102, 241, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.dashboard-card-icon-success { 
    color: var(--status-ready); 
    background: rgba(16, 185, 129, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.dashboard-card-icon-warning { 
    color: var(--status-developing); 
    background: rgba(245, 158, 11, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.dashboard-card-title { 
    margin: 0 0 1rem 0; 
    color: var(--text-color); 
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}
.dashboard-card-value, .dashboard-card-value-success, .dashboard-card-value-warning { 
    font-size: 2.2rem; 
    font-weight: 700; 
    line-height: 1;
    margin-bottom: 0.5rem;
}
.dashboard-card-value { color: var(--accent-color); }
.dashboard-card-value-success { color: var(--status-ready); }
.dashboard-card-value-warning { color: var(--status-developing); font-size: 1.2rem; }
.dashboard-info-section, .dashboard-welcome-section, .dashboard-news-section { background: var(--secondary-bg); padding: 2rem; border-radius: 12px; border: 1px solid var(--border-color); }
.dashboard-info-title, .dashboard-welcome-title, .dashboard-activity-title, .dashboard-news-title { color: var(--text-color); margin-bottom: 1.5rem; font-size: 1.3rem; font-weight: 600; }
.dashboard-info-icon { color: var(--accent-color); margin-right: 0.5rem; }
.dashboard-info-description, .dashboard-welcome-description { color: var(--muted-text); margin-bottom: 1.5rem; }
.dashboard-info-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.dashboard-info-stat { flex: 1; min-width: 200px; }
.dashboard-info-stat-title { color: var(--text-color); margin-bottom: 0.5rem; }
.dashboard-info-stat-value, .dashboard-info-stat-value-success { font-size: 1.5rem; font-weight: bold; }
.dashboard-info-stat-value { color: var(--accent-color); }
.dashboard-info-stat-value-success { color: #4caf50; }
.dashboard-info-actions { margin-top: 1.5rem; }
.dashboard-welcome-section { padding: 3rem 2rem; text-align: center; }
.dashboard-welcome-icon { color: var(--accent-color); margin-bottom: 1.5rem; }
.dashboard-welcome-description { font-size: 1.1rem; margin-bottom: 2rem; }
.dashboard-welcome-message { background: linear-gradient(135deg, var(--accent-color), #4a5ba9); color: white; padding: 2rem; border-radius: 12px; text-align: center; margin-bottom: 2rem; }
.dashboard-welcome-message .dashboard-welcome-title { margin: 0 0 0.5rem 0; font-size: 1.5rem; font-weight: 700; }
.dashboard-welcome-subtitle { margin: 0; opacity: 0.9; font-size: 1.1rem; }
.dashboard-welcome-time { margin: 1rem 0 0 0; font-size: 0.9rem; opacity: 0.8; }
.dashboard-activity-section { margin-bottom: 2rem; }
.dashboard-news-item { background: var(--primary-bg); padding: 1.5rem; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 1rem; }
.dashboard-news-item-title { color: var(--text-color); margin-bottom: 0.5rem; font-size: 1.1rem; font-weight: 600; }
.dashboard-news-item-content { color: var(--muted-text); line-height: 1.6; margin-bottom: 1rem; }
.dashboard-news-item-date { color: var(--muted-text); font-size: 0.85rem; opacity: 0.8; }
.servers-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.servers-header h1 { color: var(--text-color); font-size: 1.8rem; font-weight: 700; }
.servers-list { display: flex; flex-direction: column; gap: 1rem; }
.server-row { background: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 8px; transition: all 0.2s ease; }
.server-row:hover { border-color: var(--accent-color); box-shadow: 0 2px 8px rgba(92, 107, 192, 0.1); }
.server-row-content { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.server-main-info { flex: 1; }
.server-name-status { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.server-name { font-size: 1.1rem; font-weight: 600; color: var(--text-color); margin: 0; }
.server-status { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; text-transform: capitalize; }
.server-status.online { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.server-status.offline { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.server-status.starting { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.server-status i { font-size: 0.7rem; }
.server-details-row { display: flex; flex-wrap: wrap; gap: 1.5rem; color: var(--muted-text); font-size: 0.9rem; }
.server-details-row span { display: inline-flex; align-items: center; gap: 0.5rem; }
.server-details-row i { width: 14px; text-align: center; color: var(--accent-color); }
.server-address, .server-container { font-family: 'Courier New', monospace; font-weight: 500; }
.server-container { font-size: 0.8rem; }
.server-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.settings-section { background: var(--primary-bg); padding: 1.5rem; border-radius: 6px; border: 1px solid var(--border-color); }
.settings-section h4 { color: var(--text-color); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }

/* --- AI Chat --- */
#ai-chat-bubble { position: fixed; right: 32px; bottom: 32px; width: 60px; height: 60px; background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent)); border-radius: 50%; box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 9999; transition: var(--transition-medium); }
#ai-chat-bubble:hover { box-shadow: var(--shadow-lg); background: linear-gradient(135deg, var(--secondary-accent), var(--accent-color)); transform: translateY(-2px); }
#ai-chat-bubble i { color: #fff; font-size: 2rem; }
#ai-chat-popup { position: fixed; right: 32px; bottom: 100px; width: 350px; max-width: 95vw; height: 480px; background: var(--secondary-bg); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-lg); display: none; flex-direction: column; z-index: 10000; overflow: hidden; border: 1px solid var(--border-color); }
#ai-chat-popup.open { display: flex; }
#ai-chat-header { background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent)); color: #fff; padding: 1rem 1.2rem; font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; justify-content: space-between; }
#ai-chat-close { background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
#ai-chat-messages { flex: 1; padding: 1.2rem; overflow-y: auto; background: var(--primary-bg); }
#ai-chat-input-area { display: flex; border-top: 1px solid var(--border-color); background: var(--secondary-bg); padding: 0.7rem 1rem; }
#ai-chat-input { flex: 1; border: 1px solid var(--border-color); border-radius: 7px; padding: 0.6rem 1rem; font-size: 1rem; background: var(--input-bg); color: var(--text-color); margin-right: 0.7rem; }
#ai-chat-send { background: var(--accent-color); color: #fff; border: none; border-radius: 7px; padding: 0.6rem 1.4rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background .2s; }
#ai-chat-send:hover { background: #3a4a99; }
.ai-chat-message { margin-bottom: 1.1rem; display: flex; align-items: flex-start; gap: 0.7rem; }
.ai-chat-message.user i { color: var(--accent-color); }
.ai-chat-message.ai i { color: #4a5ba9; }
.ai-chat-message .msg { background: var(--secondary-bg); color: var(--text-color); padding: 0.7rem 1.1rem; border-radius: 8px; font-size: 1rem; max-width: 80%; word-break: break-word; }
.ai-chat-message.user .msg { background: var(--accent-color); color: #fff; }
.ai-chat-message.ai .msg { background: #e9ecef; color: #222; }

/* --- Misc --- */
.user-info-card-margin { margin-bottom: 2.5rem; }
.user-info-text-center { color: var(--muted-text); text-align: center; }
.account-actions { margin-top: 2rem; text-align: center; }

/* =====================================================
   5. RESPONSIVE MEDIA QUERIES
   ===================================================== */
@media (max-width: 992px) {
    .sidebar { width: var(--sidebar-cw); }
    .sidebar .sidebar-text, .sidebar .sidebar-title { opacity: 0; visibility: hidden; transition: opacity .2s; }
    .sidebar:hover { width: var(--sidebar-w); }
    .sidebar:hover .sidebar-text, .sidebar:hover .sidebar-title { opacity: 1; visibility: visible; transition-delay: 0s; }
    .main-content-wrapper { margin-left: var(--sidebar-cw); }
    .sidebar:hover ~ .main-content-wrapper { margin-left: var(--sidebar-w); }
    .main-workspace { grid-template-columns: 280px 1fr; }
    .ai-chat-panel { display: none; }
}
/* Hide desktop-only items on mobile */
@media (max-width: 768px) {
    .sidebar-desktop-only {
        display: none !important;
    }
    .sidebar { position: fixed; top: 0; left: -100%; height: 100vh; width: 280px; z-index: 201; transition: left 0.3s ease; border-right: 1px solid var(--border-color); box-shadow: 2px 0 10px rgba(0,0,0,0.3); display: block !important; background: var(--secondary-bg) !important; opacity: 1 !important; visibility: visible !important; overflow-y: auto; }
    .sidebar.mobile-open { left: 0 !important; transform: none !important; }
    .mobile-navbar { display: block !important; }
    .main-content-wrapper { margin-left: 0; padding-top: var(--hdr-h); }
    .main-content { padding: 1rem; }
    .section-header, .page-header.plugin-page-header { flex-direction: column; gap: 1rem; align-items: stretch; }
    .menu-toggle { display: block !important; }
    .sidebar-title { display: inline; margin-left: 0.7rem; }
    .sidebar-header, .sidebar-brand { justify-content: flex-start; padding: 1rem; }
    
    /* Mobile overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 200;
        backdrop-filter: blur(2px);
    }
    .footer-content, .footer-links { flex-direction: column; gap: 1rem; }
    .footer-container { padding: 0 1rem; }
    .server-row-content { flex-direction: column; align-items: stretch; gap: 1rem; }
    .server-details-row { gap: 1rem; }
    .server-actions { justify-content: center; }
    .server-manager-container { flex-direction: column; height: auto; }
    .server-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
    .server-content-header { flex-direction: column; gap: 1rem; }
    .main-workspace { grid-template-columns: 1fr; }
    .files-panel { border-right: none; border-bottom: 1px solid var(--border-color); }
    
    /* Mobile sidebar improvements */
    .sidebar-nav { padding: 0.5rem 0; }
    .sidebar-link { padding: 0.75rem 1rem; font-size: 0.9rem; }
    .sidebar-footer { padding: 1rem; }
    .user-info { flex-direction: row; gap: 0.75rem; align-items: center; }
    .user-avatar { width: 40px; height: 40px; }
    .language-selector-sidebar { margin: 0.5rem 0; }
    .logout-link { margin-top: 0.75rem; padding: 0.75rem; }
    
    /* Show text in mobile menu */
    .sidebar.mobile-open .sidebar-text { 
        display: inline !important; 
        opacity: 1 !important; 
        visibility: visible !important; 
    }
    
    .sidebar.mobile-open .sidebar-title { 
        display: inline !important; 
        opacity: 1 !important; 
        visibility: visible !important; 
    }
    
    /* Mobile content improvements */
    .page-header { flex-direction: column; gap: 1rem; align-items: stretch; }
    .page-header .btn { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .two-column { flex-direction: column; }
    .three-column { flex-direction: column; }
    
    /* Mobile modal improvements */
    .modal-overlay { padding: 1rem; }
    .modal-content { max-width: 100%; margin: 0; }
    .modal-header { flex-direction: column; gap: 0.5rem; }
    .modal-actions { flex-direction: column; gap: 0.5rem; }
    .modal-actions .btn { width: 100%; }
    
    /* Mobile invoice improvements */
    .invoice-card { margin-bottom: 1rem; }
    .invoice-header { flex-direction: column; gap: 0.5rem; }
    .invoice-actions { flex-direction: column; gap: 0.5rem; width: 100%; }
    .invoice-actions .btn { width: 100%; }
}
@media (min-width: 769px) {
    .menu-toggle { display: none !important; }
    .sidebar-title { display: none !important; }
    .sidebar-header, .sidebar-brand { display: flex; justify-content: center; }
    .sidebar { display: flex !important; position: fixed; left: 0; }
}
@media (max-width: 480px) {
    .server-details-row { flex-direction: column; gap: 0.5rem; }
    .main-content { padding: 0.75rem; }
    .section-header h1 { font-size: 1.5rem; }
    .btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
    .sidebar { width: 100vw; }
    .servers-grid { grid-template-columns: 1fr; }
    .card { margin-bottom: 1rem; }
    .table-responsive { font-size: 0.85rem; }
    .modal-content { margin: 1rem; width: calc(100vw - 2rem); }
    
    /* Mobile card improvements */
    .server-card { padding: 1rem; }
    .server-card-header { flex-direction: column; gap: 0.5rem; }
    .server-card-actions { flex-direction: column; gap: 0.5rem; width: 100%; }
    .server-card-actions .btn { width: 100%; }
    
    /* Mobile button improvements */
    .btn-group { flex-direction: column; gap: 0.5rem; }
    .btn-group .btn { width: 100%; }
    .action-buttons { flex-direction: column; gap: 0.75rem; }
    .action-buttons .btn { width: 100%; }
    
    /* Mobile form improvements */
    .form-group { margin-bottom: 1rem; }
    .form-row { flex-direction: column; gap: 0.5rem; }
    .form-row .form-group { width: 100%; }
    
    /* Mobile table improvements */
    .table-container { overflow-x: auto; }
    .table th, .table td { padding: 0.5rem; font-size: 0.85rem; }
    
    /* Mobile settings improvements */
    .settings-block { margin-bottom: 1.5rem; }
    .apps-grid { grid-template-columns: 1fr; }
    .app-card { margin-bottom: 1rem; }
}

/* =====================================================
   INVOICES PAGE FIX (APPENDED)
   ===================================================== */
.invoices-container { max-width: 1200px; margin: auto; }
.invoices-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; }
.invoices-list { display: flex; flex-direction: column; gap: 1rem; }
.invoice-card { background: var(--secondary-bg); border-radius: 8px; border: 1px solid var(--border-color); display: flex; flex-direction: row; align-items: center; padding: 1rem; }
.invoice-header { display: flex; flex-direction: column; align-items: flex-start; margin-right: 1rem; min-width: 120px; }
.invoice-id { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.invoice-date { font-size: 0.85rem; color: var(--muted-text); }
.status-badge { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
.status-badge.success { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.status-badge.warning { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.status-badge.danger { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.invoice-content { flex-grow: 1; margin-right: 1rem; }
.invoice-item { margin-bottom: 0.5rem; }
.item-name { font-weight: 500; margin-bottom: 0.25rem; }
.item-specs { font-size: 0.85rem; color: var(--muted-text); }
.item-price { font-weight: 600; }
.invoice-footer { display: flex; flex-direction: column; align-items: flex-end; min-width: 200px; }
.invoice-total { font-size: 1.1rem; margin-bottom: 0.5rem; }
.invoice-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.invoice-actions .action-buttons { display: flex; gap: 0.5rem; }
.invoice-actions .payment-info { font-size: 0.8rem; color: var(--muted-text); text-align: right; }
.invoice-actions .paid-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.invoice-actions .text-success { color: #4caf50; }
.invoice-form-inline { display: inline; }
.invoice-btn-margin { margin-left: 0.5rem; }
.invoice-pdf-btn { margin-top: 5px; }
.invoice-text-block { display: block; margin-top: 5px; }
/* =====================================================
   APPENDED FIXES V5 - 2025-07-09
   ===================================================== */

/* --- Sidebar User Info Spacing & Logout Fix --- */
.sidebar-footer {
    margin-top: auto; /* Push to bottom */
}
.user-info {
    margin-bottom: 1.5rem; /* Increased spacing */
}
.language-switcher {
    margin-bottom: 1.5rem; /* Increased spacing */
}

/* =====================================================
   MOBILE NAVBAR STYLES
   ===================================================== */
.mobile-navbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    height: var(--hdr-h);
}

.mobile-navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: 100%;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--hover-bg);
}

.mobile-user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-user-toggle:hover {
    background: var(--hover-bg);
}

.mobile-username {
    font-size: 0.9rem;
    font-weight: 500;
}

.mobile-user-menu {
    position: relative;
}

.mobile-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    z-index: 200;
    margin-top: 0.5rem;
}

.mobile-user-dropdown.show {
    display: block;
}

.mobile-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.mobile-user-dropdown a:hover {
    background: var(--hover-bg);
}

.mobile-user-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.mobile-user-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: none;
}

/* --- Custom Plugins Page New Layout --- */
.page-subtitle {
    color: var(--muted-text);
    margin-top: 0.25rem;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.plugin-usage-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted-text);
}
.progress-bar {
    width: 150px;
    height: 8px;
    background-color: var(--primary-bg);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.full-grid-width {
    grid-column: 1 / -1;
}
.plugin-card-new {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}
.plugin-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    border-color: var(--accent-color);
}
.plugin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem;
}
.plugin-card-title-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.plugin-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 0.25rem;
}
.plugin-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
}
.plugin-card-description {
    font-size: 0.9rem;
    color: var(--muted-text);
    margin: 0;
}
.plugin-card-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: capitalize;
    white-space: nowrap;
}
.plugin-card-status.status-ready { background-color: rgba(76, 175, 80, 0.2); color: #4caf50; }
.plugin-card-status.status-developing { background-color: rgba(255, 152, 0, 0.2); color: #ff9800; }
.plugin-card-status.status-error { background-color: rgba(244, 67, 54, 0.2); color: #f44336; }
.plugin-card-body {
    padding: 0 1.25rem 1.25rem;
    flex-grow: 1;
}
.plugin-card-info {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--muted-text);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.plugin-card-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.plugin-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-bg);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid var(--border-color);
}
.plugin-card-footer .actions-right {
    display: flex;
    gap: 0.5rem;
}

/* =====================================================
   TICKET SYSTEM STYLES - OLED THEME
   ===================================================== */

/* Ticket Container */
.tickets-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ticket Filters */
.tickets-filters {
    background: var(--secondary-bg);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.filter-group label {
    display: block;
    color: var(--muted-text);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.filter-group select,
.filter-group input[type="text"] {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    min-width: 120px;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Ticket List */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-item {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.ticket-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.ticket-title {
    flex-grow: 1;
    margin-right: 1rem;
}

.ticket-title .ticket-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.ticket-title .ticket-link:hover {
    color: var(--accent-color);
}

.ticket-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-body {
    color: var(--muted-text);
    line-height: 1.6;
}

.ticket-description {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.ticket-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted-text);
}

.ticket-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ticket-info i {
    width: 12px;
    text-align: center;
}

/* Status & Priority Badges */
.ticket-status,
.ticket-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

/* Status Colors */
.status-open {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-answered {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-closed {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
}

/* Priority Colors */
.priority-low {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.priority-medium {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.priority-high {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.priority-urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Ticket Detail View */
.ticket-detail {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.ticket-detail-header {
    background: var(--primary-bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ticket-detail-header h2 {
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.ticket-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ticket-info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--hover-bg);
}

.ticket-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ticket-info-item label {
    color: var(--muted-text);
    font-size: 0.9rem;
    font-weight: 600;
}

.ticket-info-item span {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Ticket Conversation */
.ticket-conversation {
    padding: 1.5rem;
    background: var(--primary-bg);
}

.ticket-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--border-color);
}

.ticket-message.initial-message {
    border-left-color: var(--accent-color);
    background: var(--secondary-bg);
}

.ticket-message.admin-message {
    border-left-color: var(--status-ready);
    background: rgba(16, 185, 129, 0.05);
}

.ticket-message.customer-message {
    border-left-color: var(--secondary-accent);
    background: rgba(139, 92, 246, 0.05);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.message-author i {
    width: 16px;
    text-align: center;
}

.admin-badge {
    background: var(--status-ready);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.message-date {
    color: var(--muted-text);
    font-size: 0.85rem;
}

.message-content {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Ticket Reply Form */
.ticket-reply-form {
    background: var(--secondary-bg);
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.ticket-reply-form h3 {
    color: var(--text-color);
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.ticket-reply-form .form-group {
    margin-bottom: 1rem;
}

.ticket-reply-form textarea {
    width: 100%;
    min-height: 120px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
}

.ticket-reply-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.ticket-reply-form textarea::placeholder {
    color: var(--muted-text);
}

/* Create Ticket Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-bg);
}

.modal-header h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.3rem;
}

.modal-header .close {
    background: none;
    border: none;
    color: var(--muted-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-header .close:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--primary-bg);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--muted-text);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.page-info {
    color: var(--muted-text);
    font-size: 0.9rem;
}

/* Admin-specific Styles */
.admin-filters {
    background: var(--secondary-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.filters-form .filter-group {
    margin-bottom: 0;
}

.bulk-actions {
    background: var(--primary-bg);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.bulk-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.bulk-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bulk-select label {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
}

.bulk-actions-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-table-container {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--primary-bg);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-table td {
    color: var(--text-color);
    font-size: 0.9rem;
}

.admin-table tbody tr:hover {
    background: var(--hover-bg);
}

.admin-table .ticket-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.admin-table .ticket-link:hover {
    text-decoration: underline;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-info h3 {
    color: var(--text-color);
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
}

.stat-info p {
    color: var(--muted-text);
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .ticket-meta {
        width: 100%;
        justify-content: flex-start;
    }
    
    .ticket-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ticket-detail-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ticket-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .bulk-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 800px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tickets-container {
        padding: 0 0.5rem;
    }
    
    .ticket-item {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* File Upload Styles */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--input-bg);
}

.file-upload-area:hover {
    border-color: var(--accent-color);
    background: var(--hover-bg);
}

.upload-placeholder {
    color: var(--muted-text);
}

.upload-placeholder i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.upload-placeholder span {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.upload-placeholder small {
    font-size: 0.8rem;
    color: var(--muted-text);
}

.selected-files {
    margin-top: 1rem;
    text-align: left;
}

.selected-files-header {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.selected-file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
}

.selected-file-item i {
    color: var(--accent-color);
    width: 16px;
}

.selected-file-item .file-name {
    flex-grow: 1;
    color: var(--text-color);
    font-size: 0.9rem;
}

.selected-file-item .file-size {
    color: var(--muted-text);
    font-size: 0.8rem;
}

.selected-file-item .remove-file {
    background: none;
    border: none;
    color: var(--muted-text);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.selected-file-item .remove-file:hover {
    background: var(--status-error);
    color: white;
}

/* Message Attachments */
.message-attachments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.message-attachments h4 {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-attachments h4 i {
    color: var(--accent-color);
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attachment-item {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.attachment-item:hover {
    border-color: var(--accent-color);
    background: var(--hover-bg);
}

.attachment-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.attachment-link:hover {
    color: var(--accent-color);
}

.attachment-link i {
    color: var(--accent-color);
    width: 16px;
    text-align: center;
}

.attachment-link span {
    flex-grow: 1;
}

.attachment-link small {
    color: var(--muted-text);
    font-size: 0.8rem;
}

/* =====================================================
   PROXY SYSTEM STYLES
   ===================================================== */

/* Proxy Section */
.proxies-section {
    padding: 2rem 0;
}

.proxies-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.proxies-section .section-header h2 {
    color: var(--text-color);
    font-size: 1.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.proxies-section .section-header h2 i {
    color: var(--accent-color);
}

.create-proxy-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.create-proxy-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Proxy Quota Info */
.proxy-quota-info {
    margin-bottom: 2rem;
}

.quota-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.quota-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quota-header i {
    color: var(--accent-color);
    font-size: 1.25rem;
}

.quota-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.quota-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quota-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.quota-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--input-bg);
    border-radius: var(--border-radius-sm);
}

.quota-label {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.quota-value {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.quota-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quota-bar {
    flex: 1;
    height: 8px;
    background: var(--input-bg);
    border-radius: 4px;
    overflow: hidden;
}

.quota-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
    transition: width 0.3s ease;
}

.quota-text {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.quota-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quota-warning i {
    color: #f59e0b;
}

/* Proxy Cards */
.proxies-list {
    display: grid;
    gap: 1.5rem;
}

.proxy-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.proxy-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.proxy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.proxy-name-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.proxy-name {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proxy-name i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.proxy-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.proxy-status.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-ready);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.proxy-status.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.proxy-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-developing);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.proxy-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.proxy-status i {
    font-size: 0.7rem;
}

.proxy-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proxy-actions-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dropdown-toggle:hover {
    background: var(--hover-bg);
    border-color: var(--accent-color);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
    display: none;
    margin-top: 0.5rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--hover-bg);
}

.dropdown-item.text-danger {
    color: var(--status-error);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Proxy Details */
.proxy-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.proxy-specs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--input-bg);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
}

.spec-item i {
    color: var(--accent-color);
    width: 16px;
    text-align: center;
}

.spec-item span {
    color: var(--text-color);
}

.proxy-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--input-bg);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.info-item i {
    color: var(--muted-text);
    width: 16px;
    text-align: center;
}

.info-item span {
    color: var(--muted-text);
}

/* Proxy Empty State */
.proxies-section .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}

.proxies-section .empty-state-icon {
    font-size: 4rem;
    color: var(--muted-text);
    margin-bottom: 1.5rem;
}

.proxies-section .empty-state h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.proxies-section .empty-state p {
    color: var(--muted-text);
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.proxies-section .empty-state-note {
    color: var(--status-developing);
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--border-radius-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .proxies-section .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .proxy-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .proxy-actions {
        justify-content: flex-end;
    }
    
    .proxy-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quota-stats {
        grid-template-columns: 1fr;
    }
    
    .quota-progress {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .quota-text {
        text-align: center;
    }
}

/* =====================================================
   PROXY MANAGER STYLES
   ===================================================== */

/* Proxy Manager Header */
.proxy-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.proxy-info {
    flex: 1;
}

.proxy-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.back-link {
    color: var(--muted-text);
    font-size: 1.5rem;
    transition: all var(--transition-fast);
}

.back-link:hover {
    color: var(--accent-color);
    transform: translateX(-2px);
}

.proxy-name-status h1 {
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.proxy-name-status h1 i {
    color: var(--accent-color);
}

.proxy-specs {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.proxy-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--muted-text);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.tab-link:hover {
    color: var(--text-color);
    background: var(--hover-bg);
}

.tab-link.active {
    color: white;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    box-shadow: var(--shadow-sm);
}

.tab-link i {
    font-size: 0.9rem;
}

/* Tab Content */
.tab-content {
    min-height: 400px;
}

/* Overview Tab */
.proxy-overview {
    padding: 1rem 0;
}

.overview-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.overview-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.overview-card .card-header {
    background: var(--input-bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.overview-card .card-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.overview-card .card-header h3 i {
    color: var(--accent-color);
}

.overview-card .card-content {
    padding: 1.5rem;
}

.info-grid {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--input-bg);
    border-radius: var(--border-radius-sm);
}

.info-item .label {
    color: var(--muted-text);
    font-weight: 500;
}

.info-item .value {
    color: var(--text-color);
    font-weight: 600;
}

.info-item .value.status-online {
    color: var(--status-ready);
}

.info-item .value.status-offline {
    color: var(--status-error);
}

/* Connected Servers List */
.connected-servers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.connected-server-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--input-bg);
    border-radius: var(--border-radius-sm);
}

.connected-server-item .server-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.connected-server-item .server-info i {
    color: var(--accent-color);
}

.connected-server-item .server-name {
    color: var(--text-color);
    font-weight: 500;
}

.more-servers {
    text-align: center;
    padding: 0.5rem;
}

.more-servers a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.more-servers a:hover {
    text-decoration: underline;
}

/* Empty State Small */
.empty-state-small {
    text-align: center;
    padding: 2rem;
    color: var(--muted-text);
}

.empty-state-small i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--muted-text);
}

.empty-state-small p {
    margin: 0 0 1rem 0;
}

/* Servers Management */
.proxy-servers-management {
    padding: 1rem 0;
}

.add-server-section {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.add-server-section .section-header {
    margin-bottom: 1.5rem;
}

.add-server-section .section-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.add-server-section .section-header h3 i {
    color: var(--accent-color);
}

.add-server-form {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.add-server-form .form-group {
    flex: 1;
    margin: 0;
}

.add-server-form label {
    display: block;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.add-server-form select {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 1rem;
}

.add-server-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.connected-servers-section .section-header {
    margin-bottom: 1.5rem;
}

.connected-servers-section .section-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.connected-servers-section .section-header h3 i {
    color: var(--accent-color);
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.server-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.server-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.server-card .server-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.server-card .server-name-status h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.server-card .server-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.server-card .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.server-card .detail-item .label {
    color: var(--muted-text);
}

.server-card .detail-item .value {
    color: var(--text-color);
    font-weight: 500;
}

/* Console Section */
.proxy-console-section {
    padding: 1rem 0;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.console-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.console-header h3 i {
    color: var(--accent-color);
}

.console-actions {
    display: flex;
    gap: 0.5rem;
}

.console-container {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.console-output {
    height: 400px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    overflow-y: auto;
    background: #0a0a0a;
    color: #e0e0e0;
}

.console-message {
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.console-message.console-user {
    color: #4ade80;
}

.console-message.console-system {
    color: #60a5fa;
}

.console-message.console-error {
    color: #f87171;
}

.console-input-area {
    border-top: 1px solid var(--border-color);
}

.console-form {
    display: flex;
    align-items: center;
}

.console-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #1a1a1a;
    border: none;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.console-form input:focus {
    outline: none;
    background: #2a2a2a;
}

.console-form button {
    padding: 0.75rem 1rem;
    background: var(--accent-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.console-form button:hover {
    background: var(--secondary-accent);
}

/* Settings Section */
.proxy-settings-section {
    padding: 1rem 0;
}

.settings-cards {
    display: grid;
    gap: 2rem;
}

.settings-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.settings-card .card-header {
    background: var(--input-bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-card .card-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-card .card-header h3 i {
    color: var(--accent-color);
}

.settings-card .card-content {
    padding: 2rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.settings-form label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.settings-form input,
.settings-form select {
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.settings-form input:focus,
.settings-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .proxy-manager-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .proxy-specs {
        gap: 1rem;
    }
    
    .proxy-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .proxy-actions .btn {
        flex: 1;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .overview-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .add-server-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-form .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .console-output {
        height: 300px;
        font-size: 0.8rem;
    }
}

/* =====================================================
   CREATE PROXY STYLES
   ===================================================== */

/* Create Proxy Section */
.create-proxy-section {
    padding: 1rem 0;
}

.header-with-back {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-with-back .back-link {
    color: var(--muted-text);
    font-size: 1.5rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.header-with-back .back-link:hover {
    color: var(--accent-color);
    transform: translateX(-2px);
}

.header-with-back h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-with-back h2 i {
    color: var(--accent-color);
}

/* Compact Quota Card */
.quota-card.compact {
    margin-bottom: 2rem;
}

.quota-card.compact .quota-content {
    padding: 1.5rem;
}

.quota-card.compact .quota-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Create Proxy Form Container */
.create-proxy-form-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Form Card */
.form-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.form-card .card-header {
    background: var(--input-bg);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-card .card-header h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-card .card-header h3 i {
    color: var(--accent-color);
}

.form-card .card-header p {
    color: var(--muted-text);
    margin: 0;
    line-height: 1.6;
}

.form-card .card-content {
    padding: 2rem;
}

/* Create Proxy Form */
.create-proxy-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.create-proxy-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.create-proxy-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.create-proxy-form label {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.create-proxy-form label i {
    color: var(--accent-color);
    font-size: 0.85rem;
    width: 16px;
}

.create-proxy-form input,
.create-proxy-form select {
    padding: 0.875rem;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.create-proxy-form input:focus,
.create-proxy-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: var(--secondary-bg);
}

.create-proxy-form input::placeholder {
    color: var(--muted-text);
}

.form-hint {
    color: var(--muted-text);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

/* Info Card */
.info-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.info-card .card-header {
    background: var(--input-bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.info-card .card-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-card .card-header h3 i {
    color: var(--accent-color);
}

.info-card .card-content {
    padding: 1.5rem;
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-list .info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--input-bg);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.info-list .info-item:hover {
    background: var(--hover-bg);
}

.info-list .info-item i {
    color: var(--status-ready);
    font-size: 0.9rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.info-list .info-item span {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid;
}

.alert i {
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.alert p {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-ready);
    border-color: rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-error);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .create-proxy-form-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .create-proxy-form .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .header-with-back {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .header-with-back .back-link {
        font-size: 1.25rem;
    }
    
    .header-with-back h2 {
        font-size: 1.5rem;
    }
    
    .quota-card.compact .quota-stats {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   OAUTH AUTHENTICATION STYLES
   ===================================================== */

/* OAuth Section */
.oauth-section {
    margin-top: 24px;
    margin-bottom: 24px;
}

/* OAuth Divider */
.oauth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: var(--muted-text);
    font-size: 14px;
}

.oauth-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    z-index: 1;
}

.oauth-divider span {
    background: var(--secondary-bg);
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

/* OAuth Buttons Container */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* OAuth Button Base */
.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 52px;
}

.oauth-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.oauth-btn i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Discord OAuth Button */
.discord-btn {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    color: #ffffff;
    border-color: #5865f2;
}

.discord-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4752c4, #3c45a3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4);
}

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

/* GitHub OAuth Button */
.github-btn {
    background: linear-gradient(135deg, #24292e, #1c2025);
    color: #ffffff;
    border-color: #24292e;
}

.github-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1c2025, #161a1d);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(36, 41, 46, 0.4);
}

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

/* OAuth Button Loading State */
.oauth-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* OAuth Account Linking Styles (for userdata page) */
.oauth-account-section {
    background: var(--secondary-bg);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.oauth-account-section h3 {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.oauth-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oauth-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--input-bg);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.oauth-account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oauth-account-info i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.oauth-account-info .fab.fa-discord {
    color: #5865f2;
}

.oauth-account-info .fab.fa-github {
    color: #24292e;
}

.oauth-account-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.oauth-account-name {
    font-weight: 600;
    color: var(--text-color);
}

.oauth-account-connected {
    font-size: 13px;
    color: var(--muted-text);
}

.oauth-account-actions {
    display: flex;
    gap: 8px;
}

.oauth-link-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.oauth-link-btn:hover {
    background: linear-gradient(135deg, var(--secondary-accent), var(--accent-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.oauth-unlink-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.oauth-unlink-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.oauth-status-connected {
    color: var(--status-ready);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.oauth-status-not-connected {
    color: var(--muted-text);
    font-style: italic;
}

/* OAuth Button Responsive */
@media (max-width: 480px) {
    .oauth-buttons {
        gap: 8px;
    }
    
    .oauth-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 48px;
    }
    
    .oauth-account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .oauth-account-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

