/* ============================================
   NDU Zəka - Premium Dark Glassmorphic UI
   ============================================ */

/* Logo Image */
.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    display: block;
}

.sidebar-logo,
.logo-box,
.logo-icon {
    overflow: hidden;
    background: #ffffff !important;
}

.welcome-icon {
    overflow: hidden;
}

.sidebar-logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.logo-box .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.logo-icon .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.welcome-icon .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* CSS Variables - Soft Dark Theme */
:root {
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-lighter: rgba(99,102,241,0.1);
    --primary-dark: #4F46E5;
    --secondary: #2DD4BF;
    --secondary-light: rgba(45,212,191,0.1);
    --accent: #F472B6;
    --accent-light: rgba(244,114,182,0.08);
    --emerald: #34D399;
    --emerald-light: rgba(52,211,153,0.08);
    --amber: #FBBF24;
    --amber-light: rgba(251,191,36,0.08);
    --cyan: #67E8F9;
    --rose: #FDA4AF;

    --bg-body: #111827;
    --bg-white: rgba(31,41,55,0.9);
    --bg-card: rgba(31,41,55,0.8);
    --bg-card-hover: rgba(55,65,81,0.7);
    --bg-input: rgba(17,24,39,0.6);
    --bg-sidebar: rgba(17,24,39,0.97);
    --bg-glass: rgba(17,24,39,0.85);

    --text-primary: #E5E7EB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --text-accent: var(--primary-light);

    --border: rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow: 0 4px 12px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.25);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 0 3px rgba(99,102,241,0.15), 0 0 12px rgba(99,102,241,0.06);
    --shadow-neon: 0 0 20px rgba(99,102,241,0.08);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 50%;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-spring: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --sidebar-width: 280px;
    --header-height: 68px;

    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #2DD4BF 100%);
    --gradient-hero: linear-gradient(135deg, #6366F1 0%, #67E8F9 50%, #2DD4BF 100%);
    --gradient-card: linear-gradient(145deg, rgba(31,41,55,0.8), rgba(17,24,39,0.9));
    --gradient-mesh: radial-gradient(at 20% 80%, rgba(99,102,241,0.05) 0%, transparent 50%),
                     radial-gradient(at 80% 20%, rgba(45,212,191,0.04) 0%, transparent 50%),
                     radial-gradient(at 50% 50%, rgba(103,232,249,0.03) 0%, transparent 50%);
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
}

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

/* ============ AUTH PAGES ============ */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-body);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(124,92,252,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(6,214,160,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(34,211,238,0.05) 0%, transparent 60%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124,92,252,0.08), transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: floatOrb 8s ease-in-out infinite;
}

.auth-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,214,160,0.06), transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    animation: floatOrb 10s ease-in-out infinite reverse;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg), var(--shadow-neon);
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
}

.auth-logo { text-align: center; margin-bottom: 32px; }

.auth-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(124,92,252,0.3);
    animation: float 3s ease-in-out infinite;
}

.auth-logo h1 { font-size: 24px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; }
.auth-logo p { color: var(--text-muted); font-size: 14px; margin-top: 6px; }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    backdrop-filter: blur(8px);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: rgba(20,25,40,0.9);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    width: 100%;
    box-shadow: 0 4px 16px rgba(124,92,252,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124,92,252,0.4);
}

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

.btn-primary:hover::after { left: 100%; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(124,92,252,0.3);
    color: var(--primary-light);
}

.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-icon {
    width: 38px; height: 38px; padding: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: rgba(255,107,157,0.2);
}

.auth-footer { text-align: center; margin-top: 28px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { font-weight: 600; color: var(--primary-light); }

/* ============ ALERTS ============ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(12px);
}

.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #FCA5A5; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); color: #6EE7B7; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); color: #FCD34D; }

/* ============ DASHBOARD LAYOUT ============ */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px; height: 40px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(124,92,252,0.25);
}

.sidebar-header h2 { font-size: 16px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; }
.sidebar-header span { font-size: 11px; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.nav-section { margin-bottom: 22px; }
.nav-section-title {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.2px;
    padding: 0 12px; margin-bottom: 8px;
}

.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px; font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.nav-link:hover { background: rgba(124,92,252,0.06); color: var(--text-primary); }

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

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
}

