/* ============================================
   BROK Full System GUI - Extended Styles
   ============================================ */

/* Full System Layout */
body.full-system {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #050508;
}

/* Top Bar */
.gui-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(180deg, #111118 0%, #0a0a0f 100%);
    border-bottom: 1px solid rgba(6, 214, 214, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gui-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.gui-logo .logo-icon {
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.gui-logo .logo-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-brok);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
}

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

.status-dot.online {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.workspace-tabs {
    display: flex;
    gap: 4px;
}

.workspace-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.workspace-tab.active {
    background: rgba(6, 214, 214, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.workspace-tab.add-tab {
    padding: 8px 12px;
    color: var(--text-muted);
}

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

.topbar-btn {
    position: relative;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--accent-orange);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    cursor: pointer;
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--gradient-brok);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-name {
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Main Container */
.gui-full-container {
    display: flex;
    height: calc(100vh - 50px);
    margin-top: 50px;
}

/* Left Sidebar */
.gui-sidebar {
    width: 70px;
    background: linear-gradient(180deg, #0d0d12 0%, #08080c 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
}

.sidebar-modes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.sidebar-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.sidebar-mode:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.sidebar-mode.active {
    background: rgba(6, 214, 214, 0.15);
    color: var(--accent-cyan);
}

.sidebar-mode .mode-icon {
    font-size: 1.3rem;
}

.sidebar-mode .mode-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.gui-content {
    flex: 1;
    overflow: hidden;
    background: #0a0a0f;
}

/* Mode Panels */
.mode-panel {
    display: none;
    height: 100%;
    flex-direction: column;
}

.mode-panel.active {
    display: flex;
}

/* Panel Header Bar */
.panel-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.header-left h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.header-badge {
    padding: 4px 10px;
    background: rgba(123, 44, 191, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--accent-purple);
}

.header-badge.live {
    background: rgba(74, 222, 128, 0.2);
    color: var(--accent-green);
}

.header-badge.cnc-badge {
    background: rgba(6, 214, 214, 0.2);
    color: var(--accent-cyan);
}

.header-badge.cnc-badge.idle {
    background: rgba(74, 222, 128, 0.2);
    color: var(--accent-green);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-select,
.language-select {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.header-btn {
    padding: 8px 16px;
    background: rgba(6, 214, 214, 0.1);
    border: 1px solid rgba(6, 214, 214, 0.3);
    border-radius: 6px;
    color: var(--accent-cyan);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.header-btn:hover {
    background: rgba(6, 214, 214, 0.2);
}

.header-btn.danger {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

/* Chat Mode */
.chat-main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-avatar {
    font-size: 4rem;
    color: var(--accent-cyan);
    margin-bottom: 16px;
}

.welcome-message h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 12px;
    background: var(--gradient-brok);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-message p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.welcome-capabilities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.cap-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cap-item span {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--accent-cyan);
}

.welcome-prompt {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.chat-input-area {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.input-attachments {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.attach-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.attach-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.main-chat-form {
    display: flex;
    gap: 12px;
}

.main-chat-form textarea {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    resize: none;
    min-height: 50px;
    max-height: 150px;
}

.main-chat-form textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.send-btn-main {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--gradient-brok);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn-main:hover {
    transform: scale(1.02);
}

.key-hint {
    font-size: 0.75rem;
    opacity: 0.7;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Code Mode */
.code-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    overflow: hidden;
}

.code-sidebar {
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.code-files h4,
.code-actions h4 {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.file-tree {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.file-item.active {
    background: rgba(6, 214, 214, 0.1);
    color: var(--accent-cyan);
}

.new-file-btn {
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.action-btn-code {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 6px;
    background: rgba(123, 44, 191, 0.1);
    border: 1px solid rgba(123, 44, 191, 0.2);
    border-radius: 6px;
    color: var(--accent-purple);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.action-btn-code:hover {
    background: rgba(123, 44, 191, 0.2);
}

.code-editor-area {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-tab.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.close-tab {
    opacity: 0.5;
}

.code-editor {
    flex: 1;
    overflow: auto;
    background: #0d0d12;
    font-family: 'JetBrains Mono', monospace;
}

.code-content {
    padding: 16px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.line-number {
    display: inline-block;
    width: 30px;
    color: var(--text-muted);
    user-select: none;
}

.keyword { color: #c678dd; }
.module { color: #e5c07b; }
.function { color: #61afef; }
.string { color: #98c379; }
.comment { color: #5c6370; font-style: italic; }
.variable { color: #e06c75; }
.type { color: #56b6c2; }

.code-output {
    height: 120px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.output-header {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.clear-output {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
}

.output-content {
    flex: 1;
    padding: 12px;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    overflow: auto;
}

.code-chat {
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.code-chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-chat-header h4 {
    font-size: 0.9rem;
    margin: 0;
}

.code-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.code-assistant-msg {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.code-assistant-msg ul {
    margin: 8px 0;
    padding-left: 16px;
}

.code-assistant-msg li {
    margin-bottom: 4px;
}

.code-chat-input {
    display: flex;
    padding: 12px;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.code-chat-input input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
}

.code-chat-input button {
    padding: 10px 16px;
    background: var(--accent-cyan);
    border: none;
    border-radius: 6px;
    color: #0a0a0a;
    font-weight: 600;
    cursor: pointer;
}

/* Image/Video Mode */
.image-workspace,
.video-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 350px 1fr;
    overflow: hidden;
}

.image-controls,
.video-controls {
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    overflow-y: auto;
}

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

.prompt-section label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.prompt-section textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-family: var(--font-body);
    resize: vertical;
}

.image-settings,
.video-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.setting-group select,
.setting-group input[type="number"] {
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}

.setting-group input[type="range"] {
    width: 100%;
    accent-color: var(--accent-cyan);
}

.image-actions,
.video-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--gradient-brok);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.generate-btn:hover {
    transform: scale(1.02);
}

.generate-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.generate-btn.small {
    padding: 10px 16px;
    font-size: 0.9rem;
}

.video-source {
    margin-bottom: 20px;
}

.video-source h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.source-options {
    display: flex;
    gap: 10px;
}

.source-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
}

.source-btn span {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.image-preview-area,
.video-preview-area {
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}

.preview-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.placeholder-content {
    text-align: center;
    padding: 40px;
}

.placeholder-icon {
    font-size: 4rem;
    color: var(--text-muted);
    opacity: 0.3;
}

.placeholder-content h3 {
    margin: 16px 0 8px;
    font-size: 1.2rem;
}

.placeholder-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.placeholder-content .note {
    font-size: 0.8rem;
    margin-top: 8px;
    opacity: 0.7;
}

.image-history {
    margin-top: 20px;
}

.image-history h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.history-item {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Design Mode */
.design-workspace-full {
    flex: 1;
    display: grid;
    grid-template-columns: 50px 1fr 250px;
    overflow: hidden;
}

.design-toolbar {
    background: rgba(0, 0, 0, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-btn-design {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.tool-btn-design:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.tool-btn-design.active {
    background: rgba(6, 214, 214, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.tool-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.design-canvas-area {
    background: #0d0d12;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.canvas-container {
    width: 80%;
    height: 80%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.canvas-placeholder-msg {
    text-align: center;
    z-index: 1;
}

.canvas-placeholder-msg span {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.3;
}

.canvas-placeholder-msg p {
    color: var(--text-muted);
}

.canvas-placeholder-msg .small {
    font-size: 0.85rem;
    opacity: 0.7;
}

.design-properties {
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    overflow-y: auto;
}

.design-properties h4 {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.prop-group {
    margin-bottom: 12px;
}

.prop-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.prop-group input,
.prop-group select {
    width: 100%;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}

.design-properties hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

.ai-design-section textarea {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    margin-bottom: 10px;
    resize: vertical;
}

/* CNC Mode */
.cnc-workspace-full {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 320px;
    overflow: hidden;
}

.cnc-main-display {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.cnc-position-display {
    display: flex;
    gap: 20px;
}

.position-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.axis-label {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.axis-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.cnc-visualizer {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.visualizer-placeholder {
    width: 90%;
    height: 90%;
    position: relative;
}

.table-outline {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(6, 214, 214, 0.3);
    border-radius: 8px;
    position: relative;
    background: linear-gradient(135deg, rgba(6, 214, 214, 0.05), transparent);
}

.table-size {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.torch-position {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 12px;
    height: 12px;
    background: var(--accent-orange);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-orange);
}

.cnc-jog-controls {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 20px;
}

.cnc-jog-controls h4 {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.jog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 200px;
    margin: 0 auto 16px;
}

.jog-btn {
    padding: 16px;
    background: rgba(6, 214, 214, 0.1);
    border: 1px solid rgba(6, 214, 214, 0.3);
    border-radius: 8px;
    color: var(--accent-cyan);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.jog-btn:nth-child(1) { grid-column: 2; }
.jog-btn:nth-child(5) { grid-column: 2; }

.jog-btn:hover {
    background: rgba(6, 214, 214, 0.2);
}

.jog-btn.home {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
    color: var(--accent-orange);
}

.jog-speed {
    text-align: center;
}

.jog-speed label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 10px;
}

.jog-speed select {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
}

.cnc-side-panel {
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.cnc-status-panel h4,
.gcode-panel h4 {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.status-item {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.status-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.status-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
}

.status-val.idle {
    color: var(--accent-green);
}

.status-val.off {
    color: var(--text-muted);
}

.gcode-info {
    margin-bottom: 12px;
}

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

.gcode-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.cnc-action-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.gcode-preview {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 12px;
    max-height: 150px;
    overflow: auto;
}

.gcode-preview pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cnc-run-controls {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.run-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.run-btn.start {
    background: var(--accent-green);
    color: #0a0a0a;
}

.run-btn.pause {
    background: var(--accent-orange);
    color: #0a0a0a;
}

.run-btn.stop {
    background: #dc3545;
    color: white;
}

/* Research Mode */
.research-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.research-input-section {
    max-width: 800px;
}

.research-input-section textarea {
    width: 100%;
    padding: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    margin-bottom: 12px;
}

.research-options {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.research-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.research-results {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-placeholder {
    text-align: center;
}

/* Files Mode */
.files-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 220px 1fr;
    overflow: hidden;
}

.files-sidebar {
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.storage-locations {
    flex: 1;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    transition: var(--transition);
}

.location-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.location-item.active {
    background: rgba(6, 214, 214, 0.1);
    color: var(--accent-cyan);
}

.storage-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.storage-info h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.storage-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.storage-used {
    height: 100%;
    background: var(--gradient-brok);
}

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

.files-main {
    padding: 20px;
    overflow-y: auto;
}

.files-breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.files-breadcrumb span {
    cursor: pointer;
}

.files-breadcrumb span:hover {
    color: var(--accent-cyan);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.file-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.file-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.file-card.folder {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.file-card .file-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.file-card .file-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    word-break: break-all;
}

/* Terminal Mode */
.terminal-workspace {
    flex: 1;
    padding: 0;
    display: flex;
}

.terminal-container {
    flex: 1;
    background: #0a0a0a;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.terminal-line.blank {
    height: 1em;
}

.term-prompt {
    color: var(--accent-cyan);
    margin-right: 8px;
}

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

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    outline: none;
}

/* Admin Mode */
.admin-workspace-full {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-stat-card .stat-icon {
    font-size: 2rem;
    color: var(--accent-cyan);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-info .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.admin-section h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--accent-cyan);
}

.service-control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.service-control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.svc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.svc-name {
    font-size: 0.9rem;
}

.svc-status {
    font-size: 0.75rem;
}

.svc-status.online {
    color: var(--accent-green);
}

.svc-btn {
    padding: 6px 12px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 6px;
    color: var(--accent-orange);
    font-size: 0.75rem;
    cursor: pointer;
}

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

.order-item {
    display: grid;
    grid-template-columns: 60px 1fr auto 80px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.order-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

.order-desc {
    font-size: 0.9rem;
}

.order-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.order-status.pending {
    background: rgba(255, 107, 53, 0.2);
    color: var(--accent-orange);
}

.order-status.progress {
    background: rgba(6, 214, 214, 0.2);
    color: var(--accent-cyan);
}

.order-status.complete {
    background: rgba(74, 222, 128, 0.2);
    color: var(--accent-green);
}

.order-amount {
    font-weight: 600;
    text-align: right;
}

/* System Status Mode */
.system-workspace {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.system-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

.system-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.system-card h4 {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    margin-bottom: 16px;
}

.gpu-card-full {
    grid-row: span 2;
}

.gpu-list-full {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gpu-item-full {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 3px solid var(--accent-cyan);
}

.gpu-header-full {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.gpu-header-full .gpu-name {
    font-weight: 600;
}

.gpu-temp {
    color: var(--accent-green);
}

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

.bar-group {
    display: grid;
    grid-template-columns: 70px 1fr 100px;
    gap: 10px;
    align-items: center;
}

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

.bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--gradient-ai);
    border-radius: 4px;
}

.bar-fill.compute {
    background: var(--gradient-metal);
}

.bar-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

.gpu-model-info {
    font-size: 0.8rem;
    color: var(--accent-purple);
}

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

.svc-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-size: 0.85rem;
}

.svc-stat {
    font-family: 'JetBrains Mono', monospace;
}

.svc-stat.online {
    color: var(--accent-green);
}

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

.storage-drive {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.storage-drive span:first-child {
    font-size: 0.85rem;
}

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

.storage-fill {
    height: 100%;
    background: var(--gradient-ai);
}

.storage-drive span:last-child {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.network-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.net-stat {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.net-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.net-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    .code-workspace {
        grid-template-columns: 180px 1fr;
    }

    .code-chat {
        display: none;
    }

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

    .gpu-card-full {
        grid-column: span 2;
        grid-row: span 1;
    }

    .admin-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .gui-sidebar {
        width: 56px;
    }

    .sidebar-mode .mode-label {
        display: none;
    }

    .image-workspace,
    .video-workspace {
        grid-template-columns: 1fr;
    }

    .image-controls,
    .video-controls {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* Utility */
.hidden {
    display: none !important;
}
