/* ==========================================================================
   STAYBIX – PREMIUM NEXT-GEN OWNER THEME (COMPLETE MAIN ARCHITECTURE PRODUCTION FILE)
   ========================================================================== */

/* ---------- DEEP DARK VARIABLE DESIGN SYSTEM ---------- */
:root {
  --primary-glow: #3b82f6;
  --secondary-glow: #4f46e5;
  --accent-neon: #06b6d4;
  --danger-neon: #ef4444;
  --success-neon: #10b981;
  --warning-neon: #f59e0b;

  --bg-deep: #030712;
  --bg-surface: #0b0f19;
  --bg-surface-soft: #111827;
  --bg-navbar: rgba(3, 7, 18, 0.9);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --border-glow: rgba(59, 130, 246, 0.2);
  --border-muted: #1f2937;

  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-circle: 50%;

  --font-core: "Inter", system-ui, -apple-system, sans-serif;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- SYSTEM CORE HARD RESET ENGINE ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  
  /* CRITICAL: Block all default mobile link rendering highlights globally */
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  outline: none;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-deep);
  font-family: var(--font-core);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- PREMIUM TOP NAVIGATION BAR DESIGN ---------- */
.app-top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: var(--bg-navbar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-brand-logo {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
}

.app-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.app-brand-text .main-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
}

.app-brand-text .sub-title {
  font-size: 11px;
  color: var(--primary-glow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Badge ID Account Validation Shield */
.badge-account-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(31, 41, 55, 0.6);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-muted);
}

.account-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-neon);
}

/* Notification Component Module */
.icon-action-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s var(--transition-smooth);
}

.icon-action-btn:hover {
  border-color: var(--primary-glow);
  color: #fff;
  transform: translateY(-2px);
}

.notif-bell svg {
  animation: microPulse 2s infinite ease-in-out;
}

@keyframes microPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); color: var(--accent-neon); }
}

/* User Profile Trigger Ring */
.user-avatar-trigger {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-circle);
  border: 2px solid var(--border-glow);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s var(--transition-smooth);
}

.user-avatar-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-trigger:hover {
  transform: scale(1.08);
  border-color: var(--primary-glow);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ---------- SYSTEM CONSOLE CONTAINER LAYOUT ---------- */
.app-container {
  padding-top: 70px;
  min-height: 100vh;
  display: flex;
}

/* SIDEBAR LAYOUT (DESKTOP ENVIRONMENT MODULES) */
.app-sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-muted);
  position: fixed;
  top: 70px;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 90;
  transition: transform 0.3s var(--transition-smooth);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(17, 24, 39, 0.5);
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-muted);
  margin-bottom: 24px;
}

.sb-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-circle);
}

.sb-user-details h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.sb-user-details .sb-status {
  font-size: 11px;
  color: var(--success-neon);
  font-weight: 500;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s var(--transition-smooth);
}

.sidebar-item svg {
  color: var(--text-muted);
  transition: color 0.2s;
}

.sidebar-item:hover, .sidebar-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: #fff;
}

.sidebar-item:hover svg, .sidebar-item.active svg {
  color: var(--primary-glow);
}

.sidebar-footer {
  border-top: 1px solid var(--border-muted);
  padding-top: 16px;
}

.sb-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.sb-logout-btn:hover {
  color: var(--danger-neon);
}

/* MAIN CONTENT BLOCK PIPELINE ENGINE */
.app-main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ---------- CORE APP FLOATING FLOOD NOTICES ---------- */
.floating-app-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  border-left: 4px solid transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.floating-app-notice.warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: var(--warning-neon);
  color: #fef3c7;
}
.floating-app-notice.warning .notice-icon { color: var(--warning-neon); }

.floating-app-notice.alert {
  background: rgba(239, 68, 68, 0.06);
  border-color: var(--danger-neon);
  color: #fee2e2;
}
.floating-app-notice.alert .notice-icon { color: var(--danger-neon); }

.floating-app-notice p {
  font-size: 13.5px;
  font-weight: 500;
}

/* ---------- METRICS GRID CONTROL METRICS ---------- */
.metrics-grid-engine {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.metric-glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-xl);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s var(--transition-smooth);
}

.metric-glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.metric-header .card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.m-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-icon.wrapper-1 { background: rgba(59, 130, 246, 0.1); color: var(--primary-glow); }
.m-icon.wrapper-2 { background: rgba(245, 158, 11, 0.1); color: var(--warning-neon); }
.m-icon.wrapper-3 { background: rgba(16, 185, 129, 0.1); color: var(--success-neon); }
.m-icon.wrapper-4 { background: rgba(167, 139, 250, 0.1); color: #a78bfa; }

.metric-counter {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  font-feature-settings: "tnum";
}

/* ---------- WORKSPACE LAYOUT SPLIT PARAMS ---------- */
.workspace-split-view {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.workspace-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.ws-card-header {
  margin-bottom: 24px;
}

.ws-card-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.ws-card-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Quick Actions Management List Elements */
.terminal-links-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.t-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-muted);
  text-decoration: none;
  transition: all 0.2s var(--transition-smooth);
}