.nav-link .nav-icon { font-size: 16px; width: 22px; text-align: center; }
.nav-link .nav-badge {
    margin-left: auto;
    background: var(--gradient-primary);
    color: white; font-size: 11px;
    padding: 2px 8px; border-radius: 10px; font-weight: 600;
}

/* New Chat Button */
.new-chat-btn {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 12px 16px;
    background: var(--gradient-primary);
    border: none; border-radius: var(--radius-sm);
    color: white; font-family: 'Inter', sans-serif;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 14px rgba(124,92,252,0.25);
    margin-bottom: 14px;
    text-align: center; justify-content: center;
    letter-spacing: 0.3px;
    position: relative; overflow: hidden;
}

.new-chat-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124,92,252,0.35);
}

.new-chat-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.new-chat-btn:hover::after { left: 100%; }

/* Conversation List */
.conversation-list { margin-top: 4px; }

.conv-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 13px;
    cursor: pointer; transition: var(--transition);
    margin-bottom: 1px;
}

.conv-item:hover { background: rgba(124,92,252,0.06); color: var(--text-primary); }
.conv-item.active { background: var(--primary-lighter); color: var(--primary-light); }
.conv-item .conv-icon { font-size: 13px; opacity: 0.5; }
.conv-item .conv-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .conv-delete { opacity: 0; transition: var(--transition-fast); cursor: pointer; color: var(--accent); font-size: 12px; }
.conv-item:hover .conv-delete { opacity: 1; }

/* Sidebar Footer */
.sidebar-footer { padding: 14px; border-top: 1px solid var(--border); }

.user-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: var(--radius-sm);
    transition: var(--transition); cursor: pointer;
}
.user-card:hover { background: rgba(124,92,252,0.06); }

.user-avatar {
    width: 36px; height: 36px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: white; flex-shrink: 0;
}

.user-info { flex: 1; overflow: hidden; }
.user-info .user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-info .user-email { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Main Content */
.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    display: flex; flex-direction: column;
    min-height: 100vh;
    background: transparent;
}

/* Header */
.main-header {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky; top: 0; z-index: 50;
}

.header-left { display: flex; align-items: center; gap: 14px; }
.header-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.header-subtitle { font-size: 12px; color: var(--text-muted); }
.header-right { display: flex; align-items: center; gap: 10px; }

/* Provider Selector */
.provider-select {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    backdrop-filter: blur(12px);
}

.provider-select select {
    background: transparent; border: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px; outline: none; cursor: pointer;
}

