/* OpenAgents 3D World - Modern UI Styles */

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

:root {
    /* ===== OPENAGENTS DESIGN TOKENS — Agent Oasis Command Center ===== */
    --bg-canvas: #070816;
    --bg-panel: rgba(8, 12, 26, 0.90);
    --bg-elevated: rgba(15, 23, 42, 0.88);
    --border-subtle: rgba(52, 245, 255, 0.18);
    --text-primary: #f8fafc;
    --text-secondary: #b9c6dc;
    --text-muted: #7b8aa6;
    --accent-cyan: #34f5ff;
    --accent-amber: #ffb86b;
    --accent-gold: #fbbf24;
    --accent-magenta: #f472b6;
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 140ms;
    --duration-base: 220ms;
    --duration-slow: 420ms;
    --z-canvas: 1;
    --z-panel: 120;
    --z-modal: 1000;
    --z-toast: 99999;

    /* ===== CYBERPUNK NEON COLORS - Blue/Green Theme ===== */
    --neon-cyan: #00ffff;
    --neon-green: #00ff80;
    --neon-blue: #0080ff;
    --neon-yellow: #ffff00;

    /* ===== DARK THEME ===== */
    --bg-primary: #0a0a1a;
    --bg-secondary: #1a0a2e;
    --bg-tertiary: #252542;

    /* ===== GLASS ===== */
    --glass-bg: rgba(8, 12, 26, 0.65); /* Daha fazla şeffaflık, glass hissi için */
    --glass-border: rgba(52, 245, 255, 0.25);
    --glass-glow: rgba(52, 245, 255, 0.15);

    /* ===== TEXT ===== */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;

    /* ===== ACCENT ===== */
    --accent-primary: #00ffff;
    --accent-secondary: #0080ff;
    --accent-tertiary: #00ff80;
    --accent-warning: #ffff00;
    --accent-error: #ff4444;

    /* ===== LEGACY SUPPORT ===== */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);

    --secondary: #22c55e;
    --secondary-light: #4ade80;
    --secondary-dark: #16a34a;
    --secondary-glow: rgba(34, 197, 94, 0.4);

    --accent: #f472b6;
    --accent-light: #f9a8d4;
    --accent-dark: #ec4899;

    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-glow: rgba(245, 158, 11, 0.4);

    --error: #ef4444;
    --error-light: #f87171;
    --error-glow: rgba(239, 68, 68, 0.4);

    --success: #10b981;
    --info: #3b82f6;

    /* Backgrounds - Enhanced Glassmorphism */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(10, 10, 26, 0.85);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-input: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-strong: rgba(255, 255, 255, 0.1);

    /* Text */
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --text-muted: #64748b;

    /* Borders */
    --border: rgba(0, 128, 255, 0.2);
    --border-hover: rgba(0, 128, 255, 0.3);
    --border-glow: rgba(0, 128, 255, 0.3);

    /* Shadows - Enhanced */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--glass-glow);
    --shadow-glow-lg: 0 0 40px rgba(0, 128, 255, 0.2);
    --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.05);

    /* Gradients - Enhanced */
    --gradient-primary: linear-gradient(135deg, #0080ff 0%, #00ff80 100%);
    --gradient-secondary: linear-gradient(135deg, #00ffff 0%, #0080ff 100%);
    --gradient-accent: linear-gradient(135deg, #00ff80 0%, #00ffff 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 100%);
    --gradient-card: linear-gradient(135deg, rgba(0, 128, 255, 0.1) 0%, rgba(0, 255, 128, 0.05) 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
    --gradient-ocean: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-sunset: linear-gradient(135deg, #f97316 0%, #ef4444 50%, #ec4899 100%);

    /* Animation timings */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--text);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Canvas Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#canvas-container canvas {
    display: block;
}

/* UI Overlay */
#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

#ui-overlay > * {
    pointer-events: auto;
}

/* ==================== MODAL ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow:
        0 0 20px var(--glass-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: slideUp 0.4s ease;
    position: relative;
    overflow: hidden;
    max-height: min(92vh, 960px);
    overflow-y: auto;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes panelSlideInLeft {
    0% { opacity: 0; transform: translateX(-40px) scale(0.98); }
    60% { opacity: 1; transform: translateX(5px) scale(1.01); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes panelSlideInRight {
    0% { opacity: 0; transform: translateX(40px) scale(0.98); }
    60% { opacity: 1; transform: translateX(-5px) scale(1.01); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes panelSlideInUp {
    0% { opacity: 0; transform: translateY(40px) scale(0.98); }
    60% { opacity: 1; transform: translateY(-5px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Logo */
.logo {
    margin-bottom: 30px;
}

.logo-3d {
    font-size: 72px;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.4));
}

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

.logo h1 {
    font-size: 36px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.tagline {
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 500;
}

/* ==================== FORM ==================== */

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 15px;
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.auth-tab {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 600;
    cursor: pointer;
}

.auth-tab.active {
    background: rgba(0,255,255,0.14);
    color: var(--text-primary);
    border-color: rgba(0,255,255,0.28);
}

.auth-step-label {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0,128,255,0.08);
    border: 1px solid rgba(0,128,255,0.18);
    color: var(--text-secondary);
    font-size: 13px;
}

.auth-hidden {
    display: none !important;
}

.checkbox-group {
    display: grid;
    gap: 10px;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 14px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ==================== COLOR OPTIONS ==================== */

.avatar-select {
    margin-bottom: 16px;
}

.auth-action-bar {
    margin-top: 8px;
    padding-top: 6px;
    padding-bottom: 2px;
    background: transparent;
}

.auth-action-hint {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.auth-provider-card,
.auth-provider-note {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 128, 255, 0.18);
    background: rgba(0, 128, 255, 0.08);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.auth-provider-note {
    font-size: 12px;
    margin-top: 10px;
}

.auth-telegram-link {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 14px;
}

#forgot-password-btn {
    width: 100%;
    margin-bottom: 10px;
}

.avatar-select label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.color-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.color-option {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all var(--transition-base);
    position: relative;
}

.color-option::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px currentColor;
}

.color-option.selected::after {
    border-color: white;
}

.color-option.selected {
    transform: scale(1.1);
    box-shadow: 0 0 25px currentColor;
}

/* ==================== BUTTONS ==================== */

.btn-primary {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(120deg, var(--neon-blue), var(--neon-green), var(--neon-blue));
    background-size: 200% auto;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 255, 128, 0.25), inset 0 1px 1px rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 128, 0.45), inset 0 1px 2px rgba(255,255,255,0.4);
    background-position: right center;
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 128, 0.25);
}

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

.btn-secondary {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-icon {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: var(--text-dim);
}

.btn-icon:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px var(--glass-glow);
    color: var(--text);
    transform: scale(1.1);
}

.btn-create {
    width: 100%;
    padding: 14px 20px;
    background: var(--gradient-secondary);
    background-size: 200% auto;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    margin-bottom: 16px;
}

.btn-create:hover {
    transform: translateY(-2px);
    background-position: right center;
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* ==================== ERROR ==================== */

.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid var(--error);
    color: var(--error-light);
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}

/* ==================== CHAT PANEL ==================== */

#chat-panel {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 340px;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 20px var(--glass-glow);
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: panelSlideInLeft 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--glass-border);
}

.chat-header span {
    text-shadow: 0 0 10px currentColor;
}

#room-name {
    font-weight: 700;
    color: var(--secondary);
    font-size: 15px;
}

#user-count {
    font-size: 12px;
    color: var(--text-dim);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-y: auto;
    padding: 14px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.system-msg {
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
}

.chat-msg {
    margin-bottom: 10px;
    animation: messageIn 0.3s ease;
}

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

.chat-msg .name {
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 4px;
}

.chat-msg .text {
    font-size: 14px;
    line-height: 1.5;
}

.chat-input-area {
    display: flex;
    flex: 0 0 auto;
    padding: 14px;
    gap: 10px;
    border-top: 1px solid var(--border);
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    transition: all var(--transition-base);
}

#chat-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
}

#send-btn {
    padding: 12px 18px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
}

#send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ==================== AGENT LIST ==================== */

#agent-list {
    position: fixed;
    right: 20px;
    top: 20px;
    width: 220px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    z-index: 110;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: panelSlideInRight 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.list-header {
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--glass-border);
    font-weight: 700;
    font-size: 14px;
}

.list-header span {
    text-shadow: 0 0 10px currentColor;
}

#agents {
    max-height: 320px;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
}

#agents::-webkit-scrollbar {
    width: 4px;
}

#agents::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: all var(--transition-base);
    cursor: pointer;
}

.agent-item:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.agent-item.self {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    cursor: default;
}

.agent-item.self:hover {
    transform: none;
}

.agent-color {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 10px currentColor;
}

.agent-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-badge {
    font-size: 12px;
    margin-left: 4px;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
}

/* ==================== CONTROLS HELP ==================== */

#controls-help {
    position: fixed;
    left: 20px;
    top: 72px;
    right: auto;
    bottom: auto;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    z-index: 102;
}

.help-item {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-item:last-child {
    margin-bottom: 0;
}

/* ==================== CONNECTION STATUS ==================== */

#connection-status {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 10px 18px;
    z-index: 101;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
}

#connection-status .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary);
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--secondary);
}

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

#connection-status.disconnected .dot {
    background: var(--error);
    box-shadow: 0 0 10px var(--error);
    animation: none;
}

#connection-status .text {
    font-size: 13px;
    font-weight: 600;
}

/* ==================== HIDDEN / MINIMIZED ==================== */

.hidden {
    display: none !important;
}

body.auth-screen #chat-panel,
body.auth-screen #agent-list,
body.auth-screen #project-panel,
body.auth-screen #task-board,
body.auth-screen #profile-panel,
body.auth-screen #inbox-panel,
body.auth-screen #controls-help,
body.auth-screen #connection-status,
body.auth-screen #touch-joystick,
body.auth-screen .mobile-actions,
body.auth-screen #mobile-nav,
body.auth-screen #social-btn {
    display: none !important;
}

#chat-panel.minimized {
    width: 320px;
    height: 56px !important;
    min-height: 0 !important;
    max-height: 56px !important;
    overflow: hidden !important;
}

#chat-panel.minimized .chat-header {
    border-bottom: 0;
}

#chat-panel.minimized .chat-messages,
#chat-panel.minimized .chat-input-area {
    display: none;
}

/* ==================== PROJECT PANEL ==================== */

#project-panel {
    position: fixed;
    left: 20px;
    top: 160px;
    width: 380px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: panelSlideInLeft 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 15px;
}

.project-content {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 12px 22px 0;
    padding: 14px 10px 30px 14px;
    max-height: none;
    overflow-y: auto;
    box-sizing: border-box;
    scrollbar-gutter: stable;
    border-radius: 0 0 18px 18px;
}

.project-content::-webkit-scrollbar {
    width: 6px;
}

.project-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0 30px;
}

.project-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.project-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.project-section {
    margin-bottom: 20px;
}

.project-section h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-card {
    background: var(--gradient-card);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.2);
}

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

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.project-title {
    font-weight: 700;
    font-size: 15px;
}

.project-budget {
    background: var(--gradient-primary);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.project-owner {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.project-deadline {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
    display: inline-block;
}

.project-deadline.deadline-overdue {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.project-deadline.deadline-urgent {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: pulse-deadline 1.5s infinite;
}

.project-deadline.deadline-soon {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

@keyframes pulse-deadline {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.project-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-open {
    background: rgba(34, 197, 94, 0.2);
    color: var(--secondary);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-in_progress {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-under_review {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

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

.status-review_failed {
    background: rgba(239, 68, 68, 0.15);
    color: #fda4af;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

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

/* Project Panel Minimized */
#project-panel.minimized .project-content {
    display: none;
}

#project-panel.minimized .project-header {
    border-radius: 20px;
}

#project-panel.minimized {
    height: auto !important;
    min-height: 0 !important;
    max-height: 72px !important;
    overflow: hidden !important;
}

/* Modal Large */
.modal-large {
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-large .project-detail {
    overflow-y: auto;
    max-height: 60vh;
}

.modal-large .modal-buttons {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--glass-bg);
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border);
}

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

/* Project Detail */
.project-detail {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border);
}

.detail-row {
    display: flex;
    margin-bottom: 14px;
}

.detail-label {
    font-weight: 700;
    min-width: 110px;
    color: var(--text-dim);
    font-size: 13px;
}

.detail-value {
    flex: 1;
    font-size: 14px;
}

#profile-payout-iban {
    font-size: 12px;
    word-break: break-all;
}

.detail-description {
    background: rgba(0, 0, 0, 0.25);
    padding: 14px;
    border-radius: 10px;
    margin-top: 10px;
    line-height: 1.6;
    font-size: 14px;
}

.detail-links {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.detail-link-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.detail-link-item a {
    color: var(--primary);
    word-break: break-all;
}

.delivery-source-fields {
    display: none;
}

.delivery-source-fields.active {
    display: block;
}

.delivery-upload-area input[type="file"] {
    width: 100%;
}

.deliverables-list {
    margin-top: 14px;
}

.deliverable-item {
    background: rgba(34, 197, 94, 0.1);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ==================== TASK BOARD ==================== */

/* ══════════════════════════════════════════════════════
   TASK BOARD — Complete layout fix
   Key fixes:
   - overflow:hidden on #task-board was clipping cards
   - max-height:450px was too small — increased + scrollable content
   - task-column: no more max-height constraint, scrolls internally
   ══════════════════════════════════════════════════════ */
#task-board {
    position: fixed;
    right: 250px;
    top: 20px;
    width: 660px;
    max-height: calc(100vh - 40px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;               /* clip expanded cards inside boundary */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: panelSlideInUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: flex;
    flex-direction: column;
}

.task-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.task-board-content {
    padding: 14px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 80px);
    border-radius: 0 0 12px 12px;
}

.task-board-content::-webkit-scrollbar {
    width: 6px;
}

.task-board-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Task Board Columns */
.task-board-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
    align-items: start;          /* ← columns don't stretch to each other's height */
}

.task-column {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px;
    min-height: 120px;           /* ← smaller min-height, grows with content */
    border: 1px solid var(--border);
    transition: border-color 0.2s;
    display: flex;
    flex-direction: column;
    overflow: visible;           /* ← no clipping */
}

/* Task list container */
.task-list {
    flex: 1;
    overflow-y: visible;         /* ← cards fully visible */
    padding: 0;
}

/* Scrollbar styling */
.task-list::-webkit-scrollbar {
    width: 4px;
}

.task-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.task-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.task-column.drag-over {
    background: rgba(99, 102, 241, 0.1);
    border: 2px dashed var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.column-title {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.task-count {
    background: var(--gradient-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.task-column[data-status="todo"] .column-title {
    color: #94a3b8;
}

.task-column[data-status="todo"] .task-count {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.task-column[data-status="in_progress"] .column-title {
    color: var(--warning);
}

.task-column[data-status="in_progress"] .task-count {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.task-column[data-status="done"] .column-title {
    color: var(--secondary);
}

.task-column[data-status="done"] .task-count {
    background: var(--gradient-secondary);
}

/* Task Cards */
.task-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px 18px;
    margin-bottom: 14px;
    cursor: grab;
    transition: all var(--transition-base);
}

.task-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.task-card:active {
    cursor: grabbing;
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg) scale(1.05);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.task-card-title {
    font-weight: 700;
    font-size: 14px;
    flex: 1;
}

.task-priority {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-low {
    background: rgba(34, 197, 94, 0.2);
    color: var(--secondary);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.priority-medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-high {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.task-card-description {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 8px;
    margin-bottom: 4px;
}

.task-card-meta .project-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-assignee-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

/* Task Board Footer */
.task-board-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.task-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.summary-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.summary-dot.todo {
    background: var(--neon-cyan);
}

.summary-dot.done {
    background: #00ff80;
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-bar-mini {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), #00ff80);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ─── Accepted Drafts Section ─────────────────────────────────────── */
.accepted-drafts-section {
    margin-bottom: 18px;
}

.accepted-drafts-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--neon-cyan);
    padding: 8px 4px;
    letter-spacing: 0.4px;
}

.badge-pill {
    background: var(--neon-cyan);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}

.accepted-drafts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accepted-draft-card {
    background: rgba(0,200,200,0.05);
    border: 1px solid rgba(0,200,200,0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
    min-height: 92px;
    display: flex;
    flex-direction: column;
}

.accepted-draft-card:hover {
    border-color: rgba(0,200,200,0.45);
}

.draft-card-header {
    min-height: 92px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.draft-card-info {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transform: translateY(7px);
}

.draft-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    line-height: 1.25;
}

.draft-card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    row-gap: 7px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-secondary);
    width: 100%;
}

.draft-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
}

.draft-toggle-sender {
    background: rgba(0,200,200,0.15);
    border: 1px solid rgba(0,200,200,0.3);
    color: var(--neon-cyan);
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.draft-toggle-sender:hover {
    background: rgba(0,200,200,0.28);
}

/* Delivery Status Badge */
.delivery-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.delivery-status-badge.open           { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.delivery-status-badge.in_progress    { background: rgba(0,200,200,0.15);  color: var(--neon-cyan); }
.delivery-status-badge.under_review   { background: rgba(255,200,0,0.15);  color: #ffc800; }
.delivery-status-badge.review_passed  { background: rgba(0,255,128,0.15);  color: #00ff80; }
.delivery-status-badge.review_failed  { background: rgba(255,50,50,0.12);  color: #ff5050; }
.delivery-status-badge.completed      { background: rgba(0,255,128,0.2);   color: #00ff80; }
.delivery-status-badge.forwarded      { background: rgba(0,255,128,0.2);   color: #00ff80; }

/* ─── Task Sender Panel ──────────────────────────────────────────── */
.task-sender-panel {
    border-top: 1px solid rgba(0,200,200,0.18);
    padding: 16px;
    background: rgba(0,0,0,0.18);
}

.task-sender-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-cyan);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-sender-summary {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(0,200,200,0.16);
    border-radius: 10px;
    background: rgba(0,200,200,0.06);
}

.task-sender-summary-title {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.task-sender-summary-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.task-sender-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.task-sender-card {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 10px;
}

.task-sender-card label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.task-sender-inline-field {
    display: flex;
    gap: 8px;
    align-items: center;
}

.task-sender-inline-field input {
    flex: 1;
    min-width: 0;
}

.task-sender-copy,
.task-sender-secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.task-sender-copy:hover,
.task-sender-secondary:hover {
    background: rgba(255,255,255,0.14);
}

.task-sender-quick-command {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0,0,0,0.28);
    color: var(--text-secondary);
    font-size: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.task-sender-quick-command code {
    color: #86efac;
    font-size: 12px;
    word-break: break-all;
}

.task-sender-step-list {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.task-sender-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.task-sender-step-number {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0,255,255,0.14);
    color: var(--neon-cyan);
    font-weight: 700;
    font-size: 13px;
}

.task-sender-step-content {
    min-width: 0;
}

.task-sender-step-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.task-sender-step-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.task-sender-tip {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.09);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    font-size: 12px;
    line-height: 1.45;
}

.task-sender-code-block {
    margin: 8px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0,0,0,0.32);
    border: 1px solid rgba(255,255,255,0.08);
    overflow-x: auto;
}

.task-sender-code-block code {
    color: #86efac;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre;
}

.task-sender-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.task-sender-manual-note {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.22);
    border-radius: 8px;
    font-size: 12px;
    color: #fbbf24;
}

.task-sender-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.task-sender-row label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.task-sender-row input,
.task-sender-row select,
.task-sender-inline-field input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-primary);
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.task-sender-row input:focus,
.task-sender-row select:focus {
    outline: none;
    border-color: var(--neon-cyan);
}

.task-sender-dest {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid var(--neon-cyan);
    margin-bottom: 10px;
    overflow-wrap: break-word;
}

.task-sender-dest a {
    color: var(--neon-cyan);
    text-decoration: none;
}

.task-sender-dest a:hover {
    text-decoration: underline;
}

.btn-submit-delivery {
    background: linear-gradient(135deg, var(--neon-cyan), #00ff80);
    color: #000;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-submit-delivery:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-submit-delivery:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.delivery-feedback {
    margin-top: 10px;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    display: none;
}

.delivery-feedback.success {
    background: rgba(0,255,128,0.12);
    color: #00ff80;
    border: 1px solid rgba(0,255,128,0.25);
    display: block;
}

.delivery-feedback.error {
    background: rgba(255,80,80,0.12);
    color: #ff8080;
    border: 1px solid rgba(255,80,80,0.25);
    display: block;
}

/* Review Progress */
.review-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.review-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.review-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.review-progress-fill.pending    { width: 0%;   background: transparent; }
.review-progress-fill.reviewing  { width: 60%;  background: #ffc800; animation: pulse-bar 1.5s infinite; }
.review-progress-fill.passed     { width: 100%; background: #00ff80; }
.review-progress-fill.failed     { width: 100%; background: #ff5050; }

@keyframes pulse-bar {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,200,200,0.25), transparent);
    margin: 16px 0 20px;
}

/* Task Board Minimized */
#task-board.minimized .task-board-content {
    display: none;
}

#task-board.minimized .task-board-header {
    border-radius: 20px;
}

/* Task Detail */
.task-detail {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border);
}

.task-detail-row {
    display: flex;
    margin-bottom: 14px;
}

.task-detail-label {
    font-weight: 700;
    min-width: 110px;
    color: var(--text-dim);
    font-size: 13px;
}

.task-detail-value {
    flex: 1;
    font-size: 14px;
}

/* Select styling */
select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 15px;
    transition: all var(--transition-base);
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* ==================== AGENT PROFILE ==================== */

#profile-panel {
    position: fixed;
    right: 20px;
    top: 540px;
    width: 300px;
    max-height: 420px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    z-index: 140;
    transition: all var(--transition-base);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 15px;
}

.profile-content {
    padding: 18px;
    max-height: calc(100vh - 170px);
    overflow-y: auto;
}

.profile-content::-webkit-scrollbar {
    width: 6px;
}

.profile-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Avatar Section */
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-glow);
}

.profile-name-section {
    text-align: center;
}

.profile-name-section h2 {
    font-size: 20px;
    margin-bottom: 6px;
    font-weight: 700;
}

.profile-title {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 500;
}

.profile-activity-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    margin: 0 0 10px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 255, 0.28);
    background: rgba(0, 255, 255, 0.08);
    color: #9ffcff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.10);
}

.profile-activity-status[hidden] {
    display: none !important;
}

.profile-activity-status[data-activity-status="owner-worker"] {
    border-color: rgba(255, 209, 102, 0.42);
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.13), rgba(0, 255, 255, 0.10));
    color: #ffe2a3;
}

.profile-activity-status[data-activity-status="owner"] {
    border-color: rgba(255, 209, 102, 0.34);
    background: rgba(255, 209, 102, 0.10);
    color: #ffd166;
}

.profile-activity-status[data-activity-status="worker"] {
    border-color: rgba(57, 217, 138, 0.36);
    background: rgba(57, 217, 138, 0.10);
    color: #39d98a;
}

.profile-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.stars {
    color: #fbbf24;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.rating-value {
    font-weight: 700;
    font-size: 15px;
}

/* Profile Sections */
.profile-section {
    margin-bottom: 20px;
}

.profile-section h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dim);
}

/* Skill Badges */
.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-card {
    background: var(--gradient-card);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

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

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.stat-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* XP Bar */
.xp-bar-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    border: 1px solid var(--border);
}

.xp-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.xp-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.6s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Badges Grid */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.badge-badge {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.badge-badge.locked {
    opacity: 0.3;
    filter: grayscale(1);
}

.badge-badge:hover:not(.locked) {
    transform: scale(1.15) rotate(5deg);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md);
}

.badge-badge.unlocked {
    opacity: 1;
    filter: none;
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

/* Level indicator */
.level-indicator {
    background: var(--gradient-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: var(--shadow-glow);
}

/* Profile Panel Minimized */
#profile-panel.minimized .profile-content {
    display: none;
}

#profile-panel.minimized .profile-header {
    border-radius: 20px;
}

/* ==================== DM INBOX ==================== */

#inbox-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    max-height: 300px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    z-index: 100;
}

.inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.inbox-header:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
}

.inbox-badge {
    background: #ff4757;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.inbox-badge.hidden {
    display: none;
}

.inbox-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
}

.inbox-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 13px;
}

.inbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inbox-item:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateX(3px);
}

.inbox-item:last-child {
    margin-bottom: 0;
}

.inbox-item.unread {
    background: rgba(0, 255, 255, 0.1);
    border-left: 3px solid #00ffff;
}

.inbox-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

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

.inbox-sender {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-preview {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-time {
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.inbox-delete {
    background: rgba(255, 71, 87, 0.3);
    border: none;
    color: #ff4757;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inbox-item:hover .inbox-delete {
    opacity: 1;
}

.inbox-delete:hover {
    background: #ff4757;
    color: white;
}

/* Scrollbar for inbox */
.inbox-list::-webkit-scrollbar {
    width: 6px;
}

.inbox-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.inbox-list::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 3px;
}

/* ==================== TOAST NOTIFICATIONS ==================== */

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border-radius: 14px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: toastIn 0.4s ease, toastOut 0.4s ease 2.6s forwards;
    pointer-events: auto;
    min-width: 300px;
    border: 1px solid var(--border);
}

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

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

.toast-success {
    border-color: var(--secondary);
}

.toast-success .toast-icon {
    color: var(--secondary);
}

.toast-error {
    border-color: var(--error);
}

.toast-error .toast-icon {
    color: var(--error);
}

.toast-warning {
    border-color: var(--warning);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info {
    border-color: var(--primary);
}

.toast-info .toast-icon {
    color: var(--primary);
}

.toast-icon {
    font-size: 22px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity var(--transition-base);
}

.toast-close:hover {
    opacity: 1;
}

/* ==================== LOADING SPINNER ==================== */

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
}

.loading-spinner::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 4px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-color: var(--primary) transparent var(--primary) transparent;
    animation: spin 1s linear infinite;
}

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

/* Inline spinner */
.spinner-sm {
    width: 20px;
    height: 20px;
}

.spinner-sm::after {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Pulse loading */
.loading-pulse {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* ==================== SKELETON LOADING ==================== */

.skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
    width: 60%;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    #chat-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }

    #agent-list {
        width: 180px;
    }

    #project-panel {
        width: calc(100% - 40px);
        left: 20px;
        top: 70px;
        max-height: calc(100vh - 90px);
    }

    #task-board {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        top: auto;
        bottom: 20px;
        max-height: 50vh;
    }

    .task-board-columns {
        grid-template-columns: 1fr;
        gap: 10px;
        overflow-x: auto;
        display: flex;
    }

    .task-column {
        min-width: 280px;
        min-height: 200px;
    }

    #profile-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        top: auto;
        bottom: 200px;
        max-height: 35vh;
    }

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

    #controls-help {
        display: none;
    }

    .modal-content {
        padding: 30px 24px;
    }

    .modal-large {
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 24px 20px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .color-options {
        gap: 8px;
    }

    .color-option {
        width: 38px;
        height: 38px;
    }

    .task-board-columns {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* ==================== UTILITY CLASSES ==================== */

/* Text Gradients */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-ocean {
    background: var(--gradient-ocean);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Effects */
.glow-primary {
    box-shadow: 0 0 20px var(--primary-glow);
}

.glow-primary-lg {
    box-shadow: 0 0 40px var(--primary-glow);
}

.glow-success {
    box-shadow: 0 0 20px var(--secondary-glow);
}

.glow-accent {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-card-strong {
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Pulse Ring Effect */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--primary);
    animation: pulse-ring 2s ease-out infinite;
}

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

/* Floating Animation */
.float {
    animation: float 3s ease-in-out infinite;
}

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

/* Bounce Animation */
.animate-bounce {
    animation: bounce 1s infinite;
}

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

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ==================== SPRINT 4: COLLABORATION TOOLS ==================== */

/* ===== NOTIFICATIONS PANEL ===== */
#notifications-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 320px;
    max-height: 500px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 130;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--gradient-card);
}

.notifications-header span {
    font-weight: 600;
    font-size: 14px;
}

.notification-badge {
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    box-shadow: var(--shadow-glow);
}

.notification-badge:empty {
    display: none;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-small {
    padding: 4px 10px;
    font-size: 11px;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-small:hover {
    background: var(--primary-dark);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.notification-item {
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    border-left: 3px solid var(--primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.15);
    border-left-color: var(--primary);
}

.notification-item.read {
    opacity: 0.6;
    border-left-color: var(--text-muted);
}

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

.notification-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-light);
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-content {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
}

.notification-mention {
    color: var(--accent-light);
    font-weight: 500;
}

.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-action-btn {
    padding: 4px 8px;
    font-size: 11px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-action-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text);
}

/* ===== ACTIVITY FEED PANEL ===== */
#activity-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 300px;
    max-height: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 125;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--gradient-card);
}

.activity-header span {
    font-weight: 600;
    font-size: 14px;
}

.activity-feed {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.activity-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--bg-input);
    border-radius: 8px;
    font-size: 12px;
}

.activity-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 6px;
    font-size: 14px;
    flex-shrink: 0;
}

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

.activity-text {
    color: var(--text);
    line-height: 1.4;
}

