/*
  NEXUS — UI v9 (Light / Executive)
  ------------------------------------------------
  Modern, high-contrast, "sellable" UI.
  IMPORTANT: This stylesheet matches home.php markup (.nx-app, .nx-link, .nx-toplink...).
*/

:root{
  /* Background */
  --nx-bg0:#f7f9ff;
  --nx-bg1:#eef3ff;
  --nx-orb1:rgba(124,58,237,.08);
  --nx-orb2:rgba(37,99,235,.08);
  --nx-orb3:rgba(16,185,129,.06);

  /* Text */
  --nx-text:#0b1220;
  --nx-text2:#334155;
  --nx-muted:#64748b;

  /* Surfaces */
  --nx-surface:rgba(255,255,255,.72);
  --nx-surface2:rgba(255,255,255,.92);
  --nx-border:rgba(15,23,42,.12);
  --nx-border2:rgba(15,23,42,.08);

  /* Brand */
  --nx-primary:#2563eb;
  --nx-accent:#7c3aed;
  --nx-success:#16a34a;
  --nx-warning:#d97706;
  --nx-danger:#dc2626;

  --nx-r12:12px;
  --nx-r16:16px;
  --nx-r20:20px;

  --nx-shadow: 0 18px 55px rgba(2,6,23,.10);
  --nx-shadow2: 0 10px 30px rgba(2,6,23,.08);
  --nx-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--nx-text);
  font-family:var(--nx-font);
  background: linear-gradient(180deg, var(--nx-bg0), var(--nx-bg1));
  overflow-x:hidden;
}

/* Ambient orbs (subtle) */
body::before, body::after{
  content:"";
  position:fixed;
  inset:-220px;
  pointer-events:none;
  background:
    radial-gradient(520px 520px at 18% 14%, var(--nx-orb1), transparent 60%),
    radial-gradient(520px 520px at 82% 18%, var(--nx-orb2), transparent 60%),
    radial-gradient(700px 700px at 55% 88%, var(--nx-orb3), transparent 62%);
  filter: blur(28px);
  opacity:.55;
  z-index:0;
}
body::after{ opacity:.30; filter: blur(44px); }

a{ color: var(--nx-primary); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* -------- Shell layout (home.php) -------- */
.nx-app{ position:relative; z-index:1; min-height:100vh; display:flex; }

.nx-sidebar{
  width:292px;
  padding:18px 14px;
  border-right:1px solid var(--nx-border2);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(255,255,255,.65) inset;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
}

.nx-brand{ display:flex; align-items:center; gap:12px; padding:10px 10px 16px; }
.nx-mark{
  width:40px; height:40px; border-radius:14px;
  background: radial-gradient(circle at 30% 25%, var(--nx-accent), var(--nx-primary));
  box-shadow: 0 18px 28px rgba(124,58,237,.18);
}
.nx-brand-title{ font-weight:950; letter-spacing:.26em; font-size:14px; }
.nx-brand-sub{ color:var(--nx-muted); font-size:12px; margin-top:2px; }

.nx-nav{ display:flex; flex-direction:column; gap:10px; padding:6px 6px; }
.nx-link{
  display:flex; align-items:center; gap:12px;
  padding:12px 12px;
  border-radius:16px;
  text-decoration:none;
  color:var(--nx-text2);
  border:1px solid var(--nx-border2);
  background: rgba(255,255,255,.55);
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.nx-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.78);
  border-color: rgba(37,99,235,.18);
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
}
.nx-link.active{
  color:var(--nx-text);
  border-color: rgba(37,99,235,.26);
  background: linear-gradient(90deg, rgba(37,99,235,.14), rgba(124,58,237,.10));
  box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}
.nx-ico{ display:inline-flex; color: rgba(15,23,42,.78); }

.nx-sep{ height:1px; background: rgba(15,23,42,.10); margin:10px 6px; }

.nx-sidefoot{ margin-top:14px; padding:10px 8px; display:flex; flex-direction:column; gap:10px; }
.nx-pill{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.62);
  border:1px solid var(--nx-border2);
  color:var(--nx-muted);
  font-size:12px;
}
.nx-pill b{ color:var(--nx-text); }

