/* ==========================================================================
   RXPANEL - DESIGN SYSTEM & STYLING TOKENS
   ========================================================================== */

:root {
  /* Elegant Color Palette (High-end Custom HSL) */
  --bg-base: #0b0813;
  --bg-surface: rgba(18, 14, 30, 0.7);
  --bg-sidebar: rgba(12, 9, 21, 0.85);
  
  --violet-glow: hsl(265, 85%, 60%);
  --violet-hover: hsl(265, 95%, 68%);
  --cyan-glow: hsl(190, 90%, 50%);
  --cyan-hover: hsl(190, 100%, 65%);
  --emerald-glow: hsl(145, 80%, 45%);
  --emerald-hover: hsl(145, 100%, 60%);
  --orange-glow: hsl(20, 95%, 55%);
  --orange-hover: hsl(20, 100%, 65%);
  --red-glow: hsl(345, 85%, 55%);
  --red-hover: hsl(345, 100%, 65%);
  
  --text-primary: #f3f0fc;
  --text-secondary: #a39eb9;
  --text-muted: #69657b;
  
  --border-glow: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(157, 92, 255, 0.5);
  
  /* Layout tokens */
  --sidebar-width: 260px;
  --header-height: 75px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  /* Ambient Background Glow Spotlights */
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(132, 72, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(20, 15, 38, 1) 0%, rgba(11, 8, 19, 1) 100%);
  background-attachment: fixed;
}

svg:not(.telemetry-svg) {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

select option {
  background-color: var(--bg-base);
  color: var(--text-primary);
}
code, pre, .terminal-logs-screen, .code-editor-textarea {
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
}

/* ==========================================================================
   SCROLLBAR STYLES
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: var(--transition-smooth);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(132, 72, 255, 0.4);
}

/* ==========================================================================
   REUSABLE UTILITIES & GLASS DESIGN
   ========================================================================== */
.panel-container {
  background: var(--bg-surface);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.panel-container:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Glowing Border Themes for Telemetry Cards */
.metric-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: var(--transition-smooth);
}

.metric-card:hover {
  transform: translateY(-4px);
}

.panel-glow-violet:hover { border-color: rgba(132, 72, 255, 0.35); box-shadow: 0 10px 30px rgba(132, 72, 255, 0.15); }
.panel-glow-cyan:hover { border-color: rgba(0, 229, 255, 0.35); box-shadow: 0 10px 30px rgba(0, 229, 255, 0.12); }
.panel-glow-emerald:hover { border-color: rgba(0, 230, 118, 0.35); box-shadow: 0 10px 30px rgba(0, 230, 118, 0.12); }
.panel-glow-orange:hover { border-color: rgba(255, 112, 67, 0.35); box-shadow: 0 10px 30px rgba(255, 112, 67, 0.12); }

/* Icons & Colors utilities */
.color-violet { color: var(--violet-glow); }
.color-cyan { color: var(--cyan-glow); }
.color-emerald { color: var(--emerald-glow); }
.color-orange { color: var(--orange-glow); }
.color-red { color: var(--red-glow); }

.bg-violet { background-color: var(--violet-glow); }
.bg-cyan { background-color: var(--cyan-glow); }
.bg-emerald { background-color: var(--emerald-glow); }
.bg-orange { background-color: var(--orange-glow); }

.text-center { text-align: center; }
.hidden { display: none !important; }
.spacing-top { margin-top: 24px; }

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
button {
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet-glow) 0%, #763bfa 100%);
  color: var(--text-primary);
  border: none;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(132, 72, 255, 0.3);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--violet-hover) 0%, var(--violet-glow) 100%);
  box-shadow: 0 6px 20px rgba(132, 72, 255, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(239, 83, 80, 0.15);
  color: var(--red-glow);
  border: 1px solid rgba(239, 83, 80, 0.3);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.btn-danger:hover {
  background: var(--red-glow);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 83, 80, 0.4);
}

.btn-block {
  display: block;
  width: 100%;
}

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

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

.btn-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--violet-glow);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-link:hover {
  color: var(--violet-hover);
  text-decoration: underline;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.75rem;
}

