/* Raspberry Pi Command Center Design System */
:root {
  /* Color Tokens - Glass Dark Mode */
  --bg-app: #0B0F19;
  --bg-glass: rgba(18, 25, 41, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-active: rgba(0, 242, 195, 0.3);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Accent Colors */
  --color-teal: #00F2C3;
  --color-teal-glow: rgba(0, 242, 195, 0.15);
  --color-purple: #9E00FF;
  --color-purple-glow: rgba(158, 0, 255, 0.15);
  --color-red: #FF3B30;
  --color-red-glow: rgba(255, 59, 48, 0.15);
  --color-cyan: #00D2FF;
  --color-cyan-glow: rgba(0, 210, 255, 0.15);
  --color-yellow: #FFCC00;

  /* Core UI variables */
  --sidebar-width: 260px;
  --header-height: 70px;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --backdrop-blur: blur(14px);
}

/* Light Theme overrides */
body.light-theme {
  --bg-app: #F8FAFC;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --border-glass: rgba(0, 0, 0, 0.06);
  --border-glass-active: rgba(0, 242, 195, 0.5);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --color-teal-glow: rgba(0, 242, 195, 0.08);
  --color-purple-glow: rgba(158, 0, 255, 0.08);
  --color-red-glow: rgba(255, 59, 48, 0.08);
  --color-cyan-glow: rgba(0, 210, 255, 0.08);
  --shadow-glow: 0 8px 32px 0 rgba(148, 163, 184, 0.15);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Layout App Container */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100vw;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 10;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.brand-logo {
  background: var(--color-teal-glow);
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 242, 195, 0.3);
}

.brand-logo i {
  color: var(--color-teal);
  width: 22px;
  height: 22px;
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-info .sub-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  transform: translateX(4px);
}

.nav-item.active {
  background: var(--color-teal-glow);
  color: var(--color-teal);
  border: 1px solid rgba(0, 242, 195, 0.2);
}

.nav-item i {
  width: 18px;
  height: 18px;
}

/* Connection Status in Sidebar */
.connection-status-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.status-indicator.connected .status-dot {
  background: var(--color-teal);
  box-shadow: 0 0 8px var(--color-teal);
}

.status-indicator.disconnected .status-dot {
  background: var(--text-muted);
}

.status-indicator.connecting .status-dot {
  background: var(--color-yellow);
  box-shadow: 0 0 8px var(--color-yellow);
  animation: pulse 1.5s infinite;
}

.host-details {
  font-size: 0.8rem;
}

.host-user {
  font-weight: 600;
  color: var(--text-primary);
}

.host-ip {
  color: var(--text-muted);
}

/* Main Panel Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header bar */
.top-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  backdrop-filter: var(--backdrop-blur);
  background: var(--bg-glass);
  z-index: 5;
}

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

.menu-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--color-teal);
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.menu-toggle-btn:hover {
  background: var(--color-teal-glow);
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0, 242, 195, 0.3);
}

.menu-toggle-btn i {
  width: 20px;
  height: 20px;
}

.header-title h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.uptime-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.uptime-display i {
  width: 14px;
  height: 14px;
}

/* Scrollable Inner Views */
.view-container {
  flex-grow: 1;
  padding: 32px;
  overflow-y: auto;
  position: relative;
}

.content-view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.content-view.active {
  display: block;
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-glow);
  padding: 24px;
  transition: var(--transition-smooth);
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, var(--color-teal-glow), rgba(11, 15, 25, 0));
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--color-teal);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.welcome-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.welcome-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.system-power-actions {
  display: flex;
  gap: 12px;
}

/* Grid Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition-smooth);
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

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

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon i {
  width: 18px;
  height: 18px;
}

.card-title-group h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Card Glows */
.card-glow-teal .card-icon {
  background: rgba(0, 242, 195, 0.1);
  color: var(--color-teal);
  border: 1px solid rgba(0, 242, 195, 0.2);
}
.card-glow-teal:hover {
  border-color: rgba(0, 242, 195, 0.3);
}

