/* Ordex dashboard. Dark obsidian by default, light when the system asks for it. One accent: Ordex violet. */

@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
	--canvas: #0B0C0E;
	--surface: #111215;
	--surface-2: #141519;
	--hover: #1A1C21;
	--line: rgba(255, 255, 255, 0.08);
	--line-strong: rgba(255, 255, 255, 0.16);
	--text: #F4F4F5;
	--muted: #A1A1AA;
	--faint: #71717A;
	--accent: #7C6CFF;
	--accent-hover: #8E80FF;
	--accent-soft: rgba(124, 108, 255, 0.14);
	--ok: #34D399;
	--ok-soft: rgba(52, 211, 153, 0.12);
	--bad: #F87171;
	--warn: #FBBF24;
	--glass: rgba(17, 18, 21, 0.72);
	--highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
	--ease: cubic-bezier(0.2, 0, 0, 1);
	--radius: 10px;
	--sans: "Inter", "Segoe UI Variable Text", system-ui, sans-serif;
	--mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, monospace;
	color-scheme: dark;
}
@media (prefers-color-scheme: light) {
	:root {
		--canvas: #FAFAFA; --surface: #FFFFFF; --surface-2: #F4F4F5; --hover: #F4F4F5;
		--line: rgba(0, 0, 0, 0.08); --line-strong: rgba(0, 0, 0, 0.16);
		--text: #09090B; --muted: #52525B; --faint: #71717A;
		--accent: #5B47F0; --accent-hover: #4C38E0; --accent-soft: rgba(91, 71, 240, 0.10);
		--ok: #059669; --ok-soft: rgba(5, 150, 105, 0.10); --bad: #DC2626; --warn: #B45309;
		--glass: rgba(255, 255, 255, 0.72); --highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
		color-scheme: light;
	}
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; min-height: 100vh; display: flex; flex-direction: column;
	background: var(--canvas); color: var(--text);
	font: 15px/1.6 var(--sans); font-feature-settings: "cv11", "ss01";
	-webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mono, code, .num { font-family: var(--mono); font-size: 0.86em; }
.num, td, .stat { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Soft light behind the top of the page */
.ambient {
	position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
	background: radial-gradient(50% 50% at 50% 0%, var(--accent) 0%, transparent 70%);
	opacity: 0.16; filter: blur(60px);
}

/* ---------- navbar ---------- */
.nav {
	position: sticky; top: 12px; z-index: 10; margin: 12px auto 0; width: min(1120px, calc(100% - 24px));
	display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 8px 8px 14px;
	background: var(--glass); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
	border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--highlight);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.02em; text-decoration: none; border-radius: 8px; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.account { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.account img { width: 26px; height: 26px; border-radius: 50%; }

main { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 96px; flex: 1; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; font-weight: 650; }
.display { font-size: clamp(38px, 6vw, 64px); line-height: 1.06; letter-spacing: -0.04em; }
.title { font-size: 28px; line-height: 1.15; }
h2 { font-size: 18px; letter-spacing: -0.02em; }
h3 { font-size: 15px; letter-spacing: -0.01em; }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; line-height: 1.6; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--accent); text-transform: uppercase; }
p { max-width: 68ch; }

/* ---------- buttons and controls ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 38px; padding: 0 14px; border-radius: 9px; cursor: pointer; text-decoration: none; white-space: nowrap;
	font-size: 14px; font-weight: 550; color: var(--text);
	background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--highlight);
	transition: background 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease), opacity 150ms var(--ease);
}
.btn:hover { background: var(--hover); border-color: var(--line-strong); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(0, 0, 0, 0.3); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a:focus-visible, button:focus-visible { border-radius: 8px; }

.link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; transition: color 150ms var(--ease); }
.link:hover { color: var(--text); }

label { display: block; font-size: 13px; font-weight: 550; color: var(--muted); margin: 0 0 6px; }
input, select, textarea {
	width: 100%; padding: 9px 12px; border-radius: 9px; font-size: 14px;
	background: var(--surface-2); border: 1px solid var(--line);
	transition: border-color 150ms var(--ease), background 150ms var(--ease), box-shadow 150ms var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field + .field { margin-top: 16px; }
.hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }

/* segmented control (tabs and filters) */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented button {
	display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px;
	background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 550; cursor: pointer;
	transition: background 150ms var(--ease), color 150ms var(--ease);
}
.segmented button:hover { color: var(--text); background: var(--hover); }
.segmented button[aria-selected="true"], .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--highlight), 0 1px 2px rgba(0, 0, 0, 0.25); }
.segmented button[aria-selected="true"] svg, .segmented button[aria-pressed="true"] svg { color: var(--accent); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font: 500 11.5px/1 var(--mono); background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px 32px; align-items: center; }
.hero-copy { grid-column: span 6; display: grid; gap: 22px; justify-items: start; }
.hero-preview { grid-column: span 6; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.error-note { color: var(--bad); font-size: 14px; }

/* the interactive queue mock */
.mock { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--highlight), 0 24px 60px -20px rgba(0, 0, 0, 0.55); overflow: hidden; }
.mock-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mock-head .title-sm { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.mock-body { padding: 8px; }
.mock-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; transition: background 150ms var(--ease); }
.mock-row:hover { background: var(--hover); }
.mock-row .who { display: grid; }
.mock-row .who small { color: var(--faint); font-size: 12.5px; }
.mock-row select { width: auto; padding: 5px 30px 5px 10px; font-size: 13px; }
.mock-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mock-foot .switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle { appearance: none; width: 34px; height: 20px; padding: 0; border-radius: 999px; background: var(--hover); border: 1px solid var(--line-strong); position: relative; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 150ms var(--ease), background 150ms var(--ease); }
.toggle:checked { background: var(--accent); border-color: transparent; }
.toggle:checked::after { transform: translateX(14px); background: #fff; }
.mock-caption { margin-top: 10px; font-size: 12.5px; color: var(--faint); }

.section { margin-top: 128px; }
.section-head { display: grid; gap: 10px; margin-bottom: 32px; }

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.tile { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--highlight); display: grid; gap: 10px; align-content: start; transition: border-color 150ms var(--ease); }
.tile:hover { border-color: var(--line-strong); }
.tile .tile-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.tile p { margin: 0; color: var(--muted); }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-8 { grid-column: span 8; }

