:root {
    --bg: #000000;
    --panel: #0a0e1a;
    --text: #00ff41;
    --text-secondary: #0dff00;
    --muted: rgba(0,255,65,.68);
    --line: rgba(0,255,65,.25);
    --danger: #ff0051;
    --ok: #00ff41;
    --warn: #ffcc00;
    --active: rgba(0,255,65,.15);
    --shadow: 0 0 40px rgba(0,255,65,.3), 0 0 80px rgba(0,255,65,.1);
    --glow: 0 0 10px rgba(0,255,65,.8), 0 0 20px rgba(0,255,65,.5), 0 0 30px rgba(0,255,65,.3);
    --radius: 0px;
    --radius2: 0px;
    --folder-accent: #00ffff;
    --cyber-pink: #ff006e;
    --cyber-purple: #9d00ff;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0; padding: 0;
    font-family: 'Courier New', 'Consolas', monospace;
    background: #000;
    color: var(--text);
    overflow-x: hidden;
    position: relative;
}

/* Animated Matrix Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        linear-gradient(90deg, transparent 0%, rgba(0,255,65,.03) 50%, transparent 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,65,.03) 2px, rgba(0,255,65,.03) 4px);
    animation: scan 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0,255,65,.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(0,255,255,.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.err {
    color: var(--danger);
    margin-top: 10px;
    text-shadow: 0 0 10px var(--danger);
    animation: glitchError 2s infinite;
}

@keyframes glitchError {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.spaceBetween { justify-content: space-between; width: 100%; }

/* Cyberpunk Input */
input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--line);
    background: rgba(0,0,0,.8);
    color: var(--text);
    outline: none;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 20px rgba(0,255,65,.05);
}

input:focus {
    border-color: var(--ok);
    box-shadow: 0 0 20px rgba(0,255,65,.4), inset 0 0 20px rgba(0,255,65,.1);
    text-shadow: 0 0 5px var(--ok);
}

input::placeholder {
    color: rgba(0,255,65,.3);
}

/* Cyberpunk Button */
button {
    border: 2px solid var(--line);
    padding: 12px 16px;
    background: rgba(0,0,0,.9);
    color: var(--text);
    cursor: pointer;
    transition: all .2s ease;
    font-size: 14px;
    min-height: 44px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,255,65,.2);
}

button::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,65,.3), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    border-color: var(--ok);
    box-shadow: var(--glow);
    text-shadow: 0 0 10px var(--ok);
}

button:active {
    transform: translateY(0px);
}

.btnPrimary {
    background: linear-gradient(135deg, rgba(0,255,65,.2), rgba(0,255,255,.15));
    border-color: var(--ok);
    box-shadow: var(--glow);
    animation: pulse 2s infinite;
}

.btnScreenshot {
    background: linear-gradient(135deg, rgba(255,165,0,.25), rgba(255,80,0,.2));
    border-color: #ff9500;
    box-shadow: 0 0 10px rgba(255,150,0,.5);
    font-size: 14px;
    padding: 8px 18px;
    animation: pulseScreenshot 2s infinite;
    order: -1;
}

.btnScreenshot:hover {
    border-color: #ffb800;
    box-shadow: 0 0 20px rgba(255,150,0,.8), 0 0 30px rgba(255,100,0,.4);
    text-shadow: 0 0 10px #ff9500;
}

@keyframes pulseScreenshot {
    0%, 100% { box-shadow: 0 0 10px rgba(255,150,0,.5); }
    50% { box-shadow: 0 0 20px rgba(255,150,0,.8), 0 0 30px rgba(255,100,0,.4); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0,255,65,.5); }
    50% { box-shadow: 0 0 20px rgba(0,255,65,.8), 0 0 30px rgba(0,255,65,.4); }
}

/* Auth Screen */
.centerWrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.authCard {
    width: min(520px, 100%);
    background: rgba(0,0,0,.95);
    border: 2px solid var(--ok);
    box-shadow: var(--shadow);
    padding: 30px;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

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

.authCard::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--ok), var(--folder-accent), var(--ok));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.authCard:hover::before {
    opacity: 0.3;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(90deg); }
}

.authTitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 20px;
    text-shadow: var(--glow);
    animation: flicker 5s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    95% { opacity: 0.9; }
    96% { opacity: 1; }
    97% { opacity: 0.95; }
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: var(--glow);
    animation: blink 2s infinite;
}

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

.app {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 10;
}

/* SIDEBAR - Modern Cyberpunk */
.sidebar {
    width: 280px;
    background: rgba(0,0,0,.98);
    border-right: 2px solid var(--ok);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.3s cubic-bezier(.4,0,.2,1), transform 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 40px rgba(0,255,65,.2);
    z-index: 100;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-right-width: 0;
    overflow: hidden;
}

.sidebar.collapsed .menuText,
.sidebar.collapsed .logoText,
.sidebar.collapsed .menuSectionTitle {
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .menuItem,
.sidebar.collapsed .menuItemStatic {
    justify-content: center;
    opacity: 0;
}

.sidebar.collapsed .menuItem .badge {
    position: absolute;
    right: 5px;
    top: 5px;
}

.sidebar.collapsed .sidebarHeader,
.sidebar.collapsed .sidebarFooter {
    opacity: 0;
    pointer-events: none;
}

/* Sidebar expand toggle - always visible */
.sidebarExpandBtn {
    position: fixed;
    left: 280px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 56px;
    min-height: 56px;
    background: rgba(0,0,0,.95);
    border: 2px solid var(--ok);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--ok);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
    transition: left 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.2s;
    box-shadow: 0 0 15px rgba(0,255,65,.3);
    padding: 0;
    font-size: 14px;
}

.sidebarExpandBtn:hover {
    box-shadow: 0 0 25px rgba(0,255,65,.6);
    background: rgba(0,255,65,.1);
}

.sidebarExpandBtn i {
    transition: transform 0.3s ease;
}

.sidebar.collapsed ~ .sidebarExpandBtn,
.app.sidebar-collapsed .sidebarExpandBtn {
    left: 0;
}

.app.sidebar-collapsed .sidebarExpandBtn i {
    transform: rotate(180deg);
}

/* Sidebar Header */
.sidebarHeader {
    padding: 20px 16px;
    border-bottom: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,255,65,.05);
}

.sidebarLogo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logoText {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 3px;
    text-shadow: var(--glow);
}

.sidebarToggleBtn {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Sidebar Menu */
.sidebarMenu {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.menuSection {
    margin-bottom: 24px;
}

.menuSectionTitle {
    font-size: 10px;
    color: var(--muted);
    padding: 10px 20px 8px;
    letter-spacing: 2px;
    font-weight: 700;
    opacity: 0.6;
}

.menuItem {
    padding: 14px 20px;
    cursor: pointer;
    transition: all .2s ease;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.5px;
    position: relative;
    border-left: 3px solid transparent;
}

.menuItem i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.menuItem .menuText {
    flex: 1;
}

.menuItem:hover {
    background: rgba(0,255,65,.08);
    border-left-color: var(--ok);
    padding-left: 24px;
}

.menuItem.active {
    background: rgba(0,255,65,.15);
    border-left-color: var(--ok);
    color: var(--ok);
    box-shadow: inset 0 0 20px rgba(0,255,65,.1);
}

.menuItem.active i {
    text-shadow: 0 0 10px var(--ok);
}

.menuItem .badge {
    font-size: 9px;
    padding: 3px 7px;
}

.menuItemStatic {
    padding: 10px 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.menuItemStatic i {
    font-size: 14px;
}

.statusDot {
    color: var(--ok);
    animation: blink 2s infinite;
}

/* Sidebar Footer */
.sidebarFooter {
    padding: 16px;
    border-top: 2px solid var(--line);
    background: rgba(0,255,65,.03);
}

.logoutBtn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,0,81,.15);
    border-color: var(--danger);
    color: var(--danger);
}

.logoutBtn:hover {
    background: rgba(255,0,81,.25);
    box-shadow: 0 0 20px rgba(255,0,81,.4);
}

.mainContent {
    flex: 1;
    display: flex;
    min-height: 0;
    padding: 16px;
    gap: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,20,40,.3) 0%, rgba(0,0,0,.2) 100%);
    transition: margin-left 0.3s cubic-bezier(.4,0,.2,1);
}