.activity-user {
    font-weight: 600;
    color: var(--primary-light);
}

.activity-time {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 4px;
}

/* ===== COMMENTS MODAL ===== */
#comments-modal .modal-content {
    max-width: 600px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.comments-header h2 {
    font-size: 18px;
    margin: 0;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.comment-item {
    padding: 12px;
    margin-bottom: 12px;
    background: var(--bg-input);
    border-radius: 10px;
    border-left: 3px solid var(--border);
}

.comment-item.own {
    border-left-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

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

.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-light);
}

.comment-time {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

.comment-mention {
    background: var(--primary-glow);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    color: var(--primary-light);
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.comment-delete-btn {
    padding: 4px 10px;
    font-size: 11px;
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error-light);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.comment-delete-btn:hover {
    background: var(--error);
    color: white;
}

.comment-input-area {
    position: relative;
}

#comment-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

#comment-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

/* ===== MENTION SUGGESTIONS ===== */
.mention-suggestions {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 8px;
    z-index: 1000;
}

.mention-suggestion {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
}

.mention-suggestion:hover,
.mention-suggestion.selected {
    background: var(--bg-card-hover);
}

.mention-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.mention-name {
    font-size: 13px;
    font-weight: 500;
}

.mention-title {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== VOTING PANEL ===== */
#voting-modal .modal-content {
    max-width: 500px;
}

.voting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.voting-header h2 {
    font-size: 18px;
    margin: 0;
}

.voting-content {
    margin-bottom: 16px;
}

.voting-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.voting-actions .btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.voting-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.voting-actions .btn-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.voting-actions .btn-error:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.voting-list {
    max-height: 400px;
    overflow-y: auto;
}

.vote-item {
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-input);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.vote-question {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.vote-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vote-option {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.vote-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

.vote-option-label {
    font-size: 13px;
}

.vote-option-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vote-count {
    font-size: 12px;
    color: var(--text-dim);
}

.vote-bar {
    width: 60px;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
}

.vote-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.vote-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.vote-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.vote-cancel-btn {
    padding: 4px 10px;
    font-size: 11px;
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error-light);
    border-radius: 4px;
    cursor: pointer;
}

.vote-cancel-btn:hover {
    background: var(--error);
    color: white;
}

/* ===== CREATE VOTE MODAL ===== */
#create-vote-modal .form-group label {
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#vote-question,
#vote-options,
#vote-ends {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
}

#vote-question:focus,
#vote-options:focus,
#vote-ends:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

#vote-ends {
    color-scheme: dark;
}

/* ===== DOCUMENTS PANEL ===== */
#documents-panel {
    position: fixed;
    top: 200px;
    left: 20px;
    width: 320px;
    max-height: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--gradient-card);
}

.documents-header span {
    font-weight: 600;
    font-size: 14px;
}

.documents-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-input);
    border: 2px dashed var(--border);
    border-radius: 10px;
    transition: var(--transition-fast);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.upload-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    transition: var(--transition-fast);
}

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

.document-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-secondary);
    border-radius: 8px;
    font-size: 18px;
}

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

.document-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.document-actions {
    display: flex;
    gap: 4px;
}

.document-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 14px;
}

.document-action-btn:hover {
    background: var(--bg-card-hover);
}

.document-action-btn.delete:hover {
    background: var(--error);
    color: white;
}

/* ===== DOCUMENT TYPE ICONS ===== */
.document-icon.pdf { background: linear-gradient(135deg, #ef4444, #dc2626); }
.document-icon.doc, .document-icon.docx { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.document-icon.xls, .document-icon.xlsx { background: linear-gradient(135deg, #22c55e, #16a34a); }
.document-icon.ppt, .document-icon.pptx { background: linear-gradient(135deg, #f59e0b, #d97706); }
.document-icon.zip, .document-icon.rar { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.document-icon.txt { background: linear-gradient(135deg, #64748b, #475569); }
.document-icon.image { background: linear-gradient(135deg, #ec4899, #db2777); }
.document-icon.code { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* ===== RESPONSIVE FOR SPRINT 4 PANELS ===== */
@media (max-width: 768px) {
    #notifications-panel,
    #activity-panel,
    #documents-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        max-height: 300px;
    }

    #notifications-panel {
        top: 80px;
    }

    #activity-panel {
        top: 400px;
    }

    #documents-panel {
        top: 720px;
    }
}

/* ==================== ADDITIONAL SPRINT 4 PANELS ==================== */

/* ==================== ENHANCED GLASSMORPHISM & ANIMATIONS ==================== */

/* Enhanced Glassmorphism for All Panels */
#chat-panel, #agent-list, #project-panel, #task-board, #profile-panel {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover Glow Effects for Panels */
#chat-panel:hover, #agent-list:hover, #project-panel:hover, #task-board:hover, #profile-panel:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Smooth Transitions for All Interactive Elements */
button, .btn-primary, .btn-secondary, .btn-create, .btn-icon {
    transition: all 0.2s ease !important;
    transform: translateY(0) !important;
}

button:hover, .btn-primary:hover, .btn-secondary:hover, .btn-create:hover, .btn-icon:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

button:active, .btn-primary:active, .btn-secondary:active, .btn-create:active, .btn-icon:active {
    transform: translateY(0) !important;
}

/* Loading Shimmer Effect */
.loading {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 100%) !important;
    background-size: 200% 100% !important;
    animation: shimmer 1.5s infinite !important;
}

/* Panel Slide Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

#chat-panel:not(.hidden), #agent-list:not(.hidden), #project-panel:not(.hidden), #task-board:not(.hidden), #profile-panel:not(.hidden) {
    animation: slideIn 0.3s ease !important;
}

.modal.active {
    animation: fadeIn 0.2s ease !important;
}

/* ==================== TOAST ANIMATIONS ==================== */

#toast-container {
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    left: auto !important;
    transform: none !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    pointer-events: none !important;
}

.toast {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 14px !important;
    animation: toastSlide 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    pointer-events: auto !important;
    min-width: auto !important;
}

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

.toast.hide {
    animation: toastHide 0.3s ease forwards !important;
}

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

/* Panel Header - Team-lead requested style */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gradient-card);
    border-bottom: 1px solid var(--glass-border);
}

.panel-header span {
    font-weight: 600;
    text-shadow: 0 0 10px currentColor;
}
    font-size: 14px;
    color: var(--text);
}

/* Badge - Team-lead requested style */
.badge {
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    box-shadow: var(--shadow-glow);
}

.badge:empty {
    display: none;
}

/* Notification Panel */
#notification-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 320px;
    max-height: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

#notification-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 8px;
}

/* Documents Panel */
#documents-panel {
    position: fixed;
    top: 60px;
    left: 20px;
    width: 320px;
    max-height: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

#documents-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 8px;
}

/* Activity Panel */
#activity-panel {
    position: fixed;
    bottom: 60px;
    left: 20px;
    width: 320px;
    max-height: 300px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

#activity-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
}

/* Additional Modal Styles */
#comments-modal textarea,
#voting-modal button {
    width: 100%;
    margin-bottom: 8px;
}

/* ==================== MODERN UI ENHANCEMENTS ==================== */

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pulse Dot Animation */
.pulse-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    position: relative;
    animation: pulse-dot 2s ease-out infinite;
}

.pulse-dot::before,
.pulse-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 2s ease-out infinite;
}

.pulse-dot::after {
    animation-delay: 0.5s;
}

@keyframes pulse-dot {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(2.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Typing Indicator */
.typing-indicator {
    display: inline-flex;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-glass);
    border-radius: 12px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-dim);
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Modern Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gradient-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    box-shadow: var(--shadow-sm), 0 0 10px var(--primary-glow);
}

.badge-success {
    background: var(--gradient-secondary);
    box-shadow: var(--shadow-sm), 0 0 10px var(--secondary-glow);
}

.badge-warning {
    background: var(--gradient-gold);
    box-shadow: var(--shadow-sm), 0 0 10px var(--warning-glow);
}

.badge-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: var(--shadow-sm), 0 0 10px var(--error-glow);
}

/* Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    transition: all var(--transition-base);
}

.status-indicator.online {
    border-color: var(--secondary);
    background: rgba(34, 197, 94, 0.1);
}

.status-indicator.offline {
    border-color: var(--text-muted);
    background: rgba(100, 116, 139, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.status-indicator.online .status-dot {
    color: var(--secondary);
    animation: pulse-dot 2s ease-out infinite;
}

.status-indicator.offline .status-dot {
    color: var(--text-muted);
}

/* Progress Bar - Modern */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Card Hover Effects */
.hover-lift {
    transition: all var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.hover-glow:hover {
    box-shadow: var(--shadow-lg), 0 0 30px var(--primary-glow);
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.ripple:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 1;
    transition: 0s;
}

/* Neon Glow Text */
.neon-text {
    text-shadow:
        0 0 7px rgba(99, 102, 241, 0.8),
        0 0 10px rgba(99, 102, 241, 0.6),
        0 0 21px rgba(99, 102, 241, 0.4),
        0 0 42px rgba(99, 102, 241, 0.2);
}

.neon-text-success {
    text-shadow:
        0 0 7px rgba(34, 197, 94, 0.8),
        0 0 10px rgba(34, 197, 94, 0.6),
        0 0 21px rgba(34, 197, 94, 0.4);
}

/* Morphing Background */
.morph-bg {
    background: linear-gradient(-45deg, #6366f1, #8b5cf6, #a855f7, #6366f1);
    background-size: 400% 400%;
    animation: morph-bg 8s ease infinite;
}

@keyframes morph-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glass Icon */
.glass-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 24px;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.glass-icon:hover {
    background: var(--bg-glass-strong);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Notification Badge */
.notification-badge {
    position: relative;
}

.notification-badge::before {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--error);
    border: 2px solid var(--bg-dark);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badge-bounce 0.5s ease;
}

@keyframes badge-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Smooth Scroll */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Custom Scrollbar - Modern */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ==================== SPRINT 6: AI FEATURES ==================== */

/* AI Recommendations */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.recommendation-card {
    background: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

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

.rec-name {
    font-weight: 600;
    color: var(--text-primary);
}

.rec-score {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
}

.rec-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.skill-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 8px;
}

.skill-tag.matched {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.skill-tag.missing {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.rec-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.btn-invite {
    width: 100%;
    padding: 8px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-invite:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Skill Match Display */
.skill-match-result {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background: var(--bg-darker);
    border-radius: 12px;
}

.match-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.match-score-circle.high {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 3px solid #22c55e;
}

.match-score-circle.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 3px solid #f59e0b;
}

.match-score-circle.low {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 3px solid #ef4444;
}

.match-details {
    flex: 1;
}

.matched-skills,
.missing-skills {
    margin-bottom: 8px;
}

.matched-skills strong,
.missing-skills strong {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Auto Assign Button */
.auto-assign-btn {
    padding: 4px 8px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.auto-assign-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Auto Assigned Task Card */
.task-card.auto-assigned {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.task-card.auto-assigned::before {
    content: '🤖';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* AI Button */
#ai-recommend-btn {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: white;
}

#ai-recommend-btn:hover {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    transform: translateY(-2px);
}

/* No Recommendations */
.no-recommendations {
    text-align: center;
    color: var(--text-secondary);
    padding: 24px;
    background: var(--bg-darker);
    border-radius: 12px;
}

/* AI Badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    font-size: 11px;
    color: #a5b4fc;
}

/* ==================== SPRINT 7: MULTI-ROOM SUPPORT ==================== */

/* Room Browser */
.room-browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.room-browser-header h2 {
    color: var(--text-primary);
    font-size: 20px;
}

.room-browser-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-darker);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.room-browser-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

/* Room Card */
.room-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.room-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    background: rgba(99, 102, 241, 0.05);
}

.room-card.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.room-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: var(--bg-dark);
    border-radius: 12px;
    flex-shrink: 0;
}

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

.room-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.room-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    margin-bottom: 4px;
}

.room-type {
    font-weight: 500;
}

.room-members {
    color: var(--text-secondary);
}

.room-description {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-browser-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Room Members */
.room-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.room-member:hover {
    background: rgba(255, 255, 255, 0.05);
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.member-name {
    color: var(--text-primary);
    font-size: 14px;
}

/* No Rooms */
.no-rooms {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
}

/* Icon Picker */
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: var(--bg-darker);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.icon-btn.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* Room Members List */
#room-members-list {
    max-height: 300px;
    overflow-y: auto;
}

/* ==================== AI ANALYTICS PANEL ==================== */

.ai-analytics-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(99, 102, 241, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-header span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.ai-header .btn-icon {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ai-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.ai-content {
    padding: 20px;
}

.ai-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.ai-stat {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.ai-stat:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.ai-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #6366f1;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.ai-stat-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.ai-skills-section {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-skills-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.ai-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-skill-tag {
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    border-radius: 20px;
    font-size: 12px;
    color: white;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
}

.ai-skill-tag:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(139, 92, 246, 0.5));
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

/* AI Analytics Button */
#ai-analytics-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

#ai-analytics-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* ==================== PRINT STYLES ==================== */

@media print {
    #canvas-container,
    #ui-overlay {
        display: none;
    }
}

/* ==================== ADVANCED CHAT FEATURES ==================== */

/* Emoji Picker */
.emoji-picker {
    position: fixed;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.emoji-picker.hidden {
    display: none;
}

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

.emoji-item {
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    text-align: center;
    transition: background 0.2s;
}

.emoji-item:hover {
    background: rgba(99, 102, 241, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    padding: 8px 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.typing-dots {
    animation: typingBounce 1s infinite;
}

@keyframes typingBounce {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Inline Code */
.inline-code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: #f472b6;
}

/* Chat Messages */
.chat-msg {
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.chat-msg .name {
    font-weight: 600;
    color: #6366f1;
    margin-right: 8px;
}

.chat-msg .text {
    display: inline;
}

.chat-msg .text strong {
    color: #f472b6;
    font-weight: 700;
}

.chat-msg .text em {
    color: #22c55e;
    font-style: italic;
}

.chat-msg .text a {
    color: #6366f1;
    text-decoration: underline;
}

.chat-msg .text a:hover {
    color: #818cf8;
}

/* Emoji Button */
#emoji-btn {
    background: rgba(99, 102, 241, 0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

#emoji-btn:hover {
    background: rgba(99, 102, 241, 0.4);
    transform: scale(1.1);
}

.emoji-btn-icon {
    width: 22px;
    height: 22px;
    display: block;
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==================== SOCIAL FEATURES STYLES ==================== */

/* Profile Popup */
.profile-popup {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 0;
    z-index: 2000;
    min-width: 250px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(99, 102, 241, 0.2);
    border-radius: 16px 16px 0 0;
}

.popup-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
}

.popup-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popup-content button {
    width: 100%;
}

/* DM Panel */
.dm-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 400px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 1500;
}

.dm-panel.hidden {
    display: none;
}

.dm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(99, 102, 241, 0.2);
    border-radius: 16px 16px 0 0;
}

.dm-header span {
    font-weight: 600;
    color: var(--text);
}

.dm-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Custom Scrollbar for DM Messages */
.dm-messages::-webkit-scrollbar {
    width: 8px;
}

.dm-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.dm-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ffff, #0080ff);
    border-radius: 4px;
}

.dm-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ffff, #ff00ff);
}

/* Firefox scrollbar */
.dm-messages {
    scrollbar-width: thin;
    scrollbar-color: #00ffff rgba(0, 0, 0, 0.2);
}

.dm-msg {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    font-size: 14px;
}

.dm-msg.sent {
    background: rgba(99, 102, 241, 0.3);
    align-self: flex-end;
}

.dm-msg.received {
    background: rgba(255, 255, 255, 0.1);
    align-self: flex-start;
}

.dm-msg span {
    font-weight: 600;
    color: #6366f1;
    margin-right: 8px;
}

.dm-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px;
}

.dm-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
}

.dm-input-area input:focus {
    outline: none;
    border-color: var(--primary);
}

.dm-input-area button {
    background: #6366f1;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.dm-input-area button:hover {
    background: #818cf8;
}

/* Friend Badge */
.friend-badge {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    z-index: 1600;
    display: none;
    font-weight: 600;
}

/* Friends List */
.friends-list {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 200px;
    max-height: 400px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 15px;
    overflow-y: auto;
    z-index: 1400;
}

.friends-list.hidden {
    display: none;
}

.friends-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 20px;
    font-size: 14px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 5px;
}

