/* ==========================================================================
   H. CABORCA - MAIN DASHBOARD & REAL-TIME TELEMETRY SYSTEM
   Modern Dark Glassmorphism CSS Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color Tokens */
  --bg-dark: #070a11;
  --bg-darker: #04060a;
  --panel-bg: rgba(15, 23, 42, 0.65);
  --panel-bg-hover: rgba(30, 41, 59, 0.75);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-glow: rgba(56, 189, 248, 0.35);

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

  /* Accents */
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.4);
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Gradients */
  --grad-cyan-blue: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad-amber: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

  /* Layout & Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-panel: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px -5px rgba(6, 182, 212, 0.3);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Container */
.dashboard-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
}

/* Header Section */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding: 20px 28px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

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

.brand-logo-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--grad-cyan-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.brand-title h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-title p {
  font-size: 13px;
  color: var(--text-muted);
}

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

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent-emerald);
  font-size: 13px;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-ring 1.8s infinite ease-in-out;
}

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

.clock-display {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
}

/* Real-Time Telemetry Grid */
.telemetry-section {
  margin-bottom: 32px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title h2 i {
  color: var(--accent-cyan);
}

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

.metric-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-panel);
  transition: transform 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  height: 100%;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad-cyan-blue);
  opacity: 0.8;
}

.metric-card.ram::before { background: var(--grad-purple); }
.metric-card.disk::before { background: var(--grad-emerald); }
.metric-card.disk-mirror::before { background: var(--grad-cyan-blue); }
.metric-card.disk-physical::before { background: var(--grad-cyan-blue); }
.metric-card.network::before { background: var(--grad-amber); }

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  min-height: 22px;
  overflow: hidden;
}

.card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-label i {
  font-size: 15px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.card-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}

.card-subtext {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bar */
.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin-top: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: var(--grad-cyan-blue);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-fill.ram { background: var(--grad-purple); }
.progress-bar-fill.disk { background: var(--grad-emerald); }
.progress-bar-fill.network { background: var(--grad-amber); }

/* Cores mini grid */
.cores-mini-grid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 2px;
  margin-top: 8px;
  min-height: 18px;
}

.core-bar {
  height: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.core-bar-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--accent-cyan);
  transition: height 0.4s ease;
}

/* App Launcher Section */
.app-launcher-section {
  margin-bottom: 32px;
}

.launcher-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-pill {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.category-pill.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 0 14px var(--accent-cyan-glow);
}

.launcher-right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.custom-action-btn {
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}

.custom-action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.custom-action-btn.active {
  background: var(--grad-cyan-blue);
  border-color: var(--accent-cyan);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 14px var(--accent-cyan-glow);
}

.custom-action-btn.reset:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.search-box {
  position: relative;
  min-width: 250px;
}

.search-box input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 12.5px;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 12px;
}

.shortcut-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* Customize Mode Banner */
.customize-banner {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 18px;
  animation: fadeIn 0.3s ease;
}

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

.customize-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-main);
}

.customize-icon-pill {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(6, 182, 212, 0.4);
  white-space: nowrap;
}

.save-customize-btn {
  padding: 7px 16px;
  background: var(--accent-emerald);
  border: none;
  border-radius: var(--radius-full);
  color: #000;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.save-customize-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* App Card Actions (Badge, Pin & Drag) */
.app-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
  justify-content: flex-end;
}

.card-drag-handle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: grab;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.card-drag-handle:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.card-drag-handle:active {
  cursor: grabbing;
}

.card-pin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
  flex-shrink: 0;
}

.card-pin-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.card-pin-btn.pinned {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.25);
}

.card-pin-btn.pinned:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-rose);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Edit Mode Visual Enhancements */
.apps-grid.edit-mode .card-drag-handle {
  display: flex;
}

.apps-grid.edit-mode .app-card {
  cursor: grab;
  border: 1px dashed rgba(6, 182, 212, 0.5);
  animation: subtlePulse 2s infinite ease-in-out;
}

@keyframes subtlePulse {
  0%, 100% { border-color: rgba(6, 182, 212, 0.4); }
  50% { border-color: rgba(6, 182, 212, 0.8); }
}

.apps-grid.edit-mode .app-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.app-card.dragging {
  opacity: 0.35;
  transform: scale(0.97);
  border: 2px dashed var(--accent-cyan) !important;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

.app-card.drag-over {
  border: 2px solid var(--accent-cyan) !important;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-4px);
}

/* Toast notification */
.panel-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-cyan);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.3);
  backdrop-filter: blur(12px);
  z-index: 1000;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

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

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

/* App Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.app-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-panel);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  text-decoration: none;
  color: inherit;
  min-height: 250px;
  box-sizing: border-box;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.6), 0 0 16px rgba(6, 182, 212, 0.2);
}

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

.app-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: var(--grad-cyan-blue);
  box-shadow: 0 6px 16px -4px rgba(6, 182, 212, 0.35);
  flex-shrink: 0;
}

/* Identidades visuales de cards */
.app-card.mapa .app-icon { background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%); }
.app-card.diagrama .app-icon { background: linear-gradient(135deg, #00d2ff 0%, #0077ff 100%); }
.app-card.reportes .app-icon { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.app-card.sectoriales .app-icon { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
.app-card.webmail .app-icon { background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%); }
.app-card.mikrotik .app-icon { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.app-card.backup-mikrotik .app-icon { background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%); }
.app-card.core .app-icon { background: linear-gradient(135deg, #00e5ff 0%, #3b82f6 100%); }
.app-card.monitor .app-icon { background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%); }
.app-card.chat .app-icon { background: linear-gradient(135deg, #25D366 0%, #128C7E 100%); box-shadow: 0 6px 16px -4px rgba(37, 211, 102, 0.4); }
.app-card.wisphub .app-icon { background: linear-gradient(135deg, #FF7E40 0%, #E65100 100%); box-shadow: 0 6px 16px -4px rgba(255, 126, 64, 0.4); }
.app-card.pagos .app-icon { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.app-card.uisp .app-icon { background: linear-gradient(135deg, #0066FF 0%, #0040B3 100%); box-shadow: 0 6px 16px -4px rgba(0, 102, 255, 0.4); }
.app-card.olt .app-icon { background: linear-gradient(135deg, #0ea5e9 0%, #1d4ed8 100%); box-shadow: 0 6px 16px -4px rgba(14, 165, 233, 0.4); }
.app-card.idrac .app-icon { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); box-shadow: 0 6px 16px -4px rgba(2, 132, 199, 0.4); }
.app-card.n8n .app-icon { background: linear-gradient(135deg, #EA4B71 0%, #FF6584 100%); box-shadow: 0 6px 16px -4px rgba(234, 75, 113, 0.4); }
.app-card.bot .app-icon { background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%); box-shadow: 0 6px 16px -4px rgba(139, 92, 246, 0.4); }
.app-card.speedtest .app-icon { background: linear-gradient(135deg, #00F5D4 0%, #7B2CBF 100%); box-shadow: 0 6px 16px -4px rgba(0, 245, 212, 0.4); }
.app-card.das .app-icon { background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%); }
.app-card.evolution .app-icon { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.app-card.rustdesk .app-icon { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
.app-card.portal .app-icon { background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%); }
.app-card.aircontrol .app-icon { background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%); }
.app-card.snappyadmin .app-icon { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); }

.app-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.app-status-badge .status-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
}

.app-status-dot.offline {
  background: var(--accent-rose);
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.6);
}

.app-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-bottom: 10px;
}

.app-info h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.app-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-meta-box {
  margin-top: 6px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-meta-item i {
  color: var(--accent-cyan);
  font-size: 10px;
  flex-shrink: 0;
}

.app-meta-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.app-url {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: auto;
  padding-top: 4px;
}

.app-url i {
  font-size: 11px;
  flex-shrink: 0;
}

.launch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.app-card:hover .launch-btn {
  background: var(--accent-cyan);
  color: #0f172a;
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
  font-weight: 700;
}

/* Server Services Grid */
.services-section {
  margin-bottom: 32px;
}

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

.service-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent-cyan);
}

.service-details h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.service-details span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Footer */
footer {
  text-align: center;
  padding: 24px;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--panel-border);
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-container { padding: 16px; }
  .top-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .launcher-controls { flex-direction: column; align-items: stretch; }
  .search-box { min-width: 100%; }
}

/* ==========================================================================
   ELEGANT DARK LOGIN OVERLAY & CINEMATIC TRANSITIONS
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: #04060a;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              backdrop-filter 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-overlay.hidden-login {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.login-overlay.hidden-login .login-card {
  transform: translateY(-24px) scale(0.95);
  opacity: 0;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(13, 19, 34, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.95), 0 0 1px 1px rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transform: translateY(0) scale(1);
  opacity: 1;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  animation: login-appear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-cyan-blue);
  opacity: 0.9;
}

@keyframes login-appear {
  0% { transform: translateY(24px) scale(0.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

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

.login-icon-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px auto;
  border-radius: 16px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent-cyan);
  box-shadow: 0 0 25px -5px rgba(6, 182, 212, 0.3);
}

.login-header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-dim);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-input-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.login-input-wrapper i.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  font-size: 15px;
  transition: color 0.2s ease;
}

.login-input-wrapper input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  background: rgba(7, 10, 17, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.25s ease;
}

.login-input-wrapper input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.login-input-wrapper input:focus + i.input-icon {
  color: var(--accent-cyan);
}

.login-btn {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: var(--grad-cyan-blue);
  border: none;
  border-radius: var(--radius-md);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px -5px rgba(6, 182, 212, 0.4);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -5px rgba(6, 182, 212, 0.6);
  filter: brightness(1.08);
}

.login-btn:active {
  transform: translateY(0);
}

.login-error-msg {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: none;
  align-items: center;
  gap: 8px;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.logout-btn-header {
  padding: 8px 14px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-rose);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.logout-btn-header:hover {
  background: var(--accent-rose);
  color: #fff;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}
