/* VASITARS live UI patch — loaded after the bundle CSS.
   1) Center the header nav dropdowns (About Us etc.). The wrapper uses
      left-1/2 + -translate-x-1/2, but framer-motion overwrites the inline
      transform during its entrance animation, losing the -50% shift and
      pushing the panel off the right edge. Anchor with left/right + margin
      auto instead, which no animation can stomp. */
header div[class*='980px'][class*='left-1/2'],
header div[class*='left-1/2'][class*='-translate-x-1/2'][class*='z-[70]'] {
  left: 0 !important;
  right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transform: none !important;
}

/* 2) Floating landing chips — stack value / tag / CTA vertically so the
      labels never run together ("GFRP ProductLearn more →"). */
.vx-chip {
  display: flex !important;
  align-items: stretch;
  min-width: 148px;
  max-width: 200px;
}
.vx-chip > span:not(.vx-chip-pulse) {
  display: flex !important;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.vx-chip-value,
.vx-chip-label,
.vx-chip-sub {
  display: block !important;
  white-space: normal;
}

/* ── Space theme — portal routes only (html.vx-space-portal) ─────────────── */
html.vx-space-portal body {
  background:
    radial-gradient(ellipse 60% 40% at 75% 8%, rgba(88, 60, 160, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 45% at 15% 90%, rgba(20, 90, 130, 0.30), transparent 65%),
    radial-gradient(ellipse 35% 30% at 50% 50%, rgba(212, 178, 113, 0.06), transparent 70%),
    linear-gradient(180deg, #030512 0%, #060a1c 45%, #04060f 100%) !important;
  background-attachment: fixed !important;
}
#vx-stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#vx-stars .vx-st { position: absolute; top: 0; left: 0; border-radius: 50%; background: transparent; }
#vx-stars .vx-st-a { animation: vxDrift 240s linear infinite; }
#vx-stars .vx-st-b { animation: vxDrift 160s linear infinite reverse; opacity: 0.8; }
#vx-stars .vx-st-c { animation: vxTwinkle 6s ease-in-out infinite alternate, vxDrift 320s linear infinite; }
#vx-stars .vx-nebula {
  position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 30% 30%, rgba(120, 80, 220, 0.10), transparent 45%),
    radial-gradient(circle at 75% 65%, rgba(56, 214, 194, 0.08), transparent 40%);
  animation: vxNebula 90s ease-in-out infinite alternate;
}
@keyframes vxDrift { from { transform: translateY(0); } to { transform: translateY(-2000px); } }
@keyframes vxTwinkle { from { opacity: 0.5; } to { opacity: 1; } }
@keyframes vxNebula { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(2%, 2%, 0) scale(1.06); } }

