/* Spatial Technologies client review portal - one stylesheet for the client
   pages and the admin pages. Brand: primary #007CBF, dark slate #364352,
   greys #7C8A8D / #D8D8D8, white. Roboto, self-hosted. */

@font-face {
	font-family: "Roboto";
	src: url("/static/brand/fonts/roboto-latin.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--primary: #007CBF;
	--primary-dark: #00679f;
	--primary-soft: #e6f2f9;
	--slate: #364352;
	--slate-soft: #4a5968;
	--grey: #7C8A8D;
	--grey-light: #D8D8D8;
	--grey-bg: #f4f5f6;
	--white: #FFFFFF;
	--ink: #1f2933;
	--ok: #2e8b57;
	--ok-soft: #e7f5ec;
	--warn: #c98a00;
	--warn-soft: #fff4dc;
	--bad: #c0392b;
	--bad-soft: #fbe9e7;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(54, 67, 82, .08), 0 4px 16px rgba(54, 67, 82, .06);
	--font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: ui-monospace, Consolas, "Roboto Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--grey-bg); color: var(--ink);
	font: 16px/1.55 var(--font); min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--slate); font-weight: 500; line-height: 1.25; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
.muted { color: var(--grey); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }

/* ---------- layout ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 32px 20px 64px; }
.wrap.narrow { max-width: 760px; }
.wrap.tight { max-width: 460px; }
.stack > * + * { margin-top: 20px; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.right { text-align: right; }

/* ---------- the wordmark (sign-in page) ---------- */
.wordmark { font-weight: 700; font-size: 18px; letter-spacing: .01em; color: var(--slate); white-space: nowrap; }
.wordmark .mark {
	display: inline-block; width: 30px; height: 30px; border-radius: 8px; vertical-align: middle;
	margin-right: 10px; background: var(--primary);
	background-image: linear-gradient(135deg, var(--primary) 0 55%, var(--slate) 55% 100%);
}
.site-footer { color: var(--grey); font-size: 13px; text-align: center; padding: 32px 20px; }
.site-footer a { color: var(--grey); }

/* ---------- the bar: one for the owner, the same one for the client ---------- */
.topnav { background: var(--slate); color: var(--white); }
.topnav .inner {
	max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center;
	gap: 6px; min-height: 56px; flex-wrap: wrap; position: relative;
}
.topnav .brand { color: var(--white); font-weight: 700; margin-right: 18px; display: inline-flex; align-items: center; gap: 10px; }
.topnav .brand img { height: 26px; width: auto; }
.topnav .brand:hover { text-decoration: none; }
.topnav .nav-item {
	color: rgba(255,255,255,.82); padding: 8px 12px; border-radius: 6px; font-weight: 500; font-size: 15px;
	cursor: pointer; list-style: none; white-space: nowrap;
}
.topnav .nav-item:hover { background: rgba(255,255,255,.1); text-decoration: none; color: var(--white); }
.topnav .nav-item.active { background: var(--primary); color: var(--white); }
.topnav .spacer { flex: 1; }
/* Whose portal this is: the client company, beside the nav items. */
.topnav .client {
	color: rgba(255,255,255,.7); font-size: 14px; padding: 8px 12px; border-left: 1px solid rgba(255,255,255,.18);
	margin-left: 6px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topnav .who { color: rgba(255,255,255,.7); font-size: 13px; }
.topnav form { margin: 0; }
.topnav form button { background: transparent; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.3); padding: 5px 10px; font-size: 13px; }
.topnav form button:hover { background: rgba(255,255,255,.1); }
/* Help: a small card that opens under the bar, so a confused client can
   reach us without leaving the page. */
.topnav details.help { position: relative; }
.topnav details.help summary::-webkit-details-marker { display: none; }
.topnav details.help[open] > summary { background: rgba(255,255,255,.1); color: var(--white); }
.topnav .help-card {
	position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 300px; max-width: calc(100vw - 32px);
	background: var(--white); color: var(--ink); border-radius: 10px; padding: 16px 18px;
	box-shadow: 0 12px 32px rgba(0,0,0,.22); font-size: 14px; line-height: 1.5;
}
.topnav .help-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--slate); }
.topnav .help-card p { margin: 0 0 10px; }
.topnav .help-card p:last-child { margin-bottom: 0; }
.topnav .help-card .contact { font-weight: 500; }
.topnav .help-card .contact a { display: block; }

