/* OmniControl Remote Support - Modern Styling */
:root {
  --bg-dark: #090d16;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.3);
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.3);
  --danger: #ef4444;
  --warning: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  --panel-bg: #0f172a;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 45%);
}

/* Header & Navbar */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 1.25rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-card-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo-badge-container {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.company-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1); /* White logo for dark theme */
  transition: filter 0.3s ease;
}

.logo-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
}

.sub-service-tag {
  display: flex;
  flex-direction: column;
}

.sub-service-tag h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.1;
}

.sub-service-tag span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  background: rgba(30, 41, 59, 0.6);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-card-border);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Container & Layout */
/* Container & Layout */
.app-container {
  padding: 0.5rem 1rem;
  max-width: 100%;
  height: calc(100vh - 54px);
  box-sizing: border-box;
  overflow: hidden;
}

.view-section {
  display: none;
  height: 100%;
}

.view-section.active {
  display: block;
  height: 100%;
}

/* Grid Layout for Technician Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 0.75rem;
  height: 100%;
  box-sizing: border-box;
}

/* Sidebar Panel */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  overflow: hidden;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pin-generator {
  text-align: center;
  padding: 1rem 0;
}

.pin-display {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.35rem;
  font-family: monospace;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.4);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  margin: 0.75rem 0;
  user-select: all;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent), #059669);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  width: auto;
}

/* Device List */
.device-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
}

.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.device-item:hover, .device-item.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
}

.device-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.os-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.device-details h4 {
  font-size: 0.875rem;
  font-weight: 600;
}

.device-details p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Viewer Workspace */
.viewer-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  position: relative;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

/* Remote Control Toolbar */
.remote-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-card-border);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tool-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tool-icon-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Canvas Viewport */
.screen-viewport-container {
  flex: 1;
  background: #000;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

#remoteCanvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: crosshair;
}

.viewport-overlay-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2rem 2.5rem;
  border-radius: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  z-index: 10;
  max-width: 440px;
}

.drawing-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.drawing-canvas.active {
  pointer-events: auto;
}

/* Bottom Tabbed Tools Panel */
.tools-panel-container {
  height: 165px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-card-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tools-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--bg-card-border);
}