.provider-select select option { background: #161B2D; color: var(--text-primary); }

.provider-dot { width: 8px; height: 8px; border-radius: var(--radius-full); display: inline-block; }
.provider-dot.openai { background: #10A37F; }
.provider-dot.gemini { background: #4285F4; }
.provider-dot.claude { background: #CC785C; }
.provider-dot.deepseek { background: #4D6BFE; }

.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 22px; cursor: pointer; }

/* ============ CHAT AREA ============ */
.chat-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.chat-messages { flex: 1; overflow-y: auto; padding: 28px; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(124,92,252,0.2); border-radius: 3px; }

/* Welcome Screen */
.chat-welcome {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 60vh; text-align: center;
    padding: 40px; animation: fadeIn 0.6s ease;
}

.welcome-icon {
    width: 80px; height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex; align-items: center; justify-content: center;
    font-size: 38px; margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(124,92,252,0.3);
    animation: float 3s ease-in-out infinite;
}

.welcome-title { font-size: 28px; font-weight: 800; margin-bottom: 12px; color: var(--text-primary); letter-spacing: -0.5px; }

.welcome-subtitle { color: var(--text-secondary); font-size: 15px; max-width: 480px; margin-bottom: 40px; }

.welcome-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px; max-width: 700px; width: 100%;
}

.suggestion-card {
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
    text-align: left;
    backdrop-filter: blur(12px);
}

.suggestion-card:hover {
    border-color: rgba(124,92,252,0.3);
    box-shadow: var(--shadow), 0 0 20px rgba(124,92,252,0.08);
    transform: translateY(-3px);
}

.suggestion-card .suggestion-icon { font-size: 20px; margin-bottom: 8px; }
.suggestion-card .suggestion-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* Messages */
.message {
    display: flex; gap: 14px; margin-bottom: 22px;
    animation: fadeInUp 0.3s ease;
    max-width: 860px; margin-left: auto; margin-right: auto;
}

.message-avatar {
    width: 36px; height: 36px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0; margin-top: 2px;
}

.message.user .message-avatar { background: var(--gradient-primary); color: white; }
.message.assistant .message-avatar { background: rgba(6,214,160,0.15); color: var(--secondary); }
.message.filtered .message-avatar { background: rgba(255,107,157,0.15); color: var(--accent); }

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

.message-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.message-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.message-time { font-size: 11px; color: var(--text-muted); }

.message-provider {
    font-size: 10px; padding: 2px 8px;
    border-radius: 6px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.message-provider.openai { background: rgba(16,163,127,0.12); color: #34D399; }
.message-provider.gemini { background: rgba(66,133,244,0.12); color: #60A5FA; }
.message-provider.claude { background: rgba(204,120,92,0.12); color: #FB923C; }
.message-provider.deepseek { background: rgba(77,107,254,0.12); color: #818CF8; }
.message-provider.demo { background: var(--amber-light); color: var(--amber); }

.message-body { font-size: 14px; line-height: 1.75; color: var(--text-secondary); }

.message.user .message-body {
    color: var(--text-primary);
    background: rgba(124,92,252,0.08);
    padding: 14px 18px;
    border-radius: 2px var(--radius-md) var(--radius-md) var(--radius-md);
    border: 1px solid rgba(124,92,252,0.1);
}

.message.assistant .message-body {
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: 2px var(--radius-md) var(--radius-md) var(--radius-md);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.message-body pre {
    background: rgba(0,0,0,0.4); color: #D8DCE8;
    border-radius: var(--radius-sm); padding: 16px;
    margin: 10px 0; overflow-x: auto;
    font-size: 13px; border: 1px solid var(--border);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.message-body code {
    background: rgba(124,92,252,0.12); color: var(--primary-light);
    padding: 2px 6px; border-radius: 5px; font-size: 13px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.message-body pre code { background: none; color: inherit; padding: 0; }
.message-body strong { color: var(--text-primary); font-weight: 600; }
.message-body ul, .message-body ol { margin: 6px 0 6px 18px; }
.message-body li { margin-bottom: 3px; }

/* Message Actions */
.message-actions { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: var(--transition); }
.message-content:hover .message-actions { opacity: 1; }

.action-btn {
    background: transparent; border: none; padding: 0 4px;
    cursor: pointer; font-size: 14px; color: var(--text-muted);
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.action-btn:hover { color: var(--primary-light); transform: scale(1.15); }

/* Typing Indicator */
.typing-indicator {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 0; max-width: 860px;
    margin: 0 auto; animation: fadeIn 0.3s ease;
}

.typing-dots { display: flex; gap: 5px; }
.typing-dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary-light); animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Chat Input Area */
.chat-input-area {
    padding: 16px 28px 24px;
    background: linear-gradient(to top, var(--bg-body) 70%, transparent);
}

.chat-input-wrapper { max-width: 860px; margin: 0 auto; }

.chat-input-box {
    display: flex; align-items: flex-end; gap: 10px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.chat-input-box:focus-within {
    border-color: rgba(124,92,252,0.4);
    box-shadow: var(--shadow-glow), var(--shadow);
}

.chat-input-box textarea {
    flex: 1; background: transparent; border: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif; font-size: 14px;
    resize: none; outline: none; max-height: 120px;
    line-height: 1.5; padding: 4px 0;
}
.chat-input-box textarea::placeholder { color: var(--text-muted); }

.send-btn {
    width: 40px; height: 40px;
    background: var(--gradient-primary);
    border: none; border-radius: var(--radius-sm);
    color: white; font-size: 17px;
    cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(124,92,252,0.25);
}
.send-btn:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(124,92,252,0.35); }
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

.stop-btn {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #FF6B6B, #EE5A24);
    border: none; border-radius: var(--radius-sm);
    color: white; font-size: 17px;
    cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(255,107,107,0.3);
    animation: fadeIn 0.2s ease;
}
.stop-btn:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(255,107,107,0.4); }

/* File Upload */
.file-upload-btn {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 18px;
    border-radius: var(--radius-sm); transition: var(--transition);
    flex-shrink: 0; color: var(--text-muted);
}
.file-upload-btn:hover { background: rgba(124,92,252,0.08); color: var(--primary-light); }

.file-preview-area { display: flex; gap: 8px; padding: 10px 14px 0; flex-wrap: wrap; max-width: 860px; margin: 0 auto; }

.file-preview-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 12px; color: var(--text-secondary);
    position: relative; max-width: 180px;
}
.file-preview-item .file-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.file-preview-item .file-icon { font-size: 22px; }
.file-preview-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.3; }
.file-remove-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 12px; padding: 2px; border-radius: 4px; transition: var(--transition-fast); }
.file-remove-btn:hover { background: var(--accent-light); }

.msg-attachment { margin: 6px 0; }
.msg-attachment .msg-image { max-width: 300px; max-height: 200px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; transition: var(--transition); }
.msg-attachment .msg-image:hover { box-shadow: var(--shadow-md); transform: scale(1.02); }
.msg-attachment .msg-file {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; background: var(--bg-card-hover);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; color: var(--primary-light); transition: var(--transition);
}
.msg-attachment .msg-file:hover { background: var(--primary-lighter); border-color: rgba(124,92,252,0.2); }

/* Drag & Drop */
.chat-container.drag-over { position: relative; }
.chat-container.drag-over::after {
    content: '📎 Faylları buraya sürükləyin';
    position: absolute; inset: 0;
    background: rgba(11,15,26,0.92);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 600; color: var(--primary-light);
    border: 2px dashed rgba(124,92,252,0.4);
    border-radius: var(--radius-md); z-index: 10;
}

/* ============ DASHBOARD PANEL ============ */
.dashboard-content { padding: 32px; max-width: 1100px; margin: 0 auto; width: 100%; }
.page-title { font-size: 24px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.5px; }
.page-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 28px; }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 32px; }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: var(--transition);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 3px;
    opacity: 0; transition: opacity 0.3s;
}

.stat-card:nth-child(1)::before { background: var(--gradient-primary); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, #10B981, #22D3EE); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, #FB7185, #F59E0B); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, #F59E0B, #7C5CFC); }

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card:hover::before { opacity: 1; }

.stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.stat-icon.purple { background: var(--primary-lighter); color: var(--primary-light); }
.stat-icon.green { background: var(--emerald-light); color: var(--emerald); }
.stat-icon.pink { background: var(--accent-light); color: var(--accent); }
.stat-icon.yellow { background: var(--amber-light); color: var(--amber); }

.stat-value { font-size: 28px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Section Card */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px; margin-bottom: 22px;
    backdrop-filter: blur(12px);
}

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 16px; font-weight: 700; }

.conv-table { width: 100%; border-collapse: collapse; }
.conv-table th {
    text-align: left; font-size: 11px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.conv-table td { padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); }
.conv-table tr:last-child td { border-bottom: none; }
.conv-table tr:hover td { background: rgba(124,92,252,0.04); }

/* ============ PROFILE ============ */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.profile-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 28px;
    backdrop-filter: blur(12px);
}
.profile-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

/* ============ SETTINGS ============ */
.settings-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 28px;
    margin-bottom: 20px; backdrop-filter: blur(12px);
}
.settings-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }

.api-provider-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px; background: rgba(0,0,0,0.15);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    margin-bottom: 10px; transition: var(--transition);
}
.api-provider-card:hover { border-color: rgba(124,92,252,0.2); box-shadow: var(--shadow-sm); }