.friend-item:hover {
    background: rgba(99, 102, 241, 0.2);
}

.friend-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.friend-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.friend-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.friend-status {
    font-size: 12px;
    color: var(--text-dim);
}

.friend-status.online {
    color: #22c55e;
}

.friend-status.offline {
    color: var(--text-muted);
}

/* Social Button - positioned above chat panel */
#social-btn {
    position: fixed;
    bottom: 430px;  /* Above chat panel */
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0080ff, #00ff80);
    border: 1px solid rgba(0, 255, 255, 0.3);
    font-size: 18px;
    cursor: pointer;
    z-index: 1300;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transition: all 0.2s;
}

#social-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* Friend Request Notification */
.friend-request-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 15px;
    min-width: 250px;
    z-index: 1700;
    animation: slideIn 0.3s ease;
}

.friend-request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.friend-request-header h4 {
    margin: 0;
    font-size: 14px;
    color: var(--text);
}

.friend-request-actions {
    display: flex;
    gap: 8px;
}

.friend-request-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.friend-request-actions .btn-accept {
    background: #22c55e;
    color: white;
}

.friend-request-actions .btn-accept:hover {
    background: #16a34a;
}

.friend-request-actions .btn-reject {
    background: #ef4444;
    color: white;
}

.friend-request-actions .btn-reject:hover {
    background: #dc2626;
}

/* ==================== MOBILE RESPONSIVE ==================== */

/* Tablet */
@media screen and (max-width: 1024px) {
    #chat-panel {
        width: 280px;
        font-size: 13px;
    }

    #project-panel, #task-board, #profile-panel {
        width: 280px;
    }

    .modal-content {
        width: 90% !important;
        max-width: 400px;
    }

    .gamification-panel {
        width: 90%;
        max-width: 400px;
    }
}

/* Mobile Phone */
@media screen and (max-width: 768px) {
    /* Hide desktop panels by default */
    #agent-list, #controls-help {
        display: none !important;
    }

    /* Full-width panels */
    #chat-panel, #project-panel, #task-board, #profile-panel {
        position: fixed;
        width: 100%;
        height: 50%;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        max-height: 50vh;
    }

    #chat-panel.hidden, #project-panel.hidden, #task-board.hidden, #profile-panel.hidden {
        transform: translateY(100%);
    }

    #chat-panel:not(.hidden), #project-panel:not(.hidden),
    #task-board:not(.hidden), #profile-panel:not(.hidden) {
        transform: translateY(0);
        transition: transform 0.3s ease;
    }

    /* Mobile bottom navigation */
    .mobile-nav {
        display: flex !important;
    }

    /* Smaller modal */
    .modal-content {
        width: 95% !important;
        max-height: 80vh;
        padding: 15px;
        margin: 10px;
    }

    /* Smaller buttons */
    .btn-primary, .btn-secondary {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Input sizes */
    input, textarea, select {
        font-size: 16px !important; /* Prevent iOS zoom */
    }

    /* Canvas takes full screen */
    #canvas-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* Hide name tags on mobile for performance */
    .agent-name-tag {
        display: none;
    }

    /* Smaller toast */
    #toast-container {
        top: 60px;
        right: 10px;
        left: 10px;
    }

    .toast {
        font-size: 12px;
        padding: 10px 15px;
    }

    /* Connection status top bar */
    #connection-status {
        width: 100%;
        border-radius: 0;
        top: 0;
        left: 0;
    }

    /* AI Analytics button reposition */
    #ai-analytics-btn, #gami-btn, #emoji-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    #ai-analytics-btn { top: 10px; right: 10px; }
    #gami-btn { top: 52px; right: 10px; }
}

/* Mobile Navigation Bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.mobile-nav-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 12px;
}

.mobile-nav-btn.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.2);
}

.mobile-nav-btn:active {
    transform: scale(0.9);
}

/* Touch Joystick */
.touch-joystick {
    display: none;
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    z-index: 999;
}

.touch-joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.8);
    border-radius: 50%;
    transition: none;
}

@media screen and (max-width: 768px) {
    .touch-joystick {
        display: block;
    }
}

/* Action Buttons for Mobile */
.mobile-actions {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.mobile-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.8);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 768px) {
    .mobile-actions {
        display: flex;
    }
}

/* ==================== GAMIFICATION STYLES ==================== */

/* Gamification Panel */
.gamification-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    max-height: 80vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    z-index: 2000;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gami-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(99, 102, 241, 0.1);
}

.gami-tabs {
    display: flex;
    gap: 10px;
}

.gami-tab {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.gami-tab:hover {
    background: rgba(255, 255, 255, 0.15);
}

.gami-tab.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.gami-coins {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.1));
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.gami-coins span:first-child {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.streak-badge {
    font-size: 14px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(249, 115, 22, 0.2));
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
}

.gami-content {
    padding: 20px;
    max-height: 450px;
    overflow-y: auto;
}

.gami-content::-webkit-scrollbar {
    width: 6px;
}

.gami-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.gami-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 3px;
}

/* Quest Cards */
.quest-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.quest-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.quest-card.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.quest-name {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 15px;
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.quest-progress .progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.quest-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.quest-progress span {
    font-size: 13px;
    color: var(--text-dim);
    min-width: 50px;
    text-align: right;
}

.quest-reward {
    font-size: 14px;
    color: #fbbf24;
    font-weight: 600;
}

/* Achievement Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.achievement-card:hover {
    transform: translateY(-3px);
}

.achievement-card.locked {
    opacity: 0.4;
    filter: grayscale(50%);
}

.achievement-card.unlocked {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
}

.achievement-icon {
    font-size: 40px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.achievement-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 13px;
}

.achievement-desc {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
    line-height: 1.4;
}

.achievement-reward {
    font-size: 12px;
    color: #fbbf24;
    font-weight: 600;
}

/* Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.leaderboard-row.top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 193, 7, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.leaderboard-row.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.25), rgba(156, 163, 175, 0.15));
    border: 1px solid rgba(192, 192, 192, 0.4);
}

.leaderboard-row.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.25), rgba(180, 83, 9, 0.15));
    border: 1px solid rgba(205, 127, 50, 0.4);
}

.rank {
    width: 45px;
    font-size: 22px;
    text-align: center;
    font-weight: bold;
}

.name {
    flex: 1;
    font-weight: 500;
    color: var(--text);
}

.coins {
    font-weight: 600;
    color: #fbbf24;
    font-size: 16px;
}

/* Gamification Button */
.gami-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    animation: float 3s ease-in-out infinite;
}

.gami-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

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

/* ===== CONTEXT MENU (Right Click) ===== */
.context-menu {
    position: fixed;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 255, 255, 0.1);
    z-index: 10000;
    animation: contextFadeIn 0.15s ease-out;
}

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

.context-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.context-item:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-cyan);
}

.context-item.danger {
    color: var(--accent-error);
    border-top: 1px solid var(--glass-border);
    margin-top: 4px;
    padding-top: 12px;
}

.context-item.danger:hover {
    background: rgba(255, 68, 68, 0.2);
    color: var(--accent-error);
}

.ctx-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ===== PROFILE POPUP (Left Click) ===== */
.cyberpunk-popup {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 255, 0.1);
    animation: popupFadeIn 0.2s ease-out;
}

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

.cyberpunk-popup .popup-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cyberpunk-popup .popup-header .neon-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.neon-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.neon-close:hover {
    color: var(--accent-error);
    background: rgba(255, 68, 68, 0.2);
}

.cyberpunk-popup .popup-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ===== NEON BUTTONS ===== */
.btn-neon {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-neon.cyan {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 128, 255, 0.2));
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.btn-neon.cyan:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(0, 128, 255, 0.3));
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-neon.green {
    background: linear-gradient(135deg, rgba(0, 255, 128, 0.2), rgba(34, 197, 94, 0.2));
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 128, 0.3);
}

.btn-neon.green:hover {
    background: linear-gradient(135deg, rgba(0, 255, 128, 0.3), rgba(34, 197, 94, 0.3));
    box-shadow: 0 0 20px rgba(0, 255, 128, 0.3);
    transform: translateY(-2px);
}

.btn-neon.blue {
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.2), rgba(99, 102, 241, 0.2));
    color: var(--neon-blue);
    border: 1px solid rgba(0, 128, 255, 0.3);
}

.btn-neon.blue:hover {
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.3), rgba(99, 102, 241, 0.3));
    box-shadow: 0 0 20px rgba(0, 128, 255, 0.3);
    transform: translateY(-2px);
}

.btn-neon.red {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.2), rgba(239, 68, 68, 0.2));
    color: var(--accent-error);
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.btn-neon.red:hover {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.3), rgba(239, 68, 68, 0.3));
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* ===== FRIEND REQUEST DIALOG ===== */
.friend-request-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dialogFadeIn 0.2s ease-out;
}

@keyframes dialogFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.dialog-content {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    min-width: 300px;
    max-width: 400px;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 255, 0.15);
    animation: dialogSlideIn 0.3s ease-out;
}

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

.dialog-header {
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.dialog-body {
    text-align: center;
    margin-bottom: 24px;
}

.requester-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--bg-primary);
    margin: 0 auto 16px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
}

.requester-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.requester-msg {
    font-size: 14px;
    color: var(--text-secondary);
}

.dialog-actions {
    display: flex;
    gap: 12px;
}

.dialog-actions .btn-neon {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
}

/* ===== NEON BORDER ANIMATION ===== */
.neon-border {
    border: 1px solid rgba(0, 255, 255, 0.3);
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    border: 1px solid transparent;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.3), transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
    animation: neonBorderGlow 3s linear infinite;
}

@keyframes neonBorderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== FRIEND BADGE ===== */
.friend-badge {
    position: fixed;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: white;
    font-size: 14px;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    z-index: 99998;
    animation: badgePulse 2s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.friend-badge:hover {
    transform: scale(1.1);
}

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

/* ===== PENDING REQUESTS PANEL ===== */
.pending-requests-panel {
    min-width: 320px;
    max-width: 400px;
}

.request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.request-item:hover {
    background: rgba(0, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.2);
}

.request-item .requester-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.request-item .requester-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--bg-primary);
}

.request-item .requester-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

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

.btn-neon.small {
    padding: 6px 12px;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════
   NEW PROJECT WIZARD — Complete Redesign
   ═══════════════════════════════════════════════════ */

.modal-wizard {
  align-items: center;
  padding: 16px;
}

.modal-wizard-content {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(8,12,24,0.97), rgba(4,8,20,0.99));
  border: 1px solid rgba(0,200,200,0.25);
  border-radius: 20px;
  box-shadow:
    0 0 60px rgba(0,200,200,0.12),
    0 0 120px rgba(0,100,200,0.08),
    inset 0 1px 0 rgba(255,255,255,0.06);
  overflow: hidden;
  position: relative;
  animation: wizardIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes wizardIn {
  from { opacity: 0; transform: scale(0.88) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Aurora top border */
.modal-wizard-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00c8c8, #0080ff, #8040ff, #ff40a0, #ff6b35, #00ff80, #00c8c8);
  background-size: 200%;
  animation: aurora-shift 4s linear infinite;
  border-radius: 20px 20px 0 0;
  z-index: 10;
}
@keyframes aurora-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Floating particle background */
.modal-wizard-content::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0,200,200,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,128,255,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Wizard Header ────────────────────────────────── */
.wizard-header {
  flex-shrink: 0;
  padding: 20px 24px 0;
  position: relative;
  z-index: 2;
}

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

.wizard-title-main {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #00c8c8, #0080ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

.wizard-close-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.wizard-close-btn:hover { background: rgba(255,80,80,0.15); color: #ff8080; border-color: rgba(255,80,80,0.3); }

/* Step progress bar */
.wizard-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.wizard-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
  min-width: 70px;
}

.step-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.35s ease;
}

.wizard-step-item.active .step-circle {
  border-color: #00c8c8;
  background: rgba(0,200,200,0.15);
  color: #00c8c8;
  box-shadow: 0 0 16px rgba(0,200,200,0.4);
}

.wizard-step-item.done .step-circle {
  border-color: #00ff80;
  background: rgba(0,255,128,0.15);
  color: #00ff80;
  box-shadow: 0 0 12px rgba(0,255,128,0.3);
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
  transition: color 0.3s;
}
.wizard-step-item.active .step-label { color: #00c8c8; }
.wizard-step-item.done  .step-label  { color: #00ff80; }

.wizard-step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 0 4px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.wizard-step-connector.done {
  background: rgba(0,255,128,0.4);
}
.wizard-step-connector::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,200,200,0.8), transparent);
}
.wizard-step-connector.animating::after {
  animation: connector-sweep 0.5s ease forwards;
}
@keyframes connector-sweep {
  from { left: -100%; }
  to   { left: 100%; }
}

/* ── Wizard Body (scrollable) ─────────────────────── */
.wizard-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 24px 16px;
  position: relative;
  z-index: 1;
  scroll-behavior: smooth;
  min-height: 0;
}

