/* ==========================================================================
   SARMAT GLOBAL CONTROL — DESIGN SYSTEM 2026
   Inspired by: Aceternity UI, Kokonut UI, 21st.dev, Animata, React Bits
   ========================================================================== */

:root {
  --bg-deep: #08090c;
  --bg-surface: #0e1117;
  --bg-card: #12151c;
  --bg-card-hover: #181d26;
  --bg-elevated: #161b24;
  --bg-glass: rgba(14, 17, 23, 0.88);
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-subtle-hover: rgba(255, 255, 255, 0.12);
  --border-focus: #38bdf8;
  
  --cyan: #38bdf8;
  --cyan-muted: rgba(56, 189, 248, 0.1);
  --blue: #3b82f6;
  --blue-muted: rgba(59, 130, 246, 0.1);
  --emerald: #10b981;
  --emerald-muted: rgba(16, 185, 129, 0.1);
  --amber: #f59e0b;
  --amber-muted: rgba(245, 158, 11, 0.1);
  --rose: #f43f5e;
  --rose-muted: rgba(244, 63, 94, 0.1);
  --violet: #8b5cf6;
  --violet-muted: rgba(139, 92, 246, 0.1);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --sidebar-w: 256px;
  --sidebar-width: 256px;
  --topbar-h: 56px;
  --header-height: 56px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Legacy & View Component Compatibility Variables */
  --bg: #08090c;
  --surface: #0e1117;
  --surface-elevated: #161b24;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --primary-glow: rgba(56, 189, 248, 0.08);
  --success: #10b981;
  --success-hover: #059669;
  --success-glow: rgba(16, 185, 129, 0.08);
  --danger: #f43f5e;
  --danger-hover: #e11d48;
  --danger-glow: rgba(244, 63, 94, 0.08);
  --warning: #f59e0b;
  --purple: #8b5cf6;
  --terminal-bg: #030712;
  --terminal-text: #22c55e;
}

/* Reset & Layout Shell */
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ==========================================================================
   GLOBAL CUSTOM SCROLLBARS (Vercel / Linear inspired)
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Compact scrollbars for code, terminals, modals */
.scroll-compact::-webkit-scrollbar,
.terminal::-webkit-scrollbar,
pre::-webkit-scrollbar,
code::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}


body.sarmat-shell {
  margin: 0;
  padding: 0;
  background-color: var(--bg-deep) !important;
  color: var(--text-main) !important;
  font-family: var(--font-sans) !important;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Ambient - Minimalist Senior Designer Vignette (No AI slop rainbow mesh) */
.ambient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(ellipse 70% 35% at 50% 0%, rgba(56, 189, 248, 0.035), transparent 70%);
  background-attachment: fixed;
}

/* Modern App Shell */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar Styles */
.sarmat-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: #0c0e12;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 18px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.brand-badge svg {
  width: 20px;
  height: 20px;
  fill: #38bdf8;
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-title .main-name {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.brand-title .sub-name {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 700;
  padding: 12px 10px 6px;
  display: flex;
  align-items: center;
}

/* ==========================================================================
   HIGH-END CYBERPUNK SERVER NODE SELECTOR (2026 Raycast/Linear Edition)
   ========================================================================== */
.server-node-selector {
  margin: 4px 6px 14px 6px;
  background: rgba(8, 12, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.server-node-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 100%;
}

.server-node-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  user-select: none;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.server-node-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.server-node-btn.active {
  color: #ffffff;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.server-node-btn.active#pill-host-isp1 {
  border-color: var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.node-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.node-dot-isp4 {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

.node-dot-isp1 {
  background: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.8);
}

.node-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.node-name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--text-main);
}

.node-role {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1px;
}

.server-node-btn.active .node-role {
  color: var(--cyan);
}

.server-node-btn.active#pill-host-isp1 .node-role {
  color: var(--violet);
}

.node-icon {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: all 0.2s ease;
  margin-left: auto;
  opacity: 0.6;
}

.server-node-btn:hover .node-icon,
.server-node-btn.active .node-icon {
  opacity: 1;
  color: #fff;
}

/* ==========================================================================
   HOST GROUPS - STRICT VERTICAL DOWNWARD STACKING (NO HORIZONTAL SQUISH)
   ========================================================================== */
.nav-host-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  animation: fadeIn 0.2s ease;
}

.nav-host-group[style*="display: none"] {
  display: none !important;
}

.nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 9px 12px !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  position: relative !important;
  border: 1px solid transparent !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.nav-item:hover {
  color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  transform: translateX(2px);
}

.nav-item.active {
  color: #ffffff !important;
  background: rgba(56, 189, 248, 0.09) !important;
  border-color: rgba(56, 189, 248, 0.22) !important;
  font-weight: 600 !important;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--cyan);
}

.nav-item-icon {
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.badge-cyan { background: rgba(56, 189, 248, 0.18); color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-emerald { background: rgba(16, 185, 129, 0.18); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-amber { background: rgba(245, 158, 11, 0.18); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-rose { background: rgba(244, 63, 94, 0.18); color: var(--rose); border: 1px solid rgba(244, 63, 94, 0.3); }

/* ==========================================================================
   PAGE INNER SUB-TABS (Segmented Cyber Switchers)
   ========================================================================== */
.page-subtabs-bar {
  display: inline-flex;
  gap: 6px;
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 100%;
  overflow-x: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.containers-tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  border-radius: 9px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
  user-select: none !important;
  box-sizing: border-box !important;
}

.containers-tab-btn:hover {
  color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.containers-tab-btn.btn-cyber-primary,
.containers-tab-btn.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(59, 130, 246, 0.12)) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 12px rgba(56, 189, 248, 0.15) !important;
  font-weight: 600 !important;
}

/* Sidebar User Footer */
.sidebar-user {
  padding: 14px 14px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(12, 18, 34, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.user-role-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-logout:hover {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.12);
}

/* Main Area - Edge to Edge Full Width */
.sarmat-main {
  flex: 1 1 auto;
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  max-width: calc(100% - var(--sidebar-w));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* Topbar */
.sarmat-topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  width: 100%;
  max-width: 100%;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 9, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-sizing: border-box;
}

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

.page-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

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

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

/* Crisp Status Pulse Dot (Linear style micro-indicator) */
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  animation: pulse-ring 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.pulse-dot.online {
  background: #10b981;
}
.pulse-dot.online::after {
  border: 1px solid rgba(16, 185, 129, 0.6);
}

.pulse-dot.busy {
  background: #f59e0b;
}
.pulse-dot.busy::after {
  border: 1px solid rgba(245, 158, 11, 0.6);
}

.pulse-dot.error {
  background: #f43f5e;
}
.pulse-dot.error::after {
  border: 1px solid rgba(244, 63, 94, 0.6);
}

.pulse-dot.offline {
  background: #64748b;
}
.pulse-dot.offline::after {
  display: none;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Page Content Viewport - Full Width 100% */
.sarmat-content {
  flex: 1 1 auto;
  width: 100% !important;
  max-width: 100% !important;
  padding: 28px 32px 48px 32px !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.view-wrapper,
#view-dashboard,
#view-users,
#view-forbidden,
#view-legacy-tabs,
.tab-contents-wrapper,
.tab-content {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* Unified Harmonious Legacy Tab Elements */
.control-group {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  margin-bottom: 20px !important;
  backdrop-filter: blur(16px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.kpi-card {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 1.25rem 1.4rem !important;
  backdrop-filter: blur(14px) !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}
.kpi-card:hover {
  border-color: rgba(56, 189, 248, 0.3) !important;
  transform: translateY(-2px);
}

.cont-card {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 1.4rem 1.6rem !important;
  margin-bottom: 1rem !important;
  backdrop-filter: blur(14px) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.cron-card {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 1.3rem !important;
  backdrop-filter: blur(14px) !important;
  transition: border-color 0.2s, transform 0.2s !important;
  box-sizing: border-box !important;
}

.cron-jobs-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.incidents-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
@media (max-width: 1200px) {
  .incidents-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

#admin-status-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
@media (max-width: 991px) {
  #admin-status-container { grid-template-columns: 1fr !important; }
}

.admin-status-item {
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 18px 22px !important;
  margin-bottom: 0 !important;
  backdrop-filter: blur(14px) !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}
.admin-status-item:hover {
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  transform: translateY(-2px);
}

.admin-status-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 12px !important;
}

.admin-status-controls select {
  flex: 0 0 240px !important;
  width: 240px !important;
  height: 42px !important;
}

.admin-status-controls input {
  flex: 1 1 auto !important;
  width: auto !important;
  height: 42px !important;
}

.admin-status-controls button {
  flex: 0 0 auto !important;
  width: auto !important;
  height: 42px !important;
  padding: 0 20px !important;
}

/* ==========================================================================
   ENTERPRISE DASHBOARD & BENTO GRID SYSTEM
   ========================================================================== */
.dash-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
  margin-bottom: 24px !important;
  box-sizing: border-box !important;
}

@media (max-width: 1500px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 850px) {
  .dash-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

.dash-kpi-card {
  background: rgba(13, 20, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.dash-kpi-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

.dash-kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.dash-kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.dash-kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.dash-kpi-sub {
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Charts Row */
.dash-charts-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
  width: 100%;
  margin-bottom: 24px;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .dash-charts-grid { grid-template-columns: 1fr; }
}

.dash-chart-card {
  background: rgba(13, 20, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 22px 24px;
  backdrop-filter: blur(16px);
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.dash-chart-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.dash-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

/* Live Services Matrix Grid */
.dash-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  margin-bottom: 24px;
  box-sizing: border-box;
}

@media (max-width: 1400px) {
  .dash-services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .dash-services-grid { grid-template-columns: 1fr; }
}

.dash-service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
  position: relative;
  box-sizing: border-box;
}

.dash-service-card:hover {
  border-color: var(--border-subtle-hover);
  background: var(--bg-surface);
  transform: translateY(-1px);
}

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

.dash-service-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-service-url {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-service-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 10px;
}

.dash-service-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
}

/* Operational Hub Grid (Telemetry + Events) */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .dash-bottom-grid { grid-template-columns: 1fr; }
}

.dash-event-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.dash-event-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.dash-event-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.dash-event-body {
  flex: 1;
  min-width: 0;
}

.dash-event-text {
  font-size: 0.82rem;
  color: #f1f5f9;
  line-height: 1.4;
  margin: 0 0 4px;
  word-break: break-word;
}

.dash-event-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.bento-col-12 { grid-column: span 12; }
.bento-col-8  { grid-column: span 8; }
.bento-col-6  { grid-column: span 6; }
.bento-col-4  { grid-column: span 4; }
.bento-col-3  { grid-column: span 3; }

@media (max-width: 1200px) {
  .bento-col-8 { grid-column: span 12; }
  .bento-col-6 { grid-column: span 12; }
  .bento-col-4 { grid-column: span 6; }
}

@media (max-width: 768px) {
  .bento-col-4, .bento-col-3 { grid-column: span 12; }
}

/* Elevated Card (Clean Linear style) */
.spotlight-card {
  position: relative;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 20px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.spotlight-card:hover {
  border-color: var(--border-subtle-hover);
  background-color: rgba(14, 20, 36, 0.82);
}

/* Clean Enterprise Card */
.border-beam-card {
  position: relative;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease;
}

.border-beam-card:hover {
  border-color: var(--border-subtle-hover);
}

/* Card Header & Content */
.card-header-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title-clean {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-title-clean i {
  color: var(--cyan);
}

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

/* Numeric Stat Displays (Tabular Nums & Ticker) */
.stat-hero-number {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-diff {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 6px;
}

.stat-diff.positive {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
}

.stat-diff.negative {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose);
}

/* Modern Action Buttons & Unified Design System */
.btn-cyber,
.action-btn,
button.btn-primary,
button.btn-secondary,
button.btn-ghost,
button.btn-danger,
button.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  outline: none;
  text-decoration: none;
  user-select: none;
  line-height: 1.25;
  white-space: nowrap;
}

.btn-sm {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.btn-xs {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  border-radius: 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.btn-lg {
  padding: 12px 24px !important;
  font-size: 0.95rem !important;
  border-radius: 10px !important;
}

.btn-icon-only,
.btn-table-icon {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  border-radius: 6px !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.btn-icon-only.btn-xs,
.btn-table-icon.btn-xs {
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  font-size: 0.75rem !important;
  border-radius: 5px !important;
}

/* 1. Primary Button (Refined Royal Blue with Top Specular Highlight - Linear / Vercel style) */
.btn-cyber-primary,
.btn-primary,
.btn-blue {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.btn-cyber-primary:hover,
.btn-primary:hover,
.btn-blue:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  border-color: #60a5fa !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px);
}

.btn-cyber-primary:active,
.btn-primary:active,
.btn-blue:active {
  transform: translateY(0);
  background: #1d4ed8 !important;
}

/* 2. Secondary Button (Crisp Glass Subtle Border) */
.btn-cyber-secondary,
.btn-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.btn-cyber-secondary:hover,
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--border-subtle-hover) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-cyber-secondary:active,
.btn-secondary:active {
  transform: translateY(0);
}

/* 3. Ghost Button */
.btn-cyber-ghost,
.btn-ghost {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid transparent !important;
}

.btn-cyber-ghost:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* 4. Danger Button */
.btn-cyber-danger,
.btn-danger,
.btn-red {
  background: rgba(244, 63, 94, 0.08) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(244, 63, 94, 0.24) !important;
}

.btn-cyber-danger:hover,
.btn-danger:hover,
.btn-red:hover {
  background: rgba(244, 63, 94, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
  transform: translateY(-1px);
}

/* 5. Success Button */
.btn-cyber-success,
.btn-success,
.btn-green {
  background: rgba(16, 185, 129, 0.08) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.24) !important;
}

.btn-cyber-success:hover,
.btn-success:hover,
.btn-green:hover {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-1px);
}

/* 6. Warning Button */
.btn-cyber-warning,
.btn-warning,
.btn-yellow {
  background: rgba(245, 158, 11, 0.08) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.24) !important;
}

.btn-cyber-warning:hover,
.btn-warning:hover,
.btn-yellow:hover {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  transform: translateY(-1px);
}

/* 7. Purple Button */
.btn-cyber-purple,
.btn-purple {
  background: rgba(139, 92, 246, 0.08) !important;
  color: #c4b5fd !important;
  border: 1px solid rgba(139, 92, 246, 0.24) !important;
}

.btn-cyber-purple:hover,
.btn-purple:hover {
  background: rgba(139, 92, 246, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  transform: translateY(-1px);
}

/* Disabled button state */
button:disabled,
.btn-cyber:disabled,
.action-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   BADGES & STAT CHIPS (Restrained Micro-indicators)
   ========================================================================== */
.badge,
.badge-cyber {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.73rem;
  font-weight: 500;
  line-height: 1.3;
  border: 1px solid transparent;
  white-space: nowrap;
}

.bg-blue {
  background: rgba(56, 189, 248, 0.08) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.2) !important;
}

.bg-green {
  background: rgba(16, 185, 129, 0.08) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
}

.bg-red {
  background: rgba(244, 63, 94, 0.08) !important;
  color: #fb7185 !important;
  border-color: rgba(244, 63, 94, 0.2) !important;
}

.bg-yellow,
.bg-amber {
  background: rgba(245, 158, 11, 0.08) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}

.bg-purple {
  background: rgba(139, 92, 246, 0.08) !important;
  color: #c4b5fd !important;
  border-color: rgba(139, 92, 246, 0.2) !important;
}

.bg-gray {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-subtle) !important;
}

/* Linear-style Status Chips */
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.stat-chip .sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.stat-chip.ok {
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}
.stat-chip.ok .sdot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22);
}

.stat-chip.bad {
  background: rgba(244, 63, 94, 0.08);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.2);
}
.stat-chip.bad .sdot {
  background: #f43f5e;
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.22);
}

.stat-chip.warn {
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}
.stat-chip.warn .sdot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22);
}

.stat-chip.info {
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.2);
}
.stat-chip.info .sdot {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22);
}

.stat-chip.idle,
.stat-chip.offline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}
.stat-chip.idle .sdot,
.stat-chip.offline .sdot {
  background: #64748b;
}

/* ==========================================================================
   MODERN FORM CONTROLS & SELECTS (Linear / Supabase / Raycast)
   ========================================================================== */
.input-clean,
input[type="text"].input-clean,
input[type="password"].input-clean,
input[type="email"].input-clean,
input[type="number"].input-clean,
input[type="date"].input-clean,
textarea.input-clean {
  display: block;
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-main);
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.input-clean:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(12, 17, 29, 0.95);
}