/* ---------- cards ---------- */
.card {
	background: var(--white); border: 1px solid var(--grey-light); border-radius: var(--radius);
	padding: 22px 24px; box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.card h2 { margin-bottom: 4px; }
.card .sub { color: var(--grey); font-size: 14px; margin-bottom: 16px; }
.card.accent { border-top: 4px solid var(--primary); }

/* A progress bar: a width while there is a percentage, "busy" stripes while
   something runs without one. */
.bar { height: 10px; background: var(--grey-bg); border: 1px solid #D8D8D8; border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--primary); transition: width .5s ease; }
.bar.busy .fill { background: repeating-linear-gradient(-45deg, var(--primary) 0 12px, var(--primary-dark) 12px 24px); background-size: 34px 100%; animation: bar-busy 1s linear infinite; }
@keyframes bar-busy { from { background-position: 0 0; } to { background-position: 34px 0; } }
.card.warn { border-top: 4px solid var(--warn); }
.card.bad { border-top: 4px solid var(--bad); }
.card.ok { border-top: 4px solid var(--ok); }
.empty { color: var(--grey); padding: 8px 0; }

/* ---------- forms ---------- */
label { display: block; font-size: 14px; color: var(--slate); font-weight: 500; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=number], select, textarea {
	width: 100%; padding: 11px 13px; font: 16px var(--font); color: var(--ink);
	border: 1px solid var(--grey-light); border-radius: 8px; background: var(--white);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
textarea { min-height: 120px; resize: vertical; }
input.mono { font-family: var(--mono); font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink); }
.check input { margin-top: 4px; flex: none; }
.check span { flex: 1; }
button, .button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 18px; font: 500 15px var(--font); border: 0; border-radius: 8px;
	background: var(--primary); color: var(--white); cursor: pointer; text-decoration: none;
	white-space: nowrap;
}
button:hover, .button:hover { background: var(--primary-dark); text-decoration: none; color: var(--white); }
button.secondary, .button.secondary { background: var(--white); color: var(--slate); border: 1px solid var(--grey-light); }
button.secondary:hover, .button.secondary:hover { background: var(--grey-bg); color: var(--slate); }
button.ghost, .button.ghost { background: transparent; color: var(--primary); padding: 6px 10px; }
button.ghost:hover, .button.ghost:hover { background: var(--primary-soft); color: var(--primary-dark); }
button.small, .button.small { padding: 6px 12px; font-size: 13px; }
button.big, .button.big { padding: 14px 24px; font-size: 17px; }
button.danger { background: var(--bad); }
form { margin: 0; }
form.inline { display: inline-flex; gap: 6px; align-items: center; }
form.inline input[type=number] { width: 72px; padding: 6px 8px; font-size: 13px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--grey-light); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
td.nowrap, th.nowrap { white-space: nowrap; }
/* A job's actions sit on their own line under the row, so they never fight
   the columns for width and read the same on a phone. */
tr.has-actions td { border-bottom: 0; padding-bottom: 6px; }
tr.actions-row td { padding-top: 0; }
tr.actions-row td .row { gap: 6px 8px; }

/* ---------- pills ---------- */
.pill {
	display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
	border: 1px solid var(--grey-light); color: var(--grey); white-space: nowrap; line-height: 1.5;
}
.pill.live { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.expiring { background: var(--warn-soft); color: #8a5f00; border-color: transparent; }
.pill.offline { background: #eceff1; color: var(--slate); border-color: transparent; }
.pill.deleted { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.primary { background: var(--primary-soft); color: var(--primary-dark); border-color: transparent; }
.pill.mono { font-family: var(--mono); font-size: 12px; }

/* ---------- notices ---------- */
.notice {
	padding: 14px 18px; border-radius: 8px; font-size: 15px; border: 1px solid;
	display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.notice.info { background: var(--primary-soft); border-color: #bfdcee; color: var(--slate); }
.notice.warn { background: var(--warn-soft); border-color: #f0d9a0; color: #5c4200; }
.notice.ok { background: var(--ok-soft); border-color: #bfe3cc; color: #1e5e3a; }
.notice.bad { background: var(--bad-soft); border-color: #f0c2bb; color: #7a2417; }
.notice form { margin: 0; }

/* ---------- key/value ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 15px; }
.kv dt { color: var(--grey); }
.kv dd { margin: 0; }

/* ---------- hero (client job page) ---------- */
.hero { background: var(--white); border-bottom: 1px solid var(--grey-light); }
.hero .inner { max-width: 1100px; margin: 0 auto; padding: 40px 20px 32px; }
.hero .eyebrow { color: var(--primary); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.hero h1 { font-size: 34px; }
.hero .site { color: var(--grey); font-size: 17px; margin-top: 6px; }
.hero .cta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- included items ---------- */
.items { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.item {
	border: 1px solid var(--grey-light); border-radius: 8px; padding: 14px 16px; background: var(--white);
	display: flex; gap: 12px; align-items: flex-start;
}
.item .icon { width: 40px; height: 40px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; }
.item .name { font-weight: 500; color: var(--slate); }
.item .meta { color: var(--grey); font-size: 13px; }
.item.download { border-color: #bfdcee; }

/* ---------- copy button ---------- */
.copyable { display: inline-flex; gap: 8px; align-items: center; max-width: 100%; }
.copyable code { font-family: var(--mono); font-size: 13px; background: var(--grey-bg); padding: 4px 8px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }

/* ---------- stats ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .n { font-size: 30px; font-weight: 500; color: var(--slate); line-height: 1.1; }
.stat .l { color: var(--grey); font-size: 13px; }

/* ---------- phone ---------- */
@media (max-width: 640px) {
	body { font-size: 15px; }
	.wrap { padding: 20px 16px 48px; }
	.card { padding: 18px 16px; }
	h1 { font-size: 24px; }
	.hero h1 { font-size: 26px; }
	.hero .inner { padding: 28px 16px 24px; }
	.kv { grid-template-columns: 1fr; gap: 2px 0; }
	.kv dt { margin-top: 10px; }
	.topnav .inner { padding: 0 12px; gap: 2px; min-height: 52px; }
	.topnav .brand { margin-right: 8px; }
	.topnav .brand img { height: 22px; }
	.topnav .nav-item { padding: 8px 10px; font-size: 14px; }
	.topnav .who { display: none; }
	/* The company name takes a row of its own under the actions rather than
	   pushing Sign out onto one. */
	.topnav .client { flex-basis: 100%; order: 10; max-width: none; border-left: 0; margin: 0; padding: 0 10px 8px; font-size: 13px; }
	.topnav .help-card { position: fixed; left: 16px; right: 16px; top: auto; width: auto; margin-top: 6px; }
	.wordmark { font-size: 16px; }
	.notice { flex-direction: column; align-items: flex-start; }
}
