/* NewLife Medicals — premium visual layer */
:root {
  --bg: #050914;
  --panel: rgba(13, 23, 42, .78);
  --panel-strong: rgba(9, 17, 32, .94);
  --line: rgba(177, 205, 255, .12);
  --line-bright: rgba(127, 189, 255, .25);
  --text: #f4f8ff;
  --muted: #8fa3bd;
  --blue: #67a9ff;
  --cyan: #61dcff;
  --violet: #9f82ff;
  --green: #62e9ad;
  --gold: #f4cb7a;
  --shadow: 0 32px 90px rgba(0, 0, 0, .38);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, .24);
}

html { scroll-behavior: smooth; }

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% -8%, rgba(42, 101, 181, .28), transparent 32%),
    radial-gradient(circle at 22% 72%, rgba(104, 64, 191, .15), transparent 30%),
    linear-gradient(145deg, #050914 0%, #07111f 48%, #050b16 100%);
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.ambient { opacity: .16; filter: blur(120px); z-index: -1; }
.a1 { width: 560px; height: 560px; background: #267ee8; }
.a2 { width: 500px; height: 500px; background: #7446d7; }

.app-shell { grid-template-columns: 310px minmax(0, 1fr); min-height: calc(100vh - 82px); }

.sidebar {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 82px);
  top: 82px;
  padding: 26px 20px 22px;
  border-right: 1px solid rgba(170, 202, 255, .1);
  background: linear-gradient(180deg, rgba(5, 11, 22, .96), rgba(5, 12, 24, .86));
  box-shadow: 18px 0 60px rgba(0, 0, 0, .18);
  backdrop-filter: blur(28px) saturate(140%);
}

.sidebar-heading { display: grid; gap: 4px; margin: 4px 7px 24px; padding: 7px 5px 19px; border-bottom: 1px solid var(--line); }
.sidebar-heading span { color: #6f86a1; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.sidebar-heading strong { color: #d8e6f5; font-size: 17px; letter-spacing: -.2px; }

.sidebar nav { display: grid; gap: 7px; overflow-y: auto; padding: 5px 2px 14px; scrollbar-width: thin; }
.nav-item {
  position: relative;
  min-height: 64px;
  padding: 11px 12px;
  border-radius: 16px;
  overflow: hidden;
}
.nav-item::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 8px;
  background: linear-gradient(var(--cyan), var(--violet));
  opacity: 0;
  transform: scaleY(.4);
  transition: .22s ease;
}
.nav-item.active::before { opacity: 1; transform: scaleY(1); }
.nav-item:hover:not(.locked), .nav-item.active {
  transform: none;
  color: #fff;
  border-color: rgba(103, 169, 255, .19);
  background: linear-gradient(100deg, rgba(88, 157, 255, .15), rgba(159, 130, 255, .06));
}
.nav-index { border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.045); }
.nav-item.active .nav-index { color: #dff7ff; border-color: rgba(97,220,255,.26); box-shadow: inset 0 0 18px rgba(97,220,255,.08); }
.nav-copy strong { font-size: 14px; letter-spacing: .05px; }
.nav-copy small { color: #6e829c; }

.sidebar-card {
  position: static;
  margin-top: auto;
  padding: 17px;
  border-color: rgba(244, 203, 122, .14);
  background: linear-gradient(145deg, rgba(244, 203, 122, .07), rgba(93, 114, 255, .06));
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.sidebar-card::before { content: "✦"; float: right; color: var(--gold); opacity: .75; }

.main { width: 100%; max-width: 1660px; padding: 34px 38px 64px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(210px, 1fr) auto;
  align-items: center;
  width: 100%;
  margin: 0;
  min-height: 82px;
  padding: 12px clamp(20px, 2.4vw, 42px);
  border: 1px solid rgba(176, 207, 255, .1);
  border-width: 0 0 1px;
  border-radius: 0;
  background: linear-gradient(110deg, rgba(15, 27, 48, .76), rgba(8, 17, 32, .6));
  box-shadow: 0 14px 45px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(24px) saturate(140%);
}
.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(97, 220, 255, .44), rgba(159, 130, 255, .34), transparent);
}
.eyebrow { color: #91caff; font-size: 11px; letter-spacing: 1.8px; }

.header-brand { display: block; width: min(205px, 100%); padding: 7px 5px; text-decoration: none; transition: opacity .2s ease; }
.header-brand:hover { opacity: .82; }
.header-brand img { display: block; width: 100%; height: 40px; }
.header-product { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; padding: 0 20px; white-space: nowrap; }
.header-product strong { color: #f3f8ff; font-size: 16px; letter-spacing: -.15px; }
.header-product span { color: #8fa6c0; font-size: 13px; font-weight: 600; }
.header-product i { width: 4px; height: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(97,220,255,.7); }
.page-intro { padding: 20px 6px 26px; }
.page-intro h1 { margin: 6px 0 9px; font-size: clamp(38px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -2.2px; }
.page-intro p { max-width: 760px; margin: 0; color: #91a5be; font-size: 17px; }

.top-actions { flex-wrap: nowrap; justify-content: flex-end; }
.system-status { display: flex; align-items: center; gap: 8px; color: #9db1c8; font-size: 12px; white-space: nowrap; }
.system-status i, .pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px rgba(98,233,173,.85); }
.ghost, .primary, .secondary { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, filter .2s ease; }
.ghost:hover, .secondary:hover { transform: translateY(-2px); border-color: rgba(137,188,255,.3); background: rgba(255,255,255,.075); }
.primary:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 18px 44px rgba(79,156,255,.34); }
.primary:active, .secondary:active, .ghost:active { transform: translateY(0); }
.ghost { padding: 11px 15px; border-radius: 12px; font-size: 13px; }
.profile { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.profile-copy { display: grid; line-height: 1.25; }
.profile-copy strong { font-size: 12px; }
.profile-copy span { margin-top: 2px; color: #7187a1; font-size: 10px; }
.avatar { position: relative; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: linear-gradient(145deg, #26538b, #6546a8); box-shadow: 0 10px 28px rgba(28,48,92,.34); font-size: 13px; }

.premium-card {
  border-color: rgba(177,205,255,.12);
  background: linear-gradient(155deg, rgba(17, 31, 54, .9), rgba(8, 18, 34, .86));
  box-shadow: var(--shadow-soft), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(26px) saturate(130%);
}
.hero-grid { display: block; }
.hero-card { min-height: 330px; padding: 42px; border-radius: 30px; isolation: isolate; }
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 84% 52%, rgba(65, 143, 255, .17), transparent 29%), linear-gradient(115deg, rgba(97,220,255,.035), transparent 55%);
}
.hero-card::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -205px;
  bottom: -235px;
  border: 1px solid rgba(97,220,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(97,220,255,.018), 0 0 0 110px rgba(159,130,255,.015);
}
.hero-copy { max-width: 700px; }
.hero-copy h2 { margin: 17px 0 15px; font-size: clamp(38px, 4.2vw, 61px); letter-spacing: -2.1px; }
.hero-copy em { background: linear-gradient(90deg, #6fe4ff, #a38aff 80%); -webkit-background-clip: text; background-clip: text; }
.hero-copy p { max-width: 660px; margin: 0; color: #9eb0c6; font-size: 16px; line-height: 1.72; }
.pill { align-items: center; gap: 8px; padding: 7px 11px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 11px 22px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-trust span { color: #7f94ad; font-size: 11px; }
.hero-trust b { margin-right: 4px; color: #dbeeff; font-size: 13px; }

.hero-orbit { width: 230px; height: 230px; }
.orbit-core { display: flex; flex-direction: column; width: 92px; height: 92px; border: 1px solid rgba(255,255,255,.18); border-radius: 31px; background: linear-gradient(145deg, #58b2ff, #7764ed); box-shadow: 0 0 70px rgba(92,145,255,.35), inset 0 1px rgba(255,255,255,.35); }
.orbit-core span { font-size: 25px; line-height: 1; }
.orbit-core small { margin-top: 5px; font-size: 7px; letter-spacing: 1.6px; opacity: .72; }
.orbit-ring { animation: orbit-pulse 4s ease-in-out infinite; }
.r1 { border-color: rgba(97,220,255,.25); }
.r2 { animation-delay: -2s; }
.orbit-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.d1 { top: 33px; right: 43px; }
.d2 { bottom: 22px; left: 76px; width: 5px; height: 5px; background: var(--violet); }
.d3 { top: 101px; left: 19px; width: 6px; height: 6px; background: var(--gold); }
@keyframes orbit-pulse { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.025); opacity: 1; } }

.metric-stack { gap: 18px; }
.metric { position: relative; overflow: hidden; min-height: 156px; padding: 25px; border-radius: 25px; }
.metric::after { content: ""; position: absolute; right: -45px; bottom: -65px; width: 140px; height: 140px; border: 1px solid rgba(103,169,255,.1); border-radius: 50%; }
.metric-head { display: flex; align-items: center; justify-content: space-between; }
.metric-head span { color: #8297b0; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.metric-head i { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 11px; color: #8fc8ff; background: rgba(103,169,255,.07); font-size: 10px; font-style: normal; font-weight: 900; }
.metric strong { margin: 13px 0 9px; font-size: clamp(22px, 2vw, 29px); letter-spacing: -.6px; }
.metric small { color: #7d93ad; }
.metric small b { color: #d9eaff; }
.accent-metric small { display: flex; align-items: center; gap: 7px; }
.accent-metric small em { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(98,233,173,.7); }

.workflow, .workspace { margin-top: 18px; padding: 30px; border-radius: 28px; }
.workspace { overflow: hidden; }
.workspace::after { content: ""; position: absolute; top: -140px; right: -140px; width: 300px; height: 300px; border-radius: 50%; background: rgba(103,169,255,.035); filter: blur(12px); pointer-events: none; }
.section-head h3, .workspace-head h3 { margin-top: 5px; font-size: 30px; letter-spacing: -.7px; }
.workspace-head p { max-width: 750px; margin-top: 6px; font-size: 14px; }
.step-number { color: rgba(147,183,229,.07); font-size: 66px; font-variant-numeric: tabular-nums; }
.status-dot { padding: 8px 11px; border: 1px solid rgba(98,233,173,.13); border-radius: 999px; background: rgba(98,233,173,.055); font-size: 11px; }

.progress-track { margin-top: 22px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.055); border-radius: 16px; background: rgba(2,8,18,.24); }
.progress-meta { font-size: 11px; }
.progress-rail { height: 5px; overflow: hidden; background: rgba(255,255,255,.055); }
.progress-rail span { background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet)); box-shadow: 0 0 18px rgba(103,169,255,.38); }

.stepper { gap: 9px; margin-top: 16px; }
.step { min-height: 85px; padding: 12px; border-radius: 16px; }
.step:hover:not(.locked) { transform: translateY(-2px); }
.step.active { border-color: rgba(97,220,255,.28); background: linear-gradient(145deg, rgba(81,158,255,.15), rgba(159,130,255,.07)); }
.step-icon { width: 34px; height: 34px; border-radius: 11px; }
.step-text strong { font-size: 12px; }

#stage { position: relative; z-index: 1; padding-top: 25px; }
.stage-intro h4 { font-size: 27px; }
.stage-intro p { max-width: 760px; font-size: 14px; }
.gate-chip { min-width: 205px; padding: 12px 14px; border-radius: 16px; }

.field input, .field textarea, .field select {
  padding: 15px 16px;
  border-color: rgba(180, 208, 255, .11);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(3, 10, 20, .72), rgba(7, 16, 29, .7));
  box-shadow: inset 0 1px 2px rgba(0,0,0,.26);
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: rgba(139,185,255,.22); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(97,220,255,.48); background: rgba(5,15,29,.92); box-shadow: 0 0 0 4px rgba(97,220,255,.065), inset 0 1px 2px rgba(0,0,0,.2); }
.field label { color: #b5c6da; font-size: 13px; }
.req { color: #dcbc76; }

.primary, .secondary { position: relative; overflow: hidden; }
.primary { border: 1px solid rgba(255,255,255,.13); background: linear-gradient(135deg, #438eef, #7564ed); box-shadow: 0 14px 34px rgba(59,117,218,.25), inset 0 1px rgba(255,255,255,.25); }
.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.15) 48%, transparent 70%); transform: translateX(-120%); transition: transform .55s ease; }
.primary:hover::after { transform: translateX(120%); }
.secondary { background: rgba(255,255,255,.045); }

.bottom-gate { border-radius: 18px; background: linear-gradient(110deg, rgba(244,203,122,.055), rgba(255,255,255,.018)); }
.bottom-gate.unlocked { background: linear-gradient(110deg, rgba(98,233,173,.055), rgba(82,146,255,.035)); }
.info-card, .supplier, .award-card, .premium-approval, .approval-box, .po-card { border-color: rgba(177,205,255,.1); background: linear-gradient(155deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); box-shadow: inset 0 1px rgba(255,255,255,.03); }
.supplier:hover { box-shadow: 0 18px 45px rgba(0,0,0,.2); }
.tag { border: 1px solid rgba(103,169,255,.11); }
.check { border: 1px solid rgba(255,255,255,.045); }
.document-shell, .table-wrap { border-color: rgba(177,205,255,.11); box-shadow: 0 18px 55px rgba(0,0,0,.2); }
.premium-table th { background: rgba(97,132,178,.07); }
.premium-table tbody tr { transition: background .2s ease; }
.premium-table tbody tr:hover { background: rgba(103,169,255,.055); }
.recommendation { border-color: rgba(98,233,173,.16); background: linear-gradient(120deg, rgba(98,233,173,.075), rgba(103,169,255,.055), rgba(159,130,255,.045)); }
.po-total { border-color: rgba(103,169,255,.14); }
.toast { border-color: rgba(139,185,255,.2); box-shadow: 0 22px 60px rgba(0,0,0,.42); backdrop-filter: blur(22px); }

@media (max-width: 1250px) {
  .app-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .main { padding-inline: 26px; }
  .hero-card { padding: 34px; }
  .hero-orbit { width: 190px; height: 190px; }
  .stepper { grid-template-columns: repeat(4, 1fr); }
  .topbar { grid-template-columns: 170px minmax(180px, 1fr) auto; }
  .header-product { gap: 7px; padding-inline: 12px; }
  .header-product strong { font-size: 14px; }
  .header-product span { font-size: 11px; }
  .profile-copy { display: none; }
  .profile { padding-left: 10px; }
}

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 20px 22px 52px; }
  .topbar { grid-template-columns: 180px minmax(180px, 1fr) auto; align-items: center; }
  .hero-grid { grid-template-columns: 1fr; }
  .metric-stack { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 140px; }
  .supplier-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main { padding: 14px 14px 40px; }
  .topbar { top: 0; grid-template-columns: minmax(130px, 170px) 1fr auto; align-items: center; min-height: 68px; padding: 10px 14px; border-radius: 0; }
  .header-product { justify-content: flex-start; padding-inline: 10px; }
  .header-product span, .header-product i { display: none; }
  .header-product strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
  .system-status, .profile-copy { display: none; }
  .profile { padding-left: 0; border-left: 0; }
  .top-actions .ghost { display: none; }
  .page-intro { padding: 27px 5px 22px; }
  .page-intro h1 { font-size: clamp(34px, 10vw, 47px); letter-spacing: -1.5px; }
  .page-intro p { font-size: 14px; }
  .hero-card { min-height: 0; padding: 27px 22px; }
  .hero-copy h2 { font-size: clamp(34px, 10vw, 46px); letter-spacing: -1.4px; }
  .hero-copy p { font-size: 14px; }
  .hero-orbit { display: none; }
  .hero-trust { gap: 10px 16px; }
  .metric-stack { grid-template-columns: 1fr; gap: 12px; }
  .metric { min-height: 128px; }
  .workflow, .workspace { padding: 21px 17px; border-radius: 22px; }
  .section-head, .workspace-head { align-items: center; }
  .section-head h3, .workspace-head h3 { font-size: 25px; }
  .status-dot { display: none; }
  .step-number { font-size: 48px; }
  .stepper { display: flex; gap: 9px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 5px; }
  .step { min-width: 155px; scroll-snap-align: start; }
  .stage-intro { align-items: flex-start; }
  .gate-chip { width: 100%; }
  .supplier-grid { grid-template-columns: 1fr; }
  .bottom-gate { padding: 16px; }
  .bottom-gate .primary { width: 100%; min-width: 0; }
}

@media (max-width: 470px) {
  .topbar { grid-template-columns: minmax(120px, 155px) 1fr auto; }
  .header-product { display: none; }
  .avatar { width: 39px; height: 39px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