.input-clean:focus {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 20, 34, 0.98);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.input-clean::placeholder {
  color: #4b5563;
}

/* Custom Native Select with SVG Chevron Arrow */
select.input-clean,
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px !important;
  cursor: pointer;
}

select.input-clean option,
select option {
  background-color: #0b0f19;
  color: #f1f5f9;
  padding: 8px 12px;
}

/* Dedicated Compact Cyber Select for Control Panels (e.g. Restart Policy) */
.policy-select-cyber {
  display: inline-block !important;
  width: auto !important;
  min-width: 190px !important;
  max-width: 260px !important;
  height: 30px !important;
  padding: 3px 30px 3px 10px !important;
  font-family: var(--font-sans) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #f1f5f9 !important;
  background-color: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 8px !important;
  outline: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  transition: all 0.15s ease !important;
}

.policy-select-cyber:hover {
  border-color: var(--cyan) !important;
  background-color: rgba(20, 30, 55, 0.98) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15) !important;
}

.policy-select-cyber:focus {
  border-color: var(--cyan) !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
}

.policy-select-cyber option {
  background-color: #0b0f19 !important;
  color: #f1f5f9 !important;
  padding: 8px 12px !important;
}

/* Input With Left Icon Wrapper */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon i {
  position: absolute;
  left: 11px;
  font-size: 0.8rem;
  color: var(--text-dim);
  pointer-events: none;
  transition: color 0.15s ease;
}

.input-with-icon input {
  padding-left: 32px !important;
}

.input-with-icon input:focus ~ i,
.input-with-icon:focus-within i {
  color: var(--cyan);
}

/* ==========================================================================
   CUSTOM CHECKBOXES & RADIOS
   ========================================================================== */
input[type="checkbox"],
.perm-checkbox,
.bf-date-cb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
}

input[type="checkbox"]:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

input[type="checkbox"]:checked {
  background: #0284c7;
  border-color: #38bdf8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin: 0;
}