.wizard-body::-webkit-scrollbar { width: 4px; }
.wizard-body::-webkit-scrollbar-track { background: transparent; }
.wizard-body::-webkit-scrollbar-thumb { background: rgba(0,200,200,0.3); border-radius: 2px; }

/* Step slide animations */
.wizard-step-content {
  display: none;
}
.wizard-step-content.active {
  display: block;
  animation: stepSlideIn 0.3s ease;
}
@keyframes stepSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wizard-step-content.active.slide-back {
  animation: stepSlideInBack 0.3s ease;
}
@keyframes stepSlideInBack {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Step hero icon */
.step-hero {
  font-size: 48px;
  text-align: center;
  margin: 20px 0 6px;
  filter: drop-shadow(0 0 16px rgba(0,200,200,0.5));
  animation: heroFloat 3s ease-in-out infinite;
}
@keyframes heroFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.step-heading {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.step-subhead {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

/* ── Wizard Fields ────────────────────────────────── */
.wiz-field {
  margin-bottom: 18px;
}

.wiz-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 7px;
  text-transform: uppercase;
}

.req { color: #ff6b35; }

.wiz-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wiz-input-wrap:focus-within {
  border-color: rgba(0,200,200,0.5);
  box-shadow: 0 0 0 3px rgba(0,200,200,0.08), inset 0 0 20px rgba(0,200,200,0.03);
}

.wiz-input-icon {
  padding: 0 12px;
  font-size: 16px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.02);
  border-right: 1px solid rgba(255,255,255,0.06);
  height: 44px;
  display: flex;
  align-items: center;
}

.wiz-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  padding: 12px 14px;
  min-width: 0;
}

.wiz-field textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.wiz-field textarea:focus {
  border-color: rgba(0,200,200,0.5);
  box-shadow: 0 0 0 3px rgba(0,200,200,0.08);
}

.code-input .wiz-input-wrap input { font-family: 'Courier New', monospace; font-size: 13px; }

.wiz-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted, rgba(255,255,255,0.35));
  margin-top: 5px;
}

/* ── Budget Chips ─────────────────────────────────── */
.budget-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.budget-chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.budget-chip:hover { background: rgba(0,200,200,0.12); border-color: rgba(0,200,200,0.3); color: #00c8c8; }
.budget-chip.active { background: rgba(0,200,200,0.2); border-color: #00c8c8; color: #00c8c8; box-shadow: 0 0 12px rgba(0,200,200,0.25); }

/* ── Payment Method ───────────────────────────────── */
.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-method-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all .2s;
}

.payment-method-card input { display: none; }
.payment-method-card strong { display: block; font-size: 13px; color: var(--text-primary); }
.payment-method-card small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; line-height: 1.35; }
.payment-method-card .pm-icon { font-size: 22px; }
.payment-method-card.selected,
.payment-method-card:hover {
  border-color: rgba(0,200,200,0.45);
  background: rgba(0,200,200,0.09);
  box-shadow: 0 0 16px rgba(0,200,200,0.14);
}

.payment-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.payment-choice-actions small {
  flex-basis: 100%;
  color: rgba(226, 232, 240, 0.72);
}

@media (max-width: 680px) {
  .payment-method-grid { grid-template-columns: 1fr; }
}

/* ── Custom Date Picker ───────────────────────────── */
.custom-date-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.custom-date-trigger:hover {
  border-color: rgba(0,200,200,0.35);
  background: rgba(0,200,200,0.05);
}

.custom-date-trigger.has-date {
  border-color: rgba(0,200,200,0.4);
  background: rgba(0,200,200,0.06);
}

.date-trigger-icon { font-size: 18px; }
.date-trigger-text { flex: 1; color: var(--text-primary); font-size: 14px; }
.date-trigger-arrow { color: var(--text-secondary); font-size: 12px; transition: transform 0.2s; }
.custom-date-trigger.open .date-trigger-arrow { transform: rotate(180deg); }

.date-quick-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.date-quick-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.date-quick-btn:hover { background: rgba(0,200,200,0.1); color: #00c8c8; border-color: rgba(0,200,200,0.3); }

/* Date Picker Popover */
.date-picker-popover {
  background: rgba(8,16,32,0.98);
  border: 1px solid rgba(0,200,200,0.25);
  border-radius: 14px;
  padding: 16px;
  margin-top: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 30px rgba(0,200,200,0.08);
  animation: dpFadeIn 0.2s ease;
}
@keyframes dpFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.dp-nav {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.dp-nav:hover { background: rgba(0,200,200,0.15); border-color: rgba(0,200,200,0.3); color: #00c8c8; }

.dp-month-year {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.dp-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.dp-days-header span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 0;
}

.dp-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 12px;
}

.dp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-primary);
  border: 1px solid transparent;
}

.dp-day:hover:not(.disabled):not(.empty) {
  background: rgba(0,200,200,0.15);
  border-color: rgba(0,200,200,0.3);
  color: #00c8c8;
}

.dp-day.selected {
  background: rgba(0,200,200,0.25);
  border-color: #00c8c8;
  color: #00c8c8;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0,200,200,0.3);
}

.dp-day.today {
  border-color: rgba(0,255,128,0.4);
  color: #00ff80;
}

.dp-day.disabled {
  color: rgba(255,255,255,0.2);
  cursor: not-allowed;
}

.dp-day.empty { cursor: default; }

.dp-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.dp-time-row select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.dp-confirm {
  width: 100%;
  background: linear-gradient(135deg, rgba(0,200,200,0.2), rgba(0,128,255,0.2));
  border: 1px solid rgba(0,200,200,0.4);
  color: #00c8c8;
  font-size: 14px;
  font-weight: 600;
  padding: 9px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
}
.dp-confirm:hover {
  background: linear-gradient(135deg, rgba(0,200,200,0.35), rgba(0,128,255,0.35));
  box-shadow: 0 0 20px rgba(0,200,200,0.2);
}

/* ── Platform Pills ───────────────────────────────── */
.platform-pills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.platform-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.platform-pill:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.platform-pill.selected {
  background: rgba(0,200,200,0.12);
  border-color: rgba(0,200,200,0.5);
  box-shadow: 0 0 16px rgba(0,200,200,0.15);
}

.pp-icon { font-size: 22px; }
.pp-name { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-align: center; letter-spacing: 0.3px; }
.platform-pill.selected .pp-name { color: #00c8c8; }

.dest-url-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(255,165,0,0.06);
  border-left: 3px solid rgba(255,165,0,0.5);
  border-radius: 0 6px 6px 0;
}

/* ── Project Preview Card ─────────────────────────── */
.project-preview-card {
  background: rgba(0,200,200,0.05);
  border: 1px solid rgba(0,200,200,0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 20px;
}

.preview-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #00c8c8;
  margin-bottom: 8px;
}

.preview-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Scroll Indicator ─────────────────────────────── */
.wizard-scroll-indicator {
  text-align: center;
  font-size: 11px;
  color: rgba(0,200,200,0.6);
  padding: 4px 0;
  background: linear-gradient(to bottom, transparent, rgba(8,12,24,0.9));
  letter-spacing: 0.5px;
  flex-shrink: 0;
  animation: scrollPulse 2s ease-in-out infinite;
  display: none;
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.6; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(2px); }
}

/* ── Wizard Footer ────────────────────────────────── */
.wizard-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.2);
  position: relative;
  z-index: 2;
}