.contentSection {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Panel - Cyberpunk */
.panel {
    background: rgba(0,0,0,.95);
    border: 2px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 12px;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--ok), transparent);
    animation: scanLine 3s linear infinite;
    border-radius: 12px 12px 0 0;
}

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

.panelHeader {
    padding: 14px 14px 12px;
    border-bottom: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(0,255,65,.03);
}

.panelHeader .title {
    font-weight: 800;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--ok);
}

/* Badge - Cyber Style */
.badge {
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(0,0,0,.8);
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge.ok {
    color: var(--ok);
    border-color: var(--ok);
    box-shadow: 0 0 10px rgba(0,255,65,.4);
    text-shadow: 0 0 5px var(--ok);
}

.badge.warn {
    color: var(--warn);
    border-color: var(--warn);
    box-shadow: 0 0 10px rgba(255,204,0,.4);
}

.badge.bad, .badge.bad2 {
    color: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 0 10px rgba(255,0,81,.4);
}

.badge.good {
    color: var(--ok);
    border-color: var(--ok);
    box-shadow: 0 0 10px rgba(0,255,65,.4);
}

.badge.wait {
    color: var(--warn);
    border-color: var(--warn);
    animation: pulse 1.5s infinite;
}

/* PC List Page */
.listTop {
    padding: 12px 14px 14px;
    border-bottom: 2px solid var(--line);
    background: rgba(0,255,65,.02);
}

.search { display: flex; gap: 10px; align-items: center; margin-top: 10px; }

/* Sort Bar - Cyberpunk */
.sortBar, .folderFilterBar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sortLabel {
    font-size: 11px;
    color: var(--ok);
    white-space: nowrap;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sortBtns { display: flex; gap: 6px; flex-wrap: wrap; }

.sortBtn {
    padding: 6px 12px;
    font-size: 11px;
    min-height: 32px;
    border: 2px solid var(--line);
    background: rgba(0,0,0,.8);
    color: var(--muted);
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sortBtn:hover {
    background: rgba(0,255,65,.1);
    color: var(--ok);
    border-color: var(--ok);
    box-shadow: 0 0 10px rgba(0,255,65,.3);
}

.sortBtn.active {
    background: rgba(0,255,65,.15);
    border-color: var(--ok);
    color: var(--ok);
    box-shadow: 0 0 15px rgba(0,255,65,.5);
}

/* Multi-Select Bar */
.multiSelectBar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0,255,65,.08);
    border-bottom: 2px solid var(--ok);
    flex-wrap: wrap;
    box-shadow: 0 0 20px rgba(0,255,65,.2);
}

.multiSelectBar button {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Clients List - Matrix Style */
.clientsList {
    padding: 10px;
    overflow: auto;
    flex: 1;
    min-height: 0;
}

.clientItem {
    padding: 12px;
    border: 2px solid transparent;
    background: rgba(0,255,65,.05);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}

.clientItem::before {
    content: '>';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ok);
    font-size: 20px;
    transition: left 0.3s ease;
}

.clientItem:hover::before {
    left: 5px;
}

.clientItem:hover {
    background: rgba(0,255,65,.1);
    border-color: var(--line);
    box-shadow: 0 0 15px rgba(0,255,65,.2);
}

.clientItem.active {
    border-color: var(--ok);
    background: var(--active);
    box-shadow: var(--glow);
}

.clientItem.selected {
    border-color: var(--ok);
    background: rgba(0,255,65,.12);
    box-shadow: 0 0 20px rgba(0,255,65,.3);
}

.clientItem.dragging {
    opacity: .5;
    border-style: dashed;
    border-color: var(--folder-accent);
}

.clientTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.clientTopRight {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.clientName {
    font-weight: 800;
    font-size: 15px;
    flex: 1;
    min-width: 0;
    letter-spacing: 1px;
    text-shadow: 0 0 5px var(--ok);
}

.clientMeta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.35;
}

/* Checkbox */
.clientCheckbox {
    cursor: pointer;
    font-size: 18px;
    color: var(--ok);
    transition: .15s;
    flex-shrink: 0;
}

.clientCheckbox.checked {
    color: var(--ok);
    text-shadow: var(--glow);
}

/* Folder tag */
.folderTag {
    font-size: 10px;
    padding: 3px 8px;
    background: rgba(0,255,255,.1);
    border: 1px solid var(--folder-accent);
    color: var(--folder-accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Move button */
.clientMoveBtn {
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: .6;
    transition: all .2s;
}

.clientMoveBtn:hover {
    opacity: 1;
    box-shadow: 0 0 10px rgba(0,255,65,.5);
}

/* PC Info Page */
.infoContent {
    padding: 20px;
    overflow: auto;
    flex: 1;
}

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

.infoCard {
    background: rgba(0,255,65,.05);
    border: 2px solid var(--line);
    padding: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.infoCard:hover {
    border-color: var(--ok);
    box-shadow: 0 0 20px rgba(0,255,65,.2);
}

.infoCardTitle {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ok);
    font-size: 14px;
    border-bottom: 2px solid var(--line);
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px var(--ok);
}

.infoRow {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,255,65,.1);
}

.infoRow:last-child { border-bottom: none; }

.infoLabel {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.infoValue {
    font-weight: 600;
    font-size: 12px;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
    color: var(--ok);
}

/* Chat Page - Cyberpunk */
.chatWrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.chatHeaderInfo {
    padding: 12px 14px;
    border-bottom: 2px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0,255,65,.03);
}

.chatHeaderLeft {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.chatHeaderRight {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.chatTitle {
    font-weight: 900;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 18px;
    text-shadow: 0 0 10px var(--ok);
}

.chatSub {
    color: var(--muted);
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pill {
    font-size: 10px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.8);
    color: var(--muted);
    display: inline-block;
    text-transform: uppercase;
}

.flagsRow { display: flex; flex-wrap: wrap; gap: 8px; }

.flag {
    font-size: 10px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.8);
    color: var(--muted);
    text-transform: uppercase;
}

.flag b { color: var(--ok); }

.chatBody {
    padding: 14px;
    overflow: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hint {
    padding: 14px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    background: rgba(0,255,65,.02);
}

.msgRow { display: flex; gap: 10px; }
.msgRow.me { justify-content: flex-end; }

.bubble {
    max-width: min(680px, 85%);
    background: rgba(0,255,65,.08);
    border: 2px solid var(--line);
    padding: 10px 12px;
    box-shadow: 0 0 15px rgba(0,255,65,.1);
}

.msgRow.me .bubble {
    background: rgba(0,255,65,.12);
    border-color: var(--ok);
    box-shadow: 0 0 20px rgba(0,255,65,.2);
}

.bubbleTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--muted);
    flex-wrap: wrap;
}

.sender {
    font-weight: 700;
    color: var(--ok);
    text-transform: uppercase;
}

.text {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.35;
    font-size: 14px;
}

.chatInputBar {
    padding: 12px 14px;
    border-top: 2px solid var(--line);
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(0,255,65,.03);
}

.chatInputBar input { flex: 1; padding: 12px 14px; }

/* Command Page - Terminal Style */
.cmdPanel {
    border-bottom: 2px solid var(--line);
    padding: 12px 14px;
    background: rgba(0,0,0,.95);
    max-height: 500px;
    overflow-y: auto;
}

.cmdTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.cmdTitle {
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--ok);
}

.cmdForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.cmdForm input, .cmdForm select { width: 100%; }

.cmdOut {
    border: 2px solid var(--ok);
    background: rgba(0,0,0,.95);
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: inset 0 0 20px rgba(0,255,65,.1);
}

.cmdOutTitle {
    font-size: 11px;
    color: var(--ok);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cmdOut pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--ok);
    text-shadow: 0 0 3px var(--ok);
}