input[type="radio"]:checked {
  border-color: #38bdf8;
  background: #0284c7;
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ==========================================================================
   FILTER PILLS, SEGMENTED CONTROLS & FILTER TABS (Linear & Cyberpunk Style)
   ========================================================================== */
.filter-pills,
.segmented-control,
.filter-tab-group {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.filter-pills button,
.segmented-control .seg-btn,
.filter-tab-btn,
.filter-tab-group button {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  flex: 0 0 auto !important;
  user-select: none;
}

.filter-pills button:hover,
.segmented-control .seg-btn:hover,
.filter-tab-btn:hover,
.filter-tab-group button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.filter-pills button.btn-blue,
.filter-pills button.active,
.segmented-control .seg-btn.active,
.filter-tab-btn.active,
.filter-tab-group button.active {
  color: #ffffff !important;
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* ==========================================================================
   CUSTOM STATUS SELECTOR COMPONENT (Linear / Raycast)
   ========================================================================== */
.custom-status-select {
  position: relative;
  display: inline-block;
  width: 100%;
}

.status-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  user-select: none;
}

.status-select-trigger:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(14, 20, 34, 0.95);
}

.status-select-trigger.active,
.status-select-trigger:focus {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
  outline: none;
}

.status-select-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.status-select-chevron {
  font-size: 0.72rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.status-select-trigger.active .status-select-chevron {
  transform: rotate(180deg);
}

.status-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 120;
  background: #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 4px;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: popover-in 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-select-dropdown.open {
  display: flex;
}

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.status-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.status-select-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.status-select-option.selected {
  background: rgba(56, 189, 248, 0.08);
  color: #ffffff;
}

.status-select-option-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-select-check {
  font-size: 0.75rem;
  color: var(--cyan);
  opacity: 0;
}

.status-select-option.selected .status-select-check {
  opacity: 1;
}

.sdot-working { background: #10b981; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22); }
.sdot-planned { background: #38bdf8; box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22); }
.sdot-deploy { background: #a78bfa; box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.22); }
.sdot-maintenance { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22); }
.sdot-down { background: #f43f5e; box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.22); }

/* Project Status Matrix Cards (Linear / Vercel refined) */
.project-status-card {
  position: relative !important;
  background: rgba(13, 18, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  overflow: visible !important;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.project-status-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(15, 22, 38, 0.95);
}

.project-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #101627;
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

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

.project-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.project-external-link {
  color: var(--text-dim);
  font-size: 0.72rem;
  transition: color 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.project-external-link:hover {
  color: var(--cyan);
}

.project-endpoint {
  font-size: 0.73rem;
  color: #64748b;
  font-family: var(--font-mono);
  margin-top: 3px;
}

.project-health-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.project-health-tag.online {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.06);
}

.project-health-tag.offline {
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.06);
}

.project-control-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-micro-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-save-project {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.btn-save-project:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-save-project.dirty {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-save-project.dirty:hover {
  background: #1d4ed8;
  border-color: #60a5fa;
}

.btn-save-project.saved {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.btn-icon-subtle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.73rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-subtle:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   SIDEBAR HOST SWITCHER (ISP4 vs ISP1)
   ========================================================================== */
.sidebar-host-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 4px 10px 14px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 3px;
}

.host-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px;
  border-radius: 7px;
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.host-pill i {
  font-size: 0.85rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.host-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.host-pill:hover i {
  color: var(--cyan);
  transform: scale(1.08);
}

.host-pill.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.host-pill.active i {
  color: var(--cyan);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.nav-host-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: fadeIn 0.2s ease;
}

/* ==========================================================================
   SUB-NAVIGATION TABS BAR (Linear & Vercel Inspired)
   ========================================================================== */
.subnav-bar {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(13, 18, 31, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 22px;
  overflow-x: auto;
  align-items: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.subnav-bar::-webkit-scrollbar {
  display: none;
}

.subnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  position: relative;
}

.subnav-tab i {
  font-size: 0.88rem;
  color: rgba(148, 163, 184, 0.75);
  transition: color 0.2s ease, transform 0.2s ease;
}

.subnav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.subnav-tab:hover i {
  color: var(--cyan, #38bdf8);
  transform: translateY(-1px);
}

.subnav-tab.active {
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14) 0%, rgba(99, 102, 241, 0.08) 100%);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.subnav-tab.active i {
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}


/* ==========================================================================
   SERVER COMPARATIVE BENTO GRID & CARDS
   ========================================================================== */
.server-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.server-bento-card {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.22s ease;
}

.server-bento-card:hover {
  border-color: var(--border-subtle-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

.server-metrics-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.server-metric-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.server-metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.server-metric-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.server-metric-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ==========================================================================
   AUDIT LOGS TABLE STYLES
   ========================================================================== */
.audit-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.audit-action-login {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.audit-action-container {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.audit-action-ai {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.audit-action-danger {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.audit-ip-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   PREMIUM AUTH PAGE (#/login)
   ========================================================================== */
.auth-viewport {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  overflow: hidden;
}

.auth-ambient-beams {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 800px at 50% 0%, rgba(56, 189, 248, 0.04), transparent 70%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  margin: 20px;
  background: #11141a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 34px 28px;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 2;
  animation: auth-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-fade-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card.shake {
  animation: auth-shake 0.45s ease-in-out;
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.auth-emblem {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 14px;
}

.auth-emblem svg {
  width: 26px;
  height: 26px;
  fill: #38bdf8;
}

.auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 6px;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.form-group-clean {
  margin-bottom: 20px;
}

.form-label-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* Bulletproof Modern Flex Input Group */
.auth-input-group {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 48px !important;
  background: rgba(13, 20, 36, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
}

.auth-input-group:hover {
  border-color: rgba(255, 255, 255, 0.22) !important;
  background: rgba(15, 23, 42, 0.88) !important;
}

.auth-input-group:focus-within {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
  background: rgba(15, 23, 42, 0.96) !important;
}

.auth-input-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 100% !important;
  color: #64748b !important;
  font-size: 0.95rem !important;
  pointer-events: none !important;
  transition: color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.auth-input-group:focus-within .auth-input-icon {
  color: #38bdf8 !important;
}

.auth-input-field {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #f8fafc !important;
  font-size: 0.95rem !important;
  font-family: inherit !important;
  padding: 0 14px 0 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.auth-input-field::placeholder {
  color: #475569 !important;
  opacity: 1 !important;
}

.auth-input-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  cursor: pointer !important;
  font-size: 0.95rem !important;
  transition: color 0.2s ease !important;
  padding: 0 !important;
  outline: none !important;
  flex-shrink: 0 !important;
}

.auth-input-toggle:hover {
  color: #f8fafc !important;
}

.auth-alert-box {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fecdd3;
  font-size: 0.82rem;
  margin-bottom: 18px;
  display: none;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   USERS MANAGEMENT VIEW (#/users)
   ========================================================================== */
.table-cyber {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
}

.table-cyber th {
  background: rgba(15, 23, 42, 0.6);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.table-cyber td {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  transition: background 0.15s ease;
}

.table-cyber tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Modal Cyber (Refined Enterprise Glass) */
.modal-overlay-cyber {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: sarmatOverlayFade 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-card-cyber {
  width: 100%;
  max-width: 580px;
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(255, 255, 255, 0.08) inset;
  padding: 24px 28px;
  max-height: 90vh;
  overflow-y: auto;
  animation: sarmatModalScale 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sarmatOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sarmatModalScale {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 403 Forbidden View */
.forbidden-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.forbidden-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}


/* === RECOVERED CORE COMPONENT STYLES === */

        
        
        
        .container { width: 100%; max-width: 100%; background-color: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); box-sizing: border-box; }

        @media (min-width: 992px) {
            body { padding: 2rem 1.5rem; }
            .container { max-width: 1440px; width: 95%; padding: 2.25rem; }
            .status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
            .admin-container { display: flex; gap: 2rem; align-items: flex-start; }
            .tabs { flex-direction: column; width: 250px; flex-shrink: 0; margin-bottom: 0 !important; }
            .tab-contents-wrapper { flex-grow: 1; min-width: 0; }
            .admin-status-controls { flex-direction: row !important; align-items: center; gap: 0.75rem; flex-wrap: nowrap; }
            .admin-status-controls select { flex: 0 0 250px !important; width: 250px !important; min-width: 230px !important; }
            .admin-status-controls input { flex: 1 1 auto !important; min-width: 180px !important; width: auto !important; }
            .admin-status-controls button { flex: 0 0 auto !important; width: auto !important; white-space: nowrap !important; }
        }

        .header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
        .header-top h1 { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.025em; }
        .auth-toggle-btn { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--border); color: var(--text); padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; font-weight: 500; }
        .auth-toggle-btn:hover { background: rgba(255, 255, 255, 0.2); }
        .auth-box { background-color: rgba(15, 23, 42, 0.6); border: 1px solid var(--border); padding: 1.25rem; border-radius: 12px; display: flex; align-items: center; gap: 1rem; }
        input[type="text"], input[type="password"], input[type="date"], select.status-select { width: 100%; padding: 0.85rem 1rem; background-color: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 0.95rem; outline: none; transition: all 0.2s ease; box-sizing: border-box; }
        input:focus, select.status-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); }
        ::-webkit-calendar-picker-indicator { filter: invert(1); cursor: pointer; }
        button.action-btn { padding: 0.85rem 1.5rem; border: none; border-radius: 8px; font-weight: 600; font-size: 0.95rem; color: white; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; }
        .btn-blue { background: var(--primary); }
        .btn-blue:hover { background: var(--primary-hover); }
        .btn-red { background: var(--danger); }
        .btn-red:hover { background: var(--danger-hover); }
        .btn-green { background: var(--success); }
        .btn-green:hover { background: var(--success-hover); }
        .btn-link { display: inline-flex; align-items: center; padding: 0.3rem 0.8rem; border-radius: 6px; font-size: 0.85rem; font-weight: 500; color: var(--primary); background: transparent; border: 1px solid var(--border); text-decoration: none; transition: all 0.2s; white-space: nowrap; }
        .btn-link:hover { border-color: var(--primary); background: rgba(59, 130, 246, 0.1); }
        .tabs { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; background: rgba(15, 23, 42, 0.5); padding: 0.4rem; border-radius: 10px; border: 1px solid var(--border); }
        .tab { text-align: left; padding: 0.85rem 1rem; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--text-muted); transition: all 0.2s; }
        .tab:hover { color: var(--text); background: rgba(255,255,255,0.05); }
        .tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.3); border: 1px solid var(--border); }
        .tab-content { display: none; animation: fadeIn 0.3s ease; }
        .tab-content.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
        .flex-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
        .terminal { background: var(--terminal-bg); color: var(--terminal-text); font-family: 'JetBrains Mono', 'Courier New', monospace; padding: 1.25rem; height: 280px; overflow-y: auto; border-radius: 10px; font-size: 0.85rem; white-space: pre-wrap; margin-top: 1rem; border: 1px solid #27272a; line-height: 1.5; user-select: text !important; -webkit-user-select: text !important; cursor: text; }
        /* === Стилизованные скроллбары === */
        * { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
        *::-webkit-scrollbar { width: 8px; height: 8px; }
        *::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.4); }
        *::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
        *::-webkit-scrollbar-thumb:hover { background: var(--primary); }
        /* === Терминал с шапкой === */
        .term-wrap { margin-top: 1.25rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--terminal-bg); }
        .term-wrap .terminal { margin-top: 0; border: none; border-radius: 0; height: 300px; }
        .term-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 1.1rem; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); }
        .term-header .term-title { display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-muted); }
        .term-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: inline-block; }
        .term-dot.live { background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse 1.5s infinite; }
        @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
        /* === Карточки контейнеров === */
        .cont-card { background: rgba(15, 23, 42, 0.4); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem 1.6rem; margin-bottom: 1.3rem; transition: border-color 0.2s, background 0.2s; }
        .cont-card:hover { border-color: var(--primary); }
        .cont-card.expanded { border-color: var(--primary); background: rgba(15, 23, 42, 0.6); box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12); }
        .cont-header { display: flex; align-items: center; gap: 0.85rem; cursor: pointer; flex-wrap: wrap; }
        .cont-name { font-weight: 600; font-size: 1.05rem; color: var(--text); word-break: break-all; }
        .cont-chevron { margin-left: auto; color: var(--text-muted); font-size: 0.9rem; transition: transform 0.2s; }
        .cont-chevron.open { transform: rotate(180deg); }
        .cont-status-line { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; }
        .cont-status-line .muted-chip { color: var(--text-muted); }
        .cont-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; align-items: center; }
        /* === Статус-чипы === */
        .stat-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.82rem; font-weight: 600; border: 1px solid var(--border); white-space: nowrap; }
        .stat-chip .sdot { width: 9px; height: 9px; border-radius: 50%; }
        .stat-chip.ok { background: rgba(16, 185, 129, 0.12); color: var(--success); border-color: rgba(16, 185, 129, 0.3); }
        .stat-chip.ok .sdot { background: var(--success); box-shadow: 0 0 6px var(--success); }
        .stat-chip.bad { background: rgba(239, 68, 68, 0.12); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }
        .stat-chip.bad .sdot { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
        .stat-chip.warn { background: rgba(245, 158, 11, 0.12); color: var(--warning); border-color: rgba(245, 158, 11, 0.3); }
        .stat-chip.warn .sdot { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
        .stat-chip.info { background: rgba(59, 130, 246, 0.12); color: var(--primary); border-color: rgba(59, 130, 246, 0.3); }
        .stat-chip.info .sdot { background: var(--primary); }
        /* === Кнопки мелкие === */
        button.action-btn.btn-sm { padding: 0.42rem 0.9rem; font-size: 0.82rem; width: auto; border-radius: 7px; gap: 0.4rem; }
        .btn-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); color: var(--text); }
        .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
        .cont-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
        .cont-actions .action-btn { padding: 0.5rem 1.05rem; }
        .exec-row { margin-top: 1.1rem; }
        .exec-row input[type="text"] { padding: 0.65rem 0.95rem; }
        /* === Mounts === */
        .mount-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; padding: 0.45rem 0.65rem; border-radius: 6px; background: rgba(255, 255, 255, 0.03); margin-bottom: 0.4rem; border: 1px solid transparent; }
        .mount-item:hover { border-color: var(--border); background: rgba(255, 255, 255, 0.05); }
        .mount-arrow { color: var(--primary); font-weight: 700; flex-shrink: 0; }
        .mount-type { font-size: 0.68rem; color: var(--text-muted); background: rgba(255,255,255,0.06); padding: 0.1rem 0.45rem; border-radius: 4px; text-transform: uppercase; flex-shrink: 0; }
        /* === Детали === */
        .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
        @media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
        .detail-col { min-width: 0; }
        .detail-row { display: flex; justify-content: space-between; gap: 1.2rem; padding: 0.5rem 0; border-bottom: 1px dashed rgba(51, 65, 85, 0.5); font-size: 0.88rem; }
        .detail-row:last-child { border-bottom: none; }
        .detail-label { color: var(--text-muted); flex-shrink: 0; }
        .detail-value { text-align: right; word-break: break-all; font-weight: 500; }
        .detail-section-title { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 1.1rem 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
        .exec-row { display: flex; gap: 0.5rem; margin-top: 0.9rem; align-items: center; }
        .exec-row input[type="text"] { flex: 1; min-width: 0; padding: 0.55rem 0.85rem; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; }
        .port-item { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; background: rgba(59, 130, 246, 0.1); color: var(--primary); border: 1px solid rgba(59, 130, 246, 0.25); padding: 0.15rem 0.55rem; border-radius: 6px; margin: 0.15rem 0.25rem 0.15rem 0; }
        .control-group { background: rgba(15, 23, 42, 0.3); border: 1px solid var(--border); padding: 1.75rem; border-radius: 14px; margin-bottom: 1.5rem; }
        .control-group label { display: block; font-weight: 500; margin-bottom: 0.9rem; color: var(--text-muted); }
        .cont-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.25rem; }
        .cont-toolbar .action-btn { padding: 0.6rem 1.2rem; }
        .terminal-log-line-err { color: var(--danger); }
        .terminal-log-line-warn { color: var(--warning); }
        .terminal-log-line-ok { color: var(--success); }
        .control-group { background: rgba(15, 23, 42, 0.3); border: 1px solid var(--border); padding: 1.25rem; border-radius: 12px; margin-bottom: 1.25rem; }
        .control-group label { display: block; font-weight: 500; margin-bottom: 0.75rem; color: var(--text-muted); }
        .status-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
        .status-card { background: rgba(15, 23, 42, 0.4); border: 1px solid var(--border); padding: 1.5rem; border-radius: 12px; display: flex; flex-direction: column; gap: 1rem; }
        .status-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
        .status-info { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
        .status-info h3 { margin: 0; font-size: 1.15rem; }
        .status-text { color: var(--text-muted); font-size: 0.95rem; margin: 0; line-height: 1.5; }
        .badges-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
        .badge { padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; display: inline-flex; align-items: center; border: 1px solid transparent; }
        .bg-green { background: rgba(16, 185, 129, 0.1); color: var(--success); border-color: rgba(16, 185, 129, 0.2); }
        .bg-red { background: rgba(239, 68, 68, 0.1); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
        .bg-blue { background: rgba(59, 130, 246, 0.1); color: var(--primary); border-color: rgba(59, 130, 246, 0.2); }
        .bg-purple { background: rgba(139, 92, 246, 0.1); color: var(--purple); border-color: rgba(139, 92, 246, 0.2); }
        .bg-yellow { background: rgba(245, 158, 11, 0.1); color: var(--warning); border-color: rgba(245, 158, 11, 0.2); }
        .ping-ok { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border-color: var(--border); }
        .ping-err { background: rgba(239, 68, 68, 0.1); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
        .dot { height: 8px; width: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
        .dot-ok { background-color: var(--success); box-shadow: 0 0 6px var(--success); }
        .dot-err { background-color: var(--danger); box-shadow: 0 0 6px var(--danger); }
        .admin-status-item { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
        .admin-status-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
        .admin-status-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
        .admin-status-controls { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; }
        .admin-status-controls select { width: 100%; min-width: 220px; }
        .admin-status-controls input { width: 100%; }
        .admin-status-controls button { width: 100%; white-space: nowrap; }
        @media (min-width: 992px) { .auth-box { max-width: 400px; margin-left: auto; } }
        .history-box { margin-top: 1rem; }
        .history-item { background: rgba(15, 23, 42, 0.4); padding: 1rem; border-left: 4px solid var(--primary); margin-bottom: 1rem; border-radius: 0 8px 8px 0; border: 1px solid var(--border); border-left-width: 4px; font-size: 0.9rem; }
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: none; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(4px); }
        .modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: 90%; max-width: 800px; max-height: 85vh; overflow-y: auto; padding: 1.5rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); animation: fadeIn 0.2s ease; }
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
        .modal-header h2 { margin: 0; font-size: 1.4rem; }
        .close-btn { background: transparent; border: none; color: var(--text-muted); font-size: 2rem; cursor: pointer; line-height: 1; padding: 0; margin: 0; }
        .close-btn:hover { color: var(--text); }
        .data-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
        .data-table th, .data-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
        .data-table th { color: var(--text-muted); font-weight: 600; }
        .data-table tr:last-child td { border-bottom: none; }
        .match-yes { color: var(--danger); font-weight: 600; }
        .match-no { color: var(--success); font-weight: 600; }
        .tag { padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }
        .bf-date-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: rgba(0,0,0,0.2); scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
        .bf-date-list::-webkit-scrollbar { width: 6px; }
        .bf-date-list::-webkit-scrollbar-track { background: transparent; }
        .bf-date-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
        .bf-date-list::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
        .bf-date-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s; font-size: 0.85rem; }
        .bf-date-item:last-child { border-bottom: none; }
        .bf-date-item:hover { background: rgba(255,255,255,0.03); }
        .bf-date-item input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
        .bf-date-item .bf-date-label { flex-grow: 1; }
        .bf-date-item .bf-date-badge { font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 10px; font-weight: 500; white-space: nowrap; }
        .bf-date-item .bf-date-project { color: var(--text-muted); font-size: 0.75rem; margin-left: auto; white-space: nowrap; }

        /* --- Премиальный дизайн: Аналитика, Cron и Ресурсы --- */
        .svg-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
        @keyframes spin { to { transform: rotate(360deg); } }
        .svg-icon.spin { animation: spin 1.6s linear infinite; }
        .svg-icon-spin { animation: spin 1s linear infinite; }
        .pulse-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; position: relative; flex-shrink: 0; }
        .pulse-dot.online { background: #10b981; box-shadow: 0 0 8px #10b981; }
        .pulse-dot.online::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #10b981; opacity: 0.6; animation: ping-slow 2.2s cubic-bezier(0, 0, 0.2, 1) infinite; }
        .pulse-dot.offline { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
        .pulse-dot.offline::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #ef4444; opacity: 0.6; animation: ping-slow 1.5s cubic-bezier(0, 0, 0.2, 1) infinite; }
        @keyframes ping-slow { 75%, 100% { transform: scale(2.2); opacity: 0; } }

        /* KPI карточки */
        .incidents-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; margin-bottom: 1.5rem; }
        .kpi-card { background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 1.25rem 1.4rem; position: relative; overflow: hidden; backdrop-filter: blur(14px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25); transition: transform 0.2s, border-color 0.2s; }
        .kpi-card:hover { border-color: rgba(59, 130, 246, 0.4); transform: translateY(-2px); }
        .kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
        .kpi-label { font-size: 0.76rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
        .kpi-icon-badge { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.04); color: #94a3b8; border: 1px solid rgba(255, 255, 255, 0.08); }
        .kpi-card.kpi-success .kpi-icon-badge { background: rgba(16, 185, 129, 0.12); color: #34d399; border-color: rgba(16, 185, 129, 0.25); }
        .kpi-card.kpi-danger .kpi-icon-badge { background: rgba(239, 68, 68, 0.12); color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
        .kpi-card.kpi-warning .kpi-icon-badge { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border-color: rgba(245, 158, 11, 0.25); }
        .kpi-card.kpi-purple .kpi-icon-badge { background: rgba(139, 92, 246, 0.12); color: #a78bfa; border-color: rgba(139, 92, 246, 0.25); }
        .kpi-val { font-size: 1.9rem; font-weight: 700; line-height: 1.15; color: var(--text); display: flex; align-items: baseline; gap: 0.35rem; }
        .kpi-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.45rem; display: flex; align-items: center; gap: 0.4rem; }

        /* Графики */
        .charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; margin-bottom: 1.5rem; }
        @media (max-width: 991px) { .charts-grid { grid-template-columns: 1fr; } }
        .chart-box { background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 1.25rem 1.4rem; min-height: 320px; backdrop-filter: blur(14px); position: relative; }
        .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
        .chart-title { font-size: 0.95rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }

        /* Полосы Uptime */
        .uptime-card { background: rgba(15, 23, 42, 0.65); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 1.1rem 1.3rem; margin-bottom: 0.85rem; backdrop-filter: blur(12px); transition: border-color 0.2s; }
        .uptime-card:hover { border-color: rgba(59, 130, 246, 0.4); }
        .uptime-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.65rem; flex-wrap: wrap; gap: 0.5rem; }
        .uptime-card-name { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.6rem; }
        .uptime-pct { font-weight: 700; font-size: 0.85rem; padding: 3px 9px; border-radius: 6px; background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); font-family: monospace; }
        .uptime-pct.degraded { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border-color: rgba(245, 158, 11, 0.25); }
        .uptime-pct.down { background: rgba(239, 68, 68, 0.12); color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
        .uptime-bars-track { display: flex; gap: 3px; align-items: center; height: 32px; padding: 2px 0; }
        .uptime-bar { flex: 1; height: 100%; min-width: 4px; border-radius: 3px; background: #10b981; cursor: pointer; transition: transform 0.15s, opacity 0.15s; }
        .uptime-bar:hover { transform: scaleY(1.22); opacity: 0.85; }
        .uptime-bar.status-degraded { background: #f59e0b; }
        .uptime-bar.status-down { background: #ef4444; }
        .uptime-bar-legend { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-top: 5px; }

        /* Фильтры и бейджи */
        .filter-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
        .filter-pill { padding: 0.35rem 0.85rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); color: var(--text-muted); transition: all 0.15s; display: inline-flex; align-items: center; gap: 0.4rem; }
        .filter-pill:hover, .filter-pill.active { background: var(--primary); color: white; border-color: var(--primary); }
        .incidents-table-wrap { background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; overflow-x: auto; backdrop-filter: blur(14px); }
        .inc-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
        .inc-table th { background: rgba(15, 23, 42, 0.95); padding: 0.75rem 1rem; text-align: left; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, 0.08); white-space: nowrap; }
        .inc-table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(51, 65, 85, 0.4); vertical-align: middle; }
        .inc-table tr:last-child td { border-bottom: none; }
        .inc-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

        /* Карточки Cron */
        .cron-jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.2rem; margin-bottom: 1.5rem; }
        .cron-card { background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 1.3rem; display: flex; flex-direction: column; justify-content: space-between; backdrop-filter: blur(14px); transition: transform 0.15s, border-color 0.15s; }
        .cron-card:hover { border-color: rgba(59, 130, 246, 0.45); }
        .cron-card.is-paused { opacity: 0.65; border-style: dashed; }
        .cron-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; gap: 0.5rem; }
        .cron-title { font-size: 1rem; font-weight: 600; color: var(--text); }
        .cron-badge-cat { font-size: 0.7rem; padding: 2px 7px; border-radius: 6px; background: rgba(59, 130, 246, 0.15); color: #60a5fa; font-weight: 500; white-space: nowrap; border: 1px solid rgba(59, 130, 246, 0.25); }
        .cron-sched-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px; padding: 4px 8px; font-family: monospace; font-size: 0.78rem; color: #38bdf8; margin: 0.4rem 0; }
        .cron-human-sched { font-size: 0.78rem; color: var(--text-muted); margin-left: 0.3rem; font-family: 'Inter', sans-serif; }
        .cron-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; margin-bottom: 0.85rem; flex-grow: 1; }
        .cron-meta-list { font-size: 0.76rem; color: var(--text-muted); border-top: 1px solid rgba(51, 65, 85, 0.4); padding-top: 0.6rem; display: flex; flex-direction: column; gap: 0.35rem; }
        .cron-meta-row { display: flex; justify-content: space-between; align-items: center; }
        .cron-actions { display: flex; gap: 0.45rem; margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.08); flex-wrap: wrap; }

        /* Умная группировка образов и томов */
        .docker-repo-card { background: rgba(15, 23, 42, 0.65); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; margin-bottom: 0.75rem; overflow: hidden; backdrop-filter: blur(12px); }
        .docker-repo-header { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1.1rem; cursor: pointer; transition: background 0.15s; }
        .docker-repo-header:hover { background: rgba(255, 255, 255, 0.02); }
        .docker-repo-title { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.6rem; }
        .docker-repo-rollbacks { background: rgba(0, 0, 0, 0.25); border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 0.75rem 1.1rem; display: none; }
        .docker-repo-rollbacks.open { display: block; }
        .tag-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 2px 7px; border-radius: 6px; font-size: 0.74rem; font-weight: 500; font-family: monospace; }
        .tag-pill.latest { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }
        .tag-pill.rollback { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
        .tag-pill.other { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.1); }
    /* === ULTRA-MODERN INPUTS & CONTROLS === */
input[type="text"], input[type="password"], input[type="email"], 
input[type="number"], input[type="date"], input[type="search"], 
select, textarea {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #f8fafc;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}
input::placeholder, textarea::placeholder {
    color: #64748b;
}
input:focus, select:focus, textarea:focus {
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding: 0 40px 0 14px !important;
    cursor: pointer;
    line-height: 40px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
select::-ms-expand {
    display: none;
}
select option {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 10px 14px;
    font-size: 0.9rem;
}

/* === MODERN BUTTON DESIGN SYSTEM === */
.btn, button.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 42px;
    padding: 0 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    font-family: inherit;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    box-sizing: border-box;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.btn:hover, button.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.btn:active, button.action-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Button Colors */
.btn-primary, .btn-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover, .btn-blue:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
}

.btn-success, .btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}
.btn-success:hover, .btn-green:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
}

.btn-danger, .btn-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover, .btn-red:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.45);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    box-shadow: none;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    box-shadow: none;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Button Sizes */
.btn-sm, button.action-btn.btn-sm {
    height: 34px;
    padding: 0 0.85rem;
    font-size: 0.8rem;
    border-radius: 8px;
    gap: 0.35rem;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* === PREMIUM MODERN TABLES === */
.modern-table-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow-x: auto;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-overflow-scrolling: touch;
}
.modern-table-card table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.modern-table-card th {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modern-table-card td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    color: #f1f5f9;
}
.modern-table-card tr:last-child td {
    border-bottom: none;
}
.modern-table-card tbody tr {
    transition: background 0.15s ease;
}
.modern-table-card tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}
.status-badge.active {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-badge.deleted {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* === PREMIUM MODALS === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-sizing: border-box;
}
.modal-content-glass {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header-glass {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}
.modal-body-glass {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}
.modal-footer-glass {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.form-group-glass {
    margin-bottom: 1.1rem;
}
.form-group-glass:last-child {
    margin-bottom: 0;
}
.form-group-glass label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}
.form-group-glass label span.req {
    color: #f87171;
    margin-left: 2px;
}

/* === NGINX GATEWAY & DATABASE CENTER STYLES === */
.chip-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 32px;
    padding: 0 0.85rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.chip-filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}
.chip-filter-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.3) 100%);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.nginx-terminal-viewer {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    max-height: 520px;
    overflow-y: auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}
.nginx-log-row {
    padding: 3px 6px;
    border-radius: 6px;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: background 0.1s ease;
    word-break: break-all;
}
.nginx-log-row:hover {
    background: rgba(255, 255, 255, 0.03);
}
.nginx-status-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.72rem;
    font-family: monospace;
    flex-shrink: 0;
}
.nginx-badge-502 {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.5);
}
.nginx-badge-500 {
    background: rgba(249, 115, 22, 0.25);
    color: #fdba74;
    border: 1px solid rgba(249, 115, 22, 0.5);
}
.nginx-badge-404 {
    background: rgba(234, 179, 8, 0.25);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.5);
}
.nginx-badge-daemon {
    background: rgba(168, 85, 247, 0.25);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.5);
}
.nginx-badge-info {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.db-hero-card {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
}
.db-hero-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -5px rgba(0, 0, 0, 0.45);
}

