/* ==========================================================================
   OpenVPN deft.work - Ultra-Modern Glassmorphic Dark Design System
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-dark: #07090e;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-input: rgba(11, 17, 32, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(6, 182, 212, 0.35);
  --border-focus: #06b6d4;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.25);

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

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions & Shadows */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --shadow-neon: 0 0 20px -3px rgba(6, 182, 212, 0.35);
}

/* 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;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Radial Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14, 116, 144, 0.5) 0%, rgba(99, 102, 241, 0) 70%);
  top: -100px;
  left: 15%;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(6, 182, 212, 0) 70%);
  bottom: -150px;
  right: 10%;
}

/* Glass Panels & Cards */
.glass-panel {
  background: rgba(13, 20, 36, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: var(--shadow-glass);
  position: relative;
  z-index: 1;
  transition: all var(--transition-smooth);
}

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

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.brand-badge {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid var(--border-glow);
  border-radius: 22px;
  box-shadow: var(--shadow-neon);
}

.shield-icon svg {
  width: 36px;
  height: 36px;
  color: var(--accent-cyan);
}

.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.accent-text {
  color: var(--accent-cyan);
  font-weight: 600;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

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

.input-group label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

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

.password-input-wrapper input {
  padding-right: 44px;
}

input, select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.toggle-password:hover {
  color: var(--text-main);
}

.login-footer {
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.login-footer code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--accent-cyan);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px -2px rgba(6, 182, 212, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -4px rgba(6, 182, 212, 0.6);
  filter: brightness(1.08);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

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

.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px -2px rgba(244, 63, 94, 0.4);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -4px rgba(244, 63, 94, 0.6);
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

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

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.btn-icon:hover {
  color: var(--accent-cyan);
  border-color: var(--border-glow);
  background: rgba(6, 182, 212, 0.1);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: 9px;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 7px;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }

/* Status Dot & Pulses */
.live-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 2px solid var(--bg-dark);
}

.pulse {
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.logo-shield {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.logo-shield svg {
  width: 20px;
  height: 20px;
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vpn-badge {
  background: var(--accent-cyan);
  color: #030712;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
}

.domain-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}

.status-indicator.online .status-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.status-indicator.online {
  color: var(--accent-emerald);
}

.status-indicator.offline .status-dot {
  background: var(--accent-rose);
  box-shadow: 0 0 8px var(--accent-rose);
}

.status-indicator.offline {
  color: var(--accent-rose);
}

.endpoint-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.endpoint-pill:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: var(--border-glow);
  color: var(--text-main);
}

.endpoint-pill code {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 500;
}

.copy-icon {
  opacity: 0.6;
}

/* ==========================================================================
   METRICS GRID
   ========================================================================== */
.content-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px 24px;
  position: relative;
  z-index: 1;
}

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

.metric-card {
  padding: 24px;
}

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

.metric-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-icon-bubble {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon-bubble svg {
  width: 20px;
  height: 20px;
}

.metric-icon-bubble.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.metric-icon-bubble.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.metric-icon-bubble.indigo {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
}

.metric-icon-bubble.amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.metric-icon-bubble.rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.metric-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-main);
}

.metric-subtext {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.active-pill {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.rate-badge {
  font-size: 0.75rem;
  font-weight: 500;
}

.rate-badge.in { color: var(--accent-emerald); }
.rate-badge.out { color: var(--accent-indigo); }

.info-pill {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

/* ==========================================================================
   TABS
   ========================================================================== */
.tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.tab-btn.active {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  box-shadow: 0 0 16px -2px rgba(6, 182, 212, 0.25);
  border: 1px solid var(--border-glow);
}

.tab-badge {
  background: var(--accent-cyan);
  color: #030712;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.tab-badge.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.tab-content {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-content.active {
  display: block;
}

/* ==========================================================================
   SECTION CARDS & TABLES
   ========================================================================== */
.section-card {
  padding: 28px;
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.live-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
}

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

.live-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

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

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

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

.font-mono {
  font-family: var(--font-mono);
}

.text-right {
  text-align: right;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-tag.valid {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-tag.revoked {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-tag.connected {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 50px 20px;
}

.empty-icon-radar {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px auto;
  color: var(--text-dim);
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 420px;
  margin: 0 auto;
}

/* ==========================================================================
   CLIENTS GRID & CARDS
   ========================================================================== */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

.search-input-wrapper input {
  padding-left: 40px;
}

.status-filter-pills {
  display: flex;
  gap: 6px;
}

.filter-pill {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--accent-cyan);
  color: #030712;
  border-color: var(--accent-cyan);
}

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

.client-item-card {
  background: rgba(18, 27, 49, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.client-item-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

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

.client-cn {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-cn .server-tag {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-indigo);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.client-dates {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 18px;
}

.client-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
}

/* ==========================================================================
   TERMINAL LOGS
   ========================================================================== */
.terminal-window {
  background: #030712;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.terminal-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-left: 8px;
}

.terminal-content {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #a7f3d0;
  max-height: 480px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
}

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

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

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-bubble.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.modal-icon-bubble.rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.modal-icon-bubble.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

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

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

.input-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.required {
  color: var(--accent-rose);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* QR Code Section in Modal */
.qr-content-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.qr-frame {
  background: #ffffff;
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: inline-block;
}

.qr-frame img {
  width: 220px;
  height: 220px;
  display: block;
}

.qr-instructions {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  font-size: 0.85rem;
  width: 100%;
}

.qr-instructions h4 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--accent-cyan);
}

.qr-instructions ol {
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.6;
}

.direct-download-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Config view body */
.config-view-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-actions-top {
  display: flex;
  justify-content: flex-end;
}

.config-code-preview {
  background: #030712;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #94a3b8;
  max-height: 420px;
  overflow-y: auto;
  white-space: pre;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.alert-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fecdd3;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 20px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.25s ease-out;
}

.toast.success { border-color: var(--accent-emerald); }
.toast.error { border-color: var(--accent-rose); }

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.justify-center { justify-content: center; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

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

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }
  .hide-mobile {
    display: none;
  }
  .nav-center {
    display: none;
  }
  .content-container {
    padding: 20px 16px;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .tabs-bar {
    overflow-x: auto;
  }
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   DASHBOARD FOOTER & ECOSYSTEM
   ========================================================================== */
.login-footer a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
}

.login-footer a:hover {
  text-decoration: underline;
}

.dashboard-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 15, 30, 0.55);
  backdrop-filter: blur(16px);
  padding: 18px 24px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 20px;
}

.footer-engine-pill a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}

.footer-engine-pill a:hover {
  text-decoration: underline;
}

.footer-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.footer-dot {
  opacity: 0.35;
}

.footer-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.footer-nav-link:hover {
  color: var(--accent-cyan);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

