/* ============================================================
   TechManager — GLOBAL STYLES
   Dark theme matched to the brand reference.
   ============================================================ */
:root {
  --bg:        #070a12;
  --bg-soft:   #0a0e18;
  --bg-bar:    #0c111d;
  --panel:     #0f1422;
  --panel-2:   #131a2b;
  --panel-3:   #182135;
  --border:        rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.13);
  --text:      #eef1f7;
  --text-2:    #aeb6c8;
  --muted:     #8a93a8;
  --dim:       #5c6478;
  --blue:      #2f7df6;
  --blue-2:    #4a9bff;
  --blue-deep: #1c5fd0;
  --blue-glow: rgba(47,125,246,0.45);
  --green:     #34d399;
  --amber:     #f5c451;
  --red:       #f87171;
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1180px;
  --font: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(47,125,246,0.16), transparent 60%),
    radial-gradient(900px 600px at 8% 4%, rgba(120,70,230,0.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}
#root { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--blue); color: #fff; }

/* ---- App background ambience (now applied to body) ---- */
.app-bg { display: none; }
.layer { position: relative; z-index: 1; }

/* ---- Layout helpers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }

/* ---- Typography ---- */
.display {
  font-family: var(--display);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.02;
  margin: 0;
}
h1.display { font-size: clamp(40px, 5.4vw, 72px); }
h2.display { font-size: clamp(30px, 3.6vw, 46px); }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 13px;
  font-weight: 700; color: var(--blue-2);
}
.lede { color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); max-width: 56ch; }
.text-grad {
  background: linear-gradient(180deg, #cfe0ff 0%, #6ea3ff 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 13px 22px; font-size: 15px; font-weight: 700; line-height: 1;
  transition: transform .12s ease, background .15s ease, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--blue-2), var(--blue));
  color: #fff; box-shadow: 0 8px 26px -8px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { box-shadow: 0 12px 34px -8px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-ghost { background: rgba(255,255,255,0.03); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.22); }
.btn-soft { background: var(--panel-2); color: var(--text-2); border-color: var(--border); }
.btn-soft:hover { background: var(--panel-3); color: var(--text); }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-danger { background: rgba(248,113,113,0.12); color: #fca5a5; border-color: rgba(248,113,113,0.3); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }

/* ---- Cards ---- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)) , var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-hover { transition: transform .18s ease, border-color .18s, box-shadow .18s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 20px 50px -24px rgba(0,0,0,0.8); }

/* ---- Badges / chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border-strong); background: rgba(255,255,255,0.03); color: var(--text-2);
}
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.badge-ready  { background: rgba(52,211,153,0.12); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.28); }
.badge-soon   { background: rgba(245,196,81,0.12); color: #fcd34d; border: 1px solid rgba(245,196,81,0.28); }
.badge-draft  { background: rgba(138,147,168,0.12); color: #aeb6c8; border: 1px solid rgba(138,147,168,0.28); }
.badge-pass   { background: rgba(52,211,153,0.14); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.3); }
.badge-fail   { background: rgba(248,113,113,0.13); color: #fca5a5; border: 1px solid rgba(248,113,113,0.3); }

/* ---- Inputs ---- */
.input, .textarea, .select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 10px; padding: 11px 13px; font-size: 14.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,125,246,0.18); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 0 6px; letter-spacing: .02em; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(7,10,18,0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand-dot { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #7db4ff, var(--blue) 60%, var(--blue-deep)); box-shadow: 0 0 16px var(--blue-glow), inset 0 1px 2px rgba(255,255,255,0.5); position: relative; }
.brand-dot::after { content:''; position:absolute; inset: 7px; border-radius:50%; background: rgba(7,10,18,0.55); }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-link { padding: 8px 13px; border-radius: 8px; font-size: 14.5px; font-weight: 600; color: var(--text-2); transition: color .15s, background .15s; background: transparent; border: none; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: #fff; background: rgba(47,125,246,0.14); }
.nav-spacer { flex: 1; }

/* ---- Stats bar ---- */
.statbar { background: var(--bg-bar); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 38px 20px; text-align: center; border-left: 1px solid var(--border); }
.stat:first-child { border-left: none; }
.stat-num { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3vw, 42px); letter-spacing: -0.02em; }
.stat-label { margin-top: 6px; text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; color: var(--dim); font-weight: 700; }

/* ---- Glossy node graph ---- */
.graph { position: relative; width: 100%; aspect-ratio: 1 / 0.92; }
.graph svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; }
.node-orb {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center; font-size: 38px;
  position: relative; transition: transform .2s ease, filter .2s;
}
.node-orb::before { /* glossy top highlight */
  content: ''; position: absolute; top: 8%; left: 16%; width: 56%; height: 46%;
  border-radius: 50%; background: radial-gradient(circle at 40% 30%, rgba(255,255,255,0.85), rgba(255,255,255,0) 70%);
  filter: blur(1px); opacity: .85;
}
.node-orb::after { /* base reflection */
  content: ''; position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 12px; border-radius: 50%; background: rgba(0,0,0,0.5); filter: blur(7px); opacity: .7;
}
.node:hover .node-orb { transform: scale(1.06) translateY(-2px); }
.node-label { font-size: 13px; font-weight: 700; color: var(--text-2); text-align: center; max-width: 130px; line-height: 1.2; }
.node-pip { fill: var(--blue-2); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 48px 0; color: var(--muted); }

/* ---- Modal ---- */
.modal-scrim { position: fixed; inset: 0; z-index: 100; background: rgba(4,6,12,0.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; }
.modal { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: 0 40px 90px -30px #000; max-height: 90vh; overflow: auto; }

/* ---- Utility ---- */
.grid { display: grid; }
.flex { display: flex; }
.center { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-48{margin-top:48px}
.muted { color: var(--muted); } .dim { color: var(--dim); }
.fadein { animation: fadein .5s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* progress bars */
.bar-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--blue-2)); transition: width .6s cubic-bezier(.2,.7,.2,1); }

/* responsive */
@media (max-width: 900px) {
  .statgrid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .nav-links { display: none; }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .statgrid { grid-template-columns: 1fr; }
  .stat { border-left: none; }
}
