/* ===============================================
   NEXUS GLOBAL OPERATIONS — MINIMALIST SYSTEM
   Pure Dark Node — High-End Operational Aesthetic
   =============================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS TOKENS ── */
:root {
  --font-head: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Pure Minimalism Palette */
  --bg-void:    #000000;
  --bg-deep:    #000000;
  --bg-surface: rgba(255,255,255,0.02);
  --bg-card:    rgba(255,255,255,0.03);
  --bg-hover:   rgba(255,255,255,0.06);

  /* Ultra-Thin Structural Borders */
  --border-subtle: rgba(255,255,255,0.03);
  --border-sharp:  rgba(255,255,255,0.06);

  /* High-Contrast Text */
  --text-1: #ffffff;
  --text-2: #94a3b8;
  --text-3: #475569;

  /* Operational Accents */
  /* High-Contrast Professional Pastel Palette */
  --accent-blue-soft:  #3b82f6;
  --accent-peach-soft: #a855f7;
  --accent-emerald:    #10b981;
  
  --accent-periwinkle: var(--accent-blue-soft);
  --accent-rose-dust:  var(--accent-peach-soft);
  --accent-sage:       var(--accent-emerald);
  
  --accent-blue:    var(--accent-blue-soft);
  --accent-purple:  var(--accent-peach-soft);
  --accent-lime:    var(--accent-emerald);
  --accent-amber:   #FFE5B4; 
  --accent-green:   #C1E1C1; 
  --accent-rose:    #FFB7B2;
  --accent-cyan:    #AFE4DE;
  --accent-light-blue: #93c5fd;

  /* Node Gradients (High Contrast Muted) */
  --grad-systems:  linear-gradient(135deg, #72A0C1 0%, #5B8BA5 100%);
  --grad-creative: linear-gradient(135deg, #FFCCB3 0%, #E6B39A 100%);
  --grad-neural:   linear-gradient(135deg, #A2D1A9 0%, #89B890 100%);

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 999px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── LIQUID TRANSITIONS ── */
.anim-liquid-fade {
  animation: liquidFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes liquidFade {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── STRUCTURAL UTILITIES ── */
.glass, .glass-deep, .nx-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── DASHBOARD & TEAM LAYOUTS ── */
.command-layout, .team-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  margin-top: 40px;
}
.team-layout { grid-template-columns: 360px 1fr; }

.command-main, .command-sidebar, .team-main, .team-sidebar {
  background: #000;
  padding: 40px;
}

.nexus-monitor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  margin-bottom: 40px;
}

.monitor-cell {
  background: #000;
  padding: 24px;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.ticket-row {
  display: grid;
  grid-template-columns: 60px 1fr 120px 180px;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}
.ticket-row:hover { background: var(--bg-surface); }
.ticket-row.highlight { background: rgba(182, 208, 226, 0.05); border-left: 2px solid var(--accent-periwinkle); }

.velocity-container {
    border: 1px solid var(--border-subtle);
    background: #000;
    padding: 24px;
    margin-bottom: 40px;
}

.ticket-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s;
}
.ticket-strip.focus-highlight {
    background: rgba(182, 208, 226, 0.08);
    border-left: 3px solid var(--accent-periwinkle);
    padding-left: 17px;
}
.ticket-info { display: flex; flex-direction: column; gap: 4px; }
.ticket-id { font-size: 0.7rem; font-weight: 800; color: var(--text-3); }
.ticket-subject { font-size: 0.9rem; color: #fff; font-weight: 500; }
.ticket-team { font-size: 0.7rem; color: var(--accent-blue); font-weight: 700; text-transform: uppercase; }

/* QAC Dropdown (Google Style) */
.qac-dropdown {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    z-index: 2000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}
.qac-item {
    padding: 12px 20px;
    color: var(--text-2);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.qac-item:hover, .qac-item.active {
    background: rgba(182, 208, 226, 0.1);
    color: var(--accent-periwinkle);
}
.qac-item-icon { color: var(--text-3); }

.ticket-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* ── LAYOUT ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  animation: fadeIn 0.4s ease both;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAVBAR ── */
.nx-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.9);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
}
.nx-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nx-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  color: #fff;
  text-transform: uppercase;
  text-decoration: none;
}
.nx-logo-dot {
  color: var(--accent-blue);
  margin-left: 2px;
}

/* ── DROPDOWN LOGIN ── */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #000;
  min-width: 200px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  z-index: 1001;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.dropdown-content a {
  color: var(--text-2);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.dropdown-content a:hover {
  background: var(--bg-hover);
  color: #fff;
}
.dropdown:hover .dropdown-content {
  display: block;
}

.nx-nav-links { display: flex; align-items: center; gap: 24px; }
.nx-nav-links a {
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nx-nav-links a:hover { color: #fff; }

.mobile-hide { display: block; }
.desktop-hide { display: none; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1), background 0.2s;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: #fff;
  color: #000;
  padding: 10px 24px;
  font-size: 0.85rem;
}
.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-subtle);
  padding: 10px 24px;
  font-size: 0.85rem;
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--text-2); color: #fff; }

/* ── FORM ── */
.nx-input, .nx-textarea {
  width: 100%;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--accent-light-blue);
  border-radius: var(--r-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 20px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 10px rgba(147, 197, 253, 0.05);
}
.nx-input:focus, .nx-textarea:focus {
  border-color: var(--accent-light-blue);
  background: rgba(147, 197, 253, 0.03);
  box-shadow: 0 0 25px rgba(147,197,253,0.15), inset 0 2px 4px rgba(0,0,0,0.2);
}
.nx-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
  color: var(--text-2);
}

/* ── SEARCH BAR ── */
.nx-search-wrapper {
  position: relative;
  margin-bottom: 40px;
}
.nx-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
}
.nx-search-input {
  padding-left: 56px !important;
  height: 56px;
  font-size: 1rem !important;
  background: rgba(255,255,255,0.01) !important;
}

/* ── BADGES ── */
.badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  border: 1px solid var(--border-subtle);
}