/* === SSL / TLS CERTIFICATES STYLES === */
.ssl-card {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 1.4rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
}
.ssl-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}
.ssl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
}
.ssl-badge-ok {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.ssl-badge-warn {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.ssl-badge-crit {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.5);
    animation: sslPulse 1.8s infinite;
}
@keyframes sslPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.ssl-domain-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2px;
}
.ssl-domain-pill.primary {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.25);
    font-weight: 600;
}
.ssl-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}
.ssl-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
    

/* === MODERN ENHANCEMENTS === */
/* ==========================================================================
   SARMAT AI GATEWAY — CYBER OBSIDIAN SaaS REDESIGN (2026 Ultra-Modern Dark Theme)
   ========================================================================== */

400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');



/* Global Reset & Base */
html, 

/* Main App Container */
#root, .ui.container {
  max-width: 1360px !important;
  width: 95% !important;
  margin: 0 auto !important;
  padding-top: 18px !important;
  padding-bottom: 40px !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   TOP NAVIGATION BAR (Glassmorphism Navbar)
   ========================================================================== */
.ui.menu,
.ui.menu.borderless,
.ui.secondary.pointing.menu {
  background: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5) !important;
  padding: 6px 12px !important;
  margin-bottom: 24px !important;
  display: flex !important;
  align-items: center !important;
  min-height: 56px !important;
}