.api-provider-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 800;
}
.api-provider-icon.openai { background: rgba(16,163,127,0.12); color: #34D399; }
.api-provider-icon.gemini { background: rgba(66,133,244,0.12); color: #60A5FA; }
.api-provider-icon.claude { background: rgba(204,120,92,0.12); color: #FB923C; }
.api-provider-icon.deepseek { background: rgba(77,107,254,0.12); color: #818CF8; }

.api-provider-info { flex: 1; }
.api-provider-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.api-provider-model { font-size: 12px; color: var(--text-muted); }

.api-status { padding: 3px 12px; border-radius: 16px; font-size: 12px; font-weight: 600; }
.api-status.active { background: rgba(16,185,129,0.12); color: #34D399; }
.api-status.inactive { background: rgba(239,68,68,0.12); color: #FCA5A5; }

/* Toggle Switch */
.toggle-switch { position: relative; width: 44px; height: 24px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.08); border-radius: 12px; transition: var(--transition);
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; left: 3px; bottom: 3px;
    background: white; border-radius: 50%;
    transition: var(--transition); box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked+.toggle-slider { background: var(--gradient-primary); }
.toggle-switch input:checked+.toggle-slider::before { transform: translateX(20px); }

/* ============ LANDING PAGE ============ */
.landing-page { position: relative; background: var(--bg-body); }

.landing-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 48px; position: fixed;
    top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(11,15,26,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.landing-nav .logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; color: var(--text-primary); }
.landing-nav .logo .logo-box {
    width: 36px; height: 36px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 14px rgba(124,92,252,0.25);
}
.landing-nav .nav-actions { display: flex; align-items: center; gap: 12px; }

.landing-hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 100px 24px 60px;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(124,92,252,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(6,214,160,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(34,211,238,0.05) 0%, transparent 60%);
    position: relative; overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(124,92,252,0.06), transparent 70%);
    animation: pulseGlow 4s ease-in-out infinite;
}

.hero-content { max-width: 720px; animation: fadeInUp 0.7s ease; position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px;
    background: rgba(124,92,252,0.1);
    border: 1px solid rgba(124,92,252,0.2);
    border-radius: 24px; font-size: 13px;
    color: var(--primary-light); font-weight: 600;
    margin-bottom: 32px;
    backdrop-filter: blur(8px);
}

.hero-badge .badge-dot {
    width: 7px; height: 7px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(6,214,160,0.4);
}

.hero-title {
    font-size: 52px; font-weight: 900;
    line-height: 1.12; margin-bottom: 22px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #F0F0F5 0%, #A78BFA 50%, #06D6A0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description { font-size: 17px; color: var(--text-secondary); max-width: 540px; margin: 0 auto 40px; line-height: 1.7; }

.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; }

.btn-hero {
    padding: 15px 36px; font-size: 15px;
    border-radius: var(--radius-sm); font-weight: 600;
}

.hero-stats {
    display: flex; align-items: center; justify-content: center;
    gap: 52px; margin-top: 64px; padding-top: 44px;
    border-top: 1px solid var(--border);
}

.hero-stat { text-align: center; }
.hero-stat .stat-num { font-size: 32px; font-weight: 900; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-stat .stat-text { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Features Section */
.features-section { padding: 100px 48px; background: rgba(13,17,30,0.6); border-top: 1px solid var(--border); }
.features-section .section-header { text-align: center; margin-bottom: 60px; display: block; }
.features-section .section-header h2 { font-size: 34px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.features-section .section-header p { color: var(--text-secondary); font-size: 16px; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 1060px; margin: 0 auto; }

.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 30px;
    transition: var(--transition); backdrop-filter: blur(12px);
    position: relative; overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--gradient-primary);
    opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(124,92,252,0.15); }
.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 50px; height: 50px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 18px;
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.65; }

/* Landing Footer */
.landing-footer {
    padding: 40px 48px; text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted); font-size: 13px;
    background: rgba(13,17,30,0.6);
}

/* ============ HISTORY ============ */
.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-item {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 22px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition); cursor: pointer;
    text-decoration: none; color: inherit;
    backdrop-filter: blur(12px);
}
.history-item:hover {
    border-color: rgba(124,92,252,0.2);
    box-shadow: var(--shadow); transform: translateX(4px);
}

.history-icon {
    width: 42px; height: 42px;
    background: var(--primary-lighter);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--primary-light); flex-shrink: 0;
}

.history-info { flex: 1; min-width: 0; }
.history-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.history-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 14px; }
.history-actions { display: flex; gap: 6px; }

/* ============ EMPTY STATE ============ */
.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 64px 40px; text-align: center;
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); font-size: 14px; max-width: 380px; }

