/* ==========================================================================
   QMS Quality Portal — industrial "shop floor" theme
   Palet diambil dari lantai produksi: baja grafit, beton, garis safety kuning,
   dan tag inspeksi hijau/merah/kuning.
   ========================================================================== */
:root {
  --ink: #18242b;
  --ink-2: #4a5a63;
  --muted: #7b8a92;
  --steel: #22323b;
  --steel-2: #2c414c;
  --steel-3: #3a5361;
  --concrete: #e8ecee;
  --panel: #ffffff;
  --line: #d4dbdf;
  --line-soft: #e6eaec;
  --primary: #1d6a87;
  --primary-ink: #ffffff;
  --primary-soft: #e1eff4;
  --signal: #f2b705;
  --ok: #1e8a4c;   --ok-bg: #dcf1e3;   --ok-ink: #135c32;
  --ng: #c73a2e;   --ng-bg: #f9dfdb;   --ng-ink: #8c2219;
  --hold: #d98e04; --hold-bg: #fcefcd; --hold-ink: #6f4b00;
  --info: #3b6fb6; --info-bg: #e0e9f6; --info-ink: #284b80;
  --sb-w: 264px;
  --sb-rail: 68px;
  --top-h: 60px;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", "IBM Plex Sans", sans-serif;
  --radius: 6px;

  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--concrete);
  --bs-border-color: var(--line);
  --bs-primary: var(--primary);
  --bs-primary-rgb: 29, 106, 135;
  --bs-link-color: var(--primary);
  --bs-link-color-rgb: 29, 106, 135;
}