/* Brand Header Item */
.ui.menu .header.item,
.ui.menu .header.item:first-child {
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  letter-spacing: -0.03em !important;
  color: #ffffff !important;
  background: transparent !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 16px !important;
}

.ui.menu .header.item img {
  border-radius: 10px !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

/* Regular Menu Items */
.ui.menu .item {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  border-radius: var(--radius-sm) !important;
  margin: 3px 3px !important;
  padding: 8px 14px !important;
  border: 1px solid transparent !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  background: transparent !important;
}

.ui.menu .item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.ui.menu .active.item {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14) 0%, rgba(37, 99, 235, 0.14) 100%) !important;
  color: var(--primary-cyan) !important;
  font-weight: 600 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15) !important;
}

/* Menu Dropdowns */
.ui.menu .ui.dropdown .menu {
  background: rgba(15, 23, 42, 0.96) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
  padding: 6px !important;
}

.ui.menu .ui.dropdown .menu > .item {
  color: var(--text-muted) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 14px !important;
  font-size: 0.88rem !important;
}

.ui.menu .ui.dropdown .menu > .item:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   CARDS, SEGMENTS & PANELS (Deep Slate Glass)
   ========================================================================== */
.ui.segment,
.ui.segments {
  background: var(--bg-card) !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-subtle) !important;
  backdrop-filter: blur(16px) !important;
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.45) !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  color: var(--text-main) !important;
  margin-bottom: 24px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.ui.segment:hover {
  border-color: rgba(56, 189, 248, 0.25) !important;
}

.ui.header {
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.ui.sub.header, .sub.header {
  color: var(--text-muted) !important;
}

/* ==========================================================================
   TABLES (NO OVERFLOW, DARK SaaS GRIDS)
   ========================================================================== */
.ui.segment:has(table.ui.table),
div:has(> table.ui.table),
.ui.table-wrapper {
  max-width: 100% !important;
  overflow-x: auto !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
}

.ui.table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: auto !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-subtle) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
  margin-top: 14px !important;
  margin-bottom: 20px !important;
  color: var(--text-main) !important;
}

.ui.table thead th {
  background: rgba(15, 23, 42, 0.95) !important;
  color: var(--text-muted) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  padding: 13px 16px !important;
  white-space: nowrap !important;
}

.ui.table tbody tr {
  background: transparent !important;
  transition: background-color 0.15s ease !important;
}

.ui.table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.035) !important;
}

.ui.table tbody td {
  padding: 13px 16px !important;
  font-size: 0.88rem !important;
  color: #cbd5e1 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-left: none !important;
  border-right: none !important;
  vertical-align: middle !important;
  word-break: break-word !important;
  line-height: 1.5 !important;
}

/* First Column (Time / ID) Compact & Monospace */
.ui.table td:first-child,
.ui.table th:first-child {
  white-space: nowrap !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.82rem !important;
}

/* Monospace Pill for Keys, IDs and Tokens */
.ui.table code,
.ui.table .token-code,
.ui.table a[href*="/channel/edit"],
.ui.table a[href*="/token/edit"] {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.82rem !important;
  color: var(--primary-cyan) !important;
  background: rgba(56, 189, 248, 0.08) !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
  text-decoration: none !important;
}

/* ==========================================================================
   BUTTONS (Glowing Gradients & Micro-interactions)
   ========================================================================== */
.ui.button {
  border-radius: 9px !important;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
  padding: 9px 16px !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1px solid transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  cursor: pointer !important;
}

.ui.button:hover {
  transform: translateY(-1px) !important;
}

.ui.button:active {
  transform: scale(0.98) !important;
}

.ui.button > i.icon {
  margin: 0 !important;
  vertical-align: middle !important;
}

/* Primary Button (Neon Cyan-Blue Gradient) */
.ui.primary.button,
.ui.blue.button {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35) !important;
}

.ui.primary.button:hover,
.ui.blue.button:hover {
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45) !important;
}

/* Positive / Green Button */
.ui.positive.button,
.ui.green.button {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3) !important;
}

.ui.positive.button:hover,
.ui.green.button:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

/* Negative / Red Button */
.ui.negative.button,
.ui.red.button {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3) !important;
}

.ui.negative.button:hover,
.ui.red.button:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45) !important;
}

/* Ghost / Basic Button */
.ui.button.basic,
.ui.basic.button {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-subtle) !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

.ui.button.basic:hover,
.ui.basic.button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   INPUT FIELDS & ICONS COLLISION FIX (Never Clash)
   ========================================================================== */
.ui.input input,
.ui.form input:not([type]),
.ui.form input[type="text"],
.ui.form input[type="email"],
.ui.form input[type="password"],
.ui.form input[type="number"],
.ui.form textarea,
.ui.selection.dropdown {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  color: #f8fafc !important;
  padding: 10px 14px !important;
  font-size: 0.92rem !important;
  outline: none !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
  box-sizing: border-box !important;
}

