/* ==========================================================================
   Services & Raspberry Pi System Telemetry Styles
   ========================================================================== */

#servicesOverlay {
  position: absolute;
  inset: 80px 24px 24px;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.services-layout {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 40px;
}

.services-header {
  margin-bottom: 4px;
}

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

/* --------------------------------------------------------------------------
   1. Telemetry Grid (Raspberry Pi Hardware Stats)
   -------------------------------------------------------------------------- */

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.telemetry-card {
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.telemetry-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.clickable-telemetry-card {
  cursor: pointer;
  position: relative;
}

.clickable-telemetry-card:hover {
  border-color: rgba(94, 234, 212, 0.6);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(94, 234, 212, 0.15);
  transform: translateY(-3px);
}

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

.telemetry-head-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.explore-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.15);
  color: var(--accent);
  border: 1px solid rgba(94, 234, 212, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.clickable-telemetry-card:hover .explore-pill {
  background: rgba(94, 234, 212, 0.3);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.3);
}

.explore-subtext {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.clickable-telemetry-card:hover .explore-subtext {
  opacity: 1;
  text-decoration: underline;
}

.telemetry-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.telemetry-title i {
  color: var(--accent);
}

.telemetry-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-big {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
}

.stat-sub {
  font-size: 13px;
  color: var(--muted);
}

.stat-uptime {
  font-size: 18px;
}

.progress-bar-wrap {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
  transition: width 0.4s ease, background 0.3s ease;
}

.progress-bar-fill.warm {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-bar-fill.hot {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.telemetry-footer-text {
  font-size: 12px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
}

.telemetry-footer-text strong {
  color: var(--muted);
}

.system-meta-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.system-meta-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.meta-label {
  color: var(--faint);
}

.meta-value {
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Status Pills */
.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
}

.pill-temp {
  background: rgba(94, 234, 212, 0.15);
  color: var(--accent);
  border: 1px solid rgba(94, 234, 212, 0.3);
}

.pill-temp.warm {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.pill-temp.hot {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
  animation: pulse-border 1.5s infinite;
}

.pill-info {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.pill-model {
  background: rgba(192, 38, 211, 0.18);
  color: #e879f9;
  border: 1px solid rgba(192, 38, 211, 0.3);
}

/* --------------------------------------------------------------------------
   2. Featured SSH Terminal Card
   -------------------------------------------------------------------------- */

.featured-terminal-card {
  background: linear-gradient(135deg, rgba(16, 24, 39, 0.85), rgba(8, 12, 20, 0.95));
  border: 1px solid rgba(74, 222, 128, 0.35);
  box-shadow: 0 0 25px rgba(74, 222, 128, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.featured-terminal-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.terminal-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.featured-terminal-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.featured-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 680px;
}

.ssh-command-box {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px 6px 14px;
  gap: 10px;
  width: fit-content;
  margin-top: 4px;
}

.command-prefix {
  color: #4ade80;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.ssh-command-box code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #ecfffb;
}

.copy-command-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.copy-command-btn:hover {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.5);
  color: #4ade80;
}

.featured-terminal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
}

.terminal-btn-large {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.4);
  color: #f0fdf4;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 18px;
  font-size: 14px;
}

.terminal-btn-large:hover {
  background: rgba(74, 222, 128, 0.32);
  border-color: #4ade80;
}

.terminal-btn-sub {
  padding: 10px 16px;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   2.5. Docker & Portainer Containers Supervisor
   -------------------------------------------------------------------------- */

.docker-supervisor-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 14, 26, 0.96));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.08);
  position: relative;
  overflow: hidden;
}

.docker-supervisor-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.docker-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.docker-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docker-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.docker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.docker-title-block h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.docker-desc {
  margin: 0;
  font-size: 13px;
  color: rgba(247, 247, 251, 0.75);
  line-height: 1.5;
  max-width: 680px;
}

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

.portainer-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.portainer-btn:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
  transform: translateY(-1px);
}

.docker-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.docker-stats-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.docker-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.d-stat-label {
  color: var(--muted);
}

.d-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.d-stat-val.val-green {
  color: #4ade80;
}

.d-stat-val.val-muted {
  color: #94a3b8;
}

.docker-filter-group {
  display: flex;
  gap: 6px;
}

.docker-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.docker-filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.docker-filter-btn.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}

.docker-containers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.docker-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.docker-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.docker-card.running {
  border-left: 3px solid #4ade80;
}

.docker-card.stopped {
  border-left: 3px solid #64748b;
  opacity: 0.85;
}

.docker-card.paused {
  border-left: 3px solid #f59e0b;
}

.docker-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.docker-name-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.docker-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.docker-container-icon {
  color: #38bdf8;
  font-size: 13px;
}

.docker-container-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portainer-mini-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(2, 132, 199, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  border-radius: 4px;
}