/* Portal glass placeholder — the login card floats above the starfield. */
html.vx-space-portal .glass-login-surface {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(168, 196, 255, 0.30) !important;
  box-shadow:
    0 0 0 1px rgba(212, 178, 113, 0.10),
    0 40px 120px -40px rgba(0, 0, 0, 0.95),
    0 0 80px -30px rgba(120, 140, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}
html.vx-space-portal .glass-login-surface .titan-btn-primary,
html.vx-space-portal .glass-login-surface button[class*='primary'],
html.vx-space-portal .glass-login-surface .glass-btn-gold {
  background: linear-gradient(135deg, #e8c987, #c9a75f 55%, #b08d45) !important;
  color: #10131c !important;
  border: 0 !important;
  box-shadow: 0 10px 30px -10px rgba(212, 178, 113, 0.55) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
html.vx-space-portal .glass-login-surface .titan-btn-primary:hover,
html.vx-space-portal .glass-login-surface .glass-btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -10px rgba(212, 178, 113, 0.7) !important;
}
html.vx-space-portal .glass-login-surface .glass-btn {
  border: 1px solid rgba(168, 196, 255, 0.35) !important;
  background: rgba(16, 24, 44, 0.6) !important;
}

/* ── Embedded Excel-style database browser (admin) ───────────────────────── */
#vxdb-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 9000;
  padding: 12px 18px; border-radius: 14px; border: 1px solid rgba(212, 178, 113, 0.4);
  background: linear-gradient(135deg, #1b2436, #0d1322); color: #ecd9ad;
  font: 700 13px/1 system-ui, sans-serif; letter-spacing: 0.04em; cursor: pointer;
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.9), 0 0 24px -10px rgba(212, 178, 113, 0.5);
}
#vxdb-launch:hover { transform: translateY(-1px); }
#vxdb-overlay {
  position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center;
  background: rgba(2, 4, 10, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 3vh 3vw;
}
.vxdb-panel {
  width: min(1500px, 96vw); height: min(860px, 92vh); display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden; border: 1px solid rgba(168, 196, 255, 0.25);
  background: linear-gradient(160deg, rgba(16, 24, 42, 0.98), rgba(8, 12, 24, 0.99));
  box-shadow: 0 60px 160px -50px rgba(0, 0, 0, 1);
  font: 13px/1.45 system-ui, sans-serif;
}
.vxdb-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.vxdb-title { color: #fff; font-weight: 800; font-size: 15px; margin-right: auto; }
.vxdb-title small { color: rgba(255,255,255,0.45); font-weight: 500; margin-left: 8px; }
#vxdb-q { width: 240px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(168,196,255,0.25); background: rgba(6,10,20,0.9); color: #fff; }
#vxdb-csv, #vxdb-close {
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 700;
  border: 1px solid rgba(33, 115, 70, 0.6); background: #217346; color: #fff;
}
#vxdb-close { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.vxdb-body { flex: 1; display: flex; min-height: 0; }
.vxdb-side { width: 180px; border-right: 1px solid rgba(255,255,255,0.08); padding: 10px; overflow-y: auto; }
.vxdb-ds {
  display: block; width: 100%; text-align: left; margin-bottom: 6px; padding: 9px 12px;
  border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: rgba(255,255,255,0.65); cursor: pointer; text-transform: capitalize; font-weight: 600;
}
.vxdb-ds:hover { background: rgba(255,255,255,0.06); color: #fff; }
.vxdb-ds.is-active { background: rgba(33, 115, 70, 0.25); border-color: rgba(33, 115, 70, 0.7); color: #9ff0c0; }
.vxdb-gridwrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vxdb-meta { padding: 8px 14px; color: rgba(255,255,255,0.55); font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.vxdb-scroll { flex: 1; overflow: auto; background: #fff; }
.vxdb-grid { border-collapse: collapse; min-width: 100%; background: #fff; color: #1a1a1a; font-size: 12.5px; }
.vxdb-grid th, .vxdb-grid td {
  border: 1px solid #d4d4d4; padding: 5px 10px; text-align: left; max-width: 320px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #fff;
}
.vxdb-grid thead th { position: sticky; background: #217346; color: #fff; font-weight: 700; z-index: 3; }
.vxdb-grid .vxdb-letters th { top: 0; background: #185a37; font-weight: 600; text-align: center; font-size: 11px; }
.vxdb-grid .vxdb-names th { top: 25px; }
.vxdb-grid tbody th {
  position: sticky; left: 0; background: #f3f3f3; color: #444; font-weight: 600;
  text-align: center; min-width: 44px; z-index: 2; border-color: #d4d4d4;
}
.vxdb-grid .vxdb-corner { left: 0; z-index: 4; }
.vxdb-grid tbody tr:nth-child(even) td { background: #f6faf7; }
.vxdb-grid tbody tr:hover td { background: #e7f3ec; }

/* ── Portal login card (new-build classes: .glass.max-w-md) ──────────────── */
html.vx-space-portal .glass.max-w-md {
  position: relative;
  z-index: 2;
  border-radius: 22px !important;
  padding: clamp(30px, 4vw, 44px) clamp(26px, 3.4vw, 40px) !important;
  border: 1px solid rgba(168, 196, 255, 0.30) !important;
  background: linear-gradient(160deg, rgba(17, 25, 45, 0.94), rgba(8, 12, 25, 0.97)) !important;
  box-shadow:
    0 0 0 1px rgba(212, 178, 113, 0.10),
    0 40px 120px -40px rgba(0, 0, 0, 0.95),
    0 0 80px -30px rgba(120, 140, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
}
html.vx-space-portal .glass.max-w-md .titan-input {
  min-height: 48px;
  border-radius: 13px !important;
  padding: 11px 15px !important;
  font-size: 14.5px;
  background: rgba(8, 13, 26, 0.92) !important;
  border: 1px solid rgba(168, 196, 255, 0.22) !important;
  color: #eef2fb !important;
}
html.vx-space-portal .glass.max-w-md .titan-input:focus {
  border-color: rgba(212, 178, 113, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(212, 178, 113, 0.15) !important;
  outline: none;
}
html.vx-space-portal .glass.max-w-md input:-webkit-autofill,
html.vx-space-portal .glass.max-w-md input:-webkit-autofill:hover,
html.vx-space-portal .glass.max-w-md input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(8, 13, 26, 0.96) inset !important;
  -webkit-text-fill-color: #eef2fb !important;
  caret-color: #eef2fb;
  border-radius: 13px;
}
html.vx-space-portal .glass.max-w-md .titan-btn-primary {
  min-height: 48px;
  border-radius: 13px !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #e8c987, #c9a75f 55%, #b08d45) !important;
  color: #10131c !important;
  border: 0 !important;
  box-shadow: 0 10px 30px -10px rgba(212, 178, 113, 0.55) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
html.vx-space-portal .glass.max-w-md .titan-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -10px rgba(212, 178, 113, 0.75) !important;
}

/* ── Approvals hub (admin) ───────────────────────────────────────────────── */
#vxap-launch {
  position: fixed; right: 150px; bottom: 22px; z-index: 9000;
  padding: 12px 18px; border-radius: 14px; border: 1px solid rgba(74, 222, 128, 0.45);
  background: linear-gradient(135deg, #16301f, #0b1712); color: #b8f0c9;
  font: 700 13px/1 system-ui, sans-serif; letter-spacing: 0.04em; cursor: pointer;
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.9), 0 0 24px -10px rgba(74, 222, 128, 0.45);
}
#vxap-launch:hover { transform: translateY(-1px); }
#vxap-overlay {
  position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center;
  background: rgba(2, 4, 10, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 3vh 3vw;
}
#vxap-overlay .vxdb-panel { width: min(980px, 96vw); height: min(760px, 90vh); }
.vxap-tab {
  padding: 8px 16px; border-radius: 10px; cursor: pointer; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7);
}
.vxap-tab.is-active { background: rgba(74, 222, 128, 0.18); border-color: rgba(74, 222, 128, 0.6); color: #b8f0c9; }
#vxap-refresh, #vxap-close {
  padding: 8px 12px; border-radius: 10px; cursor: pointer; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); color: #fff;
}
.vxap-list { flex: 1; overflow-y: auto; padding: 14px 16px; color: rgba(255,255,255,0.75); }
.vxap-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
}
.vxap-info { flex: 1; min-width: 0; }
.vxap-main { color: #fff; font-weight: 700; font-size: 13.5px; }
.vxap-sub { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vxap-badge {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.vxap-ok, .vxap-no {
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 12.5px;
  border: 1px solid rgba(74, 222, 128, 0.6); background: rgba(74, 222, 128, 0.15); color: #b8f0c9;
}
.vxap-no { border-color: rgba(248, 113, 113, 0.55); background: rgba(248, 113, 113, 0.12); color: #fecaca; }
.vxap-ok:hover { background: rgba(74, 222, 128, 0.3); }
.vxap-no:hover { background: rgba(248, 113, 113, 0.25); }
