* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.site-footer {
  margin-top: 24px;
  padding: 18px 4px 8px;
  color: #64748b;
  font-size: 0.92rem;
  text-align: center;
}

.site-footer p {
  margin: 8px 0 0;
}

.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer-links a {
  color: #2563eb;
  text-decoration: underline;
}

.hero {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.hero-card {
  position: relative;
  width: min(100%, 760px);
  background: linear-gradient(150deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  text-align: center;
}

.hero-admin-trigger {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbeafe;
  color: #64748b;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.hero-admin-trigger span {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.08em;
  transform: translateY(-2px);
}

.hero-admin-trigger:hover {
  transform: translateY(-1px);
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.hero-logo-wrap {
  width: 100%;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}

.hero-logo {
  display: block;
  width: min(100%, 160px);
  max-height: 64px;
  object-fit: contain;
  margin: 0 auto;
}

.hero-card h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-card p {
  margin: 14px auto 0;
  max-width: 700px;
  text-align: center;
  color: #475569;
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  justify-items: center;
  width: 100%;
}

.hero-btn {
  display: grid;
  gap: 4px;
  min-height: 130px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 22px;
  width: min(100%, 540px);
  margin: 0 auto;
  justify-self: center;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
}

.hero-btn-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.hero-btn-sub {
  font-size: 0.95rem;
  line-height: 1.35;
  color: #475569;
}

.hero-btn-primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.hero-btn-primary .hero-btn-sub {
  color: #dbeafe;
}

.hero-btn-secondary {
  background: #ffffff;
  border-color: #bfdbfe;
  color: #0f172a;
}

.hero-btn-secondary:hover {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

.status-hero {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.status-card {
  width: min(100%, 760px);
  background: linear-gradient(150deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 40px 34px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.status-card h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.status-card p {
  margin: 12px auto 0;
  max-width: 560px;
  text-align: center;
  color: #475569;
}

.status-legal-card {
  width: min(100%, 860px);
}

.legal-copy {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  text-align: left;
}

.legal-copy h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}

.legal-copy p {
  margin: 0;
  max-width: none;
  text-align: left;
}

.status-form {
  margin-top: 24px;
}

.status-form label {
  font-size: 0.95rem;
}

.status-form input {
  margin-top: 8px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #93c5fd;
  border-radius: 12px;
  font-size: 1.03rem;
}

.status-form input:focus {
  outline: 2px solid #bfdbfe;
  outline-offset: 1px;
}

.status-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-result .kv {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 10px 12px;
}

.mech-hero {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.mech-card {
  width: min(100%, 980px);
  background: linear-gradient(155deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.mech-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.mech-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.3vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.mech-header p {
  margin: 8px 0 0;
  color: #475569;
}

.mech-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mech-list {
  display: grid;
  gap: 10px;
}

.mech-bulk-form {
  display: grid;
  gap: 12px;
}

.mech-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mech-tag-layout {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 0.92rem;
}

.mech-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid #bfdbfe;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 16px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mech-row:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.mech-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.mech-check input {
  width: 18px;
  height: 18px;
}

.mech-row-main {
  flex: 1;
  min-width: 0;
}

.mech-row-main small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.mech-job-number {
  font-size: 1.05rem;
  color: #0f172a;
}

.mech-customer {
  margin-top: 2px;
  color: #1f2937;
}

.mech-status {
  white-space: nowrap;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.86rem;
  font-weight: 600;
}

.mech-status-default {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.mech-status-reserved {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #6d28d9;
}

.mech-status-received {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.mech-status-progress {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.mech-status-parts {
  background: #ffedd5;
  border-color: #fdba74;
  color: #c2410c;
}

.mech-status-ready {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.mech-status-issued {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.mech-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-with-badge {
  position: relative;
  padding-right: 40px;
}

.nav-count-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.22);
}

.mech-empty {
  text-align: center;
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  background: #ffffff;
  color: #475569;
  padding: 22px;
}

.jobnew-hero {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  padding: 14px 0 20px;
}

.jobnew-card {
  width: min(100%, 920px);
  margin: 0 auto;
  background: linear-gradient(155deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.jobnew-header {
  text-align: center;
  margin-bottom: 20px;
}

.jobnew-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.jobnew-header p {
  margin: 8px 0 0;
  color: #475569;
}

.jobnew-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.jobnew-section {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.jobnew-section h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: #1e3a8a;
}

.jobnew-checks {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 10px;
}

.jobnew-checks label {
  color: #334155;
}

.jobnew-field {
  margin-bottom: 12px;
}

.jobnew-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #374151;
}

.field-hint,
.section-text {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.jobnew-signatures {
  margin-top: 4px;
}

.jobnew-signature-card {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
}

.jobnew-signature-card h3 {
  margin: 0;
  font-size: 1rem;
  color: #1e3a8a;
}

.jobnew-signature-card p {
  margin: 6px 0 8px;
  color: #475569;
  font-size: 0.9rem;
}

.jobnew-signature-pad {
  width: 100%;
  height: 170px;
  background: #ffffff;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.jobnew-sign-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.jobnew-file-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  background: #ffffff;
}

.photo-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.photo-input-hidden {
  position: relative;
}

.photo-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.photo-preview-card-wide {
  grid-column: 1 / -1;
}

.photo-input-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.photo-input-card strong {
  color: #1e3a8a;
  font-size: 0.95rem;
}

.photo-preview-header {
  display: grid;
  gap: 4px;
}

.photo-input-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-input-controls-stack {
  display: grid;
  grid-template-columns: 1fr;
}

.photo-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}

.photo-action-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 18px;
  line-height: 1;
}

.photo-upload-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.photo-upload-form label {
  flex: 1;
  min-width: min(100%, 320px);
  margin-bottom: 0;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 160px));
  gap: 10px;
  align-items: start;
}

.photo-preview-empty {
  padding: 14px;
  border: 1px dashed #bfdbfe;
  border-radius: 10px;
  color: #64748b;
  background: #ffffff;
}

.photo-preview-item {
  margin: 0;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  width: 160px;
  max-width: 100%;
  position: relative;
}

.photo-preview-image {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  background: #e2e8f0;
}

.photo-preview-meta {
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #475569;
  word-break: break-word;
}

.photo-preview-toggle {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.photo-preview-toggle input {
  margin: 0;
  width: 16px;
  height: 16px;
}

.job-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.job-photo-card {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.job-photo-card a {
  display: block;
  background: #e2e8f0;
}

.job-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.job-photo-meta {
  padding: 10px 12px 0;
  color: #0f172a;
}

.job-photo-meta small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.job-photo-card form {
  padding: 12px;
}

.jobnew-stamp-preview {
  margin-top: 10px;
  min-height: 170px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #64748b;
  padding: 8px;
}

.jobnew-stamp-preview img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.signature {
  margin-top: 12px;
}

.signature span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #64748b;
}

.signature-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.center {
  text-align: center;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.job-row:hover {
  background: #f9fafb;
}

.warranty-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.warranty-template-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(150deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.warranty-template-card strong {
  color: #0f172a;
}

.warranty-template-card span {
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.4;
}

.warranty-template-card-alt {
  border-color: #fde68a;
  background: linear-gradient(150deg, #fffdf2 0%, #fef3c7 100%);
}

.warranty-repair-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
}

.warranty-repair-badge-small {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.warranty-repair-badge-large {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.warranty-repair-badge-parts {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.warranty-invoice-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
}

.warranty-invoice-badge-open {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.warranty-invoice-badge-done {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.warranty-protocol-open {
  border-left: 5px solid #6366f1;
}

.warranty-protocol-invoiced {
  border-left: 5px solid #22c55e;
  background: linear-gradient(180deg, #ffffff 0%, #f6fff8 100%);
}

.btn {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.btn-secondary:hover {
  background: #f9fafb;
}

.btn-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions form,
.mech-actions form {
  margin: 0;
}

.inline-form {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form-label {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #374151;
  font-size: 14px;
}

.form label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #374151;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checks {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.checks label {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checks input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.inventory-shell {
  width: min(100%, 900px);
}

.inventory-new-session {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}

.inventory-new-session label {
  margin: 0;
}

.inventory-session-list,
.inventory-item-list {
  display: grid;
  gap: 10px;
}

.inventory-session-row,
.inventory-item-row,
.inventory-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.inventory-session-row:hover,
.inventory-summary-row:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.inventory-session-row span,
.inventory-item-row > span,
.inventory-summary-row span {
  display: grid;
  gap: 4px;
}

.inventory-session-row small,
.inventory-item-row small,
.inventory-summary-row small {
  color: #64748b;
}

.inventory-session-progress {
  min-width: 110px;
  text-align: right;
  font-size: 1.05rem;
  font-weight: 700;
}

.inventory-item-form {
  border-color: #bfdbfe;
}

.inventory-warehouse-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px dashed #93c5fd;
  border-radius: 12px;
  background: #f8fbff;
}

.inventory-warehouse-form label {
  margin: 0;
}

.inventory-item-actions {
  display: flex !important;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px !important;
}

.inventory-item-actions form {
  margin: 0;
}

.inventory-item-inactive {
  opacity: 0.55;
}

.inventory-progress {
  height: 10px;
  overflow: hidden;
  margin: 4px 0 20px;
  border-radius: 999px;
  background: #e2e8f0;
}

.inventory-progress span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: #22c55e;
  transition: width 0.2s ease;
}

.inventory-version-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
}

.inventory-count-form {
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #ffffff;
}

.inventory-bulk-panel {
  padding: 20px;
  margin-bottom: 18px;
  border: 2px solid #bbf7d0;
  border-radius: 16px;
  background: #f0fdf4;
}

.inventory-bulk-heading h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.inventory-bulk-heading p {
  margin: 0 0 14px;
  color: #475569;
}

.inventory-bulk-panel textarea {
  width: 100%;
  min-height: 130px;
  padding: 14px;
  border: 1px solid #86efac;
  border-radius: 14px;
  font: inherit;
  resize: vertical;
}

.inventory-bulk-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.inventory-bulk-actions .inventory-voice-btn {
  margin: 0;
  max-width: none;
}

.inventory-bulk-actions .btn {
  min-height: 58px;
}

.inventory-bulk-review {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #bbf7d0;
}

.inventory-bulk-review[hidden] {
  display: none;
}

.inventory-bulk-review h3 {
  margin: 0;
}

.inventory-bulk-table {
  display: grid;
  gap: 8px;
}

.inventory-bulk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 160px) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dcfce7;
  border-radius: 12px;
  background: #ffffff;
}

.inventory-bulk-row > div {
  display: grid;
  gap: 4px;
}

.inventory-bulk-row small {
  color: #64748b;
}

.inventory-bulk-row label {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
}

.inventory-bulk-row input[type="number"] {
  margin-top: 4px;
  min-height: 46px;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
}

.inventory-bulk-warnings {
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
}

.inventory-code-search {
  padding: 20px;
  margin-bottom: 18px;
  border: 2px solid #60a5fa;
  border-radius: 16px;
  background: #eff6ff;
}

.inventory-code-search > label {
  max-width: 460px;
  margin: 0 auto 10px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
}

.form .inventory-code-search input,
.inventory-code-search input {
  min-height: 72px;
  border: 2px solid #60a5fa;
  border-radius: 14px;
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
}

.inventory-code-voice {
  margin-top: 8px;
}

.inventory-find-btn {
  display: block;
  width: 100%;
  max-width: 460px;
  min-height: 52px;
  margin: 4px auto 0;
  text-align: center;
}

.inventory-camera-btn {
  display: grid !important;
  place-items: center;
  width: 100%;
  max-width: 460px;
  min-height: 58px;
  margin: 12px auto 4px !important;
  border: 1px solid #2563eb;
  border-radius: 14px;
  background: #ffffff;
  color: #1d4ed8 !important;
  font-weight: 800 !important;
  cursor: pointer;
}

.inventory-camera-btn input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0 !important;
}

.inventory-ocr-status {
  min-height: 24px;
  margin: 6px 0 10px;
  color: #475569;
  text-align: center;
}

.inventory-entered {
  margin: 22px 0;
  padding-top: 18px;
  border-top: 1px solid #dbeafe;
}

.inventory-entered h2 {
  margin: 0;
  font-size: 1.25rem;
}

.inventory-entered > p {
  margin: 6px 0 14px;
  color: #64748b;
}

.inventory-entered > div {
  display: grid;
  gap: 8px;
}

.inventory-entered .inventory-summary-row {
  padding: 0;
  overflow: hidden;
}

.inventory-entered .inventory-summary-row > a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
}

.inventory-session-tools {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #ffffff;
}

.inventory-session-tools h2 {
  margin: 0;
  font-size: 1.25rem;
}

.inventory-session-tools p {
  margin: 0;
  color: #64748b;
}

.inventory-session-tools form {
  margin: 0;
}

.inventory-session-rename {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.inventory-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
}

.inventory-row-actions form {
  margin: 0;
}

.inventory-row-actions .btn {
  min-height: 42px;
}

.inventory-danger-btn {
  color: #b91c1c;
  border-color: #fecaca;
}

.inventory-current-item {
  display: grid;
  gap: 5px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.inventory-current-item > span {
  color: #2563eb;
  font-weight: 700;
}

.inventory-current-item strong {
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
}

.inventory-current-item p,
.inventory-current-item small {
  margin: 0;
  color: #64748b;
}

.inventory-quantity-label {
  text-align: center;
  font-size: 1rem !important;
  font-weight: 700;
}

.inventory-quantity-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px auto 0;
  max-width: 460px;
}

.form .inventory-quantity-wrap input {
  min-height: 86px;
  margin: 0;
  border: 2px solid #60a5fa;
  border-radius: 14px;
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
}

.inventory-quantity-wrap span {
  min-width: 52px;
  color: #475569;
  font-size: 1.2rem;
}

.inventory-voice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 460px;
  min-height: 58px;
  margin: 12px auto 4px;
  border: 0;
  border-radius: 14px;
  background: #dc2626;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.inventory-voice-btn.is-listening {
  background: #991b1b;
  box-shadow: 0 0 0 5px #fecaca;
}

.inventory-voice-status {
  min-height: 24px;
  margin-bottom: 12px;
  color: #64748b;
  text-align: center;
}

.inventory-count-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.inventory-count-actions .btn {
  min-height: 54px;
  display: grid;
  place-items: center;
  text-align: center;
}

.inventory-summary {
  margin: 18px 0;
}

.inventory-summary summary {
  padding: 12px 0;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
}

.inventory-summary > div {
  display: grid;
  gap: 8px;
}

.inventory-summary-row.is-counted {
  border-left: 5px solid #22c55e;
}

.inventory-summary-row.has-multiple-places {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.inventory-summary-row.inventory-just-saved {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.inventory-multi-place {
  color: #92400e;
  font-style: normal;
  font-weight: 700;
}

.inventory-auto-saved-label {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
}

.kv {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.kv span {
  color: #6b7280;
  font-size: 13px;
}

.signature img {
  max-height: 90px;
  max-width: 280px;
  border: 0;
  border-radius: 0;
}

.print-container {
  max-width: 960px;
  overflow-x: hidden;
}

.print-card h1 {
  margin: 0 0 10px;
}

.print-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 8px;
}

.print-logo {
  width: 260px;
  max-width: 100%;
  height: auto;
}

.print-logo-placeholder {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
}

.signatures {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.sig-box {
  border: 1px solid #d1d5db;
  height: 100px;
  margin-top: 8px;
  padding: 8px;
}

.sig-img {
  max-height: 80px;
}

.print-qr {
  margin-top: 18px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 12px;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.print-qr img {
  width: 170px;
  height: 170px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.print-qr-top {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
  justify-items: end;
}

.print-qr-top img {
  width: 145px;
  height: 145px;
}

.print-qr small {
  color: #475569;
  word-break: break-all;
}

.warranty-print-head {
  margin-bottom: 18px;
  width: 100%;
  display: table;
  table-layout: fixed;
}

.warranty-service-meta {
  display: table-cell;
  vertical-align: top;
  text-align: right;
  color: #0f172a;
}

.warranty-service-meta strong,
.warranty-service-meta span {
  display: block;
}

.warranty-service-meta span {
  color: #475569;
}

.warranty-print-card {
  padding: 28px;
}

.warranty-print-block {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.warranty-print-grid {
  margin-top: 12px;
}

.warranty-signatures {
  grid-template-columns: minmax(0, 1fr);
  max-width: 380px;
}

.warranty-print-alza {
  border-color: transparent;
  background: #ffffff;
  font-family: "Times New Roman", Times, serif;
  font-size: 11pt;
  line-height: 1.35;
}

.warranty-alza-doc {
  color: #000000;
}

.warranty-alza-title-row {
  margin-bottom: 12px;
  font-size: 14pt;
}

.warranty-alza-dates-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  margin-bottom: 18px;
}

.warranty-alza-dates-left,
.warranty-alza-dates-right {
  display: grid;
  gap: 6px;
}

.warranty-alza-dates-right {
  justify-items: start;
}

.warranty-alza-gap {
  height: 10px;
}

.warranty-alza-gap-lg {
  height: 28px;
}

.warranty-alza-line {
  margin-bottom: 8px;
}

.warranty-alza-strike {
  text-decoration: line-through;
}

.warranty-alza-work-text {
  margin: 6px 0 12px;
  min-height: 18px;
}

.warranty-alza-notes {
  margin-top: 6px;
  font-size: 10pt;
  line-height: 1.35;
  display: grid;
  gap: 2px;
}

.warranty-alza-service-footer {
  margin-top: 18px;
  text-align: center;
  display: grid;
  gap: 4px;
}

.warranty-alza-service-name {
  margin-bottom: 8px;
}

.warranty-alza-bottom-copy {
  margin-top: 18px;
  display: grid;
  gap: 6px;
}

.warranty-alza-signature-wrap {
  margin-top: 24px;
  min-height: 70px;
}

.print-body-warranty .warranty-print-card {
  width: min(100%, 210mm);
  max-width: 210mm;
  margin: 0 auto;
  padding: 28px;
  background: #ffffff;
}

.print-body-warranty .print-grid,
.print-body-warranty .signatures,
.print-body-warranty .warranty-alza-dates-grid,
.print-body-warranty .warranty-alza-dates-left,
.print-body-warranty .warranty-alza-dates-right,
.print-body-warranty .warranty-alza-notes,
.print-body-warranty .warranty-alza-bottom-copy {
  display: block;
}

.print-body-warranty .print-head > * + *,
.print-body-warranty .warranty-service-meta > * + *,
.print-body-warranty .print-grid > * + *,
.print-body-warranty .signatures > * + *,
.print-body-warranty .warranty-alza-dates-left > * + *,
.print-body-warranty .warranty-alza-dates-right > * + *,
.print-body-warranty .warranty-alza-notes > * + *,
.print-body-warranty .warranty-alza-bottom-copy > * + * {
  margin-top: 6px;
}

.print-body-warranty .warranty-service-meta {
  margin-top: 0;
  min-width: 220px;
  display: table-cell;
  vertical-align: top;
  text-align: right;
}

.print-body-warranty .print-logo {
  width: min(46vw, 260px);
  display: table-cell;
  vertical-align: top;
}

.print-body-warranty .warranty-alza-dates-grid {
  margin-bottom: 18px;
}

.print-body-warranty .warranty-alza-dates-right {
  margin-top: 14px;
}

.print-body-warranty .signatures {
  max-width: 380px;
  break-inside: avoid;
  page-break-inside: avoid;
  margin-top: 8px;
}

.print-body-warranty .sig-box {
  min-height: 48px;
  height: auto;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-body-warranty .warranty-alza-signature-wrap,
.print-body-warranty .sig-img {
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-body-warranty .sig-img {
  display: block;
  width: auto;
  max-width: 220px;
  max-height: 56px;
}

.print-body-warranty .warranty-alza-signature-wrap {
  margin-top: 12px;
  min-height: 48px;
}

.bulk-tags {
  display: grid;
  gap: 10px;
}

.bulk-tags.horizontal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bulk-tags.vertical {
  grid-template-columns: 1fr;
}

.tag-label {
  width: 63.5mm;
  height: 38.1mm;
  padding: 2.2mm 2.1mm 2.2mm 3.6mm;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.55mm;
  align-content: start;
  background: #ffffff;
  overflow: hidden;
}

.tag-label-header {
  display: block;
  padding-right: 24.8mm;
}

.tag-label-number {
  font-size: 14.8pt;
  font-weight: 700;
  line-height: 1.05;
  min-width: 0;
}

.tag-label-body {
  display: grid;
  align-content: start;
  gap: 0.5mm;
  min-height: 0;
  padding-right: 24.8mm;
}

.tag-label-kv {
  font-size: 8.6pt;
  color: #0f172a;
  line-height: 1.1;
  min-width: 0;
}

.tag-label-kv span {
  color: #64748b;
}

.tag-label-kv strong {
  word-break: break-word;
}

.tag-label-dates {
  font-size: 7.8pt;
}

.tag-label-issue strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tag-label-qr {
  width: 24mm;
  height: 24mm;
  position: absolute;
  top: 1.6mm;
  right: 1.4mm;
  z-index: 2;
  background: #ffffff;
}

.label-sheet-meta {
  margin-bottom: 12px;
  color: #475569;
  font-size: 0.95rem;
}

.label-preview {
  display: grid;
  gap: 14px;
}

.label-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.label-preview-toolbar h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
}

.label-preview-toolbar p {
  margin: 6px 0 0;
  color: #475569;
}

.label-preview-status {
  color: #334155;
  font-size: 0.95rem;
  white-space: nowrap;
}

.label-preview-sheet {
  display: grid;
  justify-items: center;
}

.label-print-layout {
  display: grid;
  justify-items: center;
}

.print-body .print-card-labels .label-print-layout {
  display: block;
  width: 210mm;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: #ffffff;
  transform-origin: top left;
  transform: translate(-5mm, -7mm) scale(1.14);
}

.print-body .print-card-labels .label-sheet {
  width: 210mm;
  aspect-ratio: auto;
  min-height: 297mm;
  height: 297mm;
  margin: 0;
  padding: 14.5mm 7mm;
  grid-template-columns: repeat(3, 63.5mm);
  grid-auto-rows: 38.1mm;
  column-gap: 2.5mm;
  row-gap: 0;
  overflow: hidden;
  background: #ffffff;
}

.print-body .print-card-labels .label-sheet-cell {
  width: 63.5mm;
  height: 38.1mm;
  background: #ffffff;
}

.print-body .print-card-labels .tag-label {
  width: 63.5mm;
  height: 38.1mm;
  padding: 2mm 1.6mm 2mm 1.6mm;
  gap: 0.35mm;
}

.print-body .print-card-labels .tag-label-header {
  padding-right: 18.5mm;
}

.print-body .print-card-labels .tag-label-body {
  padding-right: 18.5mm;
  gap: 0.35mm;
}

.print-body .print-card-labels .tag-label-kv {
  font-size: 7.6pt;
  line-height: 1.02;
}

.print-body .print-card-labels .tag-label-dates {
  font-size: 7.1pt;
}

.print-body .print-card-labels .tag-label-number {
  font-size: 13.2pt;
}

.print-body .print-card-labels .tag-label-qr {
  width: 17mm;
  height: 17mm;
  top: 1.7mm;
  right: 6.3mm;
}

.label-sheet {
  width: min(100%, 210mm);
  aspect-ratio: 210 / 297;
  min-height: 297mm;
  margin: 0 auto;
  padding: 5.72% 3.33% 4.48%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 12.828%;
  column-gap: 1.19%;
  row-gap: 0;
  background:
    linear-gradient(to right, transparent 0, transparent calc(63.5mm * 3 + 2.5mm * 2), transparent 100%);
}

.label-sheet-cell {
  width: auto;
  height: auto;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.label-sheet-cell.is-empty {
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.7);
}

.label-preview-sheet .label-sheet-cell {
  cursor: pointer;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.label-preview-sheet .tag-label {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 1.2mm 1.1mm 1.2mm 2mm;
  gap: 0.18mm;
}

.label-preview-sheet .tag-label-header {
  padding-right: 15.2mm;
}

.label-preview-sheet .tag-label-body {
  gap: 0.16mm;
  padding-right: 15.2mm;
}

.label-preview-sheet .tag-label-number {
  font-size: 10pt;
  line-height: 1;
}

.label-preview-sheet .tag-label-kv {
  font-size: 6.5pt;
  line-height: 1.05;
}

.label-preview-sheet .tag-label-dates {
  font-size: 5.9pt;
}

.label-preview-sheet .tag-label-qr {
  width: 14.8mm;
  height: 14.8mm;
  top: 1.2mm;
  right: 1.1mm;
}

.label-preview-sheet .label-sheet-cell:hover {
  box-shadow: inset 0 0 0 2px #60a5fa;
}

.label-preview-sheet .label-sheet-cell::before {
  content: attr(data-label-position);
  position: absolute;
  top: 2mm;
  right: 2mm;
  min-width: 5mm;
  height: 5mm;
  padding: 0 1.2mm;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 8pt;
  line-height: 5mm;
  text-align: center;
}

.label-preview-sheet .label-sheet-cell.is-start {
  box-shadow: inset 0 0 0 2px #2563eb;
  background: rgba(219, 234, 254, 0.45);
}

.label-preview-sheet .label-sheet-cell.is-start::before {
  background: #2563eb;
}

.print-page-break {
  break-after: page;
  page-break-after: always;
}

.tag-number {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 8px;
}

.notice {
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
  border: 1px solid transparent;
}

.notice-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.notice-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.notice-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .site-footer {
    margin-top: 18px;
    padding-top: 14px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: auto;
    padding: 16px 0 10px;
  }

  .hero-card {
    padding: 28px 18px;
    border-radius: 16px;
  }

  .hero-admin-trigger {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .hero-logo-wrap {
    margin-bottom: 18px;
  }

  .hero-logo {
    width: min(100%, 132px);
    max-height: 52px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-btn {
    min-height: 112px;
    padding: 16px;
    width: 100%;
  }

  .status-hero {
    min-height: auto;
    padding: 16px 0 10px;
  }

  .status-card {
    padding: 26px 16px;
    border-radius: 16px;
  }

  .mech-hero {
    min-height: auto;
    padding: 16px 0 10px;
  }

  .mech-card {
    padding: 22px 14px;
    border-radius: 16px;
  }

  .mech-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .mech-actions {
    width: 100%;
  }

  .mech-actions .btn {
    flex: 1;
    text-align: center;
  }

  .mech-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .mech-bulk-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mech-tag-layout {
    width: 100%;
  }

  .inline-form {
    width: 100%;
  }

  .inline-form-label {
    width: 100%;
  }

  .label-preview-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .bulk-tags.horizontal {
    grid-template-columns: 1fr;
  }

  .jobnew-card {
    padding: 20px 14px;
    border-radius: 16px;
  }

  .jobnew-header {
    margin-bottom: 14px;
  }

  .jobnew-actions {
    width: 100%;
  }

  .jobnew-actions .btn {
    flex: 1;
    text-align: center;
  }

  .jobnew-section {
    padding: 12px;
    border-radius: 12px;
  }

  .jobnew-signature-pad {
    height: 150px;
  }

  .photo-upload-form {
    align-items: stretch;
  }

  .photo-input-grid {
    grid-template-columns: 1fr;
  }

  .photo-input-controls {
    flex-direction: column;
  }

  .photo-upload-form .btn {
    width: 100%;
    text-align: center;
  }

  .jobnew-stamp-preview {
    min-height: 150px;
  }

  .signature-list {
    grid-template-columns: 1fr;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .inventory-new-session {
    grid-template-columns: 1fr;
  }

  .inventory-warehouse-form {
    grid-template-columns: 1fr;
  }

  .inventory-new-session .btn {
    min-height: 50px;
  }

  .inventory-session-row,
  .inventory-item-row {
    align-items: flex-start;
  }

  .inventory-item-row {
    flex-direction: column;
  }

  .inventory-item-actions {
    width: 100%;
    grid-auto-flow: initial;
    grid-template-columns: 1fr 1fr;
  }

  .inventory-item-actions .btn,
  .inventory-item-actions form {
    width: 100%;
    text-align: center;
  }

  .inventory-item-actions form .btn {
    width: 100%;
  }

  .inventory-count-form {
    padding: 16px 12px;
  }

  .inventory-bulk-panel {
    padding: 16px 12px;
  }

  .inventory-bulk-actions,
  .inventory-bulk-row {
    grid-template-columns: 1fr;
  }

  .inventory-bulk-row .btn {
    width: 100%;
  }

  .inventory-entered .inventory-summary-row {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-entered .inventory-summary-row > a {
    width: 100%;
  }

  .inventory-row-actions {
    width: 100%;
    padding: 0 12px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .inventory-row-actions .btn,
  .inventory-row-actions form {
    width: 100%;
    text-align: center;
  }

  .inventory-row-actions form .btn {
    width: 100%;
  }

  .inventory-session-rename {
    grid-template-columns: 1fr;
  }

  .print-container {
    max-width: 100%;
  }

  .btn-icon {
    width: 44px;
    min-width: 44px;
  }

  .print-card {
    overflow: hidden;
  }

  .print-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .print-logo {
    width: min(100%, 240px);
  }

  .print-grid,
  .signatures {
    grid-template-columns: 1fr;
  }

  .print-qr-top {
    justify-items: start;
    width: 100%;
  }

  .print-qr-top img,
  .print-qr img {
    width: min(100%, 145px);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .label-preview {
    overflow: hidden;
  }

  .label-sheet {
    min-height: auto;
  }

  .tag-label {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 1.4mm 1.7mm;
    overflow: hidden;
    gap: 0.6mm;
  }

  .tag-label-number {
    font-size: clamp(7px, 2.4vw, 10px);
    line-height: 1;
  }

  .tag-label-kv {
    font-size: clamp(5px, 1.6vw, 7px);
    overflow: hidden;
    white-space: normal;
    line-height: 1.02;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .tag-label-dates {
    font-size: clamp(4.6px, 1.35vw, 6px);
  }

  .label-preview-sheet .tag-label-qr {
    display: none;
  }

  .tag-label-qr {
    width: clamp(14mm, 22vw, 24mm);
    height: clamp(14mm, 22vw, 24mm);
  }

  .label-preview-sheet .label-sheet-cell::before {
    top: 1.2mm;
    right: 1.2mm;
    min-width: 4.2mm;
    height: 4.2mm;
    font-size: clamp(6px, 1.8vw, 8px);
    line-height: 4.2mm;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
    background: #ffffff !important;
  }

  html,
  body {
    background: #ffffff !important;
    margin: 0;
    padding: 0;
  }

  html,
  body,
  .print-body {
    width: auto;
    min-height: 0;
    height: auto;
    overflow: visible;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .container {
    max-width: none;
    padding: 0;
    background: #ffffff !important;
  }

  .card {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
  }

  .topbar,
  .btn,
  .btn-icon {
    display: none !important;
  }

  .label-preview-toolbar,
  .label-preview-status {
    display: none !important;
  }

  .label-preview-sheet .label-sheet-cell {
    cursor: default;
    transition: none;
  }

  .label-preview-sheet .label-sheet-cell::before {
    display: none;
  }

  .label-preview-sheet .label-sheet-cell.is-start {
    box-shadow: none;
    background: #ffffff !important;
  }

  .print-container {
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
    overflow: visible;
    background: #ffffff !important;
  }

  .print-card-labels {
    width: auto;
    max-width: none;
    min-height: 0;
    height: auto;
    overflow: visible;
    break-inside: avoid;
    break-after: avoid-page;
    page-break-after: avoid;
    background: #ffffff !important;
  }

  .print-card-labels .label-preview,
  .print-card-labels .label-preview-sheet {
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #ffffff !important;
  }

  .print-card-labels .label-print-layout {
    display: block;
    width: 210mm;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: #ffffff !important;
    transform-origin: top left;
    transform: translate(-5mm, -7mm) scale(1.14);
  }

  .print-card-labels .label-preview-sheet {
    display: block;
    width: 210mm;
    justify-items: initial;
  }

  .print-card {
    font-size: 12px;
    line-height: 1.28;
    break-inside: avoid;
    page-break-inside: avoid;
    background: #ffffff !important;
  }

  .print-body-warranty .warranty-print-card {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 20px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-body-warranty .print-head {
    display: table !important;
    width: 100%;
    table-layout: fixed;
  }

  .print-body-warranty .print-grid,
  .print-body-warranty .signatures,
  .print-body-warranty .warranty-alza-dates-grid,
  .print-body-warranty .warranty-alza-dates-left,
  .print-body-warranty .warranty-alza-dates-right,
  .print-body-warranty .warranty-alza-notes,
  .print-body-warranty .warranty-alza-bottom-copy {
    display: block !important;
  }

  .print-body-warranty .print-head > * + *,
  .print-body-warranty .warranty-service-meta > * + *,
  .print-body-warranty .print-grid > * + *,
  .print-body-warranty .signatures > * + *,
  .print-body-warranty .warranty-alza-dates-left > * + *,
  .print-body-warranty .warranty-alza-dates-right > * + *,
  .print-body-warranty .warranty-alza-notes > * + *,
  .print-body-warranty .warranty-alza-bottom-copy > * + * {
    margin-top: 6px;
  }

  .print-body-warranty .warranty-service-meta {
    margin-top: 0;
    min-width: 220px;
    display: table-cell !important;
    vertical-align: top;
    text-align: right;
  }

  .print-body-warranty .print-logo {
    width: 240px;
    display: table-cell;
    vertical-align: top;
  }

  .print-body-warranty .warranty-service-meta strong,
  .print-body-warranty .warranty-service-meta span {
    display: block !important;
  }

  .print-body-warranty .signatures,
  .print-body-warranty .sig-box,
  .print-body-warranty .warranty-alza-signature-wrap,
  .print-body-warranty .sig-img {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .print-body-warranty .sig-box {
    min-height: 48px !important;
    height: auto !important;
  }

  .print-body-warranty .sig-img {
    display: block !important;
    width: auto !important;
    max-width: 220px !important;
    max-height: 56px !important;
  }

  .print-body-warranty .warranty-alza-signature-wrap {
    margin-top: 12px !important;
    min-height: 48px !important;
  }

  .print-body-warranty .warranty-alza-dates-grid {
    margin-bottom: 18px;
  }

  .print-body-warranty .warranty-alza-dates-right {
    margin-top: 12px;
  }

  .print-card h1 {
    margin-bottom: 6px;
    font-size: 20px;
  }

  .print-logo {
    width: 240px;
  }

  .kv {
    margin-bottom: 6px;
  }

  .kv span {
    font-size: 11px;
  }

  .signatures {
    margin-top: 10px;
    gap: 12px;
  }

  .sig-box {
    border: 0;
    height: 62px;
    margin-top: 4px;
    padding: 0;
  }

  .sig-img {
    max-height: 56px;
  }

  .print-qr-top img {
    width: 128px;
    height: 128px;
  }

  .print-qr {
    margin-top: 8px;
  }

  .label-sheet-meta {
    display: none;
  }

  .label-sheet {
    width: 210mm;
    aspect-ratio: auto;
    margin: 0;
    min-height: 297mm;
    height: 297mm;
    padding: 14.5mm 7mm;
    grid-template-columns: repeat(3, 63.5mm);
    grid-auto-rows: 38.1mm;
    column-gap: 2.5mm;
    break-inside: avoid;
    break-after: avoid-page;
    page-break-inside: avoid;
    page-break-after: avoid;
    overflow: hidden;
    background: #ffffff !important;
  }

  .label-sheet-cell {
    width: 63.5mm;
    height: 38.1mm;
    background: #ffffff !important;
  }

  .tag-label {
    width: 63.5mm;
    height: 38.1mm;
    padding: 2mm 1.6mm 2mm 1.6mm;
  }

  .tag-label-header {
    padding-right: 18.5mm;
  }

  .tag-label-body {
    padding-right: 18.5mm;
    gap: 0.35mm;
  }

  .tag-label-kv {
    font-size: 7.6pt;
    line-height: 1.02;
  }

  .tag-label-dates {
    font-size: 7.1pt;
  }

  .tag-label-number {
    font-size: 13.2pt;
  }

  .tag-label-qr {
    width: 17mm;
    height: 17mm;
    top: 1.7mm;
    right: 6.3mm;
  }

  .label-sheet-cell.is-empty {
    border: 0;
    background: #ffffff !important;
    box-shadow: none !important;
    outline: 0 !important;
  }
}