.tool-tab {
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tool-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.tools-content {
  flex: 1;
  padding: 0.85rem;
  overflow-y: auto;
}

.sub-panel {
  display: none;
  height: 100%;
}

.sub-panel.active {
  display: flex;
  flex-direction: column;
}

/* Chat Panel */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.chat-msg {
  max-width: 75%;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.3;
}

.chat-msg.tech {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-msg.client {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.chat-input:focus {
  border-color: var(--primary);
}

/* Terminal Console */
.terminal-box {
  background: #000;
  font-family: 'Fira Code', 'Courier New', monospace;
  color: #10b981;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  flex: 1;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.4;
}

.term-input-row {
  display: flex;
  align-items: center;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
}

.term-prompt {
  color: #6366f1;
  font-family: monospace;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

.term-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: monospace;
  width: 100%;
  outline: none;
  font-size: 0.85rem;
}

/* System Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  padding: 0.75rem;
  border-radius: var(--radius-md);
}

.metric-header {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 0.3s ease;
}

/* Client Join View */
.client-join-wrapper {
  max-width: 580px;
  margin: 3rem auto;
}

.join-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.join-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1.5rem auto;
}

.pin-input-group {
  margin: 1.5rem 0;
}

.pin-input {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.5rem;
  text-align: center;
  width: 240px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: #fff;
  outline: none;
  transition: border 0.2s ease;
}

.pin-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.download-options {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-card-border);
}

.download-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.download-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.download-box h5 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.download-box p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* File Transfer List */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.modal-box {
  background: var(--panel-bg);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 90%;
  max-width: 550px;
}

/* ========== LIGHT THEME ========== */
body.light-theme {
  --bg-dark: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-border: rgba(0, 0, 0, 0.1);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-dark: #94a3b8;
  --panel-bg: #e2e8f0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 45%);
}

body.light-theme header {
  background: rgba(241, 245, 249, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.light-theme .modal-overlay { background: rgba(0, 0, 0, 0.3); }
body.light-theme .modal-box { background: #ffffff; border-color: rgba(0, 0, 0, 0.1); }
body.light-theme .remote-toolbar { background: rgba(255, 255, 255, 0.9); border-color: rgba(0, 0, 0, 0.08); }
body.light-theme .tool-icon-btn { background: rgba(0, 0, 0, 0.06); color: #334155; border-color: rgba(0, 0, 0, 0.1); }
body.light-theme .tool-icon-btn:hover { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
body.light-theme .tools-nav { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.08); }
body.light-theme .tool-tab { color: #64748b; }
body.light-theme .tool-tab.active { color: #6366f1; border-bottom-color: #6366f1; }
body.light-theme .chat-input, body.light-theme .term-input { background: #f1f5f9; color: #1e293b; border-color: rgba(0,0,0,0.12); }
body.light-theme .terminal-box { background: #1e293b; }
body.light-theme .company-logo-img { filter: none; }
body.light-theme .logo-badge-container { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
body.light-theme .logo-divider { background: rgba(0,0,0,0.15); }
body.light-theme .badge-status { background: rgba(16, 185, 129, 0.12); color: #059669; }

/* ========== MULTI-SESSION THUMBNAILS ========== */
.session-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.session-thumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.session-thumb:hover { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.3); }
.session-thumb.active { background: rgba(99, 102, 241, 0.15); border-color: var(--primary); }

.session-thumb canvas {
  width: 80px;
  height: 45px;
  border-radius: 4px;
  background: #000;
  flex-shrink: 0;
}

.session-thumb-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.session-thumb-info .thumb-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-thumb-info .thumb-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ========== SESSION HISTORY ========== */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 280px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  transition: background 0.15s ease;
}

.history-item:hover { background: rgba(255, 255, 255, 0.06); }

.history-item .history-info { display: flex; flex-direction: column; gap: 0.1rem; }
.history-item .history-os { font-weight: 600; color: var(--text-main); }
.history-item .history-time { font-size: 0.72rem; color: var(--text-muted); }
.history-item .history-duration { font-size: 0.72rem; color: var(--accent); font-weight: 600; }

/* ========== QUALITY SELECTOR ========== */
.quality-select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-family);
  cursor: pointer;
  outline: none;
}

.quality-select:focus { border-color: var(--primary); }

body.light-theme .quality-select { background: #f1f5f9; color: #334155; border-color: rgba(0,0,0,0.15); }

/* ========== THEME TOGGLE ========== */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover { background: rgba(99, 102, 241, 0.15); color: var(--primary); }

body.light-theme .theme-toggle-btn { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.12); color: #64748b; }

/* ========== NOTIFICATION BADGE PULSE ========== */
@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.notif-badge-pulse {
  animation: notifPulse 0.6s ease-in-out 3;
}

/* ========== REDESIGNED TOOLBAR ========== */
.toolbar-redesigned {
  flex-direction: column !important;
  gap: 0.3rem !important;
  padding: 0.4rem 0.6rem !important;
}

.toolbar-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.toolbar-groups-row {
  display: flex;
  gap: 0.35rem;
  width: 100%;
  align-items: stretch;
}

.toolbar-section {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.35rem 0.3rem;
  position: relative;
  flex: 1;
}

.toolbar-section:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.toolbar-section-label {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  padding-left: 0.1rem;
}

.toolbar-section-content {
  display: flex;
  gap: 0.2rem;
  align-items: center;
  flex-wrap: wrap;
}

/* New tool buttons */
.tool-btn-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.25rem 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 40px;
}

.tool-btn-new i { font-size: 0.7rem; }
.tool-btn-new span { font-size: 0.52rem; font-weight: 600; }

.tool-btn-new:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--primary);
  transform: translateY(-1px);
}

.tool-btn-new.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.25);
}

.tool-btn-danger {
  color: var(--danger) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
}

.tool-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Hotkeys grid: 3 columns */
.hotkeys-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem !important;
}

.hotkey-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  padding: 0.2rem 0.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hotkey-btn i { font-size: 0.6rem; color: var(--warning); }
.hotkey-btn span { font-size: 0.5rem; font-weight: 700; }

.hotkey-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--warning);
  transform: translateY(-1px);
}