.card-glow-purple .card-icon {
  background: rgba(158, 0, 255, 0.1);
  color: var(--color-purple);
  border: 1px solid rgba(158, 0, 255, 0.2);
}
.card-glow-purple:hover {
  border-color: rgba(158, 0, 255, 0.3);
}

.card-glow-red .card-icon {
  background: rgba(255, 59, 48, 0.1);
  color: var(--color-red);
  border: 1px solid rgba(255, 59, 48, 0.2);
}
.card-glow-red:hover {
  border-color: rgba(255, 59, 48, 0.3);
}

.card-glow-cyan .card-icon {
  background: rgba(0, 210, 255, 0.1);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 210, 255, 0.2);
}
.card-glow-cyan:hover {
  border-color: rgba(0, 210, 255, 0.3);
}

/* Radial Progress Gauges */
.radial-progress-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}

.radial-progress {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.radial-progress circle {
  fill: none;
  stroke-width: 8;
}

.radial-progress circle.bg {
  stroke: var(--border-glass);
}

.radial-progress circle.fg {
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.progress-cpu { stroke: var(--color-teal); filter: drop-shadow(0 0 4px var(--color-teal)); }
.progress-ram { stroke: var(--color-purple); filter: drop-shadow(0 0 4px var(--color-purple)); }
.progress-temp { stroke: var(--color-red); filter: drop-shadow(0 0 4px var(--color-red)); }
.progress-disk { stroke: var(--color-cyan); filter: drop-shadow(0 0 4px var(--color-cyan)); }

.radial-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.metric-info-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Chart Canvas Section */
.dashboard-charts-row {
  margin-top: 24px;
}

.chart-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
}

.panel-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header h3 i {
  color: var(--color-teal);
  width: 18px;
  height: 18px;
}

.panel-header-actions {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Interactive Terminal Section */
.terminal-wrapper {
  padding: 0;
  overflow: hidden;
  height: calc(100vh - var(--header-height) - 64px);
  display: flex;
  flex-direction: column;
}

.terminal-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #FF5F56; }
.terminal-dot.yellow { background: #FFBD2E; }
.terminal-dot.green { background: #27C93F; }

.terminal-path {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-left: 12px;
  color: var(--text-secondary);
}

.terminal-actions {
  display: flex;
  gap: 8px;
}

.terminal-btn-action {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.terminal-btn-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.terminal-btn-action i {
  width: 12px;
  height: 12px;
}

.terminal-body-container {
  flex-grow: 1;
  background: #05070B;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

#terminal-container {
  width: 100%;
  height: 100%;
}

/* Terminal Fullscreen overlay */
.terminal-wrapper.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  border-radius: 0;
  border: none;
}

/* File Manager UI */
.file-manager-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - var(--header-height) - 64px);
  padding: 20px;
}

.file-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.file-path-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
  max-width: 600px;
}

#file-path-input {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

#file-path-input:focus {
  border-color: var(--color-teal);
  outline: none;
}

.file-actions-bar {
  display: flex;
  gap: 8px;
}

.file-upload-label {
  cursor: pointer;
}

.upload-progress-banner {
  background: var(--color-teal-glow);
  border: 1px solid rgba(0, 242, 195, 0.2);
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  color: var(--color-teal);
  display: flex;
  align-items: center;
  gap: 10px;
}

.spinner {
  animation: rotate 2s linear infinite;
  width: 16px;
  height: 16px;
}

.file-list-container {
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  background: rgba(0, 0, 0, 0.1);
}