/* ==========================================================================
   INPUTS & ALERTS
   ========================================================================== */
.input-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.input-group label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.input-group input, .input-group select, .input-group textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: var(--transition-smooth);
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px rgba(132, 72, 255, 0.25);
}

.code-editor-textarea {
  min-height: 250px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre;
  resize: vertical;
}

.error-alert {
  background: rgba(239, 83, 80, 0.12);
  color: #ff8a80;
  border: 1px solid rgba(239, 83, 80, 0.25);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

/* Setup / First-Time Install Banner */
.setup-banner {
  text-align: center;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0, 230, 118, 0.06);
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-radius: var(--radius-md);
}

.setup-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--emerald-glow), hsl(145, 100%, 55%));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 12px;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.setup-banner p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 6px;
}

/* ==========================================================================
   LOGIN CARD PAGE
   ========================================================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(132, 72, 255, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(20, 15, 38, 1) 0%, rgba(11, 8, 19, 1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 40px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
  animation: slideInDown 0.4s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-glowing-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-glow) 0%, #763bfa 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: white;
  box-shadow: 0 0 20px rgba(132, 72, 255, 0.5);
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #cdbdfc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

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

.login-footer {
  text-align: center;
  margin-top: 25px;
}

.login-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.login-footer code {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--cyan-glow);
}

/* ==========================================================================
   APP CONTAINER LAYOUT (Sidebar + Content)
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glow);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: transform 0.3s ease;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

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

.logo-small {
  color: var(--violet-glow);
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
}

.badge-live {
  background: rgba(0, 230, 118, 0.15);
  color: var(--emerald-glow);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.badge-simulated {
  background: rgba(255, 112, 67, 0.15);
  color: var(--orange-glow);
  border: 1px solid rgba(255, 112, 67, 0.3);
}

.sidebar-menu {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

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

.menu-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.menu-item.active {
  background: rgba(132, 72, 255, 0.1);
  color: var(--text-primary);
  border-left: 3px solid var(--violet-glow);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-glow);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  border-radius: var(--radius-md);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bd8eff 0%, #763bfa 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 30px;
  max-width: calc(100vw - var(--sidebar-width));
  min-width: 0;
}

.content-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

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

.mobile-menu-btn {
  display: none;
}

.content-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, #ffffff 40%, #a39eb9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  font-weight: 600;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.indicator-dot.online {
  background-color: var(--emerald-glow);
  box-shadow: 0 0 10px var(--emerald-glow);
}

/* ==========================================================================
   NOTIFICATION SYSTEM
   ========================================================================== */
.notification-wrapper {
  position: relative;
}

.badge-pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--orange-glow);
  color: white;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px var(--orange-glow);
  animation: pulse-orange 1.5s infinite;
}