.docker-image-name {
  font-size: 11px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docker-status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.pill-running {
  background: rgba(74, 222, 128, 0.16);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.pill-stopped {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.pill-paused {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.docker-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.docker-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.d-info-label {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.d-info-val {
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-ports-text {
  color: #38bdf8;
  max-width: 140px;
}

.docker-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.docker-id-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--faint);
}

.docker-actions-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.docker-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}

.docker-action-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.docker-action-btn.btn-restart:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.docker-action-btn.btn-stop:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.docker-action-btn.btn-start:hover {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
}

.docker-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  gap: 10px;
}

.docker-empty-icon {
  font-size: 32px;
  color: rgba(56, 189, 248, 0.5);
}

.docker-empty-text strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.docker-empty-text p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   3. Services Catalogue & Filters
   -------------------------------------------------------------------------- */

.services-catalogue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.services-catalogue-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.service-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.service-filter-tab {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.service-filter-tab:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.service-filter-tab.active {
  background: rgba(94, 234, 212, 0.18);
  border-color: var(--accent);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   4. Services Grid Cards
   -------------------------------------------------------------------------- */

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

.service-card {
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 234, 212, 0.4);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.5);
}

.service-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.service-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.service-meta {
  flex: 1;
}

.service-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.service-category {
  font-size: 11px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.service-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.service-status-dot.online {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.service-status-dot.offline {
  background: #f87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}

.service-status-dot.checking {
  background: #fbbf24;
}

.service-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  min-height: 38px;
}

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  font-size: 12px;
}

.service-url-text {
  color: var(--faint);
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.service-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
}

.service-edit-btn {
  background: transparent;
  border: none;
  color: var(--faint);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.18s ease, transform 0.15s ease;
  font-size: 13px;
}

.service-edit-btn:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.service-delete-btn {
  background: transparent;
  border: none;
  color: var(--faint);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.18s ease, transform 0.15s ease;
  font-size: 13px;
}

.service-delete-btn:hover {
  color: var(--hot);
  transform: scale(1.1);
}

.service-loading-state {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   5. Terminal Integrated Modal
   -------------------------------------------------------------------------- */

.terminal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.terminal-modal-window {
  width: 100%;
  max-width: 1100px;
  height: 82vh;
  background: #080c14;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(74, 222, 128, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-modal-window.fullscreen {
  max-width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.terminal-modal-header {
  height: 44px;
  background: #0d121c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.terminal-window-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.18s;
}

.dot:hover {
  opacity: 0.8;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-modal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-modal-title i {
  color: #4ade80;
}

.terminal-modal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-modal-actions .icon-btn {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.terminal-modal-body {
  flex: 1;
  position: relative;
  background: #05070c;
}

.terminal-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #05070c;
}

.terminal-fallback-notice {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  background: #080c14;
  gap: 16px;
}

.notice-icon {
  font-size: 42px;
  color: #fbbf24;
}

.terminal-fallback-notice h3 {
  margin: 0;
  font-size: 20px;
}

.terminal-fallback-notice p {
  color: var(--muted);
  max-width: 520px;
  line-height: 1.5;
  margin: 0;
}

.fallback-ssh-command {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
}

.fallback-ssh-command code {
  color: #4ade80;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   6. Modals & Forms
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-window {
  width: 100%;
  max-width: 500px;
  background: #0f131d;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  outline: none;
}

select option {
  background: #0f131d;
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

/* Animations */
@keyframes pulse-border {
  0%, 100% { border-color: rgba(239, 68, 68, 0.5); }
  50% { border-color: rgba(239, 68, 68, 1); box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
}

@media (max-width: 840px) {
  #servicesOverlay {
    inset: 70px 12px 12px;
  }
  
  .featured-terminal-card {
    flex-direction: column;
    align-items: stretch;
  }
  
  .featured-terminal-actions {
    min-width: unset;
  }
}

/* ========================================================================== */
/* SECTION TRADING SUPERVISOR (ASTRO & YTIXO)                                  */
/* ========================================================================== */
.trading-supervisor-card {
  background: linear-gradient(150deg, rgba(13, 19, 29, 0.95), rgba(8, 11, 18, 0.95));
  border: 1px solid rgba(92, 225, 230, 0.22);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
}

.trading-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.trading-title-block {
  max-width: 650px;
}

.trading-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.trading-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(92, 225, 230, 0.15);
  color: #5ce1e6;
  border: 1px solid rgba(92, 225, 230, 0.35);
}

.trading-title-block h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.trading-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

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

.trading-btn {
  background: linear-gradient(135deg, #5ce1e6, #78aaff);
  color: #061013 !important;
  font-weight: 700;
}

.trading-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .trading-dual-grid {
    grid-template-columns: 1fr;
  }
}

.trading-user-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.trading-user-card:hover {
  border-color: rgba(92, 225, 230, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.trading-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.trading-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-tag {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}

.avatar-astro {
  background: linear-gradient(135deg, #5ce1e6, #3ee0a1);
  color: #061013;
  box-shadow: 0 4px 14px rgba(92, 225, 230, 0.35);
}

.avatar-ytixo {
  background: linear-gradient(135deg, #9678ff, #ff6577);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(150, 120, 255, 0.35);
}

.trading-user-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.trading-account-sub {
  font-size: 11px;
  color: var(--muted);
}

.trading-account-sub b {
  color: #38bdf8;
}

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

@media (max-width: 600px) {
  .trading-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.t-stat-box {
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.t-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

.t-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.t-stat-value small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.t-stat-sub {
  font-size: 10px;
  color: var(--muted);
}

.t-stat-sub b {
  color: #cbd5e1;
}

.val-positive, .val-positive * {
  color: #3ee0a1 !important;
}

.val-negative, .val-negative * {
  color: #ff6577 !important;
}

.trading-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trading-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.progress-fill-cyan {
  background: linear-gradient(90deg, #5ce1e6, #3ee0a1) !important;
  box-shadow: 0 0 12px rgba(92, 225, 230, 0.5) !important;
}

.progress-fill-violet {
  background: linear-gradient(90deg, #9678ff, #ff6577) !important;
  box-shadow: 0 0 12px rgba(150, 120, 255, 0.5) !important;
}

.trading-trades-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trading-trades-section h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.trading-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.4);
  max-height: 220px;
  overflow-y: auto;
}

.trading-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.trading-table th {
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.trading-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.trading-empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 24px 10px !important;
  font-style: italic;
}