.hotkey-btn:active {
  transform: scale(0.95);
  background: rgba(245, 158, 11, 0.25);
}

/* Quality dropdown wrapper */
.tool-quality-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.tool-quality-wrap .quality-select {
  font-size: 0.7rem;
  padding: 0.25rem 0.4rem;
}

/* ========== ANYDESK / TEAMVIEWER FLOATING LAYOUT ========== */
body.anydesk-layout {
  height: 100vh !important;
  width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #000 !important;
}

body.anydesk-layout header,
body.anydesk-layout .app-container {
  display: none !important;
}

/* Full Screen Canvas Viewport */
.full-screen-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.full-screen-viewport canvas#remoteCanvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: default;
}

/* Floating Top Pill Toolbar */
.floating-toolbar-pill {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 0.35rem 0.85rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  max-width: 95vw;
}

.floating-toolbar-pill:hover {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.pill-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pill-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding-right: 0.4rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.pill-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.pill-client-info {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.pill-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pill-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-family);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pill-btn i { font-size: 0.8rem; }
.pill-btn span { font-size: 0.7rem; }

.pill-btn:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.pill-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}

.pill-btn.pill-control-active {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4) !important;
}

.pill-btn.pill-control-warning {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4) !important;
}

.pill-btn-danger {
  color: var(--danger) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}

.pill-btn-danger:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

.pill-select {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.7rem !important;
  color: var(--text-main) !important;
  outline: none;
  cursor: pointer;
}

.pill-dropdown-wrap {
  position: relative;
}

.pill-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.4rem;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.35rem;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 2500;
  flex-direction: column;
  gap: 0.2rem;
}

.pill-dropdown-menu.active {
  display: flex;
}

.pill-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.75rem;
  font-family: var(--font-family);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pill-dropdown-menu button i { font-size: 0.8rem; color: var(--warning); width: 16px; }
.pill-dropdown-menu button:hover { background: rgba(99, 102, 241, 0.15); color: #fff; }

/* Floating Triggers */
.floating-trigger {
  position: fixed;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: var(--text-main);
  font-size: 0.78rem;
  font-family: var(--font-family);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.floating-trigger:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  transform: scale(1.03);
}

.trigger-left {
  top: 14px;
  left: 14px;
}

.trigger-right {
  bottom: 14px;
  right: 14px;
}

.trigger-badge {
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
}

/* Slide-out Drawers */
.slide-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-left {
  left: -390px;
  width: 360px;
  border-right-color: rgba(255, 255, 255, 0.15);
}

.drawer-left.open {
  left: 0;
}

.drawer-right {
  right: -430px;
  width: 400px;
  border-left-color: rgba(255, 255, 255, 0.15);
}

.drawer-right.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.drawer-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.drawer-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2500;
  display: none;
}

.drawer-backdrop.active {
  display: block;
}

.tools-nav-drawer {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
}

.tools-nav-drawer .tool-tab {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* Light Theme Overrides for AnyDesk Layout */
body.light-theme.anydesk-layout { background: #e2e8f0 !important; }
body.light-theme .floating-toolbar-pill { background: rgba(255, 255, 255, 0.92); border-color: rgba(0, 0, 0, 0.1); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
body.light-theme .pill-btn { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.1); color: #334155; }
body.light-theme .pill-btn:hover { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
body.light-theme .pill-client-info { color: #1e293b; }
body.light-theme .floating-trigger { background: rgba(255, 255, 255, 0.9); border-color: rgba(0,0,0,0.12); color: #1e293b; }
body.light-theme .slide-drawer { background: rgba(255, 255, 255, 0.96); border-color: rgba(0,0,0,0.1); box-shadow: 0 0 40px rgba(0,0,0,0.15); }
body.light-theme .drawer-header { background: rgba(0, 0, 0, 0.03); border-bottom-color: rgba(0, 0, 0, 0.08); }