/* ============ ANIMATIONS ============ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes typingBounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px); } }
@keyframes floatOrb { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(20px, -20px) scale(1.05); } }
@keyframes pulseGlow { 0%, 100% { opacity: 0.5; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 0.8; transform: translate(-50%,-50%) scale(1.1); } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .hero-title { font-size: 34px; }
    .hero-description { font-size: 14px; }
    .hero-stats { flex-direction: column; gap: 20px; }
    .features-section { padding: 48px 16px; }
    .landing-nav { padding: 12px 16px; }
    .hero-actions { flex-direction: column; }
    .auth-card { padding: 32px 24px; }
    .profile-grid { grid-template-columns: 1fr; }
    .dashboard-content { padding: 16px; }
    .chat-messages { padding: 14px; }
    .chat-input-area { padding: 10px 14px 16px; }
    .welcome-suggestions { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .chat-toolbar { flex-direction: column; gap: 8px; }
    .message { flex-direction: column; }
    .message-avatar { width: 30px; height: 30px; font-size: 14px; }
    .users-table { font-size: 12px; }
    .users-table th, .users-table td { padding: 8px 6px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .suggestion-card { padding: 12px; }
    .header-title { font-size: 16px; }
    .header-right { display: none; }
}

.sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 99; cursor: pointer;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.show { display: block; }

/* ============ THEME TOGGLE ============ */
.theme-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    cursor: pointer; font-size: 18px; margin-bottom: 10px;
    transition: var(--transition);
}
.theme-toggle:hover { background: var(--primary); transform: scale(1.1); }