/* ── GRID ── */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}
.grid-4 > div {
  background: #000;
  padding: 32px;
  border: 1px solid var(--border-subtle);
}

/* ── STATUS MANAGEMENT ── */
.status-select {
  background: #000;
  color: #fff;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-body);
  font-size: 0.75rem;
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.status-select:hover { border-color: var(--text-2); }

.status-escalated { background: transparent; color: var(--accent-rose); border: 1px solid var(--accent-rose); box-shadow: 0 0 10px rgba(255,0,127,0.2); }

/* ── KPI CARDS ── */
.kpi-card {
  border-bottom: 2px solid var(--border-subtle);
  padding: 24px 0;
}
.kpi-label { font-size: 0.75rem; color: var(--text-2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--text-2); }
.kpi-value { font-size: 2.2rem; font-weight: 700; color: #fff; }

/* ── FOOTER ── */
.multi-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 64px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.footer-col h4 { font-size: 0.8rem; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-2); text-decoration: none; font-size: 0.8rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; }

.footer-copy {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 32px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ── ANIMATIONS ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

.anim-fade-up { animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1) both; }

/* ── DASHBOARD MONITOR ── */
.monitor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.monitor-item {
  border: 1px solid var(--border-subtle);
  padding: 20px;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.monitor-title { font-size: 0.8rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; }
.monitor-stat  { font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--text-2); }

.node-systems .monitor-stat  { color: var(--accent-periwinkle); }
.node-creative .monitor-stat { color: var(--accent-rose-dust); }
.node-neural .monitor-stat   { color: var(--accent-sage); }

/* status overrides (Pastel Mode — Dark Text for Legibility) */
.status-open        { background: var(--accent-amber); color: #000; border: none; font-weight: 700; }
.status-in-progress { background: var(--accent-periwinkle); color: #000; border: none; font-weight: 700; }
.status-resolved    { background: var(--accent-sage); color: #000; border: none; font-weight: 700; }
.status-escalated   { background: var(--accent-rose); color: #000; border: none; font-weight: 700; box-shadow: 0 0 10px rgba(255,183,178,0.2); }

/* dot live */
.dot-live {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
}
.node-systems .dot-live  { background: var(--accent-periwinkle); box-shadow: 0 0 10px var(--accent-periwinkle); }
.node-creative .dot-live { background: var(--accent-rose-dust);  box-shadow: 0 0 10px var(--accent-rose-dust); }
.node-neural .dot-live   { background: var(--accent-sage);      box-shadow: 0 0 10px var(--accent-sage); }

/* Node-specific Monitor Overrides */
.node-systems  { border-bottom: 2px solid var(--accent-cyan); }
.node-creative { border-bottom: 2px solid var(--accent-purple); }
.node-neural   { border-bottom: 2px solid var(--accent-lime); }

.mesh-bg { display: none; }

/* ── RESPONSIVE OVERRIDES ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .monitor-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nx-nav-links { gap: 12px; }
  .nx-nav-links a { font-size: 0.75rem; }
  .btn-primary, .btn-ghost { padding: 8px 16px; font-size: 0.75rem; }
  
  .container, .container-sm { padding: 0 16px; }
  .kpi-value { font-size: 1.8rem; }
  
  .multi-footer { 
    grid-template-columns: repeat(2, 1fr);
    padding: 40px 16px;
  }
}

@media (max-width: 480px) {
  .nx-nav-inner { height: auto; padding: 16px 0; flex-direction: column; gap: 12px; }
  .nx-nav-links { width: 100%; justify-content: center; flex-wrap: wrap; }
  
  .grid-4 { grid-template-columns: 1fr; }
  .monitor-grid { grid-template-columns: 1fr; }
  .multi-footer { grid-template-columns: 1fr; }
  
  .nx-search-input { height: 48px; font-size: 0.9rem !important; }
  .kpi-value { font-size: 1.5rem; }
  .monitor-item { height: auto; min-height: 100px; }
  
  .nx-card { padding: 20px !important; }

  .nx-card { padding: 20px !important; }
}

/* ── TABLET & MOBILE DASHBOARD OVERRIDES ── */
@media (max-width: 900px) {
  .command-layout, .team-layout {
    grid-template-columns: 1fr !important;
    gap: 0;
  }
  .command-sidebar, .team-sidebar {
    border-top: 1px solid var(--border-subtle);
    padding: 32px 20px !important;
  }
  .nexus-monitor {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    background: transparent !important;
  }
  .monitor-cell {
    height: auto !important;
    min-height: 100px;
    border: 1px solid var(--border-subtle) !important;
  }
  
  .nx-nav-inner {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    gap: 16px;
  }
  .nx-nav-links {
    width: 100%;
    justify-content: center;
    gap: 16px !important;
  }
  
  /* Ticket list items on mobile */
  .ticket-strip {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 24px 20px !important;
  }
  /* Forcefully stack ticket actions */
  .ticket-actions, 
  .ticket-strip .ticket-actions,
  .ticket-row .ticket-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 12px !important;
  }
  
  .ticket-actions > *, 
  .ticket-actions select, 
  .ticket-actions .btn {
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
  }

  /* Nuclear Hide */
  .mobile-hide,
  span.mobile-hide,
  div.mobile-hide {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  .desktop-hide { display: block !important; }
}

@media (max-width: 480px) {
  .nx-logo { font-size: 0.9rem; }
  .btn { padding: 8px 16px; font-size: 0.75rem; }
  .monitor-val { font-size: 1.2rem; }
  .kpi-value { font-size: 1.5rem; }
}