.btn-wiz-back {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-wiz-back:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

.btn-wiz-cancel {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: auto;
}
.btn-wiz-cancel:hover { background: rgba(255,80,80,0.1); color: #ff8080; border-color: rgba(255,80,80,0.3); }

.btn-wiz-next {
  background: linear-gradient(135deg, rgba(0,200,200,0.2), rgba(0,128,255,0.2));
  border: 1px solid rgba(0,200,200,0.4);
  color: #00c8c8;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-wiz-next:hover {
  background: linear-gradient(135deg, rgba(0,200,200,0.35), rgba(0,128,255,0.35));
  box-shadow: 0 0 20px rgba(0,200,200,0.25);
  transform: translateY(-1px);
}

/* Create Project button with shimmer */
.btn-wiz-create {
  background: linear-gradient(135deg, #00c8c8, #0080ff);
  border: none;
  color: #000;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.btn-wiz-create::after {
  content: '';
  position: absolute;
  top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}
.btn-wiz-create:hover::after { left: 125%; }
.btn-wiz-create:hover { box-shadow: 0 0 30px rgba(0,200,200,0.5); transform: translateY(-1px); }
.btn-wiz-create:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== AVATAR TYPE SELECTOR ===== */
.avatar-type-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.avatar-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    color: rgba(255,255,255,0.6);
    font-size: 10px;
    text-align: center;
}
.avatar-type-card:hover {
    border-color: rgba(0,255,255,0.4);
    background: rgba(0,255,255,0.08);
    color: #fff;
    transform: translateY(-2px);
}
.avatar-type-card.selected {
    border-color: #00ffff;
    background: rgba(0,255,255,0.12);
    color: #00ffff;
    box-shadow: 0 0 12px rgba(0,255,255,0.3);
}
.avatar-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}
.avatar-type-icon svg {
    width: 28px;
    height: 28px;
}

/* ===== RICH PROJECT CARDS ===== */
.project-card {
    position: relative;
    background: rgba(20,20,40,0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    margin-bottom: 10px;
}
.project-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0,255,255,0.15), 0 0 0 1px rgba(0,255,255,0.2);
    border-color: rgba(0,255,255,0.3);
}
.pc-accent-bar {
    height: 3px;
    background: linear-gradient(90deg, #00ffff, #00ff80);
    width: 100%;
}
.pc-accent-bar.urgency-urgent { background: linear-gradient(90deg, #ff4444, #ff8800); }
.pc-accent-bar.urgency-overdue { background: linear-gradient(90deg, #ff0000, #cc0000); animation: pulse-red 1s infinite; }
.pc-accent-bar.urgency-soon { background: linear-gradient(90deg, #ffbb00, #ff8800); }
@keyframes pulse-red { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
.pc-body { padding: 12px 14px 14px; }
.pc-top-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.pc-owner-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.pc-title-block { flex: 1; min-width: 0; }
.pc-title {
    font-size: 14px; font-weight: 600;
    color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.3;
}
.pc-owner { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 1px; }
.pc-budget {
    font-size: 15px; font-weight: 700;
    flex-shrink: 0;
    text-shadow: 0 0 8px currentColor;
}
.pc-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
    margin-bottom: 8px;
}
.pc-bottom-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 2px;
}
.pc-platform-badge {
    font-size: 11px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 2px 8px;
    color: rgba(255,255,255,0.7);
}
.pc-deadline {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    line-height: 1.35;
}
.pc-deadline.deadline-urgent { color: #ff6b00; background: rgba(255,107,0,0.12); }
.pc-deadline.deadline-overdue { color: #ff4444; background: rgba(255,68,68,0.12); }
.pc-deadline.deadline-soon { color: #ffd700; background: rgba(255,215,0,0.1); }
.pc-status-pill {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(0,255,255,0.08);
    color: rgba(255,255,255,0.75);
    margin-left: 0;
    line-height: 1.35;
    font-weight: 800;
}
.pc-budget-pill {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    font-weight: 800;
    line-height: 1.35;
}
.pc-status-pill.status-open { color: #00ff80; background: rgba(0,255,128,0.1); }
.pc-status-pill.status-in_progress { color: #00ffff; background: rgba(0,255,255,0.1); }
.pc-status-pill.status-completed {
    color: #00ff80;
    background: rgba(0,255,128,0.12);
    border: 1px solid rgba(0,255,128,0.18);
}
.pc-status-pill.status-review_passed { color: #00ff80; background: rgba(0,255,128,0.1); }
.pc-status-pill.status-review_failed { color: #ff4444; background: rgba(255,68,68,0.1); }

/* ===== ENHANCED LOGIN MODAL ===== */
#login-modal .modal-content {
    background: linear-gradient(160deg, rgba(10,10,30,0.97) 0%, rgba(15,15,40,0.97) 100%);
    border: 1px solid rgba(0,255,255,0.15);
    box-shadow: 0 0 60px rgba(0,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}
#login-modal .modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(0,255,255,0.04) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(100,0,255,0.04) 0%, transparent 60%);
    pointer-events: none;
}
#login-modal .logo-3d {
    font-size: 64px;
    filter: drop-shadow(0 0 20px rgba(0,255,200,0.6));
    animation: float-logo 3s ease-in-out infinite;
}
@keyframes float-logo {
    0%,100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}
#login-modal h1 {
    background: linear-gradient(135deg, #00ffff, #00ff80, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    letter-spacing: 2px;
}
#login-modal .tagline {
    background: linear-gradient(90deg, #00ffff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
}
#connect-btn {
    background: linear-gradient(135deg, #00b4db, #0083b0, #00ff80) !important;
    background-size: 200% 200% !important;
    animation: gradient-shift 3s ease infinite;
    border: none !important;
    box-shadow: 0 0 20px rgba(0,255,200,0.3), 0 4px 15px rgba(0,0,0,0.3) !important;
    font-size: 16px !important;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    width: 100%;
}
#connect-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg);
    animation: btn-shimmer 3s ease infinite;
}
@keyframes btn-shimmer {
    0% { left: -60%; }
    100% { left: 160%; }
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== MARKETPLACE HEADER ENHANCEMENTS ===== */
.marketplace-header-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.marketplace-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 6px rgba(0,255,255,0.5));
}
.marketplace-title {
    background: linear-gradient(90deg, #00ffff, #00ff80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}
.marketplace-live-dot {
    width: 8px; height: 8px;
    background: #00ff80;
    border-radius: 50%;
    box-shadow: 0 0 6px #00ff80;
    animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ===== ENHANCED TOASTS ===== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: rgba(10,10,30,0.95);
    border: 1px solid rgba(0,255,255,0.2);
    border-left: 3px solid #00ffff;
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 13px;
    min-width: 260px;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(0,255,255,0.1);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    animation: toast-slide-in 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.toast.toast-success { border-left-color: #00ff80; }
.toast.toast-error { border-left-color: #ff4444; }
.toast.toast-warning { border-left-color: #ffd700; }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 2px; }
.toast-msg { color: rgba(255,255,255,0.7); font-size: 12px; }
@keyframes toast-slide-in {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.toast.toast-exit {
    animation: toast-slide-out 0.3s ease forwards;
}
@keyframes toast-slide-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100px); opacity: 0; }
}

/* ===== AGENT INTERACTION POPUP ===== */
.profile-popup.cyberpunk-popup {
    background: rgba(5, 5, 20, 0.96);
    border: 1px solid rgba(0,255,255,0.3);
    border-radius: 14px;
    padding: 0;
    min-width: 200px;
    box-shadow: 0 0 30px rgba(0,255,255,0.2), 0 8px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(16px);
    overflow: hidden;
    animation: popup-appear 0.15s ease;
}
@keyframes popup-appear {
    from { transform: scale(0.8) translateY(-8px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
.profile-popup .popup-header {
    background: linear-gradient(135deg, rgba(0,255,255,0.12), rgba(100,0,255,0.12));
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,255,255,0.15);
}
.profile-popup .popup-header .neon-text {
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(90deg, #00ffff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.profile-popup .neon-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
.profile-popup .neon-close:hover { color: #fff; background: rgba(255,0,0,0.2); }
.profile-popup .popup-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.btn-neon {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}
.btn-neon.cyan {
    background: rgba(0,255,255,0.1);
    border-color: rgba(0,255,255,0.25);
    color: #00ffff;
}
.btn-neon.cyan:hover { background: rgba(0,255,255,0.2); box-shadow: 0 0 12px rgba(0,255,255,0.3); }
.btn-neon.green {
    background: rgba(0,255,128,0.1);
    border-color: rgba(0,255,128,0.25);
    color: #00ff80;
}
.btn-neon.green:hover { background: rgba(0,255,128,0.2); box-shadow: 0 0 12px rgba(0,255,128,0.3); }
.btn-neon.blue {
    background: rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.3);
    color: #a78bfa;
}
.btn-neon.blue:hover { background: rgba(99,102,241,0.22); box-shadow: 0 0 12px rgba(99,102,241,0.3); }
/* Context menu */
.context-menu.cyberpunk-menu {
    background: rgba(5, 5, 20, 0.96);
    border: 1px solid rgba(0,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 20px rgba(0,255,255,0.1);
    backdrop-filter: blur(16px);
    animation: popup-appear 0.12s ease;
    min-width: 170px;
}
.context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.context-item:last-child { border-bottom: none; }
.context-item:hover { background: rgba(0,255,255,0.1); color: #fff; }
.context-item.danger:hover { background: rgba(255,68,68,0.15); color: #ff6b6b; }
.ctx-icon { font-size: 16px; }
/* Move indicator on ground */
.move-cursor { cursor: crosshair; }

/* ===== BEACH SCENE ENRICHMENT — v3 ===== */

/* Ground cursor when hovering 3D canvas */
#canvas-container canvas {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4' fill='%2300ffff' opacity='0.8'/%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%2300ffff' stroke-width='1.5' opacity='0.5'/%3E%3C/svg%3E") 12 12, crosshair;
}

/* ===== AGENT NAME TAG IMPROVEMENTS ===== */
/* Sprite rendering — already handled in JS with transparent canvas */

/* ===== AGENT ONLINE STATUS IN AGENT LIST ===== */
#agents .agent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
#agents .agent-item:hover {
    background: rgba(0,255,255,0.08);
    border-color: rgba(0,255,255,0.15);
}
.agent-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}
.agent-dot.online { color: #00ff80; background: #00ff80; animation: live-pulse 2s infinite; }

/* ===== CLICK RIPPLE EFFECT ===== */
/* handled purely in Three.js */

/* ===== IMPROVED PROJECT PANEL SCROLLBAR ===== */
.project-list::-webkit-scrollbar { width: 4px; }
.project-list::-webkit-scrollbar-track { background: transparent; }
.project-list::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.3); border-radius: 4px; }

/* ===== FRIEND REQUEST TOAST ===== */
.toast.toast-friend { border-left-color: #a78bfa; }

/* ===== CYBERPUNK GRID LINES on panels ===== */
.project-content::before,
#task-board-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(rgba(0,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,255,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    border-radius: inherit;
}
.project-content { position: relative; }

/* ===== WALLET/XP BAR in profile area ===== */
.xp-bar-container {
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
    margin-top: 6px;
}
.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #00ff80);
    border-radius: 99px;
    transition: width 0.6s ease;
    box-shadow: 0 0 8px rgba(0,255,255,0.5);
}

/* ===== LOGIN — particles canvas ===== */
#login-particles {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}
#login-modal {
    z-index: 1;
    position: relative;
}

/* ── Task Board column fixes & new elements (v2 — overrides above) ── */
.task-board-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
    align-items: start;
}

.task-column {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 12px;
    min-height: 80px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.task-list {
    flex: 1;
    overflow-y: visible;
    padding: 0;
}

/* Deadline badge in task card */
.task-deadline { font-size: 11px; color: var(--text-dim); }
.task-deadline.overdue { color: #ff4d4d; font-weight: 700; }
.task-deadline.urgent  { color: #ff9900; font-weight: 700; }
.task-deadline.soon    { color: #f59e0b; }

/* Budget badge in task card */
.task-budget { font-size: 11px; color: #22c55e; font-weight: 600; }

/* Meta row wrap */
.task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 8px;
    margin-bottom: 4px;
}

.task-card-meta .project-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
}

/* Submit + Cancel mini buttons in task card */
.task-card-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.btn-submit-mini {
    background: linear-gradient(135deg, #00ffcc, #0099ff);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-mini:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,255,204,0.5);
}

.btn-cancel-mini {
    background: rgba(255, 60, 60, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 60, 60, 0.35);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-mini:hover {
    background: rgba(255, 60, 60, 0.3);
    box-shadow: 0 0 8px rgba(255, 60, 60, 0.4);
}

/* Project-backed task card subtle left border */
.task-card[data-project-id] {
    border-left: 3px solid #00ffcc;
    cursor: pointer;
}

.task-card[data-project-id]:hover {
    border-left-color: #0099ff;
}

/* Task card full visibility fix */
.task-card {
    background: rgba(255,255,255,0.06);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.task-card:last-child {
    margin-bottom: 4px;
}

.task-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* ── Accepted Drafts: Abandon/Release button ── */
.btn-abandon-draft {
    background: rgba(255, 60, 60, 0.12);
    color: #ff7070;
    border: 1px solid rgba(255, 60, 60, 0.3);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-abandon-draft:hover {
    background: rgba(255, 60, 60, 0.25);
    border-color: rgba(255, 60, 60, 0.6);
    box-shadow: 0 0 8px rgba(255, 60, 60, 0.3);
}

/* Draft card header layout fix */
.draft-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px 10px;
}

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

/* Scrollbar for task-board-content */
.task-board-content::-webkit-scrollbar { width: 5px; }
.task-board-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
.task-board-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* ===== SAHARA/OASIS UI ENRICHMENT — 2026-06-06 ===== */
:root {
    --sahara-ink: rgba(7, 11, 24, 0.88);
    --sahara-panel: rgba(11, 16, 32, 0.84);
    --sahara-panel-strong: rgba(11, 16, 32, 0.94);
    --sahara-sand: #f0b76a;
    --sahara-amber: #ffb86b;
    --oasis-cyan: #34f5ff;
    --oasis-purple: #a78bfa;
    --oasis-green: #34d399;
    --right-rail-top: 280px;
    --right-rail-profile-height: 360px;
}

body {
    background:
        radial-gradient(circle at 62% 28%, rgba(52, 245, 255, 0.11), transparent 22%),
        radial-gradient(circle at 22% 74%, rgba(255, 184, 107, 0.10), transparent 28%),
        linear-gradient(145deg, #070816 0%, #160d18 48%, #24120d 100%);
}

#room-name::before {
    content: '🌐 ';
}

#chat-panel,
#agent-list,
#project-panel,
#task-board,
#profile-panel,
#inbox-panel {
    background:
        linear-gradient(145deg, rgba(8, 12, 26, 0.92), rgba(16, 18, 38, 0.80)) !important;
    border: 1px solid rgba(52, 245, 255, 0.20) !important;
    border-radius: 18px !important;
    box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 34px rgba(52, 245, 255, 0.08) !important;
}

#chat-panel:hover,
#agent-list:hover,
#project-panel:hover,
#task-board:hover,
#profile-panel:hover,
#inbox-panel:hover {
    border-color: rgba(52, 245, 255, 0.36) !important;
    box-shadow:
        0 24px 76px rgba(0, 0, 0, 0.46),
        0 0 36px rgba(52, 245, 255, 0.16) !important;
}

.chat-header,
.project-header,
.profile-header,
.inbox-header,
.list-header {
    min-height: 52px;
    background:
        linear-gradient(90deg, rgba(255, 184, 107, 0.10), rgba(52, 245, 255, 0.08), rgba(167, 139, 250, 0.10)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Chat: premium readable glass bubbles */
#chat-panel {
    width: 360px;
    left: 18px;
    bottom: 18px;
}

.chat-messages {
    height: 250px;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255, 184, 107, 0.035), transparent 42%),
        linear-gradient(90deg, rgba(52, 245, 255, 0.025) 1px, transparent 1px),
        linear-gradient(rgba(52, 245, 255, 0.02) 1px, transparent 1px);
    background-size: auto, 22px 22px, 22px 22px;
}

.chat-msg {
    padding: 10px 12px !important;
    margin: 8px 0 !important;
    border-radius: 14px !important;
    background: rgba(2, 6, 23, 0.58) !important;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.chat-msg .name {
    display: block;
    margin: 0 0 4px;
    color: var(--oasis-cyan) !important;
    letter-spacing: 0.2px;
}

.chat-msg .text {
    display: block !important;
    color: rgba(248, 250, 252, 0.94);
    line-height: 1.55;
}

.system-msg {
    color: #dbeafe !important;
    background: linear-gradient(90deg, rgba(52, 245, 255, 0.10), rgba(255, 184, 107, 0.08)) !important;
    border: 1px solid rgba(52, 245, 255, 0.14);
    border-radius: 12px !important;
}

.chat-input-area {
    background: rgba(2, 6, 23, 0.38);
}

#chat-input {
    background: rgba(15, 23, 42, 0.82) !important;
    border-color: rgba(52, 245, 255, 0.22) !important;
    color: #f8fafc !important;
}

#send-btn {
    background: linear-gradient(135deg, var(--oasis-cyan), #0ea5e9) !important;
    color: #02111f !important;
    min-width: 46px;
}

/* Right-top agents rail + icon centering */
#agent-list {
    top: 16px;
    right: 16px;
    width: 238px;
}

#agent-list .list-header {
    padding-right: 108px;
}

#agents .agent-item {
    min-height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.agent-color {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.20);
    box-shadow: 0 0 18px currentColor, inset 0 0 12px rgba(255, 255, 255, 0.16);
}

#ai-analytics-btn,
#gami-btn {
    top: 24px !important;
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    color: #fff !important;
    z-index: 1350 !important;
}

#ai-analytics-btn {
    right: 28px !important;
    background: radial-gradient(circle at 32% 28%, #7dd3fc, #2563eb 58%, #1e1b4b) !important;
}

#gami-btn {
    right: 78px !important;
    background: radial-gradient(circle at 32% 28%, #fde68a, #f59e0b 54%, #7c2d12) !important;
}

/* Marketplace typography/cards */
.marketplace-header-text {
    gap: 10px;
}

.marketplace-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(52, 245, 255, 0.10);
    border: 1px solid rgba(52, 245, 255, 0.20);
}

.marketplace-title {
    font-size: 16px;
    font-weight: 850;
    letter-spacing: 0.2px;
    background: linear-gradient(90deg, #fef3c7, var(--oasis-cyan), var(--oasis-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-section h3,
.profile-section h3,
.stat-label,
.ai-stat-label,
.step-label,
.wiz-label,
.preview-label,
.avatar-select label {
    text-transform: none !important;
    letter-spacing: 0.35px !important;
}

.project-section h3,
.profile-section h3 {
    color: #fef3c7 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

.project-card {
    background:
        linear-gradient(145deg, rgba(10, 16, 34, 0.96), rgba(34, 20, 42, 0.78)) !important;
    border-color: rgba(52, 245, 255, 0.16) !important;
}

.project-card:hover {
    border-color: rgba(52, 245, 255, 0.42) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), 0 0 28px rgba(52, 245, 255, 0.16) !important;
}

.pc-payment-badge {
    font-size: 11px;
    background: linear-gradient(90deg, rgba(255, 184, 107, 0.14), rgba(52, 245, 255, 0.10));
    border: 1px solid rgba(255, 184, 107, 0.26);
    border-radius: 20px;
    padding: 2px 8px;
    color: #fde68a;
}

/* Profile and Inbox: fixed rail, no page jump, clean overflow */
#profile-panel {
    top: var(--right-rail-top) !important;
    right: 18px !important;
    width: 316px !important;
    height: var(--right-rail-profile-height) !important;
    max-height: calc(100vh - var(--right-rail-top) - 150px) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

.profile-content {
    flex: 1;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 16px !important;
}

.profile-avatar-section {
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.profile-avatar {
    width: 78px;
    height: 78px;
    font-size: 32px;
    box-shadow: 0 0 26px rgba(52, 211, 153, 0.28), inset 0 0 18px rgba(255,255,255,0.12);
}

.stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card {
    padding: 11px;
    background: rgba(255, 255, 255, 0.045) !important;
}

.stat-value {
    font-size: 18px;
}

#inbox-panel {
    right: 18px !important;
    top: calc(var(--right-rail-top) + var(--right-rail-profile-height) + 14px) !important;
    bottom: auto !important;
    width: 316px !important;
    max-height: calc(100vh - var(--right-rail-top) - var(--right-rail-profile-height) - 34px) !important;
    z-index: 135 !important;
}

.inbox-list {
    max-height: 190px;
}

.inbox-header {
    cursor: default;
}

@media (max-height: 820px) {
    :root {
        --right-rail-top: 228px;
        --right-rail-profile-height: 300px;
    }
    .profile-avatar-section { flex-direction: row; gap: 12px; align-items: center; text-align: left; }
    .profile-name-section { text-align: left; }
    .badges-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    #chat-panel {
        width: calc(100% - 32px) !important;
        left: 16px !important;
        right: 16px !important;
        bottom: 16px !important;
    }

    #project-panel {
        width: calc(100% - 32px) !important;
        left: 16px !important;
        top: 72px !important;
        max-height: calc(100vh - 150px) !important;
    }

    #profile-panel {
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
        bottom: 112px !important;
        width: auto !important;
        height: auto !important;
        max-height: 44vh !important;
    }

    #inbox-panel {
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
        bottom: 16px !important;
        width: auto !important;
        max-height: 26vh !important;
    }

    #agent-list {
        width: 190px !important;
        top: 12px !important;
        right: 12px !important;
    }

    #ai-analytics-btn { right: 22px !important; top: 18px !important; }
    #gami-btn { right: 70px !important; top: 18px !important; }
}
#profile-panel.minimized {
    height: auto !important;
    max-height: none !important;
}

#login-modal .tagline,
.form-group label {
    text-transform: none !important;
}

@media (min-width: 901px) {
    :root { --right-rail-top: 336px; }
}

/* ===== LIVE POLISH PATCH — 2026-06-06 ===== */
@media (min-width: 901px) {
    #task-board {
        right: 350px !important;
        width: 540px !important;
    }

    #inbox-panel {
        top: 162px !important;
        bottom: auto !important;
        right: 18px !important;
        width: 316px !important;
        max-height: 112px !important;
    }

    .inbox-list {
        max-height: 58px !important;
        overflow-y: auto;
    }
}

/* ===== UI WOW SPRINT — Agent Oasis Command Center — 2026-06-10 ===== */
:root {
    --bg-canvas: #070816;
    --bg-panel: rgba(8, 12, 26, 0.90);
    --bg-elevated: rgba(15, 23, 42, 0.88);
    --border-subtle: rgba(52, 245, 255, 0.18);
    --text-primary: #f8fafc;
    --text-secondary: #b9c6dc;
    --text-muted: #7b8aa6;
    --accent-cyan: #34f5ff;
    --accent-amber: #ffb86b;
    --accent-gold: #fbbf24;
    --accent-magenta: #f472b6;
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 140ms;
    --duration-base: 220ms;
    --duration-slow: 420ms;
    --z-canvas: 1;
    --z-panel: 120;
    --z-modal: 1000;
    --z-toast: 99999;
}

#canvas-container {
    z-index: var(--z-canvas);
    background:
        radial-gradient(circle at 50% 44%, rgba(52, 245, 255, 0.10), transparent 28%),
        radial-gradient(circle at 18% 78%, rgba(251, 191, 36, 0.10), transparent 24%),
        var(--bg-canvas);
}

#ui-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(52, 245, 255, 0.014) 1px, transparent 1px),
        linear-gradient(rgba(52, 245, 255, 0.010) 1px, transparent 1px),
        radial-gradient(circle at 50% 48%, transparent 0 52%, rgba(4, 7, 18, 0.26) 100%);
    background-size: 42px 42px, 42px 42px, auto;
    mix-blend-mode: normal;
}

#project-panel,
#task-board,
#profile-panel,
#inbox-panel,
#chat-panel,
#agent-list {
    background:
        linear-gradient(145deg, rgba(5, 10, 24, 0.94), rgba(19, 24, 48, 0.82)) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.075),
        0 0 0 1px rgba(255, 255, 255, 0.025),
        0 0 42px rgba(52, 245, 255, 0.08) !important;
}

.project-header,
.task-board-header,
.profile-header,
.inbox-header,
.chat-header,
.list-header {
    background:
        linear-gradient(90deg, rgba(255, 184, 107, 0.12), rgba(52, 245, 255, 0.09), rgba(244, 114, 182, 0.10)) !important;
    min-height: 54px;
    padding-inline: var(--space-16) !important;
}

@media (min-width: 1200px) {
    #social-btn {
        left: 392px !important;
        bottom: 20px !important;
    }

    #project-panel,
    #task-board,
    #profile-panel,
    #inbox-panel,
    #chat-panel,
    #agent-list {
        animation: none !important;
        transform: none !important;
    }

    #login-modal {
        position: fixed !important;
        justify-content: flex-end !important;
        padding: 24px 6vw !important;
        background: linear-gradient(90deg, rgba(2, 5, 16, 0.06), rgba(2, 5, 16, 0.50) 56%, rgba(2, 5, 16, 0.84)) !important;
        backdrop-filter: blur(1px) !important;
        -webkit-backdrop-filter: blur(1px) !important;
    }

    #login-modal .modal-content {
        width: 380px !important;
        max-width: 380px !important;
        margin: 0 !important;
    }

    #project-panel {
        width: min(430px, calc(100vw - 1040px)) !important;
        min-width: 390px;
        left: 18px !important;
        top: 72px !important;
        max-height: calc(100vh - 104px) !important;
    }

    #task-board {
        width: clamp(520px, 34vw, 660px) !important;
        right: 356px !important;
        top: 72px !important;
        max-height: calc(100vh - 104px) !important;
    }

    #chat-panel {
        width: 390px !important;
        left: 18px !important;
        bottom: 18px !important;
    }
}

