:root {
  color-scheme: dark;
  --bg: #111215;
  --panel: #1a1c20;
  --surface: #24272e;
  --line: #343740;
  --text: #f3f4f6;
  --muted: #abb0bb;
  --red: #e31837;
  --amber: #efc177;
  --green: #97d8b3;
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #ff7187;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 650;
}
h3 {
  font-size: 1rem;
}
p + p {
  margin-top: 1rem;
}
strong {
  font-weight: 600;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.8125rem;
}
.pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.eyebrow {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 9px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 17px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.3;
  text-align: center;
}
.btn:hover {
  background: #ffffff08;
}
.btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.btn.primary:hover {
  background: #fa2a48;
}
.btn.secondary {
  border-color: var(--line);
  background: var(--panel);
}
.btn.secondary:hover {
  border-color: #6a707d;
  background: var(--surface);
}
.btn.small {
  font-size: 0.875rem;
  min-height: 44px;
  padding: 9px 11px;
}
.btn.icon {
  width: 44px;
  min-width: 44px;
  padding: 0;
  height: 44px;
  font-size: 1.25rem;
}
.btn.danger {
  background: #bc1731;
}
.text-danger {
  color: #ff91a2;
}
.warning-text {
  color: var(--amber);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar {
  display: none;
}
.topbar {
  height: 62px;
  background: #15171b;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
}
.mobile-brand {
  font-size: 0.8125rem;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.desktop-top {
  display: none;
}
.connection {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}
.connection:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
}
.connection.offline {
  color: var(--amber);
}
.connection.offline:before {
  background: var(--amber);
}
main {
  padding: 24px 16px 32px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.page-heading > .btn {
  font-size: 0.875rem;
  padding: 11px;
}
.heading-count {
  font-size: 1rem;
  vertical-align: middle;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: linear-gradient(110deg, #1e2026, #181a1f);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}
.stats > div {
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
}
.stats > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.stats > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.stats > div > span {
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 650;
}
.stats strong {
  display: block;
  font-size: 2rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  margin-top: 10px;
}
.stats small {
  font-size: 0.75rem;
  font-weight: 400;
  margin-left: 8px;
}
.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.filter-bar .search,
.filter-bar > label:last-child {
  grid-column: 1/-1;
}
input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  background: #191c21;
  border: 1px solid #41454f;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 1rem;
}
input::placeholder,
textarea::placeholder {
  color: #a0a5b0;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
input:disabled {
  color: var(--muted);
  background: #14161a;
}
input[type="checkbox"] {
  width: 27px;
  height: 27px;
  min-height: 27px;
  flex-shrink: 0;
  accent-color: var(--red);
  cursor: pointer;
}
.list-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.75rem;
  margin: 20px 0 12px;
}
.list-caption > span:last-child {
  display: none;
}
.machine-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.machine-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 19px;
  overflow: hidden;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.machine-card:hover {
  border-color: #717783;
  transform: translateY(-2px);
}
.machine-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  background: #343a44;
  color: #d9dde5;
  border: 1px solid #414753;
  border-radius: 5px;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.s-in-progress {
  color: #ffb1bf;
  background: #e318371a;
  border-color: #e3183744;
}
.s-waiting-for-parts,
.s-open {
  color: #efc985;
  background: #d99c2414;
  border-color: #b27f2b44;
}
.s-testing {
  color: #b1c8ff;
  background: #4878d520;
  border-color: #698ddb44;
}
.s-completed,
.s-resolved {
  color: #a6dfbe;
  background: #4b99651b;
  border-color: #62bc7844;
}
.s-problem {
  color: #ff95a6;
  background: #8a1b2b66;
  border-color: #e3183766;
}
.control {
  border: 1px solid #484d57;
  border-radius: 4px;
  padding: 2px 7px;
  color: #c8cdd8;
  font:
    0.75rem ui-monospace,
    monospace;
}
.machine-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 27px 0 16px;
}
.machine-symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 51px;
  background: #292c33;
  border: 1px solid #454a54;
  color: #b0b6c2;
  border-radius: 6px;
  font-size: 2rem;
}
.machine-title .eyebrow {
  font-size: 0.6875rem;
  margin-bottom: 4px;
}
.machine-title h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.serial {
  font:
    0.8125rem/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: #d9dce3;
}
.serial span {
  color: var(--muted);
}
.card-arrow {
  margin-left: auto;
  align-self: flex-start;
  color: #a3a9b4;
}
.machine-location {
  font-size: 0.8125rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 19px;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.progress-block + .progress-block {
  margin-top: 16px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  margin-bottom: 8px;
  color: #c9ced7;
}
.progress-label strong {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.percent {
  margin-left: 10px;
  color: var(--muted);
  font-weight: 400;
}
progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #383c45;
}
progress::-webkit-progress-bar {
  background: #383c45;
}
progress::-webkit-progress-value {
  background: var(--red);
  border-radius: 20px;
}
progress::-moz-progress-bar {
  background: var(--red);
}
.machine-card footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.75rem;
  margin-top: 22px;
}
.last-activity {
  background: #15171c;
  border-top: 1px solid var(--line);
  font-size: 0.6875rem;
  color: #adb2bd;
  margin: 17px -19px -19px;
  padding: 12px 19px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.last-activity > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.last-activity time {
  white-space: nowrap;
}
.workspace-footer {
  padding: 18px 20px 110px;
  color: #969da9;
  font-size: 0.6875rem;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: #1a1d23f5;
  backdrop-filter: blur(10px);
  border-top: 1px solid #424753;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.bottom-nav > a,
.bottom-nav > .btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  min-height: 51px;
  padding: 2px;
  border-radius: 8px;
  font-weight: 500;
}
.bottom-nav span {
  font-size: 1.5rem;
  line-height: 1.3;
}
.bottom-nav .selected {
  color: #ff8298;
}
.bottom-nav .bottom-add span {
  background: var(--red);
  border-radius: 7px;
  color: white;
  width: 38px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: -12px;
  margin-bottom: 6px;
}
.machine-heading {
  align-items: flex-start;
}
.heading-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 20px;
}
.quick-actions .btn {
  font-size: 0.8125rem;
  padding: 12px;
}
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin: 0 -16px;
  padding: 0 16px;
  scrollbar-width: thin;
  scrollbar-color: #515764 transparent;
}
.tabs a {
  white-space: nowrap;
  min-height: 50px;
  padding: 13px 15px;
  color: var(--muted);
  font-size: 0.875rem;
  border-bottom: 3px solid transparent;
}
.tabs a[aria-current] {
  border-color: var(--red);
  color: white;
}
.tab-count {
  background: #73303c;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.75rem;
}
.tab-body {
  padding-top: 24px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.section-title .btn {
  font-size: 0.875rem;
  padding: 10px 13px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  min-width: 0;
}
.panel > h2 {
  margin-bottom: 18px;
}
.panel > p {
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.overview-grid,
.admin-grid,
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.progress-link {
  display: block;
  margin-bottom: 22px;
}
.mini-stats {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.mini-stats > span {
  color: var(--muted);
  font-size: 0.75rem;
}
.mini-stats strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text);
}
dl {
  margin: 0;
}
dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 0.875rem;
}
dl > div:last-child {
  border: 0;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  text-align: right;
  max-width: 60%;
  overflow-wrap: anywhere;
}
.general-note {
  padding: 14px;
  background: var(--surface);
  border-radius: 6px;
  margin-top: 16px;
}
.timeline > article {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 15px;
  padding-bottom: 22px;
  position: relative;
}
.timeline > article:before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 0;
  width: 1px;
  background: #464b57;
}
.timeline > article:last-child:before {
  display: none;
}
.timeline-marker {
  width: 9px;
  height: 9px;
  border: 2px solid #9098a6;
  border-radius: 50%;
  margin-top: 7px;
  z-index: 1;
  background: var(--panel);
}
.timeline > article:first-child .timeline-marker {
  border-color: var(--red);
}
.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}
.timeline-meta time {
  font-size: 0.75rem;
  color: var(--muted);
}
.timeline p {
  font-size: 0.875rem;
  margin: 5px 0;
}
.timeline small {
  font-size: 0.75rem;
}
.timeline details {
  margin-top: 10px;
}
.timeline summary {
  font-size: 0.8125rem;
  min-height: 30px;
  color: var(--muted);
  cursor: pointer;
}
.timeline pre {
  font-size: 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 400px;
  overflow: auto;
  background: #111215;
  padding: 12px;
  border-radius: 6px;
}
.log-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.log-filters > input,
.log-filters > select {
  grid-column: 1/-1;
}
.log-filters label {
  font-size: 0.8125rem;
  color: var(--muted);
}
.entry {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 19px;
  margin-bottom: 14px;
}
.entry-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.875rem;
}
.entry > p {
  margin: 18px 0;
}
.entry footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.75rem;
  margin-top: 18px;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.inset {
  background: var(--surface);
  padding: 14px;
  border-radius: 7px;
  font-size: 0.875rem;
  color: #c3c9d3;
}
.open-note {
  border-left: 3px solid var(--amber);
}
.overview-note {
  padding: 12px 16px;
  background: #29261f;
  margin: 10px 0 !important;
}
.overview-note small {
  display: block;
  margin-top: 10px;
}
.checklist-progress {
  padding: 19px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 20px;
}
.checklist-progress progress {
  height: 8px;
}
.complete-banner {
  color: var(--green);
  font-size: 0.875rem;
  margin-top: 16px;
}
.check-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 10px;
}
.check-control {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  min-height: 76px;
  cursor: pointer;
}
.check-control input {
  margin: 0;
}
.check-control strong {
  font-size: 1rem;
  font-weight: 500;
}
.check-control small {
  display: block;
  font-size: 0.75rem;
  margin-top: 5px;
}
.check-actions {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 9px 7px 50px;
}
.check-actions .small {
  font-size: 0.8125rem;
}
.archived {
  margin-top: 22px;
  padding: 15px;
  border: 1px dashed #505764;
  border-radius: 8px;
}
.archived summary {
  min-height: 32px;
  cursor: pointer;
  color: var(--muted);
}
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.admin-row:last-child {
  border: 0;
}
.admin-row > div:first-child {
  flex: 1;
  min-width: 150px;
}
.admin-row small {
  display: block;
  margin-top: 4px;
}
.admin-row strong {
  font-size: 0.875rem;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.attachment {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.attachment img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.attachment-info {
  padding: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  overflow-wrap: anywhere;
}
.attachment-info a {
  font-size: 0.875rem;
}
.attachment-info small {
  font-size: 0.75rem;
}
.document-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.empty {
  border: 1px dashed #444b58;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  grid-column: 1/-1;
}
.empty-icon {
  display: inline-block;
  background: var(--surface);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
  color: #afb7c4;
  margin-bottom: 16px;
}
.empty p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}
.empty .btn {
  margin-top: 20px;
}
.boot {
  text-align: center;
  margin: 30vh auto;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  line-height: 1.35;
}
.brand strong {
  display: block;
  font-size: 1.125rem;
  letter-spacing: 0.025em;
}
.brand-mark {
  height: 40px;
  width: 40px;
  display: grid;
  place-items: center;
  background: var(--red);
  border-radius: 7px;
  color: white;
  font-style: italic;
  font-size: 1.7rem;
  font-weight: 800;
}
.login-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 30px 23px;
  background:
    radial-gradient(ellipse at 0 0, #43182055, transparent 65%), #111215;
}
.login-identity {
  padding-bottom: 50px;
}
.login-lines {
  display: none;
}
.login-panel {
  width: 100%;
  max-width: 430px;
  margin: auto;
  flex: 1;
  padding: 20px 0;
}
.login-panel h1 {
  font-size: 2.25rem;
  margin: 12px 0 15px;
}
.login-panel > p.muted {
  font-size: 0.9375rem;
  margin-bottom: 35px;
}
.login-panel form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-panel form .btn {
  justify-content: space-between;
  height: 52px;
}
.login-foot {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 25px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}
.field > span {
  color: #d1d5dd;
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-error {
  font-size: 0.875rem;
  color: #ff98aa;
  white-space: pre-wrap;
}
.form-error:empty {
  display: none;
}
dialog {
  padding: 0;
  border: 1px solid #505764;
  background: #1b1e24;
  color: var(--text);
  border-radius: 14px;
  width: calc(100% - 24px);
  max-width: 650px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-shadow: 0 30px 100px #0009;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(3px);
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #1b1e24;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.dialog-body {
  padding: 22px 20px;
}
.dialog-foot {
  position: sticky;
  bottom: 0;
  background: #1b1e24;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.dialog-foot .btn {
  flex: 1;
}
.upload-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: #15171c;
  border: 1px dashed #596272;
  border-radius: 8px;
  padding: 18px;
  margin: 20px 0;
}
.camera-label {
  position: relative;
  overflow: hidden;
}
.camera-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
#file-preview {
  width: 100%;
  font-size: 0.875rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
#file-preview img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  margin-top: 15px;
  border-radius: 8px;
}
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  max-width: calc(100% - 32px);
  width: max-content;
  z-index: 100;
  background: #ebedf2;
  color: #181a20;
  padding: 13px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px #0006;
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%);
}
#toast.error {
  background: #6a2032;
  color: white;
}
@media (min-width: 600px) {
  main {
    padding: 30px 26px;
  }
  .machine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats > div {
    padding: 20px;
  }
  .list-caption > span:last-child {
    display: block;
  }
  .filter-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .filter-bar > label:last-child {
    grid-column: auto;
  }
  .tabs {
    margin: 0 -26px;
    padding: 0 26px;
  }
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }
  .dialog-foot .btn {
    flex: none;
  }
  .heading-actions {
    flex-direction: row;
    align-items: center;
  }
  .log-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .log-filters > input,
  .log-filters > select {
    grid-column: span 2;
  }
}
@media (min-width: 1000px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 222px;
    background: #17191e;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 29px 18px;
    z-index: 25;
  }
  .sidebar .brand {
    margin: 0 12px 46px;
  }
  .sidebar-label {
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    color: #a1a8b5;
    padding: 0 13px;
    margin-bottom: 12px;
  }
  .sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .sidebar nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 0.875rem;
    color: var(--muted);
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    min-height: 48px;
  }
  .sidebar nav a span {
    font-size: 1.2rem;
    line-height: 1;
  }
  .sidebar nav a.selected {
    color: white;
    background: #e3183718;
    border-color: #e3183734;
  }
  .sidebar nav a.selected span {
    color: #ff728a;
  }
  .sidebar nav a:hover {
    background: #ffffff07;
  }
  .sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 22px 4px 0;
    display: flex;
    gap: 12px;
    align-items: center;
  }
  .avatar {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    flex-shrink: 0;
    border: 1px solid #555d6b;
    border-radius: 50%;
    background: #2a2e37;
    font-size: 0.875rem;
  }
  .sidebar-bottom strong {
    font-size: 0.8125rem;
  }
  .sidebar-bottom small {
    display: block;
    font-size: 0.6875rem;
  }
  .workspace {
    margin-left: 222px;
  }
  .topbar {
    height: 70px;
    padding: 0 34px;
  }
  .mobile-brand {
    display: none;
  }
  .desktop-top {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
  }
  .desktop-top span {
    margin: 0 16px;
    color: #929aa8;
  }
  .bottom-nav {
    display: none;
  }
  main {
    padding: 32px 34px 36px;
  }
  h1 {
    font-size: 2.25rem;
  }
  .page-heading {
    margin-bottom: 30px;
  }
  .page-heading > .btn {
    padding: 12px 20px;
  }
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
  }
  .stats > div {
    padding: 20px 19px;
    border: 0 !important;
    border-right: 1px solid var(--line) !important;
  }
  .stats > div:last-child {
    border: 0 !important;
  }
  .stats small {
    display: block;
    margin: 5px 0 0;
  }
  .filter-bar {
    grid-template-columns: minmax(190px, 2fr) repeat(4, minmax(100px, 1fr));
  }
  .filter-bar .search {
    grid-column: auto;
  }
  .filter-bar input,
  .filter-bar select {
    font-size: 0.8125rem;
    padding: 10px;
  }
  .machine-grid {
    gap: 20px;
  }
  .workspace-footer {
    padding: 20px 34px 26px;
  }
  .tabs {
    margin: 0 -34px;
    padding: 0 34px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 22px;
  }
  .admin-grid,
  .profile-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .check-control {
    flex: 1;
  }
  .check-actions {
    padding: 10px;
    max-width: 310px;
    justify-content: flex-end;
  }
  .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .login-screen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0;
    background: #111215;
  }
  .login-identity {
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #351720, #1d1f26 70%);
    border-right: 1px solid var(--line);
  }
  .login-identity .brand {
    font-size: 1rem;
  }
  .login-identity .brand strong {
    font-size: 1.5rem;
  }
  .login-identity .brand-mark {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
  .login-lines {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: auto;
    padding: 100px 0 10px;
    color: #c2abb2;
    font:
      0.8125rem ui-monospace,
      monospace;
    letter-spacing: 0.1em;
  }
  .login-panel {
    padding: 60px 35px;
    max-width: 490px;
    align-self: center;
  }
  .login-panel h1 {
    font-size: 2.6rem;
  }
  .login-panel form {
    gap: 10px;
  }
  #toast {
    bottom: 30px;
  }
}
@media (min-width: 1450px) {
  .machine-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats small {
    display: inline;
    margin-left: 10px;
  }
  .sidebar {
    width: 244px;
  }
  .workspace {
    margin-left: 244px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