/* Tables styling */
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-weight: 400;
  white-space: nowrap;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.empty-table {
  text-align: center;
  padding: 60px 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.empty-state i {
  width: 48px;
  height: 48px;
}

/* File actions & icons */
.file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.file-name-cell:hover span {
  color: var(--color-teal);
  text-decoration: underline;
}

.file-icon-dir {
  color: var(--color-cyan);
}

.file-icon-file {
  color: var(--text-muted);
}

.file-row-actions {
  display: flex;
  gap: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.btn-icon-only {
  padding: 8px;
  width: 36px;
  height: 36px;
}

.btn-icon-only i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--color-teal);
  color: #0B0F19;
}
.btn-primary:hover {
  box-shadow: 0 0 12px rgba(0, 242, 195, 0.4);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--color-cyan);
  color: #0B0F19;
}
.btn-success:hover {
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
  transform: translateY(-1px);
}

.btn-warning {
  background: rgba(255, 204, 0, 0.1);
  color: var(--color-yellow);
  border: 1px solid rgba(255, 204, 0, 0.3);
}
.btn-warning:hover {
  background: var(--color-yellow);
  color: #000;
}

.btn-danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--color-red);
  border: 1px solid rgba(255, 59, 48, 0.3);
}
.btn-danger:hover {
  background: var(--color-red);
  color: #FFF;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-block {
  width: 100%;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.icon-btn i {
  width: 18px;
  height: 18px;
}

/* Process UI styling */
.process-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - var(--header-height) - 64px);
}

.process-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 8px 16px;
  flex-grow: 1;
  max-width: 400px;
}

.search-box i {
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 100%;
  font-size: 0.9rem;
  outline: none;
}

.process-list-container {
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  background: rgba(0, 0, 0, 0.1);
}

.process-table th {
  position: sticky;
  top: 0;
}

.process-table td {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.process-cpu-high {
  color: var(--color-red);
  font-weight: 600;
}

/* Connection Modal Overlay */
.connection-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 11, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.4s ease;
}

.connection-card {
  width: 100%;
  max-width: 520px;
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
}

.connection-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-large {
  width: 48px;
  height: 48px;
  color: var(--color-teal);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px rgba(0, 242, 195, 0.3));
}

.connection-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.connection-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.connection-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 24px;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  flex-grow: 1;
  padding: 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn.active {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
}

.connection-tab-content {
  display: none;
}

.connection-tab-content.active {
  display: block;
}

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

.form-row {
  display: flex;
  gap: 16px;
}

.col-8 { flex: 8; }
.col-4 { flex: 4; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

input:focus, textarea:focus {
  border-color: var(--color-teal);
  outline: none;
  box-shadow: 0 0 8px rgba(0, 242, 195, 0.15);
}

textarea {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  resize: vertical;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .icon-btn {
  position: absolute;
  right: 10px;
}

.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.radio-label input {
  accent-color: var(--color-teal);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  user-select: none;
}

.checkbox-label input {
  accent-color: var(--color-teal);
}

.error-banner {
  background: var(--color-red-glow);
  border: 1px solid rgba(255, 59, 48, 0.2);
  color: var(--color-red);
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.error-banner i {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Saved profiles list styles */
.saved-profiles-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.profile-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.profile-item:hover {
  background: var(--color-teal-glow);
  border-color: rgba(0, 242, 195, 0.2);
}

.profile-details h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

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

.profile-actions {
  display: flex;
  gap: 6px;
}

/* Utility Margins */
.mt-2 { margin-top: 8px; }
.align-center { align-items: center; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

.neon-glow-icon {
  filter: drop-shadow(0 0 6px var(--color-teal));
}

/* VNC Panel Styling */
.vnc-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - var(--header-height) - 64px);
  padding: 20px;
}

.vnc-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
}

.vnc-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vnc-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.vnc-input-group input {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  width: 150px;
}

.vnc-viewport-container {
  flex-grow: 1;
  background: #05070B;
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

#vnc-screen-target,
#direct-vnc-screen-target {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#vnc-screen-target canvas,
#direct-vnc-screen-target canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-radius: var(--border-radius-sm);
}

.vnc-status-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.vnc-status-overlay i {
  width: 64px;
  height: 64px;
}

/* VNC Virtual Remote Controller Panel Styles */
.vnc-remote-bar {
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  overflow-y: auto;
}

.remote-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.remote-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.remote-key-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.remote-key-btn i {
  width: 14px;
  height: 14px;
}

/* D-Pad Layout styling */
.d-pad-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  width: 130px;
  height: 130px;
  margin: 8px auto;
}

.d-pad-btn {
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important; /* Circular buttons for clean gamepad style */
}

.d-pad-up { grid-row: 1; grid-column: 2; }
.d-pad-left { grid-row: 2; grid-column: 1; }
.d-pad-center { 
  grid-row: 2; 
  grid-column: 2; 
  border-radius: var(--border-radius-md) !important;
  font-size: 0.8rem;
}
.d-pad-right { grid-row: 2; grid-column: 3; }
.d-pad-down { grid-row: 3; grid-column: 2; }

/* Custom Dialog Overlay */
.custom-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 11, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-dialog-overlay.active {
  opacity: 1;
}

.custom-dialog-card {
  width: 90%;
  max-width: 420px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: scale(0.9);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 32px rgba(0, 242, 195, 0.15);
  border: 1px solid var(--border-glass);
}

.custom-dialog-overlay.active .custom-dialog-card {
  transform: scale(1);
}

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

.dialog-header i {
  width: 24px;
  height: 24px;
  color: var(--neon-teal);
}

.dialog-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.dialog-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.dialog-text-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  margin-top: 12px;
  font-family: inherit;
  font-size: 0.9rem;
}