.notification-dropdown {
  position: absolute;
  top: 45px;
  right: 0;
  width: 320px;
  background: rgba(18, 14, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 1000;
  overflow: hidden;
  animation: zoomIn 0.2s ease-out;
}

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

.dropdown-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.dropdown-list {
  max-height: 280px;
  overflow-y: auto;
}

.dropdown-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.notification-item {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.notification-item.warning { border-left: 3px solid var(--orange-glow); }
.notification-item.info { border-left: 3px solid var(--cyan-glow); }
.notification-item.success { border-left: 3px solid var(--emerald-glow); }

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

/* ==========================================================================
   VIEWS ARCHITECTURE
   ========================================================================== */
.content-view {
  animation: fadeIn 0.3s ease-out;
}

.view-header-title {
  margin-bottom: 24px;
}

.view-header-title h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

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

.view-header-title-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.view-header-title-flex h1 {
  font-size: 1.75rem;
  font-weight: 800;
}

.view-header-title-flex p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

.header-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ==========================================================================
   DASHBOARD TELEMETRY CARDS
   ========================================================================== */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

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

.card-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-icon {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.card-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 14px;
}

.card-value-flex {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
  height: 35px;
  align-items: flex-end;
}

.network-metric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.25rem;
  font-weight: 800;
}

.network-metric svg {
  stroke-width: 3px;
}

.arrow-down { color: var(--cyan-glow); }
.arrow-up { color: var(--orange-glow); }

.unit {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 2px;
}

.gauge-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.gauge-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.network-footer {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

/* ==========================================================================
   CHARTS & GRAPHS
   ========================================================================== */
.graph-section-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.chart-card-header {
  margin-bottom: 20px;
}

.chart-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.svg-chart-wrapper {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 10px;
}

.telemetry-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
  stroke-dasharray: 4;
}

.chart-axis-text {
  fill: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-anchor: end;
}

.chart-legends {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.legend-color {
  width: 12px;
  height: 6px;
  border-radius: 3px;
}

/* Quick Actions Widget */
.quick-actions-panel {
  display: flex;
  flex-direction: column;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  flex: 1;
}

.btn-action {
  border: 1px solid var(--border-glow);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 16px;
  transition: var(--transition-smooth);
}

.btn-action:hover {
  transform: translateY(-2px);
}

.btn-action svg {
  transition: var(--transition-smooth);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-action:hover svg {
  transform: scale(1.1);
}

.bg-glow-blue:hover { background: rgba(0, 229, 255, 0.08); border-color: var(--cyan-glow); color: var(--cyan-glow); }
.bg-glow-red:hover { background: rgba(239, 83, 80, 0.08); border-color: var(--red-glow); color: var(--red-glow); }
.bg-glow-violet:hover { background: rgba(132, 72, 255, 0.08); border-color: var(--violet-glow); color: var(--violet-glow); }
.bg-glow-emerald:hover { background: rgba(0, 230, 118, 0.08); border-color: var(--emerald-glow); color: var(--emerald-glow); }

.server-brief-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 14px;
}

.server-brief-stats p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.server-brief-stats strong {
  color: var(--text-muted);
}

/* Recent Log List inside Dashboard */
.panel-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-header-flex h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

/* ==========================================================================
   TABLES COMPONENT
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th {
  padding: 14px 18px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table td {
  padding: 14px 18px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
}

.data-table tr:hover td {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.01);
}

.container-active-row td {
  border-left: 2px solid var(--emerald-glow);
}

/* Table statuses badges */
.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
}

.status-running {
  background: rgba(0, 230, 118, 0.1);
  color: var(--emerald-glow);
}

.status-stopped {
  background: rgba(239, 83, 80, 0.1);
  color: var(--red-glow);
}

/* ==========================================================================
   DOCKER SUB-TABS
   ========================================================================== */
.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: fit-content;
}