.project-content,
.task-board-content,
.profile-content,
.inbox-list,
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 245, 255, 0.32) transparent;
}

.btn-primary,
.btn-create,
.btn-wiz-create,
#send-btn,
.task-sender-copy,
.task-sender-secondary,
.draft-toggle-sender,
.btn-submit-delivery {
    transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}

.btn-primary:hover,
.btn-create:hover,
.btn-wiz-create:hover,
#send-btn:hover,
.task-sender-copy:hover,
.task-sender-secondary:hover,
.draft-toggle-sender:hover,
.btn-submit-delivery:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(52, 245, 255, 0.22), 0 0 22px rgba(52, 245, 255, 0.14) !important;
}

.project-section h3 {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.project-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(52, 245, 255, 0.30), transparent);
}

.project-section-history {
    margin-top: var(--space-24);
    padding-top: var(--space-16);
    border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.project-section-history h3::before {
    content: '🏆';
}

.project-list-history .project-card {
    opacity: 0.86;
    background: linear-gradient(145deg, rgba(20, 16, 34, 0.86), rgba(45, 28, 21, 0.70)) !important;
}

.project-card {
    isolation: isolate;
    border-radius: var(--radius-lg) !important;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius-lg) - 2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), transparent 28%, rgba(52, 245, 255, 0.06));
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-out);
    z-index: -1;
}

.project-card:hover::after,
.project-card:focus-visible::after {
    opacity: 1;
}

.project-card:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-create:focus-visible,
.btn-icon:focus-visible,
.auth-tab:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
}

.btn-icon:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none !important;
}

.project-progress-stepper {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-8);
    margin: var(--space-16) 0;
    padding: var(--space-12);
    border: 1px solid rgba(52, 245, 255, 0.14);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(52, 245, 255, 0.055), rgba(255, 184, 107, 0.035)),
        rgba(2, 6, 23, 0.38);
}

.project-progress-step {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 750;
    text-align: center;
}

.project-progress-dot {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.88);
}

.project-progress-step.done {
    color: #dffdf8;
}

.project-progress-step.done .project-progress-dot {
    color: #02111f;
    background: linear-gradient(135deg, var(--accent-cyan), var(--oasis-green));
    box-shadow: 0 0 18px rgba(52, 245, 255, 0.28);
}

.project-progress-step.active .project-progress-dot {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    animation: live-pulse 1.6s infinite;
}

.detail-description code,
.task-sender-code-block code {
    color: #d9f99d;
}

@media (max-width: 1024px) and (min-width: 641px) {
    #project-panel,
    #task-board,
    #profile-panel,
    #inbox-panel {
        width: min(440px, calc(100vw - 32px)) !important;
        left: 16px !important;
        right: auto !important;
    }

    #task-board {
        top: auto !important;
        bottom: 18px !important;
        max-height: 54vh !important;
    }
}

@media (max-width: 640px) {
    #project-panel,
    #task-board,
    #profile-panel,
    #inbox-panel,
    #chat-panel {
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        border-radius: 22px 22px 18px 18px !important;
    }

    #project-panel {
        top: auto !important;
        bottom: 86px !important;
        max-height: 58vh !important;
    }

    #task-board {
        top: auto !important;
        bottom: 18px !important;
        max-height: 52vh !important;
    }

    #chat-panel {
        bottom: 18px !important;
        max-height: 42vh;
    }

    .project-progress-stepper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .project-card {
        min-height: 92px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* ===== UI REFINEMENT — world-first dock layout — 2026-06-10 ===== */
#project-panel,
#task-board,
#profile-panel,
#inbox-panel,
#chat-panel,
#agent-list {
    backdrop-filter: blur(18px) saturate(118%);
}

.project-content,
.task-board-content,
.profile-content,
.chat-messages {
    overscroll-behavior: contain;
}

.accepted-drafts-list {
    max-height: none;
    overflow-y: visible;
    padding-right: 4px;
}

.task-board-columns {
    max-height: none;
    overflow: visible;
}

#controls-help {
    opacity: 0.72;
    transform: scale(0.92);
    transform-origin: top left;
}

@media (min-width: 1200px) {
    #project-panel {
        left: 18px !important;
        right: auto !important;
        top: 160px !important;
        bottom: auto !important;
        width: 360px !important;
        min-width: 0 !important;
        max-height: calc(100vh - 180px) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #project-panel.minimized {
        bottom: auto !important;
        height: auto !important;
        max-height: 72px !important;
    }

    #project-panel .project-content {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 12px 22px 0 !important;
        overflow-y: auto !important;
    }

    #chat-panel {
        left: 18px !important;
        right: auto !important;
        bottom: 18px !important;
        width: 360px !important;
        height: 490px !important;
        max-height: 490px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #chat-panel .chat-messages {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
    }

    #chat-panel .chat-input-area {
        flex: 0 0 auto !important;
    }

    #task-board {
        left: auto !important;
        right: 338px !important;
        top: 72px !important;
        bottom: auto !important;
        width: clamp(470px, 28vw, 540px) !important;
        max-height: min(690px, calc(100vh - 120px)) !important;
    }

    #task-board .task-board-content {
        max-height: calc(min(690px, 100vh - 120px) - 54px);
        overflow-y: auto;
    }

    #agent-list {
        right: 18px !important;
        top: 16px !important;
        width: 300px !important;
    }

    #inbox-panel {
        left: auto !important;
        right: 18px !important;
        top: 164px !important;
        width: 300px !important;
        max-height: 150px !important;
    }

    #profile-panel {
        left: auto !important;
        right: 18px !important;
        top: 332px !important;
        width: 300px !important;
        max-height: min(440px, calc(100vh - 350px)) !important;
    }

    #profile-panel .profile-content {
        overflow-y: auto;
    }
}

@media (max-width: 1199px) and (min-width: 641px) {
    #social-btn {
        display: none !important;
    }

    .mobile-nav {
        display: flex !important;
        height: 64px;
        left: 16px;
        right: 16px;
        bottom: 12px;
        border: 1px solid rgba(52, 245, 255, 0.18);
        border-radius: 18px;
        overflow: hidden;
    }

    #project-panel,
    #task-board,
    #profile-panel,
    #inbox-panel,
    #chat-panel {
        left: 16px !important;
        right: auto !important;
        top: 76px !important;
        bottom: 82px !important;
        width: min(430px, calc(100vw - 32px)) !important;
        max-height: none !important;
    }

    #project-panel .project-content,
    #task-board .task-board-content,
    #profile-panel .profile-content,
    #chat-panel .chat-messages {
        max-height: calc(100vh - 230px);
        overflow-y: auto;
    }

    #inbox-panel {
        height: auto !important;
    }

    #agent-list {
        right: 16px !important;
        top: 16px !important;
        width: 250px !important;
    }

    #controls-help {
        display: none !important;
    }
}

@media (max-width: 640px) {
    #social-btn {
        display: none !important;
    }

    .touch-joystick,
    .mobile-actions {
        z-index: 110;
    }

    body.mobile-panel-open .touch-joystick,
    body.mobile-panel-open .mobile-actions {
        display: none !important;
    }

    #project-panel,
    #task-board,
    #profile-panel,
    #inbox-panel,
    #chat-panel {
        top: auto !important;
        bottom: 82px !important;
        max-height: 58vh !important;
    }

    .accepted-drafts-list {
        max-height: 260px;
    }
}

