/* Remote Control MDM — Operator Console — Datamob Design System */

/* Font Faces */
@font-face { font-family: 'Ubuntu'; font-weight: 300; src: url('/fonts/ubuntu-300.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Ubuntu'; font-weight: 400; src: url('/fonts/ubuntu-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Ubuntu'; font-weight: 500; src: url('/fonts/ubuntu-500.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Ubuntu'; font-weight: 700; src: url('/fonts/ubuntu-700.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; src: url('/fonts/jetbrains-mono-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; src: url('/fonts/jetbrains-mono-700.woff2') format('woff2'); font-display: swap; }

:root {
  --bg-primary: #0b1219;
  --bg-secondary: #111a24;
  --bg-card: #192530;
  --bg-input: #1e2d3c;
  --bg-hover: #243648;
  --text-primary: #e2e8f0;
  --text-secondary: #7a8a9e;
  --text-muted: #4e6478;
  --accent: #17b89b;
  --accent-hover: #1ed4b3;
  --accent-dim: rgba(23, 184, 155, 0.15);
  --accent-blue: #4694d0;
  --accent-lilac: #ad7cb7;
  --success: #17b89b;
  --warning: #f0a030;
  --danger: #e05555;
  --border: rgba(255,255,255,0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Layout */
.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}

.header-brand svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.header-info {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.card-sm { max-width: 400px; width: 100%; }

.card-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Ubuntu', sans-serif;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Ubuntu', sans-serif;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
  color: #fff;
}

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

.btn-primary {
  background: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: #c94444;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-icon {
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
}

.btn-icon:active {
  background: var(--accent-dim);
}

/* Alerts */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.alert-error {
  background: rgba(224, 85, 85, 0.15);
  color: var(--danger);
  border: 1px solid rgba(224, 85, 85, 0.3);
}

.alert-success {
  background: rgba(23, 184, 155, 0.15);
  color: var(--success);
  border: 1px solid rgba(23, 184, 155, 0.3);
}

.alert-warning {
  background: rgba(240, 160, 48, 0.15);
  color: var(--warning);
  border: 1px solid rgba(240, 160, 48, 0.3);
}

.alert.visible { display: block; }

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }

tr.clickable {
  cursor: pointer;
  transition: background var(--transition);
}

tr.clickable:hover {
  background: var(--bg-hover);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-online {
  background: rgba(23, 184, 155, 0.15);
  color: #17b89b;
}

.badge-offline {
  background: rgba(224, 85, 85, 0.15);
  color: var(--danger);
}

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

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Toolbar (devices page) */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.toolbar-title {
  font-size: 20px;
  font-weight: 600;
}

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

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .header { flex-wrap: wrap; gap: 8px; }
  .info-panel { width: 0; border-left: none; }
  .info-panel.collapsed .panel-toggle { display: flex; }
}

/* ============================================
   Session page — Layout C
   ============================================ */

.session-body {
  background: #0b1219;
  overflow: hidden;
}

.session-layout-c {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* --- LEFT TOOLBAR --- */
.session-toolbar {
  width: 72px;
  background: #0b1219;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 4px;
  flex-shrink: 0;
  z-index: 10;
}

.tool-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #152130;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #7a8a9e;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.tool-btn:hover {
  background: #1e2d3c;
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 0 16px rgba(23, 184, 155, 0.15);
}

.tool-btn:active {
  transform: scale(0.92);
}

.tool-btn-danger {
  border-color: rgba(224, 85, 85, 0.3);
}

.tool-btn-danger:hover {
  background: rgba(224, 85, 85, 0.1);
  color: #e05555;
  border-color: #e05555;
  box-shadow: 0 0 16px rgba(224, 85, 85, 0.15);
}

/* Tooltip */
.tool-btn[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: #192530;
  color: #e2e8f0;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  border: 1px solid rgba(255,255,255,0.12);
}

.tool-separator {
  width: 36px;
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}

/* --- CENTER: PHONE MOCKUP --- */
.phone-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.phone-frame {
  position: relative;
  width: 330px;
  padding: 18px 15px 10px 15px;
  background: linear-gradient(145deg, #192530, #111a24);
  border: 3px solid rgba(255,255,255,0.1);
  border-radius: 36px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.03);
}

/* Camera notch */
.phone-notch {
  width: 80px;
  height: 6px;
  background: #111a24;
  border-radius: 3px;
  margin: 0 auto 10px auto;
}

/* Screen */
.phone-screen {
  position: relative;
  width: 300px;
  height: 540px;
  background: #0b1219;
  border-radius: 22px;
  overflow: hidden;
}

.phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: crosshair;
  display: block;
}

.phone-screen .video-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(0,0,0,0.6);
}

.phone-screen .video-overlay-text {
  color: #7a8a9e;
  font-size: 14px;
  text-align: center;
}

/* Chin */
.phone-chin {
  height: 10px;
}

/* Screen ripple */
.screen-ripple {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(23, 184, 155, 0.35);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  opacity: 0;
}

.screen-ripple.active {
  animation: ripple-anim 0.4s ease-out forwards;
}

@keyframes ripple-anim {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* --- HARDWARE BUTTONS --- */
.hw-btn {
  position: absolute;
  width: 4px;
  background: linear-gradient(to right, #2a3f53, #1e2d3c);
  border-radius: 2px 0 0 2px;
  cursor: pointer;
  transition: all 100ms ease;
  z-index: 5;
}

.hw-btn:hover {
  background: linear-gradient(to right, #3a5060, #2a3f53);
}

/* Volume buttons — left side */
.hw-vol-up {
  left: -7px;
  top: 100px;
  height: 40px;
  border-radius: 2px 0 0 2px;
}

.hw-vol-down {
  left: -7px;
  top: 144px;
  height: 40px;
  border-radius: 2px 0 0 2px;
}

.hw-vol-up:active, .hw-vol-down:active {
  transform: translateX(2px);
  box-shadow: inset 2px 0 4px rgba(0,0,0,0.4);
}

/* Power button — right side */
.hw-power {
  right: -7px;
  top: 120px;
  height: 48px;
  width: 4px;
  background: linear-gradient(to left, #2a3f53, #1e2d3c);
  border-radius: 0 2px 2px 0;
}

.hw-power:hover {
  background: linear-gradient(to left, #3a5060, #2a3f53);
}

.hw-power:active {
  transform: translateX(-2px);
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.4);
}

/* --- NAVIGATION BAR --- */
.phone-navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 16px;
}

.nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #111a24;
  border: 2px solid rgba(255,255,255,0.12);
  color: #7a8a9e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover {
  background: #1e2d3c;
  border-color: rgba(255,255,255,0.2);
  color: #e2e8f0;
}

.nav-btn:active {
  transform: scale(0.88);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}

/* --- RIGHT INFO PANEL --- */
.info-panel {
  width: 300px;
  background: #0b1219;
  border-left: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  position: relative;
  transition: width 250ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.info-panel.collapsed {
  width: 0;
  border-left: none;
}

.panel-toggle {
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 48px;
  background: #152130;
  border: 1px solid rgba(255,255,255,0.1);
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: #4e6478;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-toggle:hover {
  color: #7a8a9e;
}

.info-panel.collapsed .panel-toggle {
  left: auto;
  right: 0;
  border-radius: 6px 0 0 6px;
}

.info-panel.collapsed .panel-toggle svg {
  transform: rotate(180deg);
}

/* Inner wrapper: full column layout */
.panel-inner {
  display: flex;
  flex-direction: column;
  width: 300px;
  height: 100%;
  min-height: 0;
}

.panel-tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.panel-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Ubuntu', sans-serif;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.panel-tab:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.02);
}

.panel-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Scrollable content area between tabs and footer */
.panel-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.panel-scroll::-webkit-scrollbar {
  width: 4px;
}

.panel-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.panel-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.panel-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Pinned footer */
.panel-footer {
  flex-shrink: 0;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #0b1219;
}

.panel-app-search {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12px;
  font-family: 'Ubuntu', sans-serif;
  outline: none;
  margin-bottom: 6px;
}
.panel-app-search:focus { border-color: var(--accent); }

.panel-app-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}
.panel-app-toggle input { width: 14px; height: 14px; }

.panel-app-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.panel-app-item {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  cursor: default;
}
.panel-app-item:hover { background: var(--bg-hover); }
.panel-app-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-app-pkg {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-app-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.panel-app-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}
.panel-app-badge-sys { background: rgba(100,100,100,0.3); color: #7a8a9e; }
.panel-app-badge-size { background: rgba(23,184,155,0.1); color: var(--accent); }
.panel-app-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.panel-app-btn {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
}
.panel-app-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.panel-app-btn-danger { border-color: rgba(224,85,85,0.3); color: var(--danger); }
.panel-app-btn-danger:hover { background: rgba(224,85,85,0.1); }
.panel-app-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.panel-app-count {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}
.panel-app-loadmore {
  display: block;
  width: calc(100% - 28px);
  margin: 8px 14px;
  padding: 10px;
  background: rgba(23, 184, 155, 0.1);
  border: 1px solid rgba(23, 184, 155, 0.25);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.panel-app-loadmore:hover {
  background: var(--bg-hover);
}

.panel-apps-header {
  position: sticky;
  top: 0;
  background: #0b1219;
  z-index: 2;
}

.panel-section {
  padding: 10px 14px;
}

.panel-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.panel-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #17b89b;
  margin-bottom: 6px;
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.panel-label {
  font-size: 11px;
  color: #4e6478;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.panel-value {
  font-size: 12px;
  color: #e2e8f0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.panel-value-mono {
  font-size: 16px;
  font-family: 'JetBrains Mono', monospace;
  color: #e2e8f0;
  letter-spacing: 1px;
}

/* Connection dot (shared) */
.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.conn-dot.connecting { background: #4694d0; animation: pulse 1.5s infinite; }
.conn-dot.waking { background: #f0a030; animation: pulse 1.5s infinite; }
.conn-dot.connected { background: #17b89b; }
.conn-dot.disconnected { background: #e05555; }
.conn-dot.failed { background: #e05555; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Battery bar */
.battery-bar {
  width: 100%;
  height: 6px;
  background: #152130;
  border-radius: 3px;
  overflow: hidden;
}

.battery-fill {
  height: 100%;
  background: #17b89b;
  border-radius: 3px;
  transition: width 500ms ease;
}

/* Panel text input */
.panel-text-input {
  display: flex;
  gap: 6px;
}

.panel-text-input input {
  flex: 1;
  padding: 6px 8px;
  background: #152130;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12px;
  font-family: 'Ubuntu', sans-serif;
  outline: none;
  min-width: 0;
}

.panel-text-input input:focus {
  border-color: #17b89b;
}

.panel-send-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #152130;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #7a8a9e;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-send-btn:hover {
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.15);
}

.panel-back-link {
  display: block;
  text-align: center;
  margin-top: 6px;
  font-size: 11px;
  color: #4e6478;
}

.panel-back-link:hover {
  color: #7a8a9e;
}

/* --- FEEDBACK TOAST --- */
.feedback-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e2d3c;
  color: #e2e8f0;
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  opacity: 0;
  pointer-events: none;
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.feedback-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- ACTIVE TOOLBAR BUTTON --- */
.tool-btn-active {
  background: rgba(23, 184, 155, 0.2) !important;
  border-color: #17b89b !important;
  color: #17b89b !important;
  box-shadow: 0 0 20px rgba(23, 184, 155, 0.3) !important;
}

/* --- COMMAND MODAL / DRAWER --- */
.cmd-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.cmd-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 680px;
  max-width: 90vw;
  max-height: 80vh;
  background: #0b1219;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  z-index: 510;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1), transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cmd-modal.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.cmd-modal-sm {
  width: 420px;
}

.cmd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cmd-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}

.cmd-modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #7a8a9e;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-modal-close:hover {
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.15);
}

.cmd-modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.cmd-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: #7a8a9e;
  font-size: 14px;
}

.cmd-empty {
  text-align: center;
  padding: 40px 20px;
  color: #4e6478;
  font-size: 14px;
}

/* Command modal table */
.cmd-table {
  width: 100%;
  border-collapse: collapse;
}

.cmd-table th {
  text-align: left;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4e6478;
  background: #111a24;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cmd-table td {
  padding: 8px 14px;
  font-size: 13px;
  color: #e2e8f0;
  border-bottom: 1px solid #152130;
}

.cmd-table tr:hover td {
  background: #152130;
}

.cmd-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* --- SYSTEM STATS --- */
.sys-stats {
  padding: 16px;
}

.sys-section {
  margin-bottom: 18px;
}

.sys-section:last-child {
  margin-bottom: 0;
}

.sys-bar-wrap {
  margin-bottom: 8px;
}

.sys-bar-label {
  font-size: 12px;
  color: #7a8a9e;
  margin-bottom: 4px;
}

.sys-bar {
  width: 100%;
  height: 8px;
  background: #152130;
  border-radius: 4px;
  overflow: hidden;
}

.sys-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 500ms ease;
}

.sys-value {
  font-size: 20px;
  font-weight: 600;
  color: #e2e8f0;
}

/* --- VIRTUAL KEYBOARD PANEL --- */
.vkb-panel {
  position: fixed;
  bottom: 0;
  left: 72px;
  right: 300px;
  background: #0b1219;
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 200;
}

.vkb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  font-size: 12px;
  color: #7a8a9e;
  border-bottom: 1px solid #152130;
}