.ui.input input:focus,
.ui.form input:focus,
.ui.form textarea:focus,
.ui.selection.active.dropdown {
  border-color: var(--primary-cyan) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

/* ABSOLUTE FIX: Icons in Inputs never overlap text! */
.ui.icon.input > input {
  padding-right: 3rem !important;
}

.ui.left.icon.input > input {
  padding-left: 3rem !important;
}

.ui.icon.input > i.icon {
  pointer-events: none !important;
  opacity: 0.65 !important;
  color: var(--text-muted) !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ==========================================================================
   LABELS & STATUS BADGES (Luminous Pills)
   ========================================================================== */
.ui.label {
  border-radius: 20px !important;
  font-weight: 600 !important;
  font-size: 0.76rem !important;
  padding: 4px 11px !important;
  letter-spacing: 0.02em !important;
  box-shadow: none !important;
  border: 1px solid transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.ui.green.label, .ui.positive.label {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

.ui.red.label, .ui.negative.label {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.ui.blue.label {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.ui.yellow.label, .ui.orange.label {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.ui.basic.label {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-muted) !important;
}

/* ==========================================================================
   MODALS (Deep Glass Dark Overlay)
   ========================================================================== */
.ui.dimmer {
  background-color: rgba(5, 8, 15, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.ui.modal {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
  color: var(--text-main) !important;
  overflow: hidden !important;
}

.ui.modal > .header {
  background: rgba(15, 23, 42, 0.95) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  padding: 18px 24px !important;
}

.ui.modal > .content {
  background: transparent !important;
  color: var(--text-main) !important;
  padding: 24px !important;
}

.ui.modal > .actions {
  background: rgba(15, 23, 42, 0.95) !important;
  border-top: 1px solid var(--border-subtle) !important;
  padding: 16px 24px !important;
}

/* ==========================================================================
   SCROLLBARS
   ========================================================================== */
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent !important;
}

*::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

*::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5) !important;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 4px !important;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--primary-cyan) !important;
}

/* ==========================================================================
   PUBLIC STATUS LANDING PAGE (2026 Sleek Linear / Apple / Raycast Style)
   ========================================================================== */
.landing-status-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  position: relative;
  z-index: 10;
}

.landing-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 28px;
}

.landing-hero-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.landing-emblem {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(14, 165, 233, 0.2);
}

.landing-title {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.landing-hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.landing-time-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.landing-health-banner {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.landing-health-banner.state-warn {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1);
}

.health-status-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.health-status-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.health-status-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.landing-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.landing-section-heading {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-grid-count {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.landing-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  margin-bottom: 50px;
}

.landing-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.landing-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 24px rgba(56, 189, 248, 0.1);
  background: rgba(15, 23, 42, 0.82);
}

.landing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.landing-card:hover::before {
  opacity: 1;
}

.landing-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

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

.landing-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.color-cyan { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.3); }
.color-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.color-violet { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.color-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.color-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.landing-card-name {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.landing-card-role {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.landing-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.landing-status-badge.badge-ok {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.landing-status-badge.badge-bad {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.landing-status-badge.badge-info {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.sdot-working {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.sdot-down {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

.landing-card-msg {
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 2px solid rgba(56, 189, 248, 0.5);
}

.landing-card-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 14px;
}

.timeline-bars {
  display: flex;
  gap: 2.5px;
  height: 16px;
  align-items: center;
}

.landing-day-bar {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.landing-day-bar:hover {
  transform: scaleY(1.3);
  opacity: 1 !important;
}

.landing-day-bar.bar-ok {
  background: #10b981;
  opacity: 0.85;
}

.landing-day-bar.bar-warn {
  background: #f59e0b;
  opacity: 0.9;
}

.landing-day-bar.bar-down {
  background: #f43f5e;
  opacity: 1;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 5px;
  font-family: var(--font-mono);
}

.uptime-pct {
  color: #34d399;
  font-weight: 600;
}

.landing-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.click-hint {
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.landing-card:hover .click-hint {
  opacity: 1;
}

/* BOTTOM GATE CARD */
.landing-bottom-gate {
  margin-top: auto;
  padding-top: 20px;
}

.landing-gate-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  padding: 26px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(56, 189, 248, 0.08);
  flex-wrap: wrap;
}

.landing-gate-info {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 680px;
}

.gate-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.gate-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.gate-sub {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.landing-gate-btn {
  padding: 14px 28px !important;
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3) !important;
}

.landing-copyright {
  text-align: center;
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.btn-back-to-status {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  margin-bottom: 20px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.btn-back-to-status:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   HIGH-END CYBER TABLES (Supabase / Datadog / Linear Standard)
   ========================================================================== */
.table-cyber-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 24px;
}

.table-cyber-card .table-header-bar {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.4);
}

.table-responsive-cyber {
  width: 100%;
  overflow-x: auto;
}

.cyber-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.cyber-table thead th {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.cyber-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.cyber-table tbody tr:last-child {
  border-bottom: none;
}

.cyber-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.cyber-table tbody td {
  padding: 14px 20px;
  color: var(--text-main);
  vertical-align: middle;
}

.cyber-table code,
.cyber-table .table-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge-status-pill.ok {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-status-pill.warn {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-status-pill.danger,
.badge-status-pill.bad {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-status-pill.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-status-pill.info {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   HIGH-END TABLE ACTION BUTTONS & RESPONSIVE CELLS
   ========================================================================== */
.table-actions,
.table-actions-group {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  vertical-align: middle !important;
}

.table-cyber th,
.cyber-table th {
  white-space: nowrap !important;
  vertical-align: middle !important;
}

.table-cyber td,
.cyber-table td {
  vertical-align: middle !important;
}

.table-cyber td:last-child,
.cyber-table td:last-child,
.table-cyber td[style*="text-align:right"],
.cyber-table td[style*="text-align:right"],
.table-actions-cell {
  white-space: nowrap !important;
  text-align: right !important;
}

/* Automatic baseline correction for buttons inside table cells */
.table-cyber td .btn-cyber,
.cyber-table td .btn-cyber,
.table-actions-group .btn-cyber:not(.btn-icon-only),
.table-actions-group button:not(.btn-icon-only) {
  height: 32px !important;
  min-height: 32px !important;
  width: auto !important;
  min-width: unset !important;
  padding: 0 12px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

.table-cyber td .btn-icon-only,
.cyber-table td .btn-icon-only,
.table-cyber td .btn-table-icon,
.cyber-table td .btn-table-icon,
.table-actions-group .btn-icon-only,
.table-actions .btn-icon-only {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* High-performance Daily Uptime Bar Items */
.daily-uptime-bar-item {
  flex: 1;
  height: 18px;
  border-radius: 2px;
  opacity: 0.85;
  transition: transform 0.1s ease, opacity 0.1s ease;
  cursor: pointer;
  display: inline-block;
  contain: strict;
}

.daily-uptime-bar-item:hover {
  transform: scaleY(1.35);
  opacity: 1;
  z-index: 2;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE SYSTEM (2026 Mobile-First Adaptive)
   ========================================================================== */

/* Toggle Button in Topbar */
.btn-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.05rem;
  flex-shrink: 0;
  padding: 0;
}
.btn-sidebar-toggle:hover, .btn-sidebar-toggle:active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Close button inside mobile sidebar header */
.btn-sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.btn-sidebar-close:hover {
  color: #fff;
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

/* WAF Charts & Lists Grids */
.waf-grid-charts {
  display: grid;
  grid-template-columns: 2fr 1.1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.waf-grid-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

@media (max-width: 991px) {
  .btn-sidebar-toggle {
    display: inline-flex !important;
  }

  .btn-sidebar-close {
    display: inline-flex !important;
  }

  .sidebar-backdrop {
    display: block !important;
  }

  .sidebar-backdrop.open {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Off-canvas Mobile Drawer */
  .sarmat-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 280px !important;
    max-width: 85vw !important;
    z-index: 9999 !important;
    transform: translateX(-100%) !important;
    box-shadow: none !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: rgba(10, 14, 24, 0.98) !important;
  }

  .sarmat-sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 14px 0 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  }

  body.sidebar-open {
    overflow: hidden !important;
  }

  /* Main Viewport full width */
  .sarmat-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .sarmat-topbar {
    padding: 0 16px !important;
    height: 58px !important;
    min-height: 58px !important;
  }

  .topbar-left {
    gap: 12px !important;
  }

  .page-title {
    font-size: 1.05rem !important;
    max-width: 240px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .sarmat-content {
    padding: 16px 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Bento and split grids stack vertically */
  .server-bento-grid,
  .split-pane-layout,
  .waf-grid-2col,
  .waf-matrix-grid,
  .waf-grid-charts,
  .waf-grid-lists,
  .bento-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

@media (max-width: 768px) {
  .sarmat-topbar {
    padding: 0 10px !important;
    height: 54px !important;
    min-height: 54px !important;
  }

  .topbar-left {
    gap: 8px !important;
  }

  .page-title {
    font-size: 0.95rem !important;
    max-width: 160px !important;
  }

  .topbar-right {
    gap: 8px !important;
  }

  .topbar-right .live-indicator span:last-child {
    display: none !important;
  }

  .topbar-right .btn-cyber {
    padding: 4px 8px !important;
    font-size: 0.74rem !important;
  }

  #topbar-clock {
    font-size: 0.75rem !important;
  }

  .sarmat-content {
    padding: 12px 10px !important;
  }

  /* Mobile Grid Collapses */
  .kpi-row,
  .kpi-grid,
  .incidents-kpi-grid,
  .waf-stats-grid,
  .server-bento-grid,
  #admin-status-container,
  .cron-jobs-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .server-bento-card,
  .admin-status-item,
  .kpi-card,
  .glass-card {
    padding: 14px !important;
    border-radius: 12px !important;
  }

  /* Mobile Controls */
  .admin-status-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .admin-status-controls select,
  .admin-status-controls input {
    width: 100% !important;
    flex: 1 1 auto !important;
    font-size: 0.9rem !important;
  }

  /* Horizontal Subtabs Scrollbar */
  .page-subtabs-bar {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
    padding: 4px !important;
    margin-bottom: 14px !important;
    scrollbar-width: none;
  }
  .page-subtabs-bar::-webkit-scrollbar {
    display: none;
  }

  .subtab-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }

  /* Modals on Phones */
  .modal-overlay-cyber,
  .modal-backdrop {
    padding: 8px !important;
  }

  .modal-card-cyber,
  .confirm-modal-card {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 92vh !important;
    max-height: 92dvh !important;
    margin: 6px auto !important;
    padding: 14px 12px !important;
    border-radius: 14px !important;
  }

  /* Tables horizontal scroll container */
  .table-responsive,
  .cyber-table-wrap,
  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
  }

  .table-cyber,
  .cyber-table {
    min-width: 600px !important;
  }

  /* Touch-friendly buttons */
  .btn-cyber,
  .action-btn {
    min-height: 38px !important;
  }
}

@media (max-width: 480px) {
  .topbar-right div:has(#topbar-clock) {
    display: none !important;
  }

  .page-title {
    max-width: 140px !important;
  }
}

/* ==========================================================================
   SARMAT MODERN LOG SYSTEM & TERMINAL BADGES
   ========================================================================== */
.log-badge-ok, .log-badge-success {
  color: #34d399;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.log-badge-fail, .log-badge-error {
  color: #f87171;
  font-weight: 700;
  background: rgba(248, 113, 113, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.35);
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.log-badge-stop {
  color: #fbbf24;
  font-weight: 700;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
}

.log-badge-warn, .log-badge-warning {
  color: #fbbf24;
  font-weight: 600;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
}

.log-badge-info {
  color: #38bdf8;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
}

.log-badge-skip {
  color: #94a3b8;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
}

.log-badge-save {
  color: #10b981;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
}

.log-badge-daemon, .log-badge-batch {
  color: #38bdf8;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
}

.log-badge-autopilot {
  color: #c084fc;
  font-weight: 700;
  background: rgba(192, 132, 252, 0.18);
  border: 1px solid rgba(192, 132, 252, 0.35);
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
}

.log-badge-bf {
  color: #a78bfa;
  font-weight: 700;
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
}

.log-badge-checkpoint {
  color: #2dd4bf;
  font-weight: 700;
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
}

.log-head-double {
  color: #38bdf8;
  font-weight: 700;
  display: inline-block;
  margin: 6px 0;
  background: rgba(56, 189, 248, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: 3px solid #38bdf8;
}

.log-head-single {
  color: #c084fc;
  font-weight: 600;
  display: inline-block;
  margin: 4px 0;
  background: rgba(192, 132, 252, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  border-left: 2px solid #c084fc;
}

.log-fraction {
  color: #38bdf8;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.1);
  padding: 0 4px;
  border-radius: 3px;
}

.log-search-match {
  background: #fbbf24;
  color: #000;
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 700;
}

/* Python & Runtime Traceback Cards */
.log-traceback-card {
  margin: 8px 0;
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-left: 4px solid #f43f5e;
  border-radius: 8px;
  overflow: hidden;
  font-family: inherit;
}

.log-traceback-header {
  background: rgba(244, 63, 94, 0.15);
  padding: 5px 12px;
  font-weight: 700;
  font-size: 0.76rem;
  color: #fda4af;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(244, 63, 94, 0.2);
}

.log-traceback-body {
  margin: 0;
  padding: 8px 12px;
  color: #fecdd3;
  font-size: 0.76rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

/* Filter chips */
.log-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.log-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.log-chip.active {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  font-weight: 700;
}

/* ==========================================================================
   SARMAT UNIFIED PREMIUM LOADING SYSTEM (LINEAR / VERCEL / APPLE DARK SHIMMER)
   Zero Neon Slop • Neutral Translucent Sheen • Smooth CSS Transitions
   ========================================================================== */

/* Universal Ring Spinner */
.sarmat-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--text-primary, #f8fafc);
  animation: sarmatSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  flex-shrink: 0;
  display: inline-block;
}

.sarmat-spinner-sm {
  width: 15px;
  height: 15px;
  border-width: 1.75px;
}

.sarmat-spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 2.5px;
}

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

/* Universal Loading State Container */
.sarmat-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  color: var(--text-muted);
}

.sarmat-loading-text,
.sarmat-skeleton-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Elegant Empty State Container */
.sarmat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  width: 100%;
  box-sizing: border-box;
}

.sarmat-empty-state i {
  font-size: 1.6rem;
  opacity: 0.35;
  margin-bottom: 2px;
}

/* Neutral Dark Chart Skeleton */
.sarmat-chart-skeleton,
.cyber-chart-skeleton {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
  background: var(--bg-surface, #12151b);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-hairline, rgba(255, 255, 255, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.sarmat-chart-skeleton-grid,
.cyber-chart-skeleton-grid {
  position: absolute;
  inset: 0;
  background-size: 32px 32px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
}

.sarmat-skeleton-shimmer,
.sarmat-chart-skeleton::after,
.cyber-chart-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 35%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.02) 65%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: sarmatShimmer 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes sarmatShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.sarmat-skeleton-center,
.cyber-skeleton-badge {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(14, 17, 23, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-hairline, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  padding: 6px 14px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.cyber-skeleton-badge i {
  color: var(--text-muted);
}

/* Card & Table Skeleton Placeholders */
.sarmat-skeleton-card,
.cyber-skeleton-card {
  position: relative;
  background: var(--bg-surface, #12151b);
  border: 1px solid var(--border-hairline, rgba(255, 255, 255, 0.06));
  border-radius: 8px;
  padding: 16px;
  overflow: hidden;
  min-height: 100px;
}

.sarmat-skeleton-line,
.cyber-skeleton-line {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  height: 12px;
}

.sarmat-skeleton-line::after,
.cyber-skeleton-line::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: sarmatShimmer 1.8s infinite;
}

.sarmat-skeleton-row,
.cyber-skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-hairline, rgba(255, 255, 255, 0.04));
}

/* Smooth Content Reveal */
.view-wrapper {
  animation: sarmatFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sarmatFadeIn {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Deprecate & Hide Weird Jumpy Neon Artifacts */
.cyber-chart-skeleton-wave,
.cyber-chart-skeleton-waveform,
.cyber-scanline,
.c-wave-bar,
.pulse-indicator-dot {
  display: none !important;
}







/* ==========================================================================
   STUDIO REDESIGN SYSTEM (LINEAR / VERCEL / RAYCAST PRO AESTHETIC)
   Imported from admin-redesign-preview.html
   ========================================================================== */
    /* ==========================================================================
       SARMAT PRO DESIGN SYSTEM — LINEAR / VERCEL / RAYCAST STUDIO AESTHETIC
       Zero Neon Slop • High Information Density • Authentic Telemetry UI
       ========================================================================== */
    :root {
      /* Elevation surfaces */
      --bg-base: #08090c;
      --bg-sidebar: #0c0e12;
      --bg-surface: #12151b;
      --bg-surface-hover: #171b23;
      --bg-surface-active: #1d222d;
      --bg-card: #11141a;
      --bg-card-subtle: rgba(255, 255, 255, 0.02);

      /* Borders */
      --border-hairline: rgba(255, 255, 255, 0.06);
      --border-subtle: #1e232d;
      --border-muted: #272e3b;
      --border-focus: #38bdf8;

      /* Typography */
      --text-primary: #f8fafc;
      --text-secondary: #94a3b8;
      --text-muted: #64748b;
      --text-dim: #475569;

      /* Restrained functional accents */
      --accent-primary: #38bdf8;
      --accent-primary-dim: rgba(56, 189, 248, 0.12);
      --accent-success: #10b981;
      --accent-success-dim: rgba(16, 185, 129, 0.12);
      --accent-warning: #f59e0b;
      --accent-warning-dim: rgba(245, 158, 11, 0.12);
      --accent-danger: #f43f5e;
      --accent-danger-dim: rgba(244, 63, 94, 0.12);
      --accent-purple: #a855f7;
      --accent-purple-dim: rgba(168, 85, 247, 0.12);

      /* Typography fonts */
      --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      --font-mono: 'JetBrains Mono', monospace;

      /* Layout */
      --sidebar-width: 256px;
      --header-height: 56px;
    }

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

    body {
      background-color: var(--bg-base);
      color: var(--text-primary);
      font-family: var(--font-sans);
      font-size: 13.5px;
      line-height: 1.5;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
    }

    /* Scrollbar */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: transparent;
    }
    ::-webkit-scrollbar-thumb {
      background: var(--border-muted);
      border-radius: 3px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--text-muted);
    }

    /* ==========================================================================
       APP LAYOUT SHELL
       ========================================================================== */
    .app-layout {
      display: flex;
      min-height: 100vh;
      width: 100%;
    }

    /* ==========================================================================
       SIDEBAR
       ========================================================================== */
    .sidebar {
      width: var(--sidebar-width);
      background-color: var(--bg-sidebar);
      border-right: 1px solid var(--border-hairline);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      z-index: 40;
    }

    .sidebar-brand {
      height: var(--header-height);
      padding: 0 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      border-bottom: 1px solid var(--border-hairline);
    }

    .brand-icon-box {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      background: linear-gradient(135deg, #1e293b, #0f172a);
      border: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent-primary);
      font-size: 12px;
      font-weight: 700;
    }

    .brand-text {
      display: flex;
      flex-direction: column;
    }

    .brand-title {
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.03em;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .brand-tag {
      font-size: 9.5px;
      font-family: var(--font-mono);
      background: var(--accent-primary-dim);
      color: var(--accent-primary);
      padding: 1px 5px;
      border-radius: 4px;
      font-weight: 600;
    }

    .brand-subtitle {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 500;
    }

    /* Node selector widget in sidebar */
    .sidebar-node-card {
      margin: 12px 12px 6px;
      padding: 8px;
      background: var(--bg-surface);
      border: 1px solid var(--border-hairline);
      border-radius: 8px;
    }

    .node-track {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px;
    }

    .node-btn {
      background: transparent;
      border: 1px solid transparent;
      border-radius: 6px;
      padding: 6px 8px;
      text-align: left;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.15s ease;
      color: var(--text-muted);
    }

    .node-btn:hover {
      background: var(--bg-surface-hover);
      color: var(--text-secondary);
    }

    .node-btn.active {
      background: var(--bg-card);
      border-color: var(--border-subtle);
      color: var(--text-primary);
      box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }

    .node-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .node-dot.online { background: var(--accent-success); box-shadow: 0 0 6px rgba(16,185,129,0.5); }
    .node-dot.offline { background: var(--text-dim); }

    .node-label {
      font-size: 11.5px;
      font-weight: 600;
      line-height: 1.2;
    }
    .node-sub {
      font-size: 10px;
      color: var(--text-muted);
      font-family: var(--font-mono);
    }

    /* Navigation list */
    .sidebar-nav {
      flex: 1;
      padding: 10px 12px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .nav-group-title {
      font-size: 10.5px;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--text-dim);
      padding: 0 8px;
      margin-bottom: 4px;
    }

    .nav-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 7px 10px;
      border-radius: 6px;
      color: var(--text-secondary);
      font-size: 12.5px;
      font-weight: 500;
      text-decoration: none;
      cursor: pointer;
      transition: all 0.12s ease;
      border: 1px solid transparent;
    }

    .nav-item:hover {
      background: var(--bg-surface-hover);
      color: var(--text-primary);
    }

    .nav-item.active {
      background: var(--bg-surface-active);
      color: var(--text-primary);
      border-color: var(--border-hairline);
      font-weight: 600;
    }

    .nav-icon {
      width: 16px;
      font-size: 13px;
      text-align: center;
      color: var(--text-muted);
      transition: color 0.12s ease;
    }
    .nav-item:hover .nav-icon,
    .nav-item.active .nav-icon {
      color: var(--accent-primary);
    }

    .nav-badge {
      margin-left: auto;
      font-size: 10px;
      font-family: var(--font-mono);
      background: var(--border-subtle);
      color: var(--text-muted);
      padding: 1px 6px;
      border-radius: 10px;
    }

    .nav-badge.green {
      background: var(--accent-success-dim);
      color: var(--accent-success);
    }

    /* Sidebar Footer */
    .sidebar-footer {
      padding: 12px;
      border-top: 1px solid var(--border-hairline);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--bg-sidebar);
    }

    .user-pill {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .user-avatar {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: #1e293b;
      border: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      color: var(--accent-primary);
    }

    .user-details {
      display: flex;
      flex-direction: column;
    }
    .user-name {
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-primary);
    }
    .user-role {
      font-size: 10px;
      color: var(--text-muted);
    }

    /* ==========================================================================
       MAIN CONTENT VIEWPORT
       ========================================================================== */
    .main-viewport {
      margin-left: var(--sidebar-width);
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    /* Top Navigation Bar */
    .topbar {
      height: var(--header-height);
      background: rgba(8, 9, 12, 0.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border-hairline);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 24px;
      position: sticky;
      top: 0;
      z-index: 30;
    }

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

    .breadcrumb {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12.5px;
      color: var(--text-muted);
    }

    .breadcrumb-segment {
      color: var(--text-secondary);
    }
    .breadcrumb-segment.current {
      color: var(--text-primary);
      font-weight: 600;
    }

    /* Quick Search Bar */
    .search-trigger {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--bg-surface);
      border: 1px solid var(--border-hairline);
      border-radius: 6px;
      padding: 5px 10px;
      font-size: 12px;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.15s ease;
      min-width: 220px;
    }
    .search-trigger:hover {
      border-color: var(--border-muted);
      color: var(--text-secondary);
    }
    .search-kbd {
      margin-left: auto;
      font-size: 10px;
      font-family: var(--font-mono);
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 4px;
      padding: 1px 5px;
    }

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

    .cluster-status-pill {
      display: flex;
      align-items: center;
      gap: 7px;
      background: var(--bg-surface);
      border: 1px solid var(--border-hairline);
      border-radius: 6px;
      padding: 4px 10px;
      font-size: 11.5px;
      font-weight: 600;
    }

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

    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.6; transform: scale(0.9); }
    }

    .clock-display {
      font-family: var(--font-mono);
      font-size: 11.5px;
      color: var(--text-secondary);
      background: var(--bg-surface);
      border: 1px solid var(--border-hairline);
      border-radius: 6px;
      padding: 4px 10px;
    }

    .btn-action-primary {
      background: #1e293b;
      color: var(--text-primary);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s ease;
    }
    .btn-action-primary:hover {
      background: #334155;
      border-color: var(--border-muted);
    }

    /* Notice Banner (Concept Explanation) */
    .concept-notice-banner {
      margin: 18px 24px 0;
      padding: 10px 14px;
      background: rgba(56, 189, 248, 0.05);
      border: 1px solid rgba(56, 189, 248, 0.2);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .concept-notice-text {
      font-size: 12px;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .concept-notice-text strong {
      color: var(--accent-primary);
    }

    /* Content Area */
    .content-area {
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    /* Section Header */
    .section-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .section-title-wrap {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .section-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.01em;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .section-desc {
      font-size: 12px;
      color: var(--text-muted);
    }

    /* ==========================================================================
       DUAL SERVER CARDS (ISP4 & ISP1) — CLEAN HIGH-DENSITY STUDIO CARDS
       ========================================================================== */
    .server-cards-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .server-card {
      background: var(--bg-card);
      border: 1px solid var(--border-hairline);
      border-radius: 10px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      position: relative;
      transition: border-color 0.15s ease;
    }
    .server-card:hover {
      border-color: var(--border-muted);
    }

    .server-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
    }

    .server-identity {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .server-badge-icon {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent-primary);
      font-size: 14px;
    }

    .server-info-title {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .server-ip-mono {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
    }

    .status-tag {
      font-size: 11px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 3px 8px;
      border-radius: 5px;
    }
    .status-tag.online {
      background: var(--accent-success-dim);
      color: var(--accent-success);
      border: 1px solid rgba(16, 185, 129, 0.2);
    }
    .status-tag.offline {
      background: var(--accent-danger-dim);
      color: var(--accent-danger);
      border: 1px solid rgba(244, 63, 94, 0.2);
    }

    /* Metric Grid inside Server Card */
    .server-metrics-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }

    .metric-cell {
      background: var(--bg-surface);
      border: 1px solid var(--border-hairline);
      border-radius: 6px;
      padding: 8px 10px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .metric-cell-label {
      font-size: 10px;
      color: var(--text-muted);
      text-transform: uppercase;
      font-weight: 600;
      letter-spacing: 0.03em;
    }

    .metric-cell-val {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 700;
      color: var(--text-primary);
    }

    .metric-bar-track {
      height: 3px;
      background: var(--border-subtle);
      border-radius: 2px;
      overflow: hidden;
      margin-top: 2px;
    }
    .metric-bar-fill {
      height: 100%;
      border-radius: 2px;
    }
    .metric-bar-fill.blue { background: var(--accent-primary); }
    .metric-bar-fill.green { background: var(--accent-success); }
    .metric-bar-fill.purple { background: var(--accent-purple); }
    .metric-bar-fill.amber { background: var(--accent-warning); }

    .server-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 8px;
      border-top: 1px solid var(--border-hairline);
      font-size: 11px;
      color: var(--text-muted);
    }

    .server-uptime-mono {
      font-family: var(--font-mono);
      color: var(--text-secondary);
    }

    /* ==========================================================================
       ECOSYSTEM PROJECTS MATRIX (8 Services)
       ========================================================================== */
    .services-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 12px;
    }

    .service-card {
      background: var(--bg-card);
      border: 1px solid var(--border-hairline);
      border-radius: 8px;
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .service-card:hover {
      border-color: var(--border-muted);
      background: var(--bg-surface);
      transform: translateY(-1px);
    }

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

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

    .service-icon-wrap {
      width: 24px;
      height: 24px;
      border-radius: 5px;
      background: var(--bg-surface-active);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      color: var(--text-secondary);
    }

    .service-name {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .service-ping {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--accent-success);
    }

    .service-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 11px;
      color: var(--text-muted);
    }

    .service-host-tag {
      font-family: var(--font-mono);
      background: var(--bg-surface);
      padding: 1px 6px;
      border-radius: 4px;
      border: 1px solid var(--border-hairline);
    }

    /* 30-day uptime bars (clean micro bars) */
    .uptime-bars-strip {
      display: flex;
      gap: 2px;
      height: 14px;
      align-items: center;
    }

    .uptime-bar {
      flex: 1;
      height: 100%;
      border-radius: 1.5px;
      background: var(--accent-success);
      opacity: 0.85;
      transition: opacity 0.1s ease;
    }
    .uptime-bar:hover {
      opacity: 1;
    }
    .uptime-bar.down {
      background: var(--accent-danger);
    }

    /* ==========================================================================
       CONTAINERS FLEET TABLE (ISP4 & ISP1)
       ========================================================================== */
    .table-container {
      background: var(--bg-card);
      border: 1px solid var(--border-hairline);
      border-radius: 8px;
      overflow: hidden;
    }

    .table-toolbar {
      padding: 12px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--border-hairline);
      background: var(--bg-surface);
    }

    .table-filter-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .filter-input {
      background: var(--bg-base);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      padding: 5px 10px;
      font-size: 12px;
      color: var(--text-primary);
      outline: none;
      width: 200px;
    }
    .filter-input:focus {
      border-color: var(--border-focus);
    }

    .clean-table {
      width: 100%;
      border-collapse: collapse;
      text-align: left;
      font-size: 12.5px;
    }

    .clean-table th {
      background: var(--bg-surface);
      color: var(--text-muted);
      font-weight: 600;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      padding: 10px 14px;
      border-bottom: 1px solid var(--border-hairline);
    }

    .clean-table td {
      padding: 10px 14px;
      border-bottom: 1px solid var(--border-hairline);
      color: var(--text-secondary);
      vertical-align: middle;
    }

    .clean-table tbody tr {
      transition: background 0.1s ease;
    }
    .clean-table tbody tr:hover {
      background: var(--bg-surface-hover);
    }

    .col-container-name {
      font-weight: 600;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .mono-cell {
      font-family: var(--font-mono);
      font-size: 11.5px;
    }

    .actions-group {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .btn-icon-subtle {
      background: transparent;
      border: 1px solid transparent;
      border-radius: 4px;
      width: 26px;
      height: 26px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.12s ease;
    }
    .btn-icon-subtle:hover {
      background: var(--bg-surface-active);
      color: var(--text-primary);
      border-color: var(--border-subtle);
    }

    /* ==========================================================================
       AI PIPELINES & CALL AUDIO PLAYER VIEW (Integrated)
       ========================================================================== */
    .pipelines-studio-layout {
      display: grid;
      grid-template-columns: 320px 1fr;
      gap: 16px;
      background: var(--bg-card);
      border: 1px solid var(--border-hairline);
      border-radius: 10px;
      overflow: hidden;
      min-height: 580px;
    }

    .call-recordings-list {
      background: var(--bg-surface);
      border-right: 1px solid var(--border-hairline);
      display: flex;
      flex-direction: column;
    }

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

    .call-item {
      padding: 10px 14px;
      border-bottom: 1px solid var(--border-hairline);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 4px;
      transition: background 0.12s ease;
    }
    .call-item:hover {
      background: var(--bg-surface-hover);
    }
    .call-item.active {
      background: var(--bg-surface-active);
      border-left: 2px solid var(--accent-primary);
    }

    .call-item-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .call-phone {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .call-duration {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
    }

    .call-tag {
      font-size: 10px;
      padding: 1px 6px;
      border-radius: 4px;
      background: var(--border-subtle);
      color: var(--text-secondary);
      display: inline-block;
    }

    .player-inspection-pane {
      display: flex;
      flex-direction: column;
      padding: 18px;
      gap: 16px;
    }

    /* Waveform player card */
    .waveform-player-box {
      background: var(--bg-surface);
      border: 1px solid var(--border-hairline);
      border-radius: 8px;
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .waveform-canvas-box {
      height: 64px;
      background: var(--bg-base);
      border: 1px solid var(--border-hairline);
      border-radius: 6px;
      position: relative;
      overflow: hidden;
      cursor: pointer;
    }

    .waveform-canvas {
      width: 100%;
      height: 100%;
    }

    .player-controls-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .transport-btns {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .btn-play-pause {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--accent-primary);
      color: #000;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 13px;
      transition: transform 0.1s ease;
    }
    .btn-play-pause:hover {
      transform: scale(1.05);
    }

    .time-indicator {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-secondary);
    }

    /* Dialogue container */
    .dialogue-stream {
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-height: 280px;
      overflow-y: auto;
      padding-right: 6px;
    }

    .dialogue-bubble {
      padding: 10px 12px;
      border-radius: 8px;
      border: 1px solid var(--border-hairline);
      display: flex;
      flex-direction: column;
      gap: 4px;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .dialogue-bubble:hover {
      border-color: var(--border-muted);
    }
    .dialogue-bubble.operator {
      background: rgba(2, 132, 199, 0.06);
      border-color: rgba(2, 132, 199, 0.2);
    }
    .dialogue-bubble.client {
      background: rgba(139, 92, 246, 0.06);
      border-color: rgba(139, 92, 246, 0.2);
    }
    .dialogue-bubble.active {
      border-color: var(--accent-primary);
      background: rgba(56, 189, 248, 0.12);
    }

    .dialogue-bubble-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 10.5px;
      font-weight: 600;
    }
    .dialogue-bubble.operator .dialogue-bubble-meta { color: #38bdf8; }
    .dialogue-bubble.client .dialogue-bubble-meta { color: #c084fc; }

    .dialogue-text {
      font-size: 13px;
      color: var(--text-primary);
      line-height: 1.45;
    }

    /* ==========================================================================
       VIEW TOGGLER LOGIC
       ========================================================================== */
    .view-pane {
      display: none;
    }
    .view-pane.active-view {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    /* Modal Command Palette */
    .cmd-palette-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(4px);
      z-index: 100;
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding-top: 15vh;
    }

    .cmd-palette {
      width: 540px;
      background: var(--bg-surface);
      border: 1px solid var(--border-muted);
      border-radius: 10px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.6);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .cmd-input-wrap {
      display: flex;
      align-items: center;
      padding: 12px 16px;
      gap: 10px;
      border-bottom: 1px solid var(--border-hairline);
    }

    .cmd-input {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--text-primary);
      font-size: 14px;
      outline: none;
    }

    .cmd-results {
      padding: 8px;
      max-height: 320px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .cmd-item {
      padding: 8px 12px;
      border-radius: 6px;
      color: var(--text-secondary);
      font-size: 12.5px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
    }
    .cmd-item:hover, .cmd-item.selected {
      background: var(--bg-surface-active);
      color: var(--text-primary);
    }

/* ==========================================================================
   RESPONSIVE STUDIO FIXES (SERVER CARDS, METRICS & TEXT OVERFLOW GUARDS)
   ========================================================================== */
@media (max-width: 1200px) {
  .server-cards-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 680px) {
  .server-metrics-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
.metric-cell {
  min-width: 0 !important;
  overflow: hidden !important;
}
.metric-cell-label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.metric-cell-val {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.service-card {
  min-width: 0 !important;
  overflow: hidden !important;
}
.service-name {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.service-meta-row {
  flex-wrap: wrap !important;
  gap: 4px !important;
}
.server-card-footer {
  flex-wrap: wrap !important;
  gap: 8px !important;
}
.badge, .stat-chip, .status-tag, .nav-badge {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.clean-table th, .table-cyber th {
  white-space: nowrap !important;
}
#dash-events-list {
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}


/* ==========================================================================
   ROCK-SOLID TOPBAR & SIDEBAR SYSTEM (2026 PRECISION REFINEMENT)
   ========================================================================== */
.topbar, .sarmat-topbar {
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  background: rgba(8, 10, 15, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid var(--border-hairline) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 20px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  box-sizing: border-box !important;
  gap: 12px !important;
  white-space: nowrap !important;
}

.topbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: visible !important;
}

.breadcrumb {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12.5px !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex-shrink: 0 !important;
}

.breadcrumb-sep {
  color: var(--border-subtle, rgba(255, 255, 255, 0.15)) !important;
  opacity: 0.5;
  font-size: 11px;
}

.breadcrumb-segment.current {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.search-trigger {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-hairline) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  width: auto !important;
  min-width: 200px !important;
  max-width: 290px !important;
  flex: 0 1 270px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
.search-trigger:hover {
  border-color: var(--cyan) !important;
  color: var(--text-secondary) !important;
  background: rgba(56, 189, 248, 0.05) !important;
}
.search-trigger span:not(.search-kbd) {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  flex: 1 !important;
}
.search-trigger .search-kbd {
  flex-shrink: 0 !important;
  margin-left: auto !important;
  font-size: 10px !important;
  font-family: var(--font-mono) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 4px !important;
  padding: 1px 5px !important;
  color: var(--text-muted) !important;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.cluster-status-pill {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-hairline) !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
}

.clock-display {
  font-family: var(--font-mono) !important;
  font-size: 11.5px !important;
  color: var(--text-secondary) !important;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-hairline) !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
}

.btn-action-primary {
  background: #1e293b !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.15s ease !important;
}
.btn-action-primary:hover {
  background: #283548 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

/* Sidebar Host Switcher & Navigation Precision */
@media (min-width: 992px) {
  .sarmat-sidebar {
    width: 256px !important;
    min-width: 256px !important;
    background-color: var(--bg-sidebar, #0c0e12) !important;
    border-right: 1px solid var(--border-hairline) !important;
  }

  .main-viewport, .sarmat-main {
    margin-left: 256px !important;
    width: calc(100% - 256px) !important;
    min-width: 0 !important;
  }
}

@media (max-width: 991px) {
  .main-viewport, .sarmat-main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .btn-sidebar-toggle {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  .search-trigger {
    display: none !important;
  }
  .cluster-status-pill {
    display: none !important;
  }
}

/* Universal Smooth FontAwesome Spinners */
.fa-spinner.fa-spin,
.fa-sync-alt.fa-spin,
.fa-rotate.fa-spin {
  display: inline-block !important;
  animation: sarmatSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
}

.sidebar-node-card {
  margin: 10px 12px 6px !important;
  padding: 5px !important;
  background: rgba(18, 21, 28, 0.7) !important;
  border: 1px solid var(--border-hairline) !important;
  border-radius: 8px !important;
  backdrop-filter: blur(8px) !important;
}

.node-track {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 4px !important;
}

.node-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  padding: 5px 8px !important;
  text-align: left !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.15s ease !important;
  color: var(--text-muted) !important;
  user-select: none !important;
}

.node-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-secondary) !important;
}

.node-btn.active {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

.node-btn.active .node-sub {
  color: var(--accent-primary) !important;
}
.node-btn.active#pill-host-isp1 .node-sub {
  color: #c084fc !important;
}

.node-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}
.node-dot.online {
  background: var(--accent-success, #10b981) !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6) !important;
}

.nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
  color: var(--text-secondary) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
  border: 1px solid transparent !important;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-primary) !important;
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.08) !important;
  color: #ffffff !important;
  border-color: rgba(56, 189, 248, 0.22) !important;
  font-weight: 600 !important;
}

.nav-icon {
  width: 18px !important;
  min-width: 18px !important;
  font-size: 13px !important;
  text-align: center !important;
  color: var(--text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.12s ease !important;
}

.nav-item:hover .nav-icon {
  color: var(--text-primary) !important;
}
.nav-item.active .nav-icon {
  color: var(--accent-primary) !important;
}

/* ==========================================================================
   STUDIO EXTENSIONS & STABILITY ENHANCEMENTS
   ========================================================================== */

/* 1. Universal Bounded Loading State */
.sarmat-loading-state {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 140px;
  gap: 10px;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
  color: var(--text-muted);
}

/* 2. Process Buttons Text Overflow Prevention */
.btn-cyber,
.action-btn,
button.btn-primary,
button.btn-secondary,
button.btn-ghost,
button.btn-danger,
button.btn-success {
  min-width: fit-content !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
}

.table-actions-group,
.btn-cyber-group,
.actions-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

/* 3. Studio Terminal & Log Styling */
.log-terminal,
.terminal-window,
.code-terminal,
pre[id$="-output"],
pre[id$="-terminal"],
pre[id$="-stream"],
pre[id$="-inspect-pre"],
pre[id$="-logs"] {
  background: #06080b !important;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  font-family: 'JetBrains Mono', 'SF Mono', monospace !important;
  font-size: 0.8rem !important;
  line-height: 1.55 !important;
  padding: 14px 16px !important;
  letter-spacing: -0.01em;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}

.log-terminal::-webkit-scrollbar,
.terminal-window::-webkit-scrollbar,
pre::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.log-terminal::-webkit-scrollbar-track,
.terminal-window::-webkit-scrollbar-track,
pre::-webkit-scrollbar-track {
  background: #06080b;
}

.log-terminal::-webkit-scrollbar-thumb,
.terminal-window::-webkit-scrollbar-thumb,
pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.log-terminal::-webkit-scrollbar-thumb:hover,
pre::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* 4. Studio Host Offline Card */
.sarmat-offline-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 32px 24px !important;
  min-height: 220px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(244, 63, 94, 0.03) !important;
  border: 1px solid rgba(244, 63, 94, 0.18) !important;
  border-radius: 12px !important;
  position: relative !important;
  overflow: hidden !important;
}

/* 5. Mobile Drawer & Off-canvas Responsive Layout */
@media (max-width: 991px) {
  .sarmat-sidebar {
    transform: translateX(-100%) !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.85) !important;
    z-index: 1000 !important;
  }
  .sarmat-sidebar.open {
    transform: translateX(0) !important;
  }
  .btn-sidebar-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    background: transparent !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 6px !important;
    color: #fff !important;
    cursor: pointer !important;
  }
  .btn-sidebar-close {
    display: inline-flex !important;
  }
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden !important;
  }
  .main-viewport, .sarmat-main {
    padding: 12px 12px 32px !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .topbar {
    padding: 0 12px !important;
  }
  .breadcrumb .breadcrumb-segment:not(.current),
  .breadcrumb .breadcrumb-sep {
    display: none !important;
  }
  .search-trigger,
  .cluster-status-pill,
  .clock-display {
    display: none !important;
  }
}

/* ==========================================================================
   SARMAT QUICK SEARCH / COMMAND PALETTE MODAL STYLES
   ========================================================================== */
@keyframes sarmatModalSlide {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sarmat-search-card {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.12) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.sarmat-search-tab {
  transition: all 0.15s ease !important;
}
.sarmat-search-tab:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.sarmat-search-result-row {
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease !important;
}
.sarmat-search-result-row:hover {
  background: rgba(56, 189, 248, 0.09) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  transform: translateX(2px);
}
.sarmat-search-result-row:hover .item-enter-hint {
  display: inline-block !important;
}