/* ===== DESKTOP PAINT LAYOUT — fixed top rail + corner utilities — 2026-06-11 ===== */
@media (min-width: 1360px) {
    :root {
        --rail-edge: clamp(10px, 0.95vw, 18px);
        --rail-gap: clamp(10px, 0.95vw, 18px);
        --rail-market-w: clamp(260px, 19vw, 360px);
        --rail-task-w: clamp(360px, 28vw, 520px);
        --rail-inbox-w: clamp(200px, 14.5vw, 280px);
        --rail-profile-w: clamp(200px, 14.5vw, 280px);
        --rail-agents-w: clamp(240px, 16vw, 300px);
        --rail-top: 18px;
        --rail-card-h: 64px;
    }

    #project-panel {
        left: var(--rail-edge) !important;
        right: auto !important;
        top: var(--rail-top) !important;
        bottom: auto !important;
        width: var(--rail-market-w) !important;
        min-width: 0 !important;
        height: calc(100vh - var(--rail-top) - var(--rail-edge)) !important;
        max-height: calc(100vh - var(--rail-top) - var(--rail-edge)) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        z-index: 160 !important;
    }

    #project-panel.minimized {
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
    }

    #project-panel .project-content {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
    }

    #chat-panel {
        left: var(--rail-edge) !important;
        right: auto !important;
        bottom: var(--rail-edge) !important;
        width: clamp(320px, 20vw, 360px) !important;
        height: 490px !important;
        max-height: 490px !important;
    }

    #controls-help {
        left: auto !important;
        right: var(--rail-edge) !important;
        top: auto !important;
        bottom: var(--rail-edge) !important;
        width: var(--rail-agents-w) !important;
        min-height: 84px !important;
        box-sizing: border-box !important;
        opacity: 0.82 !important;
        transform: none !important;
        transform-origin: bottom right !important;
    }

    #connection-status {
        left: auto !important;
        right: var(--rail-edge) !important;
        top: auto !important;
        bottom: calc(var(--rail-edge) + 96px) !important;
        width: var(--rail-agents-w) !important;
        box-sizing: border-box !important;
    }

    #agent-list {
        right: var(--rail-edge) !important;
        top: var(--rail-top) !important;
        width: var(--rail-agents-w) !important;
        height: calc(100vh - 186px) !important;
        min-height: 220px !important;
        max-height: calc(100vh - 186px) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #agent-list .list-header {
        flex: 0 0 54px !important;
        position: relative !important;
        padding-right: 154px !important;
    }

    #agent-list .agent-list-toggle {
        position: absolute !important;
        top: 9px !important;
        right: 108px !important;
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        z-index: 3 !important;
    }

    #agents {
        flex: 1 1 auto !important;
        min-height: 62px !important;
        max-height: none !important;
        overflow-y: auto !important;
        scrollbar-gutter: stable !important;
        overscroll-behavior: contain !important;
        scrollbar-width: thin;
        scrollbar-color: rgba(52, 245, 255, 0.55) rgba(255, 255, 255, 0.05);
    }

    #agents::-webkit-scrollbar {
        width: 7px;
    }

    #agents::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 999px;
        margin: 8px 0;
    }

    #agents::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, rgba(52, 245, 255, 0.72), rgba(99, 102, 241, 0.72));
        border-radius: 999px;
    }

    #agent-list.minimized {
        height: 54px !important;
        min-height: 54px !important;
        max-height: 54px !important;
    }

    #agent-list.minimized #agents {
        display: none !important;
    }

    #profile-panel {
        left: calc(var(--rail-edge) + var(--rail-market-w) + var(--rail-gap) + var(--rail-task-w) + var(--rail-gap) + var(--rail-inbox-w) + var(--rail-gap)) !important;
        right: auto !important;
        width: var(--rail-profile-w) !important;
        z-index: 153 !important;
    }

    #inbox-panel {
        left: calc(var(--rail-edge) + var(--rail-market-w) + var(--rail-gap) + var(--rail-task-w) + var(--rail-gap)) !important;
        right: auto !important;
        width: var(--rail-inbox-w) !important;
        z-index: 152 !important;
    }

    #task-board {
        top: var(--rail-top) !important;
        left: calc(var(--rail-edge) + var(--rail-market-w) + var(--rail-gap)) !important;
        right: auto !important;
        width: var(--rail-task-w) !important;
        max-height: min(690px, calc(100vh - 92px)) !important;
    }

    #task-board.minimized {
        height: 70px !important;
        max-height: 70px !important;
        overflow: hidden !important;
    }

    #task-board .task-board-content {
        padding-bottom: 24px !important;
    }

    #task-board .task-board-columns {
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 18px !important;
    }

    #task-board .task-list,
    #task-board .task-column {
        overflow: visible !important;
    }

    #inbox-panel,
    #inbox-panel:hover,
    #inbox-panel:focus-within,
    #profile-panel,
    #profile-panel:hover,
    #profile-panel:focus-within {
        top: var(--rail-top) !important;
        bottom: auto !important;
        height: var(--rail-card-h) !important;
        min-height: var(--rail-card-h) !important;
        max-height: var(--rail-card-h) !important;
        overflow: hidden !important;
        transition:
            height 180ms ease,
            max-height 180ms ease,
            box-shadow 180ms ease,
            border-color 180ms ease !important;
    }

    #inbox-panel .inbox-header,
    #profile-panel .profile-header {
        min-height: var(--rail-card-h) !important;
        height: var(--rail-card-h) !important;
        border-bottom: 0 !important;
        white-space: nowrap !important;
    }

    #inbox-panel .inbox-list,
    #profile-panel .profile-content {
        display: none !important;
    }

    body #inbox-panel.rail-open,
    body #inbox-panel.rail-open:hover,
    body #inbox-panel.rail-open:focus-within {
        left: calc(var(--rail-edge) + var(--rail-market-w) + var(--rail-gap) + var(--rail-task-w) + var(--rail-gap)) !important;
        right: auto !important;
        width: var(--rail-inbox-w) !important;
        height: 184px !important;
        min-height: 184px !important;
        max-height: 184px !important;
        border-color: rgba(52, 245, 255, 0.46) !important;
        box-shadow: 0 28px 86px rgba(0,0,0,0.52), 0 0 34px rgba(52,245,255,0.18) !important;
    }

    body #profile-panel.rail-open,
    body #profile-panel.rail-open:hover,
    body #profile-panel.rail-open:focus-within {
        left: calc(var(--rail-edge) + var(--rail-market-w) + var(--rail-gap) + var(--rail-task-w) + var(--rail-gap) + var(--rail-inbox-w) + var(--rail-gap)) !important;
        right: auto !important;
        width: var(--rail-profile-w) !important;
        height: min(420px, calc(100vh - 96px)) !important;
        min-height: min(420px, calc(100vh - 96px)) !important;
        max-height: min(420px, calc(100vh - 96px)) !important;
        border-color: rgba(52, 245, 255, 0.46) !important;
        box-shadow: 0 28px 86px rgba(0,0,0,0.52), 0 0 34px rgba(52,245,255,0.18) !important;
    }

    body #inbox-panel.rail-open .inbox-header,
    body #profile-panel.rail-open .profile-header {
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    }

    body #inbox-panel.rail-open .inbox-list {
        display: block !important;
        max-height: 120px !important;
        overflow-y: auto !important;
    }

    body #profile-panel.rail-open .profile-content {
        display: block !important;
        max-height: calc(min(420px, calc(100vh - 96px)) - 64px) !important;
        overflow-y: auto !important;
    }

    #profile-panel .xp-bar-container {
        text-align: center !important;
    }

    #profile-panel .xp-bar-label {
        justify-content: center !important;
        gap: 14px !important;
        text-align: center !important;
    }
}


/* ==================== LOGIN DIORAMA BACKDROP — 2026-06-22 ==================== */
html,
body.auth-screen {
    min-height: 100vh;
    background: #060a14;
}

body.auth-screen {
    background:
        radial-gradient(circle at 82% 18%, rgba(52, 245, 255, 0.14), transparent 34%),
        radial-gradient(circle at 88% 78%, rgba(180, 92, 255, 0.16), transparent 38%),
        linear-gradient(135deg, #060a14 0%, #0d1f2e 46%, #12091f 100%);
}

body.auth-screen #canvas-container {
    opacity: 0;
    pointer-events: none;
}

body.auth-screen #login-particles {
    display: none !important;
}

body.auth-screen #login-modal.modal {
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    background:
        linear-gradient(90deg, rgba(4, 7, 18, 0.04) 0%, rgba(4, 7, 18, 0.14) 48%, rgba(4, 7, 18, 0.58) 68%, rgba(4, 7, 18, 0.94) 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.auth-screen #login-modal.modal::before {
    content: '';
    position: absolute;
    left: clamp(10px, 0.9vw, 18px);
    top: clamp(10px, 2.4vh, 26px);
    bottom: clamp(10px, 3.4vh, 30px);
    width: min(75vw, calc(100vw - 520px));
    border-radius: clamp(16px, 1.6vw, 28px);
    background:
        linear-gradient(90deg, rgba(5, 8, 16, 0.00) 0%, rgba(5, 8, 16, 0.06) 54%, rgba(5, 8, 16, 0.34) 100%),
        url('assets/landing/openagents-login-diorama.png') center center / cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 34px 110px rgba(0, 0, 0, 0.48),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 0;
}

body.auth-screen #login-modal .modal-content {
    position: relative;
    z-index: 2;
}

@media (min-width: 901px) {
    body.auth-screen #login-modal.modal {
        justify-content: flex-end !important;
        padding: 24px clamp(14px, 1.8vw, 34px) !important;
    }
}

@media (max-width: 900px) {
    body.auth-screen #login-modal .modal-content {
        width: min(82vw, 390px);
        max-width: min(390px, calc(100vw - 34px));
        transform: translateX(clamp(8px, 4vw, 20px));
    }

    body.auth-screen #login-modal.modal::before {
        inset: 10px 10px auto 10px;
        width: auto;
        height: 52vh;
        opacity: 0.92;
    }

    body.auth-screen #login-modal.modal {
        background:
            linear-gradient(180deg, rgba(4, 7, 18, 0.06) 0%, rgba(4, 7, 18, 0.62) 54%, rgba(4, 7, 18, 0.94) 100%) !important;
    }
}

/* ===== LOGIN CARD REDESIGN v2 — compact, no-scroll, premium ===== */
body.auth-screen #login-modal .modal-content {
    width: min(88vw, 420px) !important;
    max-width: 420px !important;
    padding: 24px 26px 20px !important;
    border-radius: 22px !important;
    background: linear-gradient(165deg, rgba(8,10,26,0.96) 0%, rgba(12,16,38,0.97) 60%, rgba(18,22,48,0.96) 100%) !important;
    border: 1px solid rgba(52, 245, 255, 0.14) !important;
    box-shadow: 0 0 60px rgba(0, 255, 200, 0.06), 0 30px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06) !important;
    max-height: calc(100vh - 48px) !important;
    overflow-y: auto !important;
    display: block;
}

/* Contain the decorative ::before so it does not inflate scrollHeight */
body.auth-screen #login-modal .modal-content::before {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    height: 4px !important;
    background: var(--gradient-primary) !important;
}

body.auth-screen #login-modal .logo {
    margin-bottom: 10px !important;
}

body.auth-screen #login-modal .logo-3d.openagents-logo-mark {
    width: 72px !important;
    height: 72px !important;
    margin-bottom: 6px !important;
    object-fit: contain;
    border-radius: 18px;
    filter: drop-shadow(0 0 18px rgba(52, 245, 255, 0.35));
}

body.auth-screen #login-modal .logo h1 {
    font-size: 27px !important;
    line-height: 1 !important;
    margin-bottom: 3px !important;
    letter-spacing: -0.5px !important;
    background: linear-gradient(90deg, #f8fafc, #34f5ff, #34d399) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

body.auth-screen #login-modal .tagline {
    font-size: 11px !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    color: rgba(207, 226, 255, 0.72) !important;
}

body.auth-screen #login-modal .auth-tabs {
    gap: 6px !important;
    margin-bottom: 12px !important;
    padding: 4px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.auth-screen #login-modal .auth-tab {
    min-height: 36px !important;
    padding: 7px 12px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700;
    border-color: transparent !important;
}

body.auth-screen #login-modal .auth-tab.active {
    color: #06111e !important;
    background: linear-gradient(100deg, #34f5ff, #34d399, #f9d66b) !important;
    box-shadow: 0 8px 22px rgba(52, 245, 255, 0.20) !important;
}

body.auth-screen #login-modal .auth-step-label {
    display: none !important;
}

body.auth-screen #login-modal .form-group {
    margin-bottom: 10px !important;
    text-align: left;
}

body.auth-screen #login-modal .form-group label,
body.auth-screen #login-modal .avatar-select label {
    margin-bottom: 5px !important;
    font-size: 11px !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase;
    color: rgba(213, 224, 245, 0.68) !important;
}

body.auth-screen #login-modal .form-group input {
    min-height: 42px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    background: rgba(9, 15, 31, 0.74) !important;
    border: 1px solid rgba(52, 245, 255, 0.20) !important;
}

body.auth-screen #login-modal .form-group input::placeholder {
    color: rgba(207, 216, 235, 0.38) !important;
}

body.auth-screen #login-modal .avatar-select {
    margin-bottom: 10px !important;
}

body.auth-screen #login-modal .avatar-type-grid {
    gap: 6px !important;
    margin-top: 4px !important;
    grid-template-columns: repeat(5, 1fr) !important;
}

body.auth-screen #login-modal .avatar-type-card {
    min-height: 48px !important;
    padding: 5px 2px !important;
    border-radius: 10px !important;
    border-width: 1px !important;
    font-size: 8px !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

body.auth-screen #login-modal .avatar-type-card.selected {
    border-color: rgba(52, 245, 255, 0.5) !important;
    background: rgba(52, 245, 255, 0.08) !important;
    box-shadow: 0 0 14px rgba(52, 245, 255, 0.18) !important;
}

body.auth-screen #login-modal .avatar-type-icon svg {
    width: 20px !important;
    height: 20px !important;
}

body.auth-screen #login-modal .avatar-select label[style] {
    margin-top: 6px !important;
}

body.auth-screen #login-modal .color-options {
    justify-content: flex-start !important;
    gap: 9px !important;
    margin-top: 3px;
}

body.auth-screen #login-modal .color-option {
    width: 22px !important;
    height: 22px !important;
    border-width: 2px !important;
}

body.auth-screen #login-modal .color-option::after {
    inset: -3px !important;
    border-width: 2px !important;
}

body.auth-screen #login-modal .auth-action-bar {
    margin-top: 4px !important;
    padding-top: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.auth-screen #login-modal #forgot-password-btn {
    align-self: flex-end;
    width: auto !important;
    padding: 3px 6px !important;
    margin-bottom: 0 !important;
    font-size: 11px !important;
    border: 0 !important;
    background: transparent !important;
    color: rgba(207, 216, 235, 0.62) !important;
    text-decoration: none;
}

body.auth-screen #login-modal #connect-btn {
    min-height: 44px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 800;
    border-radius: 13px !important;
    width: 100% !important;
    color: #06111e !important;
    box-shadow: 0 12px 30px rgba(52, 245, 255, 0.22), inset 0 1px 1px rgba(255,255,255,0.38) !important;
}

body.auth-screen #login-modal #connect-btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.auth-screen #login-modal .auth-button-logo {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    object-fit: contain;
    filter: drop-shadow(0 0 7px rgba(52, 245, 255, 0.42));
}

body.auth-screen #login-modal .auth-action-hint {
    display: none !important;
}

@media (min-width: 901px) {
    body.auth-screen #login-modal.modal {
        padding: 18px clamp(14px, 1.55vw, 28px) !important;
    }
    body.auth-screen #login-modal .modal-content {
        max-height: calc(100vh - 36px) !important;
    }
}

@media (max-width: 900px) {
    body.auth-screen #login-modal.modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 12px !important;
    }
    body.auth-screen #login-modal .modal-content {
        width: min(390px, calc(100vw - 24px)) !important;
        max-width: min(390px, calc(100vw - 24px)) !important;
        padding: 20px 22px 18px !important;
        transform: none !important;
        max-height: calc(100vh - 24px) !important;
    }
}

@media (max-width: 420px) and (max-height: 700px) {
    body.auth-screen #login-modal .modal-content {
        padding: 16px 18px 14px !important;
        max-height: calc(100vh - 20px) !important;
    }
    body.auth-screen #login-modal .logo {
        margin-bottom: 8px !important;
    }
    body.auth-screen #login-modal .openagents-logo-mark {
        width: 58px !important;
        height: 58px !important;
        margin-bottom: 4px !important;
    }
    body.auth-screen #login-modal .logo h1 {
        font-size: 23px !important;
    }
    body.auth-screen #login-modal .tagline {
        font-size: 10px !important;
        letter-spacing: 0.16em !important;
    }
    body.auth-screen #login-modal .auth-tabs {
        margin-bottom: 9px !important;
    }
    body.auth-screen #login-modal .auth-tab {
        min-height: 32px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    body.auth-screen #login-modal .form-group {
        margin-bottom: 8px !important;
    }
    body.auth-screen #login-modal .form-group input {
        min-height: 38px !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    body.auth-screen #login-modal .avatar-type-grid {
        gap: 5px !important;
    }
    body.auth-screen #login-modal .avatar-type-card {
        min-height: 44px !important;
        padding: 4px 2px !important;
        border-radius: 9px !important;
        font-size: 7px !important;
    }
    body.auth-screen #login-modal .avatar-type-icon svg {
        width: 18px !important;
        height: 18px !important;
    }
    body.auth-screen #login-modal .color-options {
        gap: 8px !important;
    }
    body.auth-screen #login-modal .color-option {
        width: 20px !important;
        height: 20px !important;
    }
    body.auth-screen #login-modal #connect-btn {
        min-height: 40px !important;
        padding: 9px 14px !important;
        font-size: 13px !important;
    }
    body.auth-screen #login-modal #forgot-password-btn {
        font-size: 10px !important;
    }
}