html, body { min-height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--concrete);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; color: var(--ink); }
a { color: var(--primary); }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ---------- Buttons & forms (override Bootstrap) ---------- */
.btn { font-weight: 500; border-radius: 5px; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: #155670; --bs-btn-hover-border-color: #155670; --bs-btn-active-bg: #124a61; --bs-btn-disabled-bg: var(--primary); --bs-btn-disabled-border-color: var(--primary); }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-active-bg: var(--primary); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--concrete); --bs-btn-hover-border-color: var(--line); }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.form-control, .form-select { border-color: var(--line); border-radius: 5px; font-size: 14px; background-color: #fff; color: var(--ink); }
.form-control[readonly], .form-control:disabled, .form-select:disabled { background-color: #f4f6f7; }
.ts-control, .ts-wrapper.single.input-active .ts-control { background: #fff !important; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,106,135,.18); }
.form-label { font-weight: 500; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.form-label .req { color: var(--ng); margin-left: 2px; }
.form-text { font-size: 12px; color: var(--muted); }
.input-group-text { background: var(--concrete); border-color: var(--line); font-size: 13px; color: var(--ink-2); }
.form-control[readonly].calc { background: #f4f6f7; font-weight: 600; }
.form-control.is-ok { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok); }
.form-control.is-ng { background: var(--ng-bg); color: var(--ng-ink); border-color: var(--ng); }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1040;
  width: var(--sb-w);
  background: var(--steel);
  color: #c9d5db;
  display: flex; flex-direction: column;
  transition: width .2s ease, transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.sb-brand {
  height: var(--top-h); flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  white-space: nowrap;
}
.sb-logo {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 6px;
  background: var(--signal); color: var(--steel);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.sb-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: #fff; line-height: 1.05; }
.sb-title small { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 400; color: #8ea2ad; }
.sb-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 10px 0 16px; scrollbar-width: thin; scrollbar-color: var(--steel-3) transparent; }
.sb-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 18px 9px 22px;
  color: #c9d5db; text-decoration: none; white-space: nowrap;
  border: 0; background: none; width: 100%; text-align: left; font-size: 14px;
}
.sb-link > i.bi:first-child { font-size: 17px; width: 24px; flex: 0 0 24px; text-align: center; color: #93a7b2; }
.sb-link .sb-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.sb-link .sb-caret { font-size: 11px; transition: transform .2s; color: #7f949f; }
.sb-link[aria-expanded="true"] .sb-caret { transform: rotate(90deg); }
.sb-link:hover { background: var(--steel-2); color: #fff; }
.sb-link:hover > i.bi:first-child { color: #fff; }
.sb-link.active { background: var(--steel-2); color: #fff; }
.sb-link.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 0 3px 3px 0; background: var(--signal); }
.sb-link.active > i.bi:first-child { color: var(--signal); }
.sb-sub { padding: 2px 0 6px; }
.sb-sub a {
  display: block; position: relative;
  padding: 7px 18px 7px 58px;
  font-size: 13.5px; color: #a9bac3; text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sb-sub a::before { content: ""; position: absolute; left: 33px; top: 50%; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid #5f7682; transform: translateY(-50%); }
.sb-sub a:hover { color: #fff; background: rgba(255,255,255,.04); }
.sb-sub a.active { color: #fff; font-weight: 500; }
.sb-sub a.active::before { background: var(--signal); border-color: var(--signal); }
.sb-foot { flex: 0 0 auto; border-top: 1px solid rgba(255,255,255,.07); padding: 10px 12px; }
.sb-foot button { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: #93a7b2; padding: 8px 10px; border-radius: 5px; white-space: nowrap; font-size: 13px; }
.sb-foot button:hover { background: var(--steel-2); color: #fff; }
.sb-foot i { font-size: 16px; width: 24px; flex: 0 0 24px; text-align: center; }

.main { margin-left: var(--sb-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .2s ease; }

/* Mode auto-hide: sidebar menyusut jadi rail ikon, melebar saat kursor mendekat */
@media (min-width: 992px) {
  html.sb-auto .main { margin-left: var(--sb-rail); }
  html.sb-auto .sidebar { width: var(--sb-rail); }
  html.sb-auto .sidebar:hover, html.sb-auto .sidebar:focus-within { width: var(--sb-w); box-shadow: 8px 0 28px rgba(16, 28, 34, .28); }
  html.sb-auto .sidebar:not(:hover):not(:focus-within) .sb-label,
  html.sb-auto .sidebar:not(:hover):not(:focus-within) .sb-caret,
  html.sb-auto .sidebar:not(:hover):not(:focus-within) .sb-title,
  html.sb-auto .sidebar:not(:hover):not(:focus-within) .sb-foot span { opacity: 0; }
  html.sb-auto .sidebar:not(:hover):not(:focus-within) .sb-sub { display: none; }
  html.sb-auto .sidebar:not(:hover):not(:focus-within) .sb-link { padding-left: 22px; }
}
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  html.sb-open .sidebar { transform: none; box-shadow: 8px 0 28px rgba(16,28,34,.35); }
  .sb-backdrop { position: fixed; inset: 0; background: rgba(16,28,34,.45); z-index: 1035; display: none; }
  html.sb-open .sb-backdrop { display: block; }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1020;
  height: var(--top-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px 0 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.topbar .crumb { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .today { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.user-chip { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 6px; border-radius: 6px; }
.user-chip:hover { background: var(--concrete); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.user-chip .who { text-align: left; line-height: 1.15; }
.user-chip .who b { display: block; font-size: 13px; font-weight: 600; }
.user-chip .who small { font-size: 11.5px; color: var(--muted); }
@media (max-width: 575.98px) { .user-chip .who, .topbar .today { display: none; } .topbar { padding-right: 12px; } }

.content { padding: 22px 24px 40px; flex: 1; }
@media (max-width: 575.98px) { .content { padding: 16px 12px 32px; } }
.app-foot { padding: 14px 24px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 26px; margin: 0; line-height: 1.15; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { font-size: 17px; margin: 0; }
.panel-head .hint { font-size: 12px; color: var(--muted); }
.panel-body { padding: 16px; }
.form-section { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--steel-2);
  display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.form-section::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.filter-bar .form-control, .filter-bar .form-select { height: 34px; font-size: 13px; width: auto; }
.filter-bar .search { min-width: 220px; flex: 1 1 220px; max-width: 340px; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 0; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; background: #fff; }
.status-chip b { font-weight: 600; color: var(--ink); }
.status-chip.on { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table-q { width: 100%; margin: 0; font-size: 13.5px; border-collapse: separate; border-spacing: 0; }
.table-q th { background: #f4f6f7; color: var(--ink-2); font-weight: 600; font-size: 12.5px; text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.table-q td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table-q tbody tr:hover td { background: #f8fafb; }
.table-q td.num, .table-q th.num { text-align: right; }
.table-q .doc { font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap; }
.table-q .doc:hover { text-decoration: underline; }
.table-q .act { white-space: nowrap; text-align: right; width: 1%; }
.table-q .overdue { color: var(--ng); font-weight: 600; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .pagination { margin: 0; --bs-pagination-color: var(--primary); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); --bs-pagination-font-size: 13px; }

/* ---------- Inspection tag (judgement / status) ----------
   Bentuk tag gantung dengan lubang, seperti tag OK/NG fisik di lantai produksi. */
.tag {
  position: relative; display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px 0 17px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  clip-path: polygon(7px 0, 100% 0, 100% 100%, 7px 100%, 0 50%);
  border-radius: 0 4px 4px 0;
}
.tag::before { content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.tag-ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag-ng { background: var(--ng-bg); color: var(--ng-ink); }
.tag-hold { background: var(--hold-bg); color: var(--hold-ink); }
.tag-info { background: var(--info-bg); color: var(--info-ink); }
.tag-neutral { background: #e8ecee; color: #46555d; }
.tag-lg { height: 30px; font-size: 15px; padding: 0 14px 0 22px; clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%); }
.tag-lg::before { left: 9px; width: 7px; height: 7px; margin-top: -3.5px; }

/* ---------- Detail view ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 22px; }
.dl-grid .dl-item.wide { grid-column: 1 / -1; }
.dl-item dt { font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 3px; }
.dl-item dd { margin: 0; font-size: 14px; }
.thumb { max-width: 220px; max-height: 160px; border-radius: 4px; border: 1px solid var(--line); object-fit: cover; }
.file-link { text-decoration: none; white-space: nowrap; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 12.5px; }
.timeline li { padding: 6px 0; border-bottom: 1px dashed var(--line-soft); color: var(--ink-2); }
.timeline li b { color: var(--ink); font-weight: 600; }

/* ---------- Empty / flash ---------- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-2); }
.empty-state > i { font-size: 40px; color: var(--muted); }
.empty-state h2 { font-size: 22px; margin: 10px 0 6px; }
.empty-state p { max-width: 460px; margin: 0 auto 16px; }
.alert { border-radius: var(--radius); font-size: 13.5px; }

/* ---------- Dashboard: andon board ---------- */
.dash-filter { display: flex; gap: 8px; align-items: center; }
.andon { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
@media (max-width: 991.98px) { .andon { grid-template-columns: repeat(2, minmax(0, 1fr)); } .andon-value { font-size: 32px; } }
.andon-cell { background: var(--panel); padding: 14px 16px 14px; position: relative; text-decoration: none; color: inherit; display: block; }
.andon-cell::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--line); }
.andon-cell.st-ok::before { background: var(--ok); }
.andon-cell.st-ng::before { background: var(--ng); }
.andon-cell.st-hold::before { background: var(--hold); }
.andon-cell:hover { background: #fafbfc; }
.andon-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; margin-top: 4px; }
.andon-value { font-family: var(--font-display); font-weight: 600; font-size: 38px; line-height: 1.05; margin: 4px 0 2px; color: var(--ink); }
.andon-value small { font-size: 18px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
.andon-meta { font-size: 12px; color: var(--muted); }
.andon-meta .lamp { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; background: var(--muted); }
.st-ok .lamp { background: var(--ok); } .st-ng .lamp { background: var(--ng); } .st-hold .lamp { background: var(--hold); }
.chart-box { position: relative; height: 280px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.mini-list li:last-child { border-bottom: 0; }
.mini-date { flex: 0 0 46px; text-align: center; border: 1px solid var(--line); border-radius: 5px; padding: 3px 0; line-height: 1.1; }
.mini-date b { display: block; font-family: var(--font-display); font-size: 19px; }
.mini-date small { font-size: 10.5px; color: var(--muted); }
.mini-list .t { font-weight: 500; }
.mini-list .s { font-size: 12px; color: var(--muted); }

/* ---------- Checksheet ---------- */
.cs-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.cs-grid th, .cs-grid td { border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); padding: 6px 8px; vertical-align: middle; background: #fff; }
.cs-grid thead th { background: var(--steel); color: #fff; font-weight: 500; font-size: 12px; text-align: center; white-space: nowrap; border-color: var(--steel-3); position: sticky; top: 0; z-index: 2; }
.cs-grid .c-no { width: 38px; text-align: center; color: var(--muted); }
.cs-grid .c-point { min-width: 200px; }
.cs-grid .c-std { min-width: 120px; white-space: nowrap; font-size: 12.5px; }
.cs-grid .c-std .rng { font-weight: 600; }
.cs-grid .c-cell { width: 74px; min-width: 74px; padding: 4px; text-align: center; }
.cs-grid .c-judge { width: 70px; text-align: center; }
.cs-grid .sticky-l { position: sticky; left: 0; z-index: 1; }
.cs-grid thead .sticky-l { z-index: 3; }
.cs-in {
  width: 100%; height: 34px; text-align: center; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink);
}
.cs-in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,106,135,.2); }
.cs-in.okng { cursor: pointer; caret-color: transparent; user-select: none; }
.cs-in.v-ok { background: var(--ok-bg); border-color: #9fd3b2; color: var(--ok-ink); }
.cs-in.v-ng { background: var(--ng-bg); border-color: #eba69e; color: var(--ng-ink); }
.cs-val { display: inline-block; min-width: 46px; padding: 3px 6px; border-radius: 3px; font-weight: 600; }
.cs-val.v-ok { background: var(--ok-bg); color: var(--ok-ink); }
.cs-val.v-ng { background: var(--ng-bg); color: var(--ng-ink); }
.sc-mark { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 5px; border: 1.5px solid var(--ng); color: var(--ng); border-radius: 50%; margin-left: 6px; }
.cs-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.cs-summary .box { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.cs-summary .box span { display: block; font-size: 12px; color: var(--muted); }
.cs-summary .box b { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.legend { font-size: 12px; color: var(--muted); }
.legend kbd { background: var(--concrete); color: var(--ink); border: 1px solid var(--line); box-shadow: none; font-size: 11px; }
.tpl-items td { vertical-align: top; }
.tpl-items .form-control, .tpl-items .form-select { font-size: 13px; padding: 5px 8px; }
.tpl-items { min-width: 1180px; }
.tpl-items .form-select { padding-right: 26px; background-position: right 7px center; }
.tpl-items td:nth-child(2) { min-width: 220px; }
.tpl-items td:nth-child(3) { min-width: 160px; }
.drag-btns { display: flex; gap: 2px; }

/* ---------- Calendar ---------- */
.fc { --fc-border-color: var(--line); --fc-today-bg-color: #fff8de; --fc-button-bg-color: #fff; --fc-button-text-color: var(--ink); --fc-button-border-color: var(--line);
  --fc-button-hover-bg-color: var(--concrete); --fc-button-hover-border-color: var(--line); --fc-button-active-bg-color: var(--primary); --fc-button-active-border-color: var(--primary); font-size: 13px; }
.fc .fc-button-primary:not(:disabled).fc-button-active { color: #fff; }
.fc .fc-toolbar-title { font-family: var(--font-display); font-size: 22px; }
.fc .fc-event { cursor: pointer; }
.fc a.fc-col-header-cell-cushion, .fc a.fc-daygrid-day-number, .fc a.fc-list-day-text, .fc a.fc-list-day-side-text { text-decoration: none; color: var(--ink-2); }
.cal-layers { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.cal-layers label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cal-layers .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); background: var(--concrete); }
.login-art { background: var(--steel); color: #dbe5ea; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: repeating-linear-gradient(-45deg, var(--signal) 0 18px, var(--steel) 18px 36px); }
.login-art h1 { color: #fff; font-size: 44px; line-height: 1.05; max-width: 14ch; margin: 0 0 14px; }
.login-art p { max-width: 46ch; color: #a8bac3; font-size: 15px; }
.login-flow { display: flex; gap: 0; margin-top: 34px; flex-wrap: wrap; }
.login-flow span { font-size: 12.5px; padding: 6px 12px 6px 18px; background: var(--steel-2); color: #dbe5ea; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); margin-right: -4px; }
.login-flow span:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 12px; }
.login-box { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 28px; margin-bottom: 4px; }
@media (max-width: 860px) { .login-page { grid-template-columns: 1fr; } .login-art { padding: 32px 28px 46px; } .login-art h1 { font-size: 32px; } .login-flow { display: none; } }

/* ---------- Tom Select ---------- */
.ts-wrapper.form-select, .ts-wrapper.form-control { padding: 0; }
.ts-control { border-color: var(--line) !important; border-radius: 5px !important; font-size: 14px; min-height: 36px; }
.filter-bar .ts-wrapper { min-width: 190px; }
.filter-bar .ts-control { min-height: 34px; font-size: 13px; }

/* ---------- Print (checksheet / detail) ---------- */
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; font-size: 11px; }
  .sidebar, .topbar, .app-foot, .page-actions, .no-print, .sb-backdrop { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0; }
  .panel { border: 1px solid #999; break-inside: avoid; }
  .print-only { display: block; }
  .cs-grid thead th { background: #ddd !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tag, .cs-val { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sign-row { display: grid !important; }
}
.sign-row { display: grid; grid-template-columns: repeat(3, 160px); justify-content: end; gap: 0; margin-top: 16px; text-align: center; font-size: 12px; }
.sign-row div { border: 1px solid #999; }
.sign-row div span { display: block; border-bottom: 1px solid #999; padding: 4px; }
.sign-row div b { display: block; height: 58px; }
.sign-row div small { display: block; border-top: 1px solid #999; padding: 3px; min-height: 22px; }

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