/* VALTRIX Assets. Flat navy and orange. No gradients, no decorative shapes. */

:root {
  --navy: #01254b;
  --navy-2: #01315f;
  --navy-3: #01182f;
  --orange: #f46401;
  --orange-press: #c44700;
  --paper: #f4f6f8;
  --card: #ffffff;
  --line: #e3e7ed;
  --line-strong: #d3dae3;
  --ink: #142033;
  --muted: #5e6d7e;
  --good: #0e6b43;
  --good-bg: #e7f5ee;
  --warn: #8a5b00;
  --warn-bg: #fbf4e4;
  --bad: #9e1b1b;
  --bad-bg: #f8e9e9;
  --info: #0c4f86;
  --info-bg: #e7f1f8;
  --slate: #3e4c5e;
  --slate-bg: #eef1f5;
  --sidebar: 260px;
  --top: 60px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.brand-band {
  display: block;
  background: #fff;
  padding: 16px 16px 14px;
  border-bottom: 3px solid var(--orange);
  text-decoration: none;
}

a.brand-band:hover { text-decoration: none; }

.logo {
  display: block;
  width: 100%;
  height: auto;
}

.side-scroll {
  flex: 1;
  overflow: auto;
  padding: 14px 10px 12px;
}

.side-kicker {
  padding: 4px 10px 12px;
}

.side-kicker strong,
.side-kicker span {
  display: block;
}

.side-kicker strong {
  font-size: 13px;
  font-weight: 700;
}

.side-kicker span {
  margin-top: 2px;
  color: #b7c5d4;
  font-size: 12px;
}

.side-label {
  margin: 14px 10px 6px;
  color: #8ba0b5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 10px;
  padding: 9px 12px;
  border-radius: 8px;
  border-left: 0;
  color: #d5dee8;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  background: #012c56;
  color: #fff;
  text-decoration: none;
}

.nav-link.is-active {
  background: var(--orange);
  color: #fff;
}

.nav-group { margin: 2px 0; }
.nav-group summary { cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group .chev { margin-left: auto; display: flex; }
.nav-group[open] .chev { transform: rotate(180deg); }
.nav-kids { padding: 2px 0 6px; }
.nav-sub { margin-left: 22px; font-size: 13px; font-weight: 600; }

.side-hero {
  position: relative;
  margin: 8px 12px 14px;
  min-height: 108px;
  padding: 14px;
  border-radius: 12px;
  overflow: hidden;
  background: #01182f url("../imgs/login-hero1.jpg") center 60% / cover no-repeat;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.side-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(1, 24, 47, 0.05), rgba(1, 24, 47, 0.82));
}

.side-hero strong,
.side-hero span { position: relative; }
.side-hero strong { font-size: 14px; line-height: 1.25; }
.side-hero strong::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 8px;
  background: var(--orange);
}
.side-hero span { color: #d5dee8; font-size: 12px; }

.nav-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.side-foot {
  padding: 12px 16px 16px;
  border-top: 1px solid #01365f;
  color: #b7c5d4;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.side-foot strong {
  display: block;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.icon-btn,
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 4px;
}

.top-product {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}

.search {
  position: relative;
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 4px;
}

.search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: 0 0 auto;
}

.search input {
  flex: 1;
  height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  outline: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: -1px;
  right: -1px;
  background: #fff;
  border: 1px solid var(--line-strong);
  z-index: 25;
}

.search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.search-item:hover {
  background: #f7f9fb;
}

.search-item strong {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--navy);
}

.search-item span {
  color: var(--muted);
  font-size: 12px;
}

.top-spacer {
  flex: 1;
}

.who {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.who-name {
  font-weight: 700;
  font-size: 13px;
}

.who-role {
  color: var(--muted);
  font-size: 11px;
}

.role-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
}

.role-field span,
.field > span,
.stat-label,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.role-field select,
.control,
.field input,
.field select,
.field textarea,
.toolbar select,
.toolbar input,
.inline-input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  padding: 0 10px;
}

.field textarea {
  height: auto;
  min-height: 74px;
  padding: 8px 10px;
  resize: vertical;
}

