/* ==========================================================================
   ELITE EA BRIDGE CSS
   Glassmorphism, Live Server Status, Code Terminals
   ========================================================================== */

/* Layout & Globals */
.eab-container { margin-left: 20px; padding: 32px; min-height: 100vh; color: #ffffff; font-family: 'Inter', sans-serif; position: relative; overflow-x: hidden; display: flex; flex-direction: column; }
.eab-layout { display: flex; gap: 24px; align-items: flex-start; flex-grow: 1; height: calc(100vh - 200px); }
.eab-main-view { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.eab-sidebar { width: 340px; flex-shrink: 0; height: 100%; overflow-y: auto; padding-right: 8px; }

/* Utilities */
.hidden { display: none !important; opacity: 0; pointer-events: none; }
.hidden-mobile { display: flex; }
@media (max-width: 768px) { .hidden-mobile { display: none !important; } .eab-layout { flex-direction: column; height: auto; } .eab-sidebar { width: 100%; } }
.m-0 { margin: 0; } .p-0 { padding: 0 !important; } .p-8 { padding: 8px; } .p-16 { padding: 16px; } .p-24 { padding: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.pl-16 { padding-left: 16px; } .pb-16 { padding-bottom: 16px; }
.border-bottom { border-bottom: 1px solid rgba(255,255,255,0.1); } .border-top { border-top: 1px solid rgba(255,255,255,0.1); } .border-none { border: none !important; }
.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.85rem; } .text-muted { color: rgba(255,255,255,0.6); } .w-full { width: 100%; } .text-center { text-align: center; } .text-right { text-align: right; }
.uppercase { text-transform: uppercase; } .letter-spacing { letter-spacing: 1px; } .font-bold { font-weight: 700; } .tabular-nums { font-variant-numeric: tabular-nums; }
.flex-between { display: flex; justify-content: space-between; align-items: center; } .flex-align-center { display: flex; align-items: center; } .align-start { align-items: flex-start; } .flex-end { display: flex; justify-content: flex-end; } .justify-center { justify-content: center; } .gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }

/* Palette */
.text-purple { color: #c084fc; } .text-cyan { color: #06b6d4; } .text-gold { color: #fbbf24; } .text-red { color: #ef5350; } .text-green { color: #22c55e; } .text-orange { color: #fb923c; } .text-white { color: #ffffff; }
.bg-purple { background: #c084fc; color: #000; } .bg-cyan { background: #06b6d4; color: #000; } .bg-gold { background: #fbbf24; color: #000; } .bg-green { background: #22c55e; color: #000; } .bg-red { background: #ef5350; color: #fff; } .bg-dark { background: rgba(0,0,0,0.5); } .bg-transparent { background: transparent !important; }
.border-cyan { border: 1px solid rgba(6,182,212,0.4); } .border-green { border: 1px solid rgba(34,197,94,0.4); } .border-purple { border: 1px solid rgba(192,132,252,0.4); } .border-red { border: 1px solid rgba(239,83,80,0.4); } .border-gold { border: 1px solid rgba(251,191,36,0.4); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); } 70% { box-shadow: 0 0 0 20px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes pulseGlowRed { 0% { box-shadow: 0 0 0 0 rgba(239,83,80,0.5); } 70% { box-shadow: 0 0 0 20px rgba(239,83,80,0); } 100% { box-shadow: 0 0 0 0 rgba(239,83,80,0); } }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.fade-in { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.pulse-btn { animation: pulseGlow 2s infinite; border-radius: 12px; }
.pulse-glow { animation: pulseGlow 2s infinite; border-radius: 50%; }

/* Cards & Buttons */
.eab-card { background: rgba(255,255,255,0.03); backdrop-filter: blur(24px) saturate(180%); border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05); transition: all 0.4s; }

.eab-btn { padding: 10px 20px; border-radius: 12px; font-weight: 700; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s; border: none; text-transform: uppercase; font-family: inherit; }
.eab-btn--primary { background: linear-gradient(135deg, #a855f7, #7e22ce); color: white; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3); }
.eab-btn--primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5); }
.eab-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.eab-btn--secondary { background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }
.eab-btn--secondary:hover:not(:disabled) { background: rgba(255,255,255,0.1); border-color: #c084fc; color: #c084fc; }
.eab-btn--danger { background: linear-gradient(135deg, #ef5350, #c62828); color: white; box-shadow: 0 4px 15px rgba(239, 83, 80, 0.3); }
.eab-btn--danger:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239, 83, 80, 0.5); }
.eab-btn-icon { background: transparent; border: none; color: rgba(255,255,255,0.6); cursor: pointer; transition: 0.2s; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; }
.eab-btn-icon:hover { color: white; background: rgba(255,255,255,0.1); transform: scale(1.05); }
.eab-btn-icon-small { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.eab-btn-icon-small:hover { background: rgba(192,132,252,0.2); color: #c084fc; border-color: #c084fc; }
.eab-btn-text { background: transparent; border: none; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: 0.2s; padding: 0; }
.eab-btn-text:hover { filter: brightness(1.2); }

.eab-input, .eab-select { width: 100%; padding: 10px 14px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; transition: 0.3s; font-family: inherit; font-size: 0.85rem; outline: none; }
.eab-input:focus, .eab-select:focus { border-color: #c084fc; box-shadow: 0 0 0 2px rgba(192,132,252,0.2); }
.eab-form-group { margin-bottom: 16px; }
.eab-form-group label { display: block; margin-bottom: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.8); font-weight: 600; }

.eab-copy-box { display: flex; gap: 8px; align-items: center; }
.eab-copy-box input { font-family: monospace; color: #fbbf24; font-weight: 700; letter-spacing: 2px; }

/* Switch & Checkbox */
.eab-switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.eab-switch input { opacity: 0; width: 0; height: 0; }
.eab-slider-toggle { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); transition: .4s; border-radius: 24px; }
.eab-slider-toggle:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
.eab-switch input:checked + .eab-slider-toggle { background-color: #06b6d4; }
.eab-switch input:checked + .eab-slider-toggle:before { transform: translateX(20px); }

.eab-chk-row { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 0.9rem; color: rgba(255,255,255,0.8); background: rgba(0,0,0,0.2); padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); transition: 0.2s; margin-bottom: 8px; }
.eab-chk-row:hover:not(.hover-none) { background: rgba(255,255,255,0.05); border-color: rgba(6,182,212,0.3); }
.eab-chk-row input { accent-color: #06b6d4; width: 18px; height: 18px; cursor: pointer; }

/* Header & Banners */
.eab-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 24px; flex-shrink: 0; }
.eab-header__title { font-size: 2.2rem; font-weight: 800; margin: 0 0 8px 0; letter-spacing: 1px; }
.eab-header__subtitle { color: #c084fc; margin: 0; font-size: 1rem; }
.eab-header__actions { display: flex; gap: 16px; align-items: center; }

.eab-status-banner { background: radial-gradient(circle at left, rgba(34,197,94,0.15), rgba(0,0,0,0.5)); border: 1px solid rgba(34,197,94,0.3); border-radius: 16px; padding: 20px 32px; display: flex; justify-content: space-between; align-items: center; transition: 0.5s; }
.eab-status-icon { width: 50px; height: 50px; border-radius: 50%; background: rgba(34,197,94,0.1); color: #22c55e; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.eab-status-actions { display: flex; align-items: center; gap: 24px; }
.status-stopped { background: radial-gradient(circle at left, rgba(239,83,80,0.15), rgba(0,0,0,0.5)); border-color: rgba(239,83,80,0.3); }
.status-stopped .eab-status-icon { color: #ef5350; background: rgba(239,83,80,0.1); animation: none; }
.status-stopped #status-title { color: #ef5350 !important; }

/* Terminal Grid */
.eab-term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.eab-term-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 20px; transition: 0.3s; position: relative; display: flex; flex-direction: column; }
.eab-term-card:hover { transform: translateY(-2px); border-color: rgba(6,182,212,0.3); background: rgba(255,255,255,0.04); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.eab-term-card.disconnected { opacity: 0.6; filter: grayscale(1); }
.t-ico { font-size: 1.5rem; color: #fff; width: 40px; height: 40px; background: rgba(0,0,0,0.4); border-radius: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.1); }
.t-name { font-size: 1.1rem; font-weight: 800; margin: 0 0 4px 0; color: #fff; display: flex; align-items: center; gap: 8px; }
.t-acc { font-size: 0.8rem; color: rgba(255,255,255,0.5); font-family: monospace; }
.t-stats { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 16px; padding-top: 16px; font-size: 0.8rem; }
.t-actions { display: flex; gap: 8px; margin-top: 16px; }

/* Event Log */
.eab-events-container { flex-grow: 1; overflow-y: auto; padding: 0 8px; scrollbar-width: thin; display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.eab-events-container::-webkit-scrollbar { width: 4px; }
.eab-events-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.eab-evt-row { display: grid; grid-template-columns: 80px 40px 100px 1fr 100px; gap: 16px; align-items: center; padding: 8px 12px; background: rgba(255,255,255,0.02); border-radius: 8px; font-size: 0.85rem; font-family: monospace; cursor: pointer; transition: 0.2s; border-left: 2px solid transparent; animation: popIn 0.2s ease-out; }
.eab-evt-row:hover { background: rgba(255,255,255,0.05); }
.eab-evt-row.evt-ok { border-left-color: #22c55e; }
.eab-evt-row.evt-err { border-left-color: #ef5350; background: rgba(239,83,80,0.05); }

.eab-filter-chips { display: flex; gap: 8px; }
.eab-filter-chips button { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); padding: 4px 12px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: 0.2s; text-transform: uppercase; }
.eab-filter-chips button:hover { color: white; background: rgba(255,255,255,0.1); }
.eab-filter-chips button.active { background: rgba(192,132,252,0.2); color: #c084fc; border-color: rgba(192,132,252,0.4); }

/* Setup Steps Sidebar */
.eab-step-list { display: flex; flex-direction: column; gap: 24px; position: relative; }
.eab-step-list::before { content: ''; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 2px; background: rgba(255,255,255,0.05); z-index: 1; }
.eab-step-item { display: flex; gap: 16px; position: relative; z-index: 2; opacity: 0.4; transition: 0.3s; }
.eab-step-item.active { opacity: 1; }
.eab-step-item.done { opacity: 0.8; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: #0d0b12; border: 2px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; flex-shrink: 0; transition: 0.3s; color: rgba(255,255,255,0.5); }
.eab-step-item.active .step-num { border-color: #fbbf24; color: #fbbf24; box-shadow: 0 0 10px rgba(251,191,36,0.3); }
.eab-step-item.done .step-num { border-color: #22c55e; background: rgba(34,197,94,0.2); color: #22c55e; }
.eab-step-item.done .step-num::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }
.eab-step-item.done .step-num { font-size: 0; } /* hide number, show check */
.step-content { flex-grow: 1; padding-top: 6px; }

.eab-mode-selector { display: flex; background: rgba(0,0,0,0.4); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); padding: 4px; }
.mode-btn { flex: 1; background: transparent; border: none; color: rgba(255,255,255,0.5); padding: 8px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.2s; font-size: 0.85rem; }
.mode-btn.active { background: rgba(255,255,255,0.1); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

/* Slide Drawer */
.eab-slide-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 999; transition: opacity 0.4s; }
.eab-slide-panel { position: fixed; top: 0; right: 0; width: 100%; max-width: 600px; height: 100vh; background: #0d0b12; border-left: 1px solid rgba(255,255,255,0.1); z-index: 1000; box-shadow: -10px 0 30px rgba(0,0,0,0.5); transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; }
.eab-slide-panel.open { transform: translateX(0); }
.eab-slide-body { overflow-y: auto; flex-grow: 1; }

.eab-code-box { background: #000; border: 1px solid rgba(6,182,212,0.3); padding: 16px; border-radius: 12px; font-family: monospace; font-size: 0.85rem; color: #a855f7; overflow-x: auto; white-space: pre; }

/* Modals */
.eab-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.eab-modal__overlay { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); }
.eab-modal__content { position: relative; background: #0d0b12; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; width: 90%; max-height: 90vh; overflow-y: auto; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); animation: popIn 0.3s cubic-bezier(0.16,1,0.3,1) forwards; }
.eab-modal__close { position: absolute; top: 24px; right: 24px; background: none; border: none; color: rgba(255,255,255,0.5); font-size: 1.5rem; cursor: pointer; transition: 0.3s; z-index: 10; }
.eab-modal__close:hover { color: white; }

.eab-diag-list { display: flex; flex-direction: column; gap: 12px; }
.diag-item { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); padding: 16px; border-radius: 8px; font-size: 0.9rem; color: #fff; display: flex; align-items: center; gap: 12px; }
.diag-ok i { color: #22c55e; } .diag-err i { color: #ef5350; }
.eab-alert { padding: 12px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 12px; animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }