/* ==========================================================================
   PC MONITOR & REMOTE MANAGEMENT DASHBOARD - DARK GLASSMORPHISM DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-dark: #080b11;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(26, 35, 56, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);

  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-violet: #7928ca;
  --accent-magenta: #ff007f;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

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

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.15);
  --backdrop-blur: blur(16px);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(121, 40, 202, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.12) 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* ==========================================================================
   AUTH OVERLAY & LOGIN MODAL
   ========================================================================== */

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.88);
  backdrop-filter: var(--backdrop-blur);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: linear-gradient(145deg, rgba(22, 30, 48, 0.9), rgba(12, 17, 29, 0.95));
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 40px rgba(0, 242, 254, 0.2), 0 20px 40px rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 36px 30px;
  text-align: center;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: #fff;
  font-size: 32px;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.google-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  margin: 20px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.pin-form {
  display: flex;
  gap: 10px;
}

.pin-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.pin-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  color: #000;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
}

.auth-error {
  margin-top: 16px;
  font-size: 13px;
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 10px;
  border-radius: var(--radius-sm);
  display: none;
}

/* ==========================================================================
   APP HEADER & LAYOUT
   ========================================================================== */

.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 24px;
  margin-bottom: 24px;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--accent-cyan);
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.user-email {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  color: #fff;
  border-color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

/* Navigation Tabs Bar */
.nav-tabs-bar {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow-x: auto;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(121, 40, 202, 0.15));
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

/* Main Content Views */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* ==========================================================================
   CARDS & GRID SYSTEM
   ========================================================================== */

.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

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

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

.metric-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* Progress bar */
.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

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

/* Spec Card Info List */
.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  color: var(--text-dim);
}

.info-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* Canvas Chart */
.chart-container {
  position: relative;
  height: 200px;
  width: 100%;
}
canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ==========================================================================
   SCREEN CAPTURE VIEW
   ========================================================================== */

.screen-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.screen-preview-box {
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  position: relative;
}

.screen-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s;
}

.screen-placeholder {
  color: var(--text-dim);
  text-align: center;
}

/* ==========================================================================
   TERMINAL VIEW
   ========================================================================== */

.terminal-card {
  background: #04070d;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  background: #0c121e;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.preset-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
}

.btn-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-chip:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
}

.terminal-output {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: #33ffaa;
  background: #04070d;
  padding: 20px;
  height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  background: #080d17;
  border-top: 1px solid var(--border-color);
  padding: 10px 20px;
}

.terminal-prompt {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-right: 12px;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
}

/* ==========================================================================
   PROCESS MANAGER & DATA TABLES
   ========================================================================== */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

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

.data-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

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

.btn-danger-sm {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.btn-danger-sm:hover {
  background: var(--accent-rose);
  color: #fff;
}

/* Responsive queries & Mobile Touch Enhancements */
@media (max-width: 768px) {
  .grid-cols-2 { grid-template-columns: 1fr; }
  .top-navbar { flex-direction: column; gap: 14px; align-items: flex-start; }
  .user-profile { width: 100%; justify-content: space-between; }

  /* Transform Tabs into Mobile Bottom Navigation Bar */
  .nav-tabs-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-radius: 0;
    margin: 0;
    background: rgba(8, 11, 17, 0.95);
    backdrop-filter: var(--backdrop-blur);
    border-top: 1px solid var(--border-glow);
    padding: 8px 12px;
    justify-content: space-around;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.7);
  }

  .nav-tab {
    padding: 8px 10px;
    font-size: 11px;
    flex-direction: column;
    gap: 4px;
  }

  .app-container {
    padding-bottom: 90px; /* Space for bottom nav */
  }

  /* Touch-friendly buttons */
  .btn-primary, .btn-chip, .btn-danger-sm {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

