/* tokens.css — FA Forms theme = Crew V1 design system (Dolf de Jager's "Amazing in Motion" pack, Sep 2026).
   Token values lifted 1:1 from apply.foggingamazing.co.za/css/tokens.css so FA Forms sits visually next to Crew.
   Deep navy canvas, electric blue → violet → light-red "flow" glow, cyan for links/selection. */
:root {
  /* surfaces */
  --void: #05070F; --canvas: #0B1226; --canvas-alt: #080D1F; --panel-v: #0F172B; --panel2-v: #111A31; --panel3: #101E34;
  --blue-panel: #0B1F45; --blue-panel-line: #1D4ED8; --line-v: #263D5A; --line-soft: #253150; --line2: #19243D; --input-line: #3A4B6E; --track: #1B2745;
  /* text */
  --ink: #F8FAFF; --ink2: #BAC6DC; --ink3: #8FA0BE;
  /* brand */
  --blue: #155EEF; --blue-deep: #0B2A8A; --violet: #5B3FE0; --violet2: #7137DC; --purple: #8A4BD8; --purple2: #AF18B8;
  --red-light: #E86A7A; --red-tint: #F2A3AC; --cyan: #35CFFF; --pink: #F06BEA;
  --ok: #4ADE80; --ok-bg: #0F2A1E; --warn-c: #FFD37A; --warn-bg: #2A1F0A; --bad-c: #FF8A8A; --bad-bg: #2A0F16; --bad-line: #B42318; --info: #7FC4FF;
  --flow: linear-gradient(90deg, #0B2A8A 0%, #155EEF 16%, #5B3FE0 30%, #8A4BD8 40%, #E86A7A 47%, #FFFFFF 50%, #E86A7A 53%, #8A4BD8 60%, #5B3FE0 70%, #155EEF 84%, #0B2A8A 100%);
  --neon: linear-gradient(135deg, #155EEF 0%, #7137DC 50%, #F06BEA 100%);
  --font: 'Segoe UI', Inter, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --script: 'Segoe Script', 'Brush Script MT', cursive;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  /* aliases */
  --bg: #0B1226; --bg2: #080D1F; --panel: #0F172B; --panel2: #111A31; --line: #263D5A; --text: #F8FAFF; --muted: #BAC6DC;
  --accent: #35CFFF; --accent2: #7FC4FF; --g1: #155EEF; --g2: #7137DC; --g3: #F06BEA;
  --grad: linear-gradient(135deg, var(--g1), var(--g2) 50%, var(--g3));
  --green: #4ADE80; --amber: #FFD37A; --red: #FF8A8A; --hot: #F06BEA; --new: #7FC4FF; --hold: #FFB020;
  --radius: 16px; --shadow: 0 12px 32px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
.hidden, [hidden] { display: none !important; }
svg { width: 16px; height: 16px; flex: none; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
img { max-width: 100%; display: block; }

/* ---- buttons (Crew glow-flow) ---- */
button, .btn { font: inherit; cursor: pointer; border: 0; border-radius: 8px; padding: 9px 14px; background: var(--panel2); color: var(--text); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.2;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease, filter .2s ease; }
button:hover, .btn:hover { background: #172340; }
button:active, .btn:active { transform: translateY(1px); }
button:disabled, .btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; transform: none; }
button.primary, .btn.primary { position: relative; isolation: isolate; color: #fff; font-weight: 700;
  background-image: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.02) 40%, rgba(0,0,0,0) 60%, rgba(0,0,0,.28) 100%),
    radial-gradient(62% 120% at 50% 55%, rgba(6,4,40,.5), rgba(6,4,40,.25) 55%, rgba(6,4,40,0) 78%),
    linear-gradient(90deg, #0B2A8A 0%, #155EEF 16%, #5B3FE0 30%, #8A4BD8 40%, #E86A7A 47%, #F2A3AC 50%, #E86A7A 53%, #8A4BD8 60%, #5B3FE0 70%, #155EEF 84%, #0B2A8A 100%);
  background-size: 100% 100%, 100% 100%, 300% 100%; background-position: 0 0, 0 0, 50% 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(255,255,255,.2), inset 0 -6px 10px rgba(8,4,40,.4), inset 0 0 0 1px rgba(255,255,255,.14), 0 0 0 2px rgba(255,255,255,.12), 0 0 16px rgba(21,94,239,.45), 0 0 32px rgba(232,106,122,.4), 0 10px 22px rgba(0,0,0,.5);
  text-shadow: 0 1px 2px rgba(0,0,0,.7), 0 0 8px rgba(0,0,0,.55); }
button.primary::before, .btn.primary::before { content: ''; position: absolute; inset: -4px; border-radius: 11px; pointer-events: none; z-index: -1; padding: 1.5px; background: var(--flow); background-size: 300% 100%; background-position: 50% 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .9; }
button.primary:hover, .btn.primary:hover { filter: brightness(1.1) saturate(1.15); background: none; background-image: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -6px 10px rgba(8,4,40,.3), inset 0 0 0 1px rgba(255,255,255,.22), 0 0 0 2px rgba(255,255,255,.22), 0 0 24px rgba(21,94,239,.7), 0 0 48px rgba(232,106,122,.6), 0 12px 26px rgba(0,0,0,.55); }
button.primary.live, .btn.primary.live { animation: capflow 9s linear infinite; }
button.primary.live::before, .btn.primary.live::before { animation: flow 9s linear infinite; }
button.primary.big, .btn.primary.big { height: 56px; min-width: 200px; padding: 0 32px; font-size: 18px; border-radius: 8px; }
button.ghost, .btn.ghost { position: relative; isolation: isolate; color: var(--text); font-weight: 700;
  background-image: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 40%, rgba(0,0,0,.25) 100%), linear-gradient(90deg, #111A31, #0F172B);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -5px 9px rgba(8,4,40,.45), inset 0 0 0 1px rgba(255,255,255,.1), 0 0 12px rgba(21,94,239,.2), 0 8px 18px rgba(0,0,0,.45); }
button.ghost::before, .btn.ghost::before { content: ''; position: absolute; inset: -4px; border-radius: 11px; pointer-events: none; z-index: -1; padding: 1.5px; background: var(--flow); background-size: 300% 100%; background-position: 50% 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; }
button.ghost:hover, .btn.ghost:hover { filter: brightness(1.15); background-image: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 40%, rgba(0,0,0,.25) 100%), linear-gradient(90deg, #111A31, #0F172B); }
button.danger, .btn.danger { background: transparent; border: 1.5px solid #FF6B6B; color: var(--bad-c); box-shadow: none; }
button.danger:hover, .btn.danger:hover { background: rgba(255,138,138,.1); }
button.small, .btn.small { padding: 5px 11px; font-size: 12.5px; border-radius: 6px; }
button.small.primary::before, button.small.ghost::before, .btn.small.primary::before, .btn.small.ghost::before { inset: -3px; border-radius: 9px; padding: 1px; }
button.quiet, .btn.quiet { background: transparent; box-shadow: none; }
button.quiet:hover, .btn.quiet:hover { background: rgba(255,255,255,.05); }
button.icon, .btn.icon { padding: 7px; border-radius: 8px; }
@keyframes capflow { 0% { background-position: 0 0, 0 0, 100% 0; } 100% { background-position: 0 0, 0 0, -100% 0; } }
@keyframes flow { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* glow text + neon panel */
.glow { display: inline-block; position: relative; padding: .12em .08em .22em .02em; margin: -.12em -.08em -.22em -.02em; line-height: 1.1; background: var(--flow); background-size: 300% 100%; background-position: 50% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 8px rgba(21,94,239,.35)) drop-shadow(0 0 16px rgba(232,106,122,.3)); }
.glow.live { animation: flow 9s linear infinite; }
.neon { position: relative; border: 2px solid transparent; border-radius: 20px; background-image: linear-gradient(var(--panel), var(--panel)), var(--neon); background-origin: border-box; background-clip: padding-box, border-box;
  box-shadow: 0 0 24px rgba(113,55,220,.35), 0 16px 40px rgba(0,0,0,.5); }

/* inputs */
input, select, textarea { font: inherit; background: var(--panel); color: var(--text); border: 1px solid var(--input-line); border-radius: 12px; padding: 10px 13px; outline: none; caret-color: var(--cyan); transition: border-color .15s, box-shadow .15s; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--ink3); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--blue); padding: 0; margin: 0; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238FA0BE' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
select option { background: var(--panel2); color: var(--text); }
textarea { resize: vertical; min-height: 90px; }
label { display: block; font-weight: 600; font-size: 14px; color: var(--ink2); margin-bottom: 6px; }

/* text utilities */
.muted { color: var(--muted); } .dim { color: var(--ink3); } .mono { font-family: var(--mono); } .right { margin-left: auto; }
.error { color: var(--red); font-size: 13.5px; min-height: 18px; margin: 6px 0; } .good { color: var(--green); } .bad { color: var(--red); } .warn { color: var(--amber); }
.w-full { width: 100%; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--ink3); }
.small { font-size: 13px; } .tiny { font-size: 12px; }

/* cards / panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink2); background: var(--panel2); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: rgba(74,222,128,.35); background: var(--ok-bg); }
.pill.warn { color: var(--warn-c); border-color: rgba(255,211,122,.35); background: var(--warn-bg); }
.pill.bad { color: var(--bad-c); border-color: rgba(255,138,138,.35); background: var(--bad-bg); }
.pill.info { color: var(--info); border-color: rgba(127,196,255,.35); background: #0B1F45; }
.pill.hot { color: #fff; border-color: transparent; background: var(--neon); }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .col { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 14px; }
.spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes slideup { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes faGlow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* rails: the faint vertical glow lines from Crew's public pages */
.rails::before, .rails::after { content: ''; position: fixed; top: 0; bottom: 0; width: 1px; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, transparent, rgba(21,94,239,.35) 30%, rgba(240,107,234,.35) 70%, transparent); opacity: .5; }
.rails::before { left: max(12px, calc(50% - 400px)); } .rails::after { right: max(12px, calc(50% - 400px)); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 999; opacity: 0; transition: .25s; max-width: 92vw; font-weight: 600; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.ok { border-color: rgba(74,222,128,.4); } .toast.bad { border-color: rgba(255,138,138,.5); }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(4,6,16,.7); backdrop-filter: blur(4px); z-index: 500; display: none; align-items: center; justify-content: center; padding: 16px; }
.overlay.open { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; padding: 22px; box-shadow: var(--shadow); animation: pop .18s ease; }
.modal h2 { font-size: 20px; margin-bottom: 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
th { color: var(--ink3); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
tbody tr { transition: background .12s; } tbody tr:hover { background: rgba(255,255,255,.025); } tbody tr.clickable { cursor: pointer; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-v) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; } *::-webkit-scrollbar-thumb { background: var(--line-v); border-radius: 8px; }
