/* LifeMD Report app: sign-in, account and admin pages. Brand palette from the LifeMD brand guide. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(/fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }

:root {
  --navy: #000229; --blue: #2273B5; --green: #0D835A; --purple: #573AA0; --sky: #61B7E7;
  --steel: #3A61A0; --mint: #5BA983; --lilac: #A996DC; --slate: #6F707F;
  --ink: #0B1033; --ink2: #3B4060; --ink3: #6F707F; --line: #DDE1EA; --bg: #F4F6FA; --card: #fff;
  --ok: #0D835A; --bad: #B42318; --warn: #9A5B00;
  --head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--blue); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===================== Sign-in ===================== */
body.auth { min-height: 100vh; background: var(--navy); color: #fff; overflow-x: hidden; }
.stage { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.stage .glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.stage .g1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle at 40% 40%, var(--blue), transparent 65%); }
.stage .g2 { width: 40vw; height: 40vw; right: -10vw; top: 8vh; background: radial-gradient(circle at 50% 50%, var(--purple), transparent 65%); animation-duration: 28s; animation-delay: -6s; }
.stage .g3 { width: 38vw; height: 38vw; left: 22vw; bottom: -18vw; background: radial-gradient(circle at 50% 50%, var(--green), transparent 65%); animation-duration: 26s; animation-delay: -12s; opacity: .45; }
.stage .g4 { width: 24vw; height: 24vw; right: 18vw; bottom: -6vw; background: radial-gradient(circle at 50% 50%, var(--sky), transparent 65%); animation-duration: 19s; animation-delay: -3s; opacity: .35; }
@keyframes drift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(4vw,3vh,0) scale(1.08); } 100% { transform: translate3d(-3vw,-2vh,0) scale(.96); } }
.stage .grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(97,183,231,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(97,183,231,.07) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 30% 60%, #000 20%, transparent 75%); }
.stage svg.curves { position: absolute; left: 0; bottom: 0; width: 100%; height: 72%; }
.curves path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 3.2s cubic-bezier(.2,.7,.2,1) forwards; }
.curves path.c1 { stroke: var(--sky); animation-delay: .2s; } .curves path.c2 { stroke: var(--mint); animation-delay: .5s; opacity: .8; }
.curves path.c3 { stroke: var(--lilac); animation-delay: .8s; opacity: .7; } .curves path.c4 { stroke: var(--blue); animation-delay: 1.1s; opacity: .6; }
.curves path.area { stroke: none; fill: url(#fillA); stroke-dasharray: none; animation: fadein 2.4s ease 1s forwards; opacity: 0; }
.curves circle { fill: var(--sky); opacity: 0; animation: fadein .6s ease forwards, pulse 2.6s ease-in-out 3.4s infinite; }
.curves circle.d1 { animation-delay: 2.6s, 3.4s; } .curves circle.d2 { animation-delay: 3.1s, 3.9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes pulse { 0%, 100% { r: 4; opacity: .9; } 50% { r: 7; opacity: .35; } }

.auth-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 440px); align-items: center; gap: 48px; max-width: 1240px; margin: 0 auto; padding: 48px 40px; }
.hero .logo { width: 172px; height: auto; display: block; margin-bottom: 56px; }
.hero .kick { font-family: var(--head); font-weight: 600; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--sky); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.hero .kick::before { content: ""; width: 28px; height: 2px; background: var(--sky); }
.hero h1 { font-family: var(--head); font-weight: 600; font-size: clamp(44px, 6vw, 80px); line-height: .95; letter-spacing: -.02em; margin: 0 0 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--sky), var(--lilac) 55%, var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: rgba(255,255,255,.72); max-width: 520px; margin: 0 0 30px; }
.hero .stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .stats span { font-family: var(--head); font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.82); border: 1px solid rgba(97,183,231,.35); background: rgba(0,2,41,.72); padding: 6px 12px; border-radius: 999px; }