.view {
  padding: 22px 24px 48px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-head h1,
.page-title {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.lede,
.page-sub,
.card-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-actions,
.toolbar,
.tabs,
.pager,
.module-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.back {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.scope-note,
.note {
  margin: 0 0 14px;
  padding: 8px 10px;
  background: var(--info-bg);
  color: var(--info);
  border-left: 3px solid var(--info);
  font-size: 13px;
  font-weight: 600;
}

.note.warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-left-color: var(--warn);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
}

.stat {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.stat:hover {
  border-color: var(--navy);
}

.stat-value {
  display: block;
  margin: 6px 0 0;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-meta {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: #fff;
  border-radius: 4px;
  flex: 0 0 auto;
}

.stat-icon.tone-orange { background: var(--orange); }
.stat-icon.tone-red { background: var(--bad); }
.stat-icon.tone-amber { background: #8a5b00; }
.stat-icon.tone-green { background: var(--good); }

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.status-card {
  margin-bottom: 12px;
  padding: 18px 18px 14px;
  border-radius: 16px;
  border-color: #e6edf5;
  box-shadow: 0 10px 28px rgba(20, 40, 70, 0.05);
}

.status-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff1e8;
  color: var(--orange);
  flex: 0 0 auto;
}

.status-mark svg { width: 20px; height: 20px; }
.status-head .card-title { font-size: 18px; }
.status-head .card-sub { margin: 1px 0 0; }

.flow {
  display: flex;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  min-width: 0;
  margin: 16px 0 2px;
  padding: 6px 2px 10px;
  list-style: none;
  overflow-x: auto;
}

.flow li {
  position: relative;
  flex: 1 0 104px;
  display: flex;
  min-width: 104px;
}

.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid #c5d0dc;
  border-right: 1.5px solid #c5d0dc;
  transform: translateY(-50%) rotate(45deg);
}

.flow li > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  padding: 12px 20px 12px 10px;
  background: #f5f8fb;
  color: #1c2d42;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M24 6H150c14 0 22 10 30 26l14 18-14 18c-8 16-16 26-30 26H24c-12 0-18-8-18-20V26C6 14 12 6 24 6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M24 6H150c14 0 22 10 30 26l14 18-14 18c-8 16-16 26-30 26H24c-12 0-18-8-18-20V26C6 14 12 6 24 6z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  filter: drop-shadow(0 0 0.6px #d5dee8);
}

.flow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8eef5;
  color: #24364c;
}

.flow-icon svg { width: 18px; height: 18px; }

.flow .is-here { z-index: 1; }

.flow .is-here > span {
  background: var(--orange);
  color: #fff;
  filter: drop-shadow(0 8px 14px rgba(244, 100, 1, 0.38));
}

.flow .is-here .flow-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.split .data td { white-space: nowrap; }
.split {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-box {
  position: relative;
  height: 320px;
  margin-top: 8px;
}

.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data th {
  text-align: left;
  padding: 8px 10px;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data th button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-weight: 800;
}

.data td {
  padding: 9px 10px;
  border-bottom: 1px solid #eef1f4;
  vertical-align: middle;
}

.data tbody tr:hover td {
  background: #f7f9fb;
}

.data tr[data-href] {
  cursor: pointer;
}

.code,
.data td.code,
.code-lg {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
}

.code-lg {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.data th.num,
.data td.num {
  text-align: right;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--slate-bg);
  color: var(--slate);
}

.chip-available,
.chip-completed,
.chip-resolved,
.chip-good { background: var(--good-bg); color: var(--good); }
.chip-allocated,
.chip-issued,
.chip-open,
.chip-purchased { background: var(--info-bg); color: var(--info); }
.chip-transferred { background: #e7eef8; color: #0c3f78; }
.chip-maintenance,
.chip-scheduled,
.chip-fair { background: var(--warn-bg); color: var(--warn); }
.chip-returned { background: #e7f3f1; color: #0f5c56; }
.chip-retired { background: var(--slate-bg); color: var(--slate); }
.chip-approved { background: var(--good-bg); color: var(--good); }
.chip-pending { background: var(--warn-bg); color: var(--warn); }
.chip-scrapped,
.chip-rejected,
.chip-missing,
.chip-expired { background: var(--bad-bg); color: var(--bad); }
.chip-damaged,
.chip-due { background: #fde8d8; color: #9a3b00; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; border-color: var(--navy); }
.btn-primary { background: var(--orange-press); border-color: var(--orange-press); color: #fff; }
.btn-primary:hover { background: #a83b00; border-color: #a83b00; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.request-form { margin-bottom: 16px; }
.btn-small { height: 28px; padding: 0 8px; font-size: 12px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.toolbar {
  margin-bottom: 12px;
}

.toolbar .control,
.toolbar input,
.toolbar select {
  width: auto;
  min-width: 150px;
}

.grow { flex: 1; min-width: 180px; }
.suggest { position: relative; flex: 1; min-width: 220px; }
.suggest .control { width: 100%; min-width: 0; }
.control.is-bad { border-color: var(--bad); background: var(--bad-bg); }
.serial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.serial-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; }
.code-list { margin: 8px 0 0; padding: 0; list-style: none; max-height: 220px; overflow: auto; }
.code-list li { padding: 2px 0; color: var(--navy); font-family: var(--mono); font-size: 12px; }
.match-box { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.match-title { margin: 8px 0 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.match-list { margin: 0; padding: 0; list-style: none; }
.match-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.match-list strong { display: block; color: var(--bad); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.match-list span { color: var(--muted); font-size: 12px; }
.dup-list { margin: 6px 0 0; padding-left: 18px; }

.pager {
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.asset-tag {
  text-align: center;
}

.asset-tag canvas,
.asset-tag svg {
  display: block;
  margin: 0 auto 8px;
  max-width: 100%;
}

#qr-box {
  width: 168px;
  height: 168px;
  margin: 0 auto 12px;
}

#qr-box canvas {
  display: block !important;
  width: 168px !important;
  height: 168px !important;
}

#qr-box img { display: none !important; }

.tag-name {
  margin: 8px 0 0;
  font-weight: 800;
  color: var(--navy);
}

.tag-site {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}

.kv {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
}

.kv dt {
  color: var(--muted);
  font-size: 12px;
}

.kv dd {
  margin: 0;
  font-weight: 700;
}

.tabs {
  margin-bottom: 12px;
}

.tab {
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  border-radius: 0;
}

.tab.is-active {
  color: var(--navy);
  border-bottom-color: var(--orange);
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.chart-box canvas { display: block; }

.code-preview {
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
  border-radius: 6px;
}

.code-preview strong {
  display: block;
  margin: 4px 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.code-preview em {
  display: block;
  color: #b7c5d4;
  font-style: normal;
  font-size: 12px;
}

.form-card { max-width: 980px; }

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(1, 24, 47, 0.55);
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow: auto;
}

.modal {
  width: min(640px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.modal.wide { width: min(820px, 100%); }

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.modal-head h2 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

.modal-body { padding: 14px; }

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 70;
}

.toast {
  min-width: 240px;
  max-width: 380px;
  padding: 10px 12px;
  background: var(--navy);
  color: #fff;
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  font-weight: 600;
}

.toast.bad { border-left-color: #ffb4b4; }

.empty {
  padding: 28px 10px;
  text-align: center;
  color: var(--muted);
}

.module-row { margin-top: 10px; }

.module {
  flex: 1 1 140px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  text-align: left;
  border-radius: 4px;
}

.module strong,
.module span { display: block; }
.module span { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.module.is-on { border-color: var(--navy); background: var(--navy); color: #fff; }
.module.is-on span { color: #f46401; }

.group-block { margin-bottom: 12px; }
.group-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

.overlay { display: none; }
.boot-error {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--bad);
  color: #fff;
  padding: 8px 12px;
  font-weight: 700;
}

.loading { color: var(--muted); padding: 24px; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--paper);
}

.preloader img {
  width: 88px;
  height: auto;
}

.preloader strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.preloader span {
  color: var(--muted);
  font-size: 13px;
}

.preloader i {
  display: block;
  width: 88px;
  height: 3px;
  background: var(--line);
}

.preloader i::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  background: var(--orange);
}
.print-only { display: none; }

.audit-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.audit-tools .control { width: auto; min-width: 160px; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid,
  .split,
  .detail-grid,
  .kv-grid,
  .fields { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}

@media (max-width: 960px) {
  .shell { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    width: min(280px, 88vw);
    transition: transform 160ms linear;
  }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(1, 24, 47, 0.45);
    z-index: 25;
  }
  .menu-btn { display: inline-flex; }
  .top-product { display: none; }
  .topbar {
    height: auto;
    min-height: var(--top);
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 8px;
  }
  .search { order: 5; flex: 1 1 100%; max-width: none; }
  .role-field { min-width: 0; width: auto; flex: 1 1 140px; }
  .role-field > span { display: none !important; }
  .view { padding: 16px; }
}

@media print {
  .print-only { display: block; margin: 0 0 10px; font-weight: 800; color: #01254b; }
  .sidebar,
  .topbar,
  .no-print,
  .toast-root,
  #modal-root,
  .page-actions,
  .toolbar,
  .pager,
  .tabs { display: none !important; }
  .shell { display: block; }
  .view { padding: 0; }
  .card { break-inside: avoid; }
  body.print-tag .view > *:not(.detail-grid) { display: none !important; }
  body.print-tag .detail-grid { display: block !important; }
  body.print-tag .detail-grid > *:not(.asset-tag) { display: none !important; }
  body.print-tag .asset-tag {
    display: block !important;
    width: 280px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #000;
    border-radius: 0;
    background: #fff;
    text-align: center;
  }
  body.print-tag .asset-tag #qr-box,
  body.print-tag .asset-tag .tag-name,
  body.print-tag .asset-tag .tag-site {
    display: none !important;
  }
  body.print-tag .asset-tag svg {
    display: block !important;
    width: 100%;
    height: 64px;
    margin: 0 auto;
  }
  body.print-tag .asset-tag .code {
    display: block !important;
    margin-top: 6px;
    color: #000;
    font-size: 13px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

.login-body {
  min-height: 100vh;
  display: flex;
  padding: 28px 18px;
  background: #e7edf2;
}

.stage { width: min(1100px, 100%); margin: auto; }
.stage[hidden] { display: none !important; }

.login-shell {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  min-height: 700px;
  padding: 14px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(20, 32, 51, 0.08);
}

.login-visual {
  position: relative;
  min-height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #f4f6f8;
}

.login-visual img {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  object-fit: contain;
}

.signin {
  display: flex;
  min-width: 0;
  padding: 18px 16px 12px 8px;
}

.signin-field svg,
.signin-id svg,
.signin-count svg,
.signin-link svg,
#toggle-code svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.signin-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 10px 22px 4px;
  background: transparent;
  text-align: center;
}

.signin-logo { width: 168px; height: auto; align-self: flex-start; }

.signin-intro { margin: 28px 0 22px; }

.signin-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.signin-sub {
  margin: 8px auto 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: 14px;
}

.signin-block { display: block; margin-bottom: 14px; text-align: left; }
.signin-block > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.signin-block em { color: var(--orange); font-style: normal; }

.signin-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: #8aa0b5;
  text-align: left;
}

.signin-field:focus-within { border-color: var(--navy); }

.signin-field input {
  flex: 1;
  width: auto;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  outline: none;
}

.signin-field svg { flex: 0 0 auto; }

#toggle-code {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #8aa0b5;
  padding: 0;
}

.signin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 2px 12px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.signin-count,
.signin-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.signin-count svg,
.signin-link svg { width: 14px; height: 14px; }

.signin-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #1d6fb5;
  font-weight: 700;
}

.gate-error {
  margin: 0 0 10px;
  color: var(--bad);
  font-size: 13px;
  font-weight: 700;
}

.signin-go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.signin-go:hover { background: var(--orange-press); }

.signin-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  color: #9aa8b6;
  font-size: 12px;
  font-weight: 700;
}

.signin-or::before,
.signin-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.signin-people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.signin-id {
  min-height: 64px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--orange);
}

.signin-id:hover { border-color: var(--navy); }
.signin-id strong,
.signin-id span { display: block; }
.signin-id strong {
  color: var(--navy);
  font-size: 11.5px;
  line-height: 1.2;
}
.signin-id span {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.signin-foot {
  margin: auto 0 0;
  padding-top: 18px;
  color: #9aa8b6;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 860px) {
  .login-body { padding: 16px 12px; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-visual { height: 280px; min-height: 280px; }
  .login-visual img { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .signin { padding: 8px 4px 4px; }
  .signin-card { padding: 12px 8px 4px; }
  .signin-intro { margin: 18px 0 16px; }
  .signin-card h2 { font-size: 26px; }
}

@media (max-width: 420px) {
  .signin-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signin-row { align-items: flex-start; flex-direction: column; }
}

.who { flex-direction: row; align-items: center; gap: 8px; }
.who > span:not(.avatar) { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
}
.bell:hover { text-decoration: none; border-color: var(--navy); }
.bell-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--bad);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search { max-width: 640px; }

.hello {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  min-height: 132px;
  margin-bottom: 16px;
  padding: 22px 24px;
  border-radius: 16px;
  color: #fff;
  background: #01254b url("../imgs/login-hero1.jpg") center 42% / cover no-repeat;
}
.hello::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(1, 24, 47, 0.82), rgba(1, 24, 47, 0.28) 72%, rgba(1, 24, 47, 0.5));
}
.hello > * { position: relative; }
.hello-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hello h1 { margin: 2px 0 0; color: #fff; font-size: 32px; letter-spacing: -0.03em; }
.hello p { margin: 6px 0 0; color: #e7eef5; }
.hello-when { text-align: right; }
.hello-when strong,
.hello-when span { display: block; }
.hello-when span { margin-top: 4px; color: #d5dee8; font-size: 13px; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}
.kpi:hover { border-color: var(--navy); }
.kpi.is-on { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.maint-sheet .card-head { align-items: flex-end; flex-wrap: wrap; }
.maint-sheet .tabs { margin: 0; }
.subline { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi strong { display: block; color: var(--navy); font-size: 20px; letter-spacing: -0.03em; }
.kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: 0 0 auto;
}
.kpi-icon svg { width: 18px; height: 18px; }
.tone-orange { background: #fff1e8; color: #f46401; }
.tone-green { background: #e7f6ee; color: #0e6b43; }
.tone-amber { background: #fff4df; color: #b26a00; }
.tone-blue { background: #e7f1fb; color: #0c4f86; }
.tone-red { background: #fdecec; color: #9e1b1b; }
.tone-gold { background: #f8f1e4; color: #8a5b00; }

.dash-charts,
.dash-lower {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}
.view, .card, .dash-bottom, .chart-box, .donut-wrap, .table-wrap, .site-row { min-width: 0; }
.chart-box canvas, .donut-wrap canvas { max-width: 100%; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.card-head h2 { margin: 0; color: var(--navy); font-size: 15px; }
.card-head a { font-size: 12px; font-weight: 800; }
.donut-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; align-items: center; }
.donut-wrap { position: relative; height: 150px; }
.donut-mid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-mid strong { color: var(--navy); font-size: 18px; }
.donut-mid span { color: var(--muted); font-size: 11px; font-weight: 700; }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 6px; align-items: center; margin-bottom: 4px; font-size: 11px; }
.legend i { width: 8px; height: 8px; border-radius: 99px; }
.legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-box.tall { height: 220px; }
.due { color: #c44700; font-weight: 800; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed a { color: inherit; text-decoration: none; }
.feed a:hover strong { text-decoration: underline; }
.feed strong, .feed span, .feed em { display: block; }
.feed strong { font-size: 13px; }
.feed span, .feed em { color: var(--muted); font-size: 11px; font-style: normal; }
.feed-icon { display: flex; color: var(--orange); }
.feed-icon svg { width: 16px; height: 16px; }

.dash-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; }
.site-row { display: flex; gap: 8px; overflow: auto; width: 100%; padding-bottom: 4px; }
.site-card {
  flex: 0 0 140px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.site-card:hover { text-decoration: none; border-color: var(--navy); }
.site-card strong, .site-card span { display: block; }
.site-card span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.quick:hover { text-decoration: none; border-color: var(--orange); }
.quick span { display: flex; color: var(--orange); }
.quick svg { width: 16px; height: 16px; }

.crumbs { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.crumbs a { color: var(--muted); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.sheet { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.sheet-block {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.sheet-block header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-block h2 { margin: 0; color: var(--navy); font-size: 16px; }
.sheet-block header p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.step, .step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.step { background: var(--navy); color: #fff; font-size: 13px; font-weight: 800; }
.step-icon { background: #fff1e8; color: var(--orange); }
.step-icon svg { width: 15px; height: 15px; }
.code-card .code-big {
  margin: 0;
  color: var(--navy);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}
.sheet-side { position: sticky; top: 76px; }
.sheet-head .btn svg { width: 15px; height: 15px; }

@media (max-width: 1180px) {
  .dash-charts, .dash-lower, .dash-bottom, .sheet { grid-template-columns: 1fr; }
  .sheet-side { position: static; }
}
@media (max-width: 800px) {
  .maint-sheet .toolbar .grow { flex-basis: 100%; }
  .flow li { flex-basis: 92px; min-width: 92px; }
  .flow li > span { min-height: 92px; font-size: 12px; padding-right: 16px; }
  .serial-grid { grid-template-columns: 1fr; }
  .hello { flex-direction: column; align-items: flex-start; }
  .hello-when { text-align: left; }
  .hello h1 { font-size: 26px; }
  .donut-row { grid-template-columns: 1fr; }
  .sheet-head { flex-direction: column; align-items: stretch; }
}