.sub-tab {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.sub-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.sub-tab.active {
  background: rgba(132, 72, 255, 0.15);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(132, 72, 255, 0.2);
}

/* ==========================================================================
   SYSTEM DETAIL INFORMATION PAGE
   ========================================================================== */
.system-specs-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.panel-header-border {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.panel-header-border h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.spec-label {
  color: var(--text-secondary);
}

.spec-val {
  font-weight: 600;
}

/* ==========================================================================
   DOCKER STACKS PAGE
   ========================================================================== */
.stacks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.stack-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.stack-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.stack-card-body {
  flex: 1;
  margin-bottom: 20px;
}

.stack-card-body pre {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  max-height: 120px;
  overflow: hidden;
  color: var(--text-secondary);
}

.stack-card-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* ==========================================================================
   APP STORE CARDS
   ========================================================================== */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.cat-btn {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  transition: var(--transition-smooth);
  text-transform: capitalize;
}

.cat-btn:hover {
  border-color: rgba(132, 72, 255, 0.3);
  color: var(--text-primary);
}

.cat-btn.active {
  background: rgba(132, 72, 255, 0.15);
  border-color: rgba(132, 72, 255, 0.4);
  color: var(--text-primary);
}

.apps-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.app-card {
  display: flex;
  flex-direction: column;
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.app-store-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.08) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.app-info-title h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.app-info-title .app-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.app-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 18px;
  flex: 1;
}

.app-card-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.app-card-stats p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.app-card-stats strong {
  color: var(--text-secondary);
  word-break: break-all;
  text-align: right;
  max-width: 65%;
}

.app-card-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* ==========================================================================
   FILE MANAGER DESIGN
   ========================================================================== */
.fm-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.breadcrumb-item {
  cursor: pointer;
  font-weight: 600;
}

.breadcrumb-item:hover {
  color: var(--violet-glow);
  text-decoration: underline;
}

.fm-table td {
  vertical-align: middle;
}

.file-type-icon {
  margin-right: 10px;
  vertical-align: middle;
}

.file-clickable-name {
  cursor: pointer;
  font-weight: 500;
}

.file-clickable-name:hover {
  color: var(--violet-glow);
  text-decoration: underline;
}

/* ==========================================================================
   CONSOLE SHELL / WEB TERMINAL
   ========================================================================== */
.terminal-panel {
  display: flex;
  flex-direction: column;
  height: 480px;
  background: #06040a !important;
  border-color: rgba(132, 72, 255, 0.15) !important;
  padding: 0;
  overflow: hidden;
}

.terminal-output {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terminal-line {
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.color-gray { color: var(--text-secondary); }
.color-lightgray { color: var(--text-muted); }

.terminal-input-bar {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 20px;
}

.terminal-prompt {
  font-size: 0.88rem;
  color: var(--emerald-glow);
  font-weight: 700;
  margin-right: 10px;
}

#terminal-cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  outline: none;
}

/* Pre block screen container logs */
.terminal-logs-screen {
  background: #06040a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.82rem;
  max-height: 380px;
  overflow-y: auto;
  color: #a39eb9;
  line-height: 1.5;
}

/* ==========================================================================
   NETWORK MANAGER PAGE
   ========================================================================== */
.network-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.network-meta-info span {
  display: flex;
  gap: 8px;
}

.network-meta-info strong {
  color: var(--text-primary);
}

.network-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.network-tool-form {
  margin-bottom: 16px;
}

.input-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.input-row input {
  flex: 1;
  min-width: 60px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: var(--transition-smooth);
}

.input-row input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 8px rgba(132, 72, 255, 0.2);
}

.panel-container {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  max-width: 100%;
}

.tool-result-output {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* ==========================================================================
   STORAGE MANAGER PAGE
   ========================================================================== */
.partition-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.partition-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 18px;
}

.partition-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.partition-card .partition-mount {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.partition-card .partition-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.partition-card .partition-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.partition-card .partition-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   SETTINGS FORMS LAYOUT
   ========================================================================== */
.settings-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.settings-form button {
  margin-top: 10px;
}

/* ==========================================================================
   MODALS COMPONENT
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(6, 4, 10, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 95%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: zoomIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-lg {
  max-width: 720px;
}

.modal-sm {
  max-width: 400px;
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  transition: var(--transition-smooth);
}

.btn-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastSlideIn 0.35s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.toast-success {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.25);
  color: var(--emerald-glow);
}

.toast.toast-error {
  background: rgba(239, 83, 80, 0.12);
  border-color: rgba(239, 83, 80, 0.25);
  color: var(--red-glow);
}

.toast.toast-warning {
  background: rgba(255, 112, 67, 0.12);
  border-color: rgba(255, 112, 67, 0.25);
  color: var(--orange-glow);
}

.toast.toast-info {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.25);
  color: var(--cyan-glow);
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast.toast-hide {
  animation: toastSlideOut 0.3s ease-in forwards;
}

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

@keyframes slideInDown {
  from { transform: translateY(-40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulse-orange {
  0% { box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 112, 67, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 112, 67, 0); }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(60px); }
}

.spin-hover:hover {
  animation: spin 1.2s infinite linear;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 992px) {
  .graph-section-grid {
    grid-template-columns: 1fr;
  }
  .network-tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.sidebar-open {
    transform: translateX(0);
  }
  .mobile-menu-btn {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    max-width: 100vw;
    padding: 16px;
  }
  .content-header h2 {
    font-size: 1.1rem;
  }
  .view-header-title h1,
  .view-header-title-flex h1 {
    font-size: 1.4rem;
  }
  .view-header-title-flex {
    flex-direction: column;
    align-items: flex-start;
  }
  .widget-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }
  .sub-tabs {
    flex-wrap: wrap;
    width: 100%;
  }
  .system-status-indicator span:not(.indicator-dot) {
    display: none;
  }
}

/* ==========================================================================
   CASAOS IMPROVEMENTS & APP STORE SEARCH
   ========================================================================== */
.search-box-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input-field {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 20px;
  width: 250px;
  transition: var(--transition-smooth);
}

.search-input-field:focus {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px rgba(132, 72, 255, 0.25);
  outline: none;
}

.installed-apps-section {
  margin-bottom: 24px;
  position: relative;
  z-index: 20;
}

.installed-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.installed-app-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 14px;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.installed-app-card:has(.app-card-dropdown.show) {
  z-index: 50;
}

.installed-app-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--violet-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(132, 72, 255, 0.15);
}

.installed-app-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.installed-app-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.installed-app-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.installed-app-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.running {
  background: #00e676;
  box-shadow: 0 0 6px #00e676;
}

.status-dot.stopped {
  background: #ff1744;
  box-shadow: 0 0 6px #ff1744;
}

.installed-app-action {
  opacity: 0;
  transition: var(--transition-smooth);
  color: var(--violet-glow);
  font-size: 0.95rem;
}

.installed-app-card:hover .installed-app-action {
  opacity: 1;
}

.app-card-menu-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 2;
}

