/* Sim-Motion internal tools — shared design tokens and base components.
   Fonts are self-hosted (no Google Fonts requests, GDPR). Colours: adjust to CI here only. */
@font-face { font-family: "Chakra Petch"; font-weight: 400; font-display: swap; src: url("/_ui/fonts/chakra-petch-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("/_ui/fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("/_ui/fonts/chakra-petch-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/_ui/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/_ui/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/_ui/fonts/barlow-latin-600-normal.woff2") format("woff2"); }

:root {
  --sm-bg: #0a0c0f;
  --sm-bg-grid: #11151a;
  --sm-panel: #13171d;
  --sm-panel-2: #1a1f27;
  --sm-line: #262d37;
  --sm-text: #e8ecf1;
  --sm-muted: #8b95a3;
  --sm-accent: #ff4d1a;      /* start-light red/orange */
  --sm-accent-2: #ffb21a;    /* amber, warnings */
  --sm-ok: #3ddc84;
  --sm-danger: #ff3355;
  --sm-radius: 3px;
  --sm-font-display: "Chakra Petch", "Bahnschrift", sans-serif;
  --sm-font-body: "Barlow", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    linear-gradient(115deg, transparent 0 62%, rgba(255,77,26,.06) 62% 63%, transparent 63%),
    repeating-linear-gradient(0deg, var(--sm-bg-grid) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--sm-bg-grid) 0 1px, transparent 1px 48px),
    var(--sm-bg);
  color: var(--sm-text);
  font: 400 16px/1.5 var(--sm-font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sm-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--sm-font-display); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; color: var(--sm-muted); }

.sm-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--sm-line); background: rgba(10,12,15,.85); backdrop-filter: blur(6px); }
.sm-brand { font-family: var(--sm-font-display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; color: var(--sm-text); }
.sm-brand::before { content: ""; width: 22px; height: 12px; background: linear-gradient(90deg, var(--sm-accent) 0 33%, transparent 33% 40%, var(--sm-accent) 40% 73%, transparent 73% 80%, var(--sm-accent) 80%); transform: skewX(-20deg); }
.sm-brand small { color: var(--sm-muted); font-weight: 400; letter-spacing: .08em; }
.sm-main { max-width: 960px; margin: 0 auto; padding: 32px 24px 64px; }
.sm-center { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 24px; }

.sm-card { background: var(--sm-panel); border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: 28px; position: relative; overflow: hidden; }
.sm-card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--sm-accent), transparent 70%); }
.sm-card.narrow { width: 100%; max-width: 400px; }

label { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sm-muted); margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=email], select, textarea {
  width: 100%; padding: 11px 12px; background: var(--sm-bg); color: var(--sm-text);
  border: 1px solid var(--sm-line); border-radius: var(--sm-radius); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sm-accent); box-shadow: 0 0 0 3px rgba(255,77,26,.18); }

.sm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 0; cursor: pointer;
  font-family: var(--sm-font-display); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .9rem;
  background: var(--sm-accent); color: #0a0c0f; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.sm-btn:hover { filter: brightness(1.1); text-decoration: none; }
.sm-btn.ghost { background: var(--sm-panel-2); color: var(--sm-text); }
.sm-btn.block { width: 100%; margin-top: 22px; }

.sm-alert { padding: 10px 14px; border-left: 3px solid var(--sm-danger); background: rgba(255,51,85,.08); margin: 12px 0; font-size: .95rem; }
.sm-alert.ok { border-color: var(--sm-ok); background: rgba(61,220,132,.08); }
.sm-alert.warn { border-color: var(--sm-accent-2); background: rgba(255,178,26,.08); }
.sm-muted { color: var(--sm-muted); }
.sm-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.sm-table th { text-align: left; font-family: var(--sm-font-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; color: var(--sm-muted); padding: 8px 10px; border-bottom: 1px solid var(--sm-line); }
.sm-table td { padding: 10px; border-bottom: 1px solid var(--sm-line); vertical-align: top; }
.sm-tag { display: inline-block; padding: 2px 8px; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; background: var(--sm-panel-2); border: 1px solid var(--sm-line); }
.sm-tag.on { color: var(--sm-ok); border-color: rgba(61,220,132,.4); }
.sm-tag.off { color: var(--sm-muted); }
.sm-stack > * + * { margin-top: 20px; }

/* Customer-facing pages (complaint form, status page): light theme in the logo colours. */
body.sm-light {
  --sm-bg: #f3f6f8;
  --sm-panel: #ffffff;
  --sm-panel-2: #e9eef2;
  --sm-line: #d6dde4;
  --sm-text: #2c3242;
  --sm-muted: #5d6878;
  --sm-accent: #3d84a0;
  --sm-accent-2: #b7791f;
  --sm-ok: #2f8f5b;
  --sm-danger: #c62f47;
  --sm-radius: 6px;
  background: linear-gradient(180deg, #e6eef3 0, var(--sm-bg) 320px);
}
body.sm-light .sm-card { box-shadow: 0 1px 2px rgba(44,50,66,.06), 0 8px 24px rgba(44,50,66,.06); }
body.sm-light .sm-card::before { background: linear-gradient(90deg, #4591ad, #2c3242 85%); }
body.sm-light .sm-btn { color: #fff; background: linear-gradient(135deg, #4a9ab8, #2f6f8a); clip-path: none; border-radius: var(--sm-radius); }
body.sm-light .sm-btn.ghost { background: var(--sm-panel-2); color: var(--sm-text); }
body.sm-light input[type=text], body.sm-light input[type=email], body.sm-light select, body.sm-light textarea { background: #fff; }
body.sm-light input:focus, body.sm-light select:focus, body.sm-light textarea:focus { box-shadow: 0 0 0 3px rgba(69,145,173,.2); }
body.sm-light h1 { color: #2c3242; }
.sm-pubhead { background: #fff; border-bottom: 1px solid var(--sm-line); }
.sm-pubhead > div { max-width: 820px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sm-pubhead img { height: 44px; width: auto; display: block; }
.sm-pubhead a.shop { font-family: var(--sm-font-display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.sm-pubfoot { max-width: 820px; margin: 0 auto; padding: 8px 20px 40px; color: var(--sm-muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 520px) { .sm-pubhead img { height: 34px; } }
body.sm-light input[type=file] { font: inherit; color: var(--sm-muted); }
body.sm-light input[type=file]::file-selector-button { font: 600 .85rem var(--sm-font-display); letter-spacing: .06em; text-transform: uppercase; padding: 8px 14px; margin-right: 12px; border: 1px solid var(--sm-line); border-radius: var(--sm-radius); background: var(--sm-panel-2); color: var(--sm-text); cursor: pointer; }