.cmdForm select {
    padding: 12px 14px;
    border: 2px solid var(--line);
    background: rgba(0,0,0,.9);
    color: var(--ok);
    outline: none;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.cmdForm select:focus {
    border-color: var(--ok);
    box-shadow: 0 0 20px rgba(0,255,65,.4);
}

/* Stats - Cyber */
.statsRow {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.statCard {
    background: rgba(0,255,65,.05);
    border: 2px solid var(--line);
    padding: 12px;
    min-width: 120px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.statCard:hover {
    border-color: var(--ok);
    box-shadow: 0 0 20px rgba(0,255,65,.3);
}

.statValue {
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 5px;
    color: var(--ok);
    text-shadow: 0 0 15px var(--ok);
}

.statLabel {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Folders Page */
.folderPageContent {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.folderTreePanel {
    width: 340px;
    min-width: 220px;
    border-right: 2px solid var(--line);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.folderTreeHeader {
    padding: 10px 14px 8px;
    border-bottom: 2px solid var(--line);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ok);
}

.folderTree {
    overflow: auto;
    flex: 1;
    padding: 8px 0;
}

.folderClientsPanel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.folderClientsHeader {
    padding: 10px 14px 8px;
    border-bottom: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.folderClientsList {
    overflow: auto;
    flex: 1;
    padding: 10px;
}

/* Folder Tree Node */
.folderNode {
    user-select: none;
}

.folderNodeRow {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px 7px calc(14px + var(--depth, 0) * 18px);
    margin: 2px 6px;
    cursor: pointer;
    transition: all .2s ease;
    border: 2px solid transparent;
}

.folderNodeRow:hover {
    background: rgba(0,255,255,.1);
    border-color: var(--folder-accent);
}

.folderNodeRow.active {
    background: rgba(0,255,255,.08);
    border-color: var(--folder-accent);
    box-shadow: 0 0 15px rgba(0,255,255,.3);
}

.folderToggle {
    width: 18px;
    flex-shrink: 0;
    font-size: 10px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .15s;
}

.folderToggle.invisible { opacity: 0; pointer-events: none; }

.folderIcon {
    font-size: 14px;
    color: var(--folder-accent);
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px var(--folder-accent));
}

.folderNodeName {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 1px;
}

.folderCountBadge {
    font-size: 10px;
    padding: 2px 6px;
    flex-shrink: 0;
}

.folderActions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity .15s;
}

.folderNodeRow:hover .folderActions { opacity: 1; }

.folderActionBtn {
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border-color: transparent;
    background: rgba(0,255,65,.1);
}

.folderActionBtn:hover {
    background: rgba(0,255,65,.2);
    box-shadow: 0 0 10px rgba(0,255,65,.4);
}

.folderActionBtn.danger:hover {
    background: rgba(255,0,81,.2);
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: 0 0 10px rgba(255,0,81,.5);
}

/* Modal - Cyberpunk */
.modalOverlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modalCard {
    width: min(420px, 100%);
    background: rgba(0,0,0,.98);
    border: 2px solid var(--ok);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    animation: modalSlide 0.4s ease-out;
}

@keyframes modalSlide {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modalHeader {
    padding: 16px 18px 14px;
    border-bottom: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(0,255,65,.05);
}

.modalTitle {
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--ok);
}

.modalCloseBtn {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.modalBody {
    overflow-y: auto;
    flex: 1;
    padding: 10px 0;
}

.modalFolderList {
    display: flex;
    flex-direction: column;
}

.modalFolderItem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s ease;
    border-bottom: 1px solid rgba(0,255,65,.1);
}

.modalFolderItem:hover {
    background: rgba(0,255,255,.1);
    color: var(--folder-accent);
    border-color: var(--folder-accent);
    box-shadow: 0 0 15px rgba(0,255,255,.2);
}

.modalFolderItem i {
    color: var(--folder-accent);
    width: 16px;
    filter: drop-shadow(0 0 5px var(--folder-accent));
}

.modalFooter {
    padding: 12px 18px;
    border-top: 2px solid var(--line);
    display: flex;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: wrap;
    background: rgba(0,255,65,.05);
}

.modalFooter button {
    flex: 1;
    min-height: 40px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Mobile Menu Button - Hidden by default */
.mobileMenuBtn {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app {
        height: 100vh;
    }

    .sidebarExpandBtn {
        display: none !important;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 0 60px rgba(0,255,65,.4);
        border-right-width: 2px;
        overflow: visible;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 280px;
        overflow: visible;
        border-right-width: 2px;
    }

    .sidebar.collapsed .menuText,
    .sidebar.collapsed .logoText,
    .sidebar.collapsed .menuSectionTitle {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar.collapsed .menuItem,
    .sidebar.collapsed .menuItemStatic {
        justify-content: flex-start;
        opacity: 1;
    }

    .sidebar.collapsed .sidebarHeader,
    .sidebar.collapsed .sidebarFooter {
        opacity: 1;
        pointer-events: auto;
    }

    .mainContent {
        padding: 10px;
        margin-left: 0 !important;
        width: 100%;
    }

    /* Overlay when menu is open */
    .app::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,.85);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        backdrop-filter: blur(4px);
    }

    .app.menu-open::before {
        opacity: 1;
        pointer-events: auto;
    }

    .app.menu-open .sidebar {
        transform: translateX(0);
    }

    /* Floating menu button for mobile */
    .mobileMenuBtn {
        display: flex;
        position: fixed;
        bottom: 24px;
        right: 24px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--ok), rgba(0,255,65,.8));
        color: #000;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        z-index: 998;
        box-shadow: 0 0 30px rgba(0,255,65,.6), 0 4px 20px rgba(0,0,0,.4);
        border: 3px solid rgba(0,0,0,.3);
        cursor: pointer;
        transition: all 0.3s ease;
        animation: pulse 2s infinite;
    }

    .mobileMenuBtn:hover {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(0,255,65,.8), 0 6px 25px rgba(0,0,0,.5);
    }

    .mobileMenuBtn:active {
        transform: scale(0.95);
    }

    .app.menu-open .mobileMenuBtn i {
        transform: rotate(90deg);
    }

    .mobileMenuBtn i {
        transition: transform 0.3s ease;
    }

    input { padding: 10px 12px; font-size: 15px; }
    button { padding: 10px 12px; font-size: 12px; min-height: 40px; }
    .badge { font-size: 10px; padding: 3px 8px; }

    .infoGrid { grid-template-columns: 1fr; }
    .infoCard { padding: 12px; }

    .clientItem { padding: 10px; margin-bottom: 8px; }
    .clientName { font-size: 14px; }
    .clientMeta { font-size: 11px; }

    .chatBody { padding: 10px; }
    .bubble { padding: 8px 10px; }
    .text { font-size: 13px; }

    .cmdPanel { padding: 10px; max-height: 400px; }
    .cmdOut { max-height: 250px; }

    .statsRow { gap: 10px; }
    .statCard { min-width: 100px; padding: 10px; }
    .statValue { font-size: 24px; }

    .folderPageContent { flex-direction: column; }
    .folderTreePanel { width: 100%; max-height: 220px; border-right: none; border-bottom: 2px solid var(--line); }
    .folderClientsPanel { flex: 1; }

    .sortBar, .folderFilterBar { gap: 6px; }
    .sortBtn { padding: 5px 8px; font-size: 10px; }

    .multiSelectBar { padding: 6px 10px; }
    .multiSelectBar button { font-size: 11px; min-height: 32px; padding: 6px 10px; }
}

@media (max-width: 480px) {
    .mainContent { padding: 5px; }
    .menuItem { padding: 12px 8px; font-size: 11px; }
    button { padding: 8px 10px; font-size: 11px; min-height: 36px; }
    .panelHeader { padding: 10px; }
    .infoContent { padding: 10px; }
    .statCard { min-width: 80px; padding: 8px; }
    .statValue { font-size: 20px; }
    .folderNodeRow { padding: 6px 10px 6px calc(10px + var(--depth,0) * 14px); }
}

/* Animations */
.contentSection {
    animation: fadeInContent 0.4s ease;
}

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

/* Scrollbar - Cyberpunk */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,.5);
    border-left: 1px solid var(--line);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ok), rgba(0,255,65,.6));
    box-shadow: 0 0 10px var(--ok);
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,.5);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
    box-shadow: 0 0 20px var(--text-secondary);
}

::-webkit-scrollbar-corner {
    background: rgba(0,0,0,.5);
}

/* Tooltips */
[title] {
    position: relative;
}

button:hover[title]::after,
.menuItem:hover[title]::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 6px 12px;
    background: rgba(0,0,0,.95);
    border: 1px solid var(--ok);
    color: var(--ok);
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
    box-shadow: 0 0 15px rgba(0,255,65,.3);
}

/* Selection */
::selection {
    background: rgba(0,255,65,.3);
    color: var(--text);
    text-shadow: 0 0 10px var(--ok);
}

/* Glitch Effect for Headers */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.panel:hover .panelHeader .title {
    animation: glitch 0.3s;
}