.t-link:active { transform: scale(0.98); }

.t-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-soft);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.t-details h5 {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.t-details p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.t-link:hover {
  transform: translateX(4px);
  border-color: var(--border-glow);
  background: rgba(59, 130, 246, 0.04);
}

.t-link:hover .t-icon {
  background: var(--primary-glow);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Snapshot Table Profile Alignment Rows */
.snapshot-data-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.snap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
}

.snap-row .lbl {
  font-size: 13px;
  color: var(--text-secondary);
}

.snap-row .val {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
}

.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.btn-premium-action {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary-glow) 0%, var(--secondary-glow) 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
  transition: all 0.2s var(--transition-smooth);
}

.btn-premium-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
  opacity: 0.95;
}

/* ---------- 📱 APP COMPONENT LOCK NATIVE BOTTOM NAVIGATION BAR ---------- */
.app-bottom-navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: #090d16;
  border-top: 1px solid #1f2937;
  display: none; /* Hidden inside desktop PC browser views */
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Hard parameters lock: drops default web blue selection mechanics completely */
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.app-bottom-navigation.bnav-hidden { transform: translateY(100%); }

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  gap: 5px;
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  position: relative;

  /* Total deletion of default anchor web tap highlights overlays natively */
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}

/* ⚡ HIGH DEFINITION NATIVE CLICK ANIMATION DRIVER ENGINE */
.bnav-item:active {
  transform: scale(0.94);
  filter: brightness(1.2);
}

.bnav-item.active {
  color: var(--primary-glow);
}

.bnav-item.primary-action-trigger { 
  position: relative; 
  overflow: visible; 
}

/* Centralized floating button ring layout module */
.action-btn-circle {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-circle);
  background: linear-gradient(135deg, var(--primary-glow) 0%, var(--accent-neon) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-12px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  border: 4px solid #030712;
  transition: transform 0.1s ease;
}

.bnav-item.primary-action-trigger:active .action-btn-circle {
  transform: translateY(-14px) scale(0.93);
}

/* ---------- SYSTEM CORE OVERLAYS & MODAL OVERRIDES ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(3, 7, 18, 0.8); backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px;
}

.modal { background: var(--bg-surface); border: 1px solid var(--border-muted); border-radius: var(--radius-xl); padding: 32px; width: 100%; max-width: 500px; position: relative; }
.modal-large { max-width: 520px; }
.modal h2 { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.close-modal { position: absolute; top: 20px; right: 20px; background: transparent; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; }

.profile-form .form-grid, .help-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; color: var(--text-secondary); }

.profile-form input, .profile-form textarea, .help-form input, .help-form textarea {
  background: var(--bg-surface-soft); border: 1px solid var(--border-muted); border-radius: var(--radius-md); padding: 12px; color: #fff; outline: none; font-size: 14px;
}

.profile-form input:focus, .help-form input:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn-update { grid-column: 1 / -1; padding: 14px; background: var(--primary-glow); color: #fff; border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; }

/* ---------- RESPONSIVE CONFIGURATION ENVIRONMENT SETUPS ---------- */
@media (max-width: 1200px) {
  .metrics-grid-engine { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 991px) {
  .app-sidebar { display: none !important; }
  .app-main-content { margin-left: 0; padding: 20px; padding-bottom: 90px; }
  .app-bottom-navigation { display: flex; }

  /* 🎯 MOB BRANDINGS BOUNDARIES CORRECTIONS SETUPS LOCK */
  .app-top-navbar { padding: 0 16px; }
  .app-brand-text { display: flex !important; }
  .app-brand-text .main-title { font-size: 16px; }
  .app-brand-text .sub-title { font-size: 9.5px; }
}

@media (max-width: 768px) {
  .workspace-split-view { grid-template-columns: 1fr; }
  .profile-form .form-grid, .help-form { grid-template-columns: 1fr; }
  .badge-account-wrapper { background: transparent; border: none; padding: 0; gap: 4px; }
  .badge-account-wrapper .account-tag { font-size: 11px; }
}

@media (max-width: 480px) {
  .metrics-grid-engine { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .metric-glass-card { padding: 16px; }
  .metric-counter { font-size: 24px; }
  .metric-header .card-title { font-size: 11px; }
  .m-icon { width: 34px; height: 34px; }
  .account-tag { max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}