.steps { display: grid; grid-template-columns: repeat(12, 1fr); border-top: 1px solid var(--line); }
.step { grid-column: span 4; padding: 28px 28px 0 0; display: grid; gap: 8px; align-content: start; }
.step .num { color: var(--accent); }
.step p { margin: 0; color: var(--muted); }

.cta-band { margin-top: 128px; padding: 56px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }

.footer { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; color: var(--faint); font-size: 13px; }
.footer nav { display: flex; gap: 18px; }

/* ---------- app pages ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.page-head.spaced { margin-top: 20px; }
.page-head .who { display: flex; align-items: center; gap: 14px; }
.avatar { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 650; background: var(--accent-soft); color: var(--accent); object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }

.list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; transition: background 150ms var(--ease); }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row:hover { background: var(--hover); }
.list-row:hover .chev { transform: translateX(2px); color: var(--text); }
.list-row .grow { flex: 1; min-width: 0; display: grid; }
.list-row .grow small { color: var(--faint); font-size: 13px; }
.chev { color: var(--faint); transition: transform 150ms var(--ease), color 150ms var(--ease); }
.group-title { margin: 40px 0 12px; font-size: 13px; color: var(--faint); font-weight: 550; }

/* settings: label column + fields column, split by hairlines */
.settings-section { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px 40px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.settings-section .about { grid-column: span 4; display: grid; gap: 6px; align-content: start; }
.settings-section .about .tile-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.settings-section .about p { margin: 0; color: var(--muted); font-size: 14px; }
.settings-section .fields { grid-column: span 8; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .field { margin-top: 0; }
.save-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 20px; min-height: 38px; }
.save-status { font-size: 13px; color: var(--muted); }
.save-status.ok { color: var(--ok); }
.save-status.bad { color: var(--bad); white-space: pre-line; }

/* orders table */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 16px; }
.table-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--faint); padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
tr.order { cursor: pointer; transition: background 150ms var(--ease); }
tr.order:hover td { background: var(--hover); }
tr.order .chev { display: inline-block; }
tr.order[aria-expanded="true"] .chev { transform: rotate(90deg); color: var(--accent); }
tr.details td { background: var(--surface-2); padding: 20px 16px 20px 56px; }
.answers { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px 32px; }
.answers div { grid-column: span 6; }
.answers dt { font-size: 12.5px; color: var(--faint); }
.answers dd { margin: 4px 0 0; white-space: pre-wrap; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 56px 16px; color: var(--muted); text-align: center; }
.empty .tile-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--faint); }
.table-foot { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--line); }

.notice { display: grid; gap: 14px; justify-items: start; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--hover), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
	main { padding-top: 40px; }
	.hero-copy, .hero-preview, .span-7, .span-5, .span-4, .span-8, .step { grid-column: 1 / -1; }
	.settings-section .about, .settings-section .fields { grid-column: 1 / -1; }
	.section, .cta-band { margin-top: 88px; }
	.grid-2 { grid-template-columns: 1fr; }
	.answers div { grid-column: 1 / -1; }
	.hide-sm { display: none; }
	tr.details td { padding-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