.card-auth { position: relative; background: linear-gradient(160deg, rgba(255,255,255,.11), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.16); border-radius: 20px; padding: 36px 34px 28px; backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12); animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.card-auth::before { content: ""; position: absolute; inset: -1px; border-radius: 20px; padding: 1px; background: linear-gradient(140deg, rgba(97,183,231,.7), transparent 35%, transparent 65%, rgba(169,150,220,.6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.card-auth h2 { font-family: var(--head); font-weight: 600; font-size: 32px; letter-spacing: -.01em; margin: 0 0 4px; }
.card-auth .sub { color: rgba(255,255,255,.62); margin: 0 0 26px; font-size: 15px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.field .in { position: relative; }
.field input { width: 100%; height: 50px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(0,2,41,.55); color: #fff; font: inherit; font-size: 16px; padding: 0 16px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.field input::placeholder { color: rgba(255,255,255,.35); }
.field input:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(97,183,231,.22); background: rgba(0,2,41,.75); }
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #0b1a4a inset; caret-color: #fff; }
.field .peek { position: absolute; right: 8px; top: 8px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: rgba(255,255,255,.6); font-family: var(--head); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.field .peek:hover { color: #fff; background: rgba(255,255,255,.08); }
.field.pw input { padding-right: 72px; }
.row-x { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 22px; font-size: 14px; color: rgba(255,255,255,.7); }
.row-x label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.row-x input { width: 16px; height: 16px; accent-color: var(--sky); }
.row-x a { color: var(--sky); text-decoration: none; }
.row-x a:hover { text-decoration: underline; }
.btn-primary { width: 100%; height: 52px; border: 0; border-radius: 12px; cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: linear-gradient(100deg, var(--blue), var(--steel) 45%, var(--purple)); background-size: 200% 100%; background-position: 0 0; box-shadow: 0 10px 30px rgba(34,115,181,.45); transition: background-position .5s ease, transform .1s ease, box-shadow .2s; }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 12px 36px rgba(87,58,160,.5); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.alert { border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; font-size: 14.5px; }
.alert.err { background: rgba(180,35,24,.18); border: 1px solid rgba(240,120,110,.45); color: #FFD9D4; }
.alert.ok { background: rgba(13,131,90,.2); border: 1px solid rgba(91,169,131,.5); color: #D6F5E7; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12.5px; color: rgba(255,255,255,.5); display: flex; gap: 8px; align-items: center; }
.foot .lock { width: 14px; height: 14px; flex: none; }
.foot a { color: inherit; }
.foot form.inline { margin: 0; }
.textbtn { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline; font: inherit; }
.btn-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.field input.code { font-size: 28px; letter-spacing: .45em; text-align: center; font-weight: 600; height: 60px; padding: 0 0 0 .45em; }
.alt { margin-top: 16px; font-size: 14px; color: rgba(255,255,255,.75); }
.alt .textbtn { color: var(--sky); }
.alt form.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.hint { font-size: 13.5px; color: rgba(255,255,255,.6); margin: -8px 0 18px; }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 28px; padding: 28px 18px; }
  .hero .logo { margin-bottom: 28px; width: 140px; }
  .hero p, .hero .stats { display: none; }
  .hero h1 { font-size: 44px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .stage .glow, .curves path, .curves circle, .card-auth { animation: none !important; }
  .curves path { stroke-dashoffset: 0; } .curves path.area, .curves circle { opacity: 1; }
}

/* ===================== Admin / account pages (light) ===================== */
.top { background: var(--navy); color: #fff; }
.top .in { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 22px; }
.top img { height: 28px; display: block; }
.top nav { display: flex; gap: 4px; flex: 1; }
.top nav a { color: rgba(255,255,255,.75); text-decoration: none; font-family: var(--head); font-size: 16px; font-weight: 500; letter-spacing: .04em; padding: 6px 12px; border-radius: 8px; }
.top nav a:hover, .top nav a.on { color: #fff; background: rgba(255,255,255,.1); }
.top .who { font-size: 14px; color: rgba(255,255,255,.7); display: flex; align-items: center; gap: 12px; }
.top .who form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--sky); cursor: pointer; text-decoration: underline; }
main.page { max-width: 1200px; margin: 0 auto; padding: 28px 24px 60px; }
main.page h1 { font-family: var(--head); font-size: 36px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; }
main.page .lead { color: var(--ink3); margin: 0 0 24px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; }
.panel h2 { font-family: var(--head); font-size: 22px; font-weight: 600; margin: 0 0 12px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: left; font-family: var(--head); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.grid td { padding: 10px; border-bottom: 1px solid #EEF0F5; vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #EEF3FE; color: var(--steel); }
.pill.admin { background: #EFEAFB; color: var(--purple); } .pill.off { background: #FDECEA; color: var(--bad); } .pill.ok { background: #E6F4EE; color: var(--ok); } .pill.warn { background: #FFF4E5; color: var(--warn); }
.form-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.form-inline label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.form-inline input, .form-inline select { height: 38px; border: 1px solid #C9CFDB; border-radius: 9px; padding: 0 10px; font: inherit; font-size: 14px; min-width: 200px; }
.btn { height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--blue); }
.btn.danger { background: #fff; color: var(--bad); border-color: #E5B4AE; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions form { margin: 0; }
form.inline { display: inline; margin: 0; }
.msg { border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 14.5px; }
.msg.ok { background: #E6F4EE; color: #0B5E41; border: 1px solid #B9E0CD; }
.msg.err { background: #FDECEA; color: #8E1C12; border: 1px solid #F3C2BC; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #0B1033; color: #fff; padding: 2px 8px; border-radius: 6px; user-select: all; }
.small { font-size: 13px; color: var(--ink3); }

/* user settings */
.vlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin: 8px 0 4px; }
.vlist label, .radios label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.radios { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 6px; }
.fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.fieldset legend { font-family: var(--head); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); font-weight: 600; margin-bottom: 6px; }
.form-stack label.txt { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink2); max-width: 420px; margin-bottom: 14px; }
.form-stack input[type=text], .form-stack input[type=email] { height: 38px; border: 1px solid #C9CFDB; border-radius: 9px; padding: 0 10px; font: inherit; font-size: 14px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--ink3); } .kv dd { margin: 0; }
.backlink { display: inline-block; margin-bottom: 10px; font-size: 14px; }
.hidden { display: none !important; }
.btn-a { display: inline-flex; align-items: center; text-decoration: none; }

/* NDA signing */
body.auth.wide .auth-wrap { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); max-width: 1400px; align-items: start; }
body.auth.wide .hero { position: sticky; top: 48px; padding-top: 40px; }
.card-doc { padding: 30px 30px 24px; }
.doc { max-height: 46vh; overflow: auto; background: rgba(255,255,255,.96); color: #0B1033; border-radius: 12px; padding: 18px 22px; font-size: 14.5px; line-height: 1.6; margin-bottom: 8px; }
.doc p { margin: 0 0 12px; white-space: pre-line; }
.doc-hash { word-break: break-all; font-size: 11.5px; }
.sigtabs { display: flex; gap: 6px; margin: 4px 0 8px; }
.sigtab { background: transparent; border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.75); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13.5px; cursor: pointer; }
.sigtab.on { background: #fff; color: #0B1033; border-color: #fff; }
.sigbox { position: relative; background: #fff; border-radius: 12px; height: 120px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; overflow: hidden; }
.sigbox #sigPreview { font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive; font-size: 40px; color: #0B1033; }
.sigbox #sigPreview.ph { color: #B8BCC9; }
.sigbox canvas { width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sigbox .sigclear { position: absolute; right: 12px; top: 8px; color: #3B4060; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: rgba(255,255,255,.85); margin-bottom: 12px; }
label.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--sky); flex: none; }
@media (max-width: 900px) { body.auth.wide .auth-wrap { grid-template-columns: 1fr; } body.auth.wide .hero { display: none; } }
.form-stack label.txt.wide { max-width: none; }
.form-stack textarea { border: 1px solid #C9CFDB; border-radius: 9px; padding: 10px; font: inherit; font-size: 14px; line-height: 1.5; width: 100%; }
label.check-dark { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 0 0 14px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.sel { height: 38px; border: 1px solid #C9CFDB; border-radius: 9px; padding: 0 10px; font: inherit; font-size: 14px; min-width: 260px; }
.grp-all { display: inline-flex; gap: 8px; align-items: center; color: var(--ink); font-size: 14px; letter-spacing: .06em; }
.fieldset.grp { border-top: 1px solid var(--line); padding-top: 10px; }
svg.dau { width: 100%; height: 140px; display: block; }
svg.dau rect { fill: var(--blue); }
svg.dau rect:hover { fill: var(--purple); }
svg.dau line { stroke: var(--line); }
tr.muted td { opacity: .55; }