.app-card-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.app-card-dropdown {
  position: absolute;
  top: 42px;
  right: 10px;
  background: #1e1b2e; /* matches elevated surface */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 130px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.app-card-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.app-card-dropdown button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  text-align: left;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-card-dropdown button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.app-card-dropdown button.danger {
  color: #ff5e5e;
}

.app-card-dropdown button.danger:hover {
  background: rgba(255, 94, 94, 0.1);
}

.no-apps-message {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 24px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.05);
}

.no-apps-message a {
  color: var(--violet-glow);
  text-decoration: none;
  font-weight: 600;
}

.no-apps-message a:hover {
  text-decoration: underline;
}

.apps-count-badge {
  background: rgba(132, 72, 255, 0.15);
  border: 1px solid rgba(132, 72, 255, 0.3);
  color: var(--violet-glow);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.app-meta-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.app-meta-item {
  display: flex;
  justify-content: space-between;
}

.app-meta-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.app-meta-val {
  font-family: monospace;
}

/* ========================================= */
/* BACKGROUND TASKS WIDGET */
/* ========================================= */
.tasks-widget {
  display: flex;
  align-items: center;
  background: var(--surface-light);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--primary-color);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
  margin-right: 15px;
  gap: 10px;
  transition: all 0.3s ease;
}
.tasks-widget.hidden {
  display: none !important;
}
.tasks-icon {
  color: var(--primary-color);
  display: flex;
  align-items: center;
}
.spin-animation {
  animation: spin 2s linear infinite;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}
.tasks-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tasks-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-color);
  white-space: nowrap;
}
.tasks-progress-bar {
  width: 120px;
  height: 4px;
  background: var(--bg-color);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.tasks-progress-fill {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #a78bfa);
  animation: indeterminateProgress 1.5s infinite linear;
  transform-origin: 0% 50%;
}
@keyframes indeterminateProgress {
  0% { transform: translateX(-100%) scaleX(0.2); }
  50% { transform: translateX(0%) scaleX(0.5); }
  100% { transform: translateX(200%) scaleX(0.2); }
}

/* ==========================================================================
   CUSTOM CONFIRMATION MODAL
   ========================================================================== */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 5, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.custom-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.custom-modal-overlay.show .custom-modal-box {
  transform: translateY(0) scale(1);
}

.custom-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.custom-modal-icon {
  width: 24px;
  height: 24px;
  color: var(--orange-glow);
}

.custom-modal-icon.danger {
  color: var(--red-glow);
}

.custom-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.custom-modal-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.custom-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.custom-modal-footer button {
  min-width: 100px;
}