.dialog-text-input:focus {
  outline: none;
  border-color: var(--neon-teal);
  box-shadow: 0 0 8px rgba(0, 242, 195, 0.2);
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* VNC Panel Fullscreen */
.vnc-panel.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 100;
  border-radius: 0 !important;
  border: none !important;
  padding: 16px !important;
  background: var(--bg-main) !important;
}

body.vnc-fullscreen-active .sidebar {
  display: none !important;
}
body.vnc-fullscreen-active .top-header {
  display: none !important;
}
body.vnc-fullscreen-active .main-content {
  height: 100vh !important;
  width: 100vw !important;
}
body.vnc-fullscreen-active .content-view {
  padding: 0 !important;
}
body.vnc-fullscreen-active .vnc-panel {
  height: 100vh !important;
  width: 100vw !important;
  padding: 10px !important;
}
/* -------------------------------------------------------------
   WI-FI PHONE CONTROL HUB STYLES
   ------------------------------------------------------------- */

/* Quick Actions Section */
.quick-actions-bar {
  padding: 20px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.action-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.85rem;
  font-weight: 500;
}

.action-card:hover {
  background: rgba(0, 242, 195, 0.08);
  border-color: rgba(0, 242, 195, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 242, 195, 0.15);
}

.action-icon {
  width: 26px;
  height: 26px;
  color: var(--neon-teal);
}

.status-badge-large {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--neon-teal);
  padding: 10px 20px;
  background: rgba(0, 242, 195, 0.08);
  border: 1px solid rgba(0, 242, 195, 0.25);
  border-radius: 30px;
}

/* Wi-Fi Camera Panel */
.camera-panel {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.camera-actions-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.camera-feed-container {
  position: relative;
  width: 100%;
  height: 480px;
  background: #000;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-stream-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-overlay-controls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.tool-card {
  padding: 24px;
}

.clipboard-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  resize: vertical;
}

.clipboard-input:focus {
  outline: none;
  border-color: var(--neon-teal);
}

.tool-btn-group {
  display: flex;
  gap: 12px;
}

/* Media Preview Modal */
.media-modal-card {
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.media-modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
  min-height: 250px;
}

.media-modal-body img,
.media-modal-body video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--border-radius-sm);
  object-fit: contain;
}

.media-modal-body pre {
  width: 100%;
  max-height: 60vh;
  overflow: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-teal);
}

