:root {
  --bg: #06050d;
  --ink: #f4f3fb;
  --muted: #8b87a6;
  --line: rgba(155, 92, 255, .22);
  --blue: #4f7cff;
  --purple: #9b5cff;
  --grad: linear-gradient(120deg, #4f7cff 0%, #9b5cff 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(640px circle at 12% 6%, rgba(79,124,255,.20), transparent 62%),
    radial-gradient(720px circle at 88% 16%, rgba(155,92,255,.18), transparent 62%),
    radial-gradient(860px circle at 45% 96%, rgba(124,58,237,.15), transparent 62%);
}
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grain { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#glow { position: fixed; top: 0; left: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%;
  pointer-events: none; z-index: 0; background: radial-gradient(circle, rgba(124,92,255,.10), transparent 60%); will-change: transform; }

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 26px; border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); position: sticky; top: 0; background: rgba(6,5,13,.7); z-index: 10; }
.brand { font-weight: 500; letter-spacing: .02em; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.top-right { display: flex; gap: 10px; align-items: center; }

.btn { display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 9px; background: var(--grad); color: #fff; font-size: 13px; border: none; cursor: pointer; }
.btn.ghost { background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--ink); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; max-width: 1100px; margin: 24px auto; padding: 0 24px; }
.sidebar { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: rgba(155,92,255,.04); height: fit-content; position: sticky; top: 80px; }
.side-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sidebar h2 { font-size: 15px; font-weight: 500; }
.role { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.ents, .orders { list-style: none; }
.ents .ent, .orders .order { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ents .ent .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grad); flex: none; }
.orders .order { justify-content: space-between; }
.orders .status { font-size: 11px; text-transform: uppercase; color: var(--muted); }

.content { display: flex; flex-direction: column; gap: 20px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: rgba(155,92,255,.04); }
.card h2 { font-size: 17px; font-weight: 500; margin-bottom: 10px; }

.chatlog { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding: 6px 2px; margin-bottom: 14px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.msg.ai { align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.chatform { display: flex; gap: 10px; }
.chatform input { flex: 1; background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; color: var(--ink); font-family: inherit; font-size: 14px; outline: none; }
.chatform input:focus { border-color: var(--purple); }

/* shop */
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shop-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.02); }
.shop-item h4 { font-size: 15px; font-weight: 500; }
.shop-item .ptag { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.shop-item .price { font-weight: 500; margin-top: auto; }
.shop-item .buy { align-self: flex-start; }

/* terms */
.terms { max-height: 260px; overflow-y: auto; white-space: pre-wrap; font-size: 12px; line-height: 1.55; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; font-family: inherit; }

/* support thread */
.thread { display: flex; flex-direction: column; gap: 10px; }
.sup { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.sup.resolved { opacity: .6; }
.sup-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.sup-reply { background: rgba(79,124,255,.12); border-left: 2px solid var(--blue); padding: 8px 10px; margin-top: 8px; border-radius: 0 8px 8px 0; }
.sup-msg { margin: 6px 0; padding: 8px 10px; border-radius: 8px; }
.sup-msg.customer { background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.sup-msg.manager { background: rgba(79,124,255,.1); border: 1px solid rgba(79,124,255,.3); }
.sup-alias { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.ops-msgs { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.ops-actions { display: flex; gap: 6px; }

/* ops nav */
.opsnav { list-style: none; }
.opsnav li { padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.opsnav li:hover { background: rgba(255,255,255,.04); color: var(--ink); }
.opsnav li.active { background: rgba(79,124,255,.14); color: var(--ink); }

/* ops rows */
.opslist { display: flex; flex-direction: column; gap: 10px; }
.ops-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.ops-main { display: flex; flex-direction: column; gap: 4px; }
.ops-main b { font-weight: 500; }
.ops-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.ops-side .status { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.reply { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px; color: var(--ink); font-family: inherit; font-size: 13px; min-width: 220px; min-height: 56px; outline: none; }

/* product form */
.productform { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.productform input, .productform select { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); font-family: inherit; font-size: 13px; outline: none; }
.productform input:focus, .productform select:focus { border-color: var(--purple); }
.productform select option { background: #14101f; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: #0d0a18; border: 1px solid var(--line); border-radius: 14px; padding: 26px; max-width: 460px; width: 92%; display: flex; flex-direction: column; gap: 16px; }
.modal-box h3 { font-size: 18px; font-weight: 500; }
.modal-body { font-size: 14px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin-top: 10px; cursor: pointer; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* ---- auth (custom sign-in/sign-up) ---- */
.authwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 400px; border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px; background: rgba(155,92,255,.05); box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.auth-logo { display: block; max-width: 300px; height: auto; margin: 0 auto 22px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form h2 { font-size: 18px; font-weight: 500; text-align: center; margin-bottom: 4px; }
.auth-form input { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; color: var(--ink); font-family: inherit; font-size: 14px; outline: none; }
.auth-form input:focus { border-color: var(--purple); }
.auth-form .btn { justify-content: center; font-size: 14px; padding: 11px; }
.auth-links { display: flex; justify-content: space-between; font-size: 13px; margin-top: 4px; }
.auth-links a { color: var(--purple); cursor: pointer; }
.auth-links a:hover { color: var(--blue); }

/* ---- checkout page ---- */
.co-wrap { max-width: 980px; margin: 28px auto 60px; padding: 0 24px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: start; }
.co-product { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 90px; }
.co-product h1 { font-size: 30px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
.co-product .ptag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.co-product p.muted { font-size: 15px; font-weight: 300; line-height: 1.6; }
.co-price { font-size: 26px; font-weight: 400; letter-spacing: -0.01em; }
.co-note { border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.55; }
.co-form h2 { font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.co-form-body { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-form input, .co-form textarea { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; color: var(--ink); font-family: inherit; font-size: 14px; outline: none; width: 100%; }
.co-form input:focus, .co-form textarea:focus { border-color: var(--purple); }
.co-form textarea { min-height: 66px; resize: vertical; }
.co-pay { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: rgba(79,124,255,.05); }
.co-pay-head { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.co-pay input { background: rgba(255,255,255,.03); }
.co-submit { justify-content: center; font-size: 15px; padding: 13px; }
.co-error { display: none; color: #ff7b9c; font-size: 13px; text-align: center; }
.co-success { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.co-success h2 { font-size: 24px; font-weight: 500; }
.co-success p { font-size: 15px; line-height: 1.6; }
@media (max-width: 760px) {
  .co-wrap { grid-template-columns: 1fr; }
  .co-product { position: static; }
  .co-grid, .co-grid2 { grid-template-columns: 1fr; }
}

/* ---- supply & hiring map (admin) ---- */
.supply { display: flex; flex-direction: column; gap: 18px; }
.supply-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 4px; }
.supply-row { display: grid; grid-template-columns: 230px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(155,92,255,.12); align-items: start; }
.supply-item { display: flex; flex-direction: column; gap: 2px; }
.supply-item b { font-weight: 500; font-size: 14px; }
.supply-item .sell { font-size: 12px; color: var(--blue); }
.supply-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.supply-role { display: flex; flex-direction: column; gap: 1px; background: rgba(79,124,255,.08); border: 1px solid rgba(79,124,255,.25); border-radius: 8px; padding: 5px 9px; font-size: 12px; line-height: 1.35; }
.supply-role b { font-weight: 500; }
.supply-role span { color: var(--muted); font-size: 11px; }
.supply-role .cost { color: var(--ink); }
.supply-role .cov { margin-top: 3px; font-size: 10px; color: #7fe0a8; }
/* roster (contractor tracker) */
.roster-add { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.roster-add input, .roster-add select { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); font-family: inherit; font-size: 13px; outline: none; }
.roster-add input:focus, .roster-add select:focus { border-color: var(--purple); }
.roster-add select option { background: #14101f; }
.roster { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.roster-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.roster-main { display: flex; flex-direction: column; gap: 2px; }
.roster-main b { font-weight: 500; font-size: 14px; }
.roster-side { display: flex; align-items: center; gap: 8px; }
.st { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.st-interviewing { background: rgba(155,92,255,.15); color: #c9b3ff; }
.st-hired { background: rgba(79,124,255,.18); color: #a8c2ff; }
.st-assigned { background: rgba(46,204,113,.16); color: #7fe0a8; }
/* analytics dashboard */
.an-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.an-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: rgba(79,124,255,.05); }
.an-num { font-size: 26px; font-weight: 400; }
.an-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.an-sec { margin-top: 16px; }
.an-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 760px) {
  .supply-row { grid-template-columns: 1fr; }
  .roster-row { flex-direction: column; align-items: flex-start; }
  .an-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- homepage-style nav + page head + footer (auth + checkout) ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: linear-gradient(180deg, rgba(6,5,13,.72), rgba(6,5,13,0)); }
.nav-in { display: flex; align-items: center; justify-content: space-between; padding: 26px 32px; }
.nav-in .logo { font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.nav-in .links { display: flex; gap: 30px; }
.nav-in .links a { color: var(--muted); font-size: 13px; letter-spacing: .03em; transition: color .22s; }
.nav-in .links a:hover { color: var(--ink); }
.page-head { padding: 168px 24px 72px; text-align: center; }
.page-head .kicker { font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.page-head h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.05; }
.page-head p { color: var(--muted); font-size: 16px; font-weight: 300; max-width: 480px; margin: 20px auto 0; }
.footer { border-top: 1px solid var(--line); padding: 32px 28px; display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; letter-spacing: .04em; flex-wrap: wrap; }
@media (max-width: 760px) { .nav-in .links { display: none; } }