.nx-main{ flex:1; padding:22px 22px 28px; min-width:0; }

.nx-topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border:1px solid var(--nx-border2);
  border-radius:20px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--nx-shadow2);
}

.nx-topbar-title{ font-weight:900; letter-spacing:-.02em; font-size:16px; }

.nx-topbar-actions{ display:flex; gap:10px; }
.nx-toplink{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--nx-border2);
  background: rgba(255,255,255,.66);
  color: var(--nx-text2);
  text-decoration:none;
  font-weight:900;
}
.nx-toplink:hover{ background: rgba(255,255,255,.92); color: var(--nx-text); text-decoration:none; }

.nx-burger{ display:none; }

.nx-content{ margin-top:16px; }

.nx-iframeCard{
  border-radius:22px;
  border:1px solid var(--nx-border2);
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--nx-shadow);
  overflow:hidden;
}

.nx-iframe{
  width:100%;
  height: calc(100vh - 120px);
  border:0;
  display:block;
  background: transparent;
}

.nx-bannerwrap{ margin-top:12px; }

/* Responsive */
@media (max-width: 980px){
  .nx-sidebar{ position:fixed; left:-330px; top:0; height:100vh; z-index:50; transition:left .18s ease; }
  .nx-sidebar.open{ left:0; }
  .nx-main{ padding:16px; }
  .nx-burger{
    display:inline-flex;
    border:1px solid var(--nx-border2);
    background: rgba(255,255,255,.80);
    color:var(--nx-text);
    border-radius:12px;
    padding:10px 12px;
    cursor:pointer;
  }
}

/* Small utilities (used across pages) */
.nx-h1{ font-size:30px; letter-spacing:-.03em; margin:0 0 10px; }
.nx-sub{ color:var(--nx-muted); margin:0; font-size:13px; }

/* -------- Components used by nx_dashboard.php -------- */
.nx-grid{ display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:14px; }
.nx-card{
  background: rgba(255,255,255,.76);
  border: 1px solid var(--nx-border2);
  border-radius: 22px;
  box-shadow: var(--nx-shadow2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nx-card.pad{ padding:18px; }
.nx-heroTitle{ font-size:28px; font-weight:950; letter-spacing:-.04em; }
.nx-chip{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--nx-border2);
  background: rgba(255,255,255,.72);
  color:var(--nx-text2);
  font-weight:900;
  font-size:12px;
}
.nx-filters{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.nx-filters input, .nx-filters select{
  min-width:220px;
  max-width: 360px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--nx-border2);
  background: rgba(255,255,255,.92);
  color: var(--nx-text);
}
.nx-filters input::placeholder{ color: rgba(100,116,139,.95); }
.nx-filters input:focus, .nx-filters select:focus{ outline:none; box-shadow:0 0 0 4px rgba(37,99,235,.12); border-color: rgba(37,99,235,.35); }

.nx-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--nx-border2);
  background: rgba(255,255,255,.78);
  color:var(--nx-text);
  text-decoration:none;
  font-weight:950;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.nx-btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.92); border-color: rgba(37,99,235,.20); box-shadow: 0 12px 24px rgba(2,6,23,.08); }
.nx-btn.primary{ border:none; background: linear-gradient(90deg, var(--nx-primary), var(--nx-accent)); color:#fff; box-shadow: 0 18px 32px rgba(37,99,235,.16); }
.nx-btn.ghost{ background: rgba(255,255,255,.58); }

.nx-stat{ padding:12px 12px; border-radius:18px; border:1px solid var(--nx-border2); background: rgba(255,255,255,.64); }
.nx-stat .k{ color:var(--nx-muted); font-size:12px; font-weight:950; letter-spacing:.08em; text-transform:uppercase; }
.nx-stat .v{ margin-top:6px; font-weight:950; color: var(--nx-text); font-size:13px; }

.nx-k{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: rgba(255,255,255,.78); border:1px solid var(--nx-border2); padding:2px 6px; border-radius:10px; color: var(--nx-text2); }

@media (max-width: 980px){
  .nx-filters input, .nx-filters select{ min-width: 160px; flex:1 1 auto; }
}