/* ============ LIGHT MODE ============ */
[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf0f5;
    --bg-glass: rgba(255,255,255,0.8);
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: rgba(0,0,0,0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] body { background: var(--bg-primary); color: var(--text-primary); }
[data-theme="light"] .sidebar { background: var(--bg-secondary); border-right: 1px solid var(--border); }
[data-theme="light"] .main-content { background: var(--bg-primary); }
[data-theme="light"] .main-header { background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
[data-theme="light"] .section-card, [data-theme="light"] .stat-card,
[data-theme="light"] .profile-card, [data-theme="light"] .settings-section {
    background: var(--bg-secondary); border: 1px solid var(--border);
}
[data-theme="light"] .form-control, [data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"], [data-theme="light"] input[type="email"],
[data-theme="light"] select, [data-theme="light"] textarea {
    background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border);
}
[data-theme="light"] .nav-link { color: var(--text-secondary); }
[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-link.active { color: var(--primary); background: rgba(108,92,231,0.08); }
[data-theme="light"] .history-item { background: var(--bg-secondary); border: 1px solid var(--border); }
[data-theme="light"] .history-item:hover { border-color: var(--primary); }
[data-theme="light"] .message { background: var(--bg-secondary); }
[data-theme="light"] .suggestion-card { background: var(--bg-secondary); border: 1px solid var(--border); }
[data-theme="light"] .chat-input-box { background: var(--bg-secondary); border: 1px solid var(--border); }
[data-theme="light"] .auth-card { background: var(--bg-secondary); }
[data-theme="light"] .landing-nav { background: rgba(255,255,255,0.9); }
[data-theme="light"] .api-provider-card { background: var(--bg-tertiary); }
[data-theme="light"] .users-table tr:hover { background: var(--bg-tertiary); }
[data-theme="light"] .chat-toolbar { background: var(--bg-secondary); border-bottom: 1px solid var(--border); }

/* ============ CHAT TOOLBAR ============ */
.chat-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px; background: var(--bg-secondary);
    border-bottom: 1px solid var(--border); gap: 10px;
}
.chat-toolbar-left, .chat-toolbar-right { display: flex; align-items: center; gap: 8px; }

.model-select {
    background: var(--bg-tertiary); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: 8px;
    padding: 6px 12px; font-size: 13px; cursor: pointer;
    font-family: 'Inter', sans-serif; outline: none;
    transition: var(--transition);
}
.model-select:focus { border-color: var(--primary); }

.toolbar-btn {
    background: var(--bg-tertiary); color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: 8px;
    padding: 6px 14px; font-size: 12px; cursor: pointer;
    font-family: 'Inter', sans-serif; transition: var(--transition);
}
.toolbar-btn:hover { border-color: var(--primary); color: var(--primary); }
.toolbar-btn.danger:hover { border-color: #d63031; color: #d63031; }

/* ============ MARKDOWN / CODE BLOCKS ============ */
.markdown-body { line-height: 1.7; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    margin: 16px 0 8px; color: var(--text-primary); font-weight: 700;
}
.markdown-body h1 { font-size: 1.4em; }
.markdown-body h2 { font-size: 1.2em; }
.markdown-body h3 { font-size: 1.05em; }
.markdown-body p { margin: 8px 0; }
.markdown-body ul, .markdown-body ol { margin: 8px 0; padding-left: 24px; }
.markdown-body li { margin: 4px 0; }
.markdown-body blockquote {
    border-left: 3px solid var(--primary); padding: 8px 16px;
    margin: 12px 0; background: rgba(108,92,231,0.05); border-radius: 0 8px 8px 0;
}
.markdown-body table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.markdown-body th, .markdown-body td {
    border: 1px solid var(--border); padding: 8px 12px; text-align: left;
}
.markdown-body th { background: var(--bg-tertiary); font-weight: 600; }
.markdown-body code {
    background: rgba(108,92,231,0.15); color: #e84393;
    padding: 2px 6px; border-radius: 4px; font-size: 0.88em;
    font-family: 'Fira Code', 'Consolas', monospace;
}
.markdown-body pre { margin: 12px 0; }
.markdown-body pre code {
    display: block; background: transparent; color: inherit;
    padding: 0; border-radius: 0;
}
.code-block-wrapper {
    position: relative; border-radius: 12px; overflow: hidden;
    background: #0d1117; margin: 12px 0;
}
.code-block-wrapper pre {
    margin: 0; padding: 16px; overflow-x: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.code-copy-btn {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    background: rgba(255,255,255,0.1); color: #ccc; border: none;
    padding: 4px 10px; border-radius: 6px; font-size: 11px;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: var(--transition);
}
.code-copy-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ============ LOADING SKELETON ============ */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(255,255,255,0.05) 50%, var(--bg-tertiary) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
}
.skeleton-text { height: 14px; width: 80%; margin: 8px 0; }
.skeleton-title { height: 20px; width: 50%; margin: 12px 0; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-card { height: 120px; border-radius: 16px; }

/* ============ ADMIN USERS TABLE ============ */
.users-table {
    width: 100%; border-collapse: collapse;
    font-size: 14px;
}
.users-table th {
    text-align: left; padding: 12px 16px;
    color: var(--text-muted); font-weight: 600;
    border-bottom: 1px solid var(--border); font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.users-table td {
    padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}
.users-table tr:hover { background: rgba(108,92,231,0.03); }
.users-table .blocked-row { opacity: 0.6; }
.user-avatar-sm {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.role-badge {
    padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.role-badge.admin { background: rgba(253,203,110,0.15); color: #fdcb6e; }
.role-badge.user { background: rgba(108,92,231,0.15); color: #a29bfe; }
.status-badge {
    padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.status-badge.active { background: rgba(0,184,148,0.15); color: #00b894; }
.status-badge.blocked { background: rgba(214,48,49,0.15); color: #d63031; }

.btn-success { background: rgba(0,184,148,0.2); color: #00b894; border: 1px solid rgba(0,184,148,0.3); border-radius: 6px; cursor: pointer; }
.btn-success:hover { background: rgba(0,184,148,0.3); }
.btn-warning { background: rgba(253,203,110,0.2); color: #fdcb6e; border: 1px solid rgba(253,203,110,0.3); border-radius: 6px; cursor: pointer; }
.btn-warning:hover { background: rgba(253,203,110,0.3); }
.btn-danger { background: rgba(214,48,49,0.2); color: #d63031; border: 1px solid rgba(214,48,49,0.3); border-radius: 6px; cursor: pointer; }
.btn-danger:hover { background: rgba(214,48,49,0.3); }
.btn-secondary { background: #1a1a2e; color: #fff; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-family: 'Inter', sans-serif; transition: var(--transition); }
.btn-secondary:hover { background: var(--primary); border-color: var(--primary); }
.btn-sm { padding: 8px 18px; font-size: 13px; }