:root {
      --blue: #006eb8;
      --bg: #f7f8fc;
      --card: #ffffff;
      --muted: #5b6775;
      --border: #d0d7de;
    }
    body { font-family: "Segoe UI", Tahoma, sans-serif; background: var(--bg); padding: 10px; }
    .container {
      max-width: 980px; margin: auto; background: var(--card);
      border-radius: 12px; box-shadow: 0 0 10px rgba(0,0,0,0.10); padding: 18px 20px 22px;
    }
    .brand {
      display:flex; align-items:center; justify-content:center;
      padding: 8px 6px 6px;
      border-bottom: 1px solid rgba(0,0,0,0.06);
      margin-bottom: 12px;
    }
    .brand img { max-width: 520px; width: 100%; height: auto; }
    h1 { text-align:center; color: var(--blue); margin: 10px 0 0; font-size: 1.35rem; }
    h2 { margin-top: 18px; color:#333; font-size: 1.12rem; }
    label { font-weight: 600; margin-top: 10px; display:block; }
    input, select, textarea {
      width: 100%; box-sizing: border-box; padding: 10px 12px;
      border: 1px solid var(--border); border-radius: 10px;
      margin-top: 6px; font-size: 1rem;
    }
    textarea { resize: vertical; }
    button {
      padding: 12px 16px; border: none; border-radius: 10px;
      margin-top: 14px; font-size: 1.02rem; cursor: pointer;
    }
    .btn-primary { background: var(--blue); color: #fff; }
    .btn-success { background: #2e7d32; color: #fff; }
    .btn-warning { background: #ffa726; color: #fff; }
    .btn-danger  { background: #ef5350; color: #fff; }
    .btn-outline {
      background: #fff; border: 1px solid var(--border); color: #25313c;
    }

    
    .btn-outline.active { background:#198754; border-color:#198754; color:#fff; }
	#login-box {
      border: 2px solid #90caf9; background:#e3f2fd; padding: 16px 16px 18px;
      border-radius: 12px; margin-bottom: 14px;
    }
	
	#login-box h1,
	#login-box h2 {
	  text-align: center;
	  font-size: 22px;
	  font-weight: 700;
	  margin: 0 0 18px 0;
	}
		
    .muted { color: var(--muted); font-size: 0.93rem; }
    .row { display:flex; gap: 12px; flex-wrap: wrap; align-items:flex-end; }
    .row > .col { flex: 1; min-width: 220px; }
    .row-1line {
      display:grid;
      grid-template-columns: 1fr 1fr 1.2fr;
      gap: 12px;
    }
    @media (max-width: 920px) {
      .row-1line { grid-template-columns: 1fr 1fr; }
    
    .row-1line > div { display:flex; flex-direction:column; }

    .parametry-nextcheck .inline-row{
	  display:flex;
	  gap: 8px;
	  align-items: stretch;
	}

	.parametry-nextcheck .inline-row input,
	.parametry-nextcheck .inline-row button{
	  height: 42px;
	}
	
}
    @media (max-width: 520px) {
      .row-1line { grid-template-columns: 1fr; }
    }

    .topbar { display:flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
    #engineer-name { text-align:right; color: var(--blue); margin: 0; font-weight: 700; }

    /* Checklist sections */
    .check-sections {
      display:grid; grid-template-columns: 1fr 1.5fr; gap: 18px;
      padding: 10px 12px; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px;
      background: #fafbfd;
    }
    
    .panel-box{
      padding: 10px 12px;
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 12px;
      background: #fafbfd;
      margin: 10px 0 16px;
    }
	
	.device-list {
	  display: grid;
	  gap: 10px;
	}

	.device-row {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  gap: 12px;
	  padding: 12px 14px;
	  border: 1px solid #d9dee7;
	  border-radius: 10px;
	  background: #f6f6f6;
	}

	.device-row--done {
	  background: #cfd6df;
	  border-color: #aab4c0;
	}

	.device-row--active {
	  outline: 2px solid #1f6feb;
	}

	.device-row__main {
	  display: grid;
	  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr);
	  gap: 10px;
	  flex: 1;
	}
	
	.device-row__field {
	  display: flex;
	  flex-direction: column;
	  gap: 4px;
	}

	.device-row__label {
	  font-size: 12px;
	  color: #5f6b7a;
	  font-weight: 600;
	}

	.device-row__input {
	  width: 100%;
	  min-height: 38px;
	  padding: 8px 10px;
	  border: 1px solid #cfd4da;
	  border-radius: 8px;
	  background: #fff;
	}

	.device-row__title {
	  font-weight: 600;
	}

	.device-row__serial {
	  font-size: 13px;
	  color: #5f6b7a;
	  margin-top: 2px;
	}

	.device-row__actions {
	  display: flex;
	  gap: 8px;
	  flex-wrap: wrap;
	}

	.device-badge {
	  background: #eef3f8;
	  border: 1px solid #d9dee7;
	  border-radius: 999px;
	  padding: 6px 10px;
	  font-size: 13px;
	}

	.muted-box {
	  background: #f8f9fb;
	  border: 1px dashed #cfd4da;
	  border-radius: 10px;
	  padding: 12px;
	  color: #5f6b7a;
	}

	.section-head {
	  display: flex;
	  align-items: center;
	  justify-content: space-between;
	  gap: 12px;
	  margin-bottom: 12px;
	}
	
@media (max-width: 860px) {
      .check-sections { grid-template-columns: 1fr; }
    }
    .check-col h3 {
      margin: 0 0 8px; font-size: 0.98rem; color:#2b333c;
    }
    .check-grid {
      display:grid; gap: 8px;
    }
    .check-item {
      display:flex; align-items:center; gap:10px;
      font-weight: 500; font-size: 0.98rem;
      line-height: 1.1;
    }
    .check-item input[type="checkbox"] {
      width: 18px; height: 18px; margin: 0;
    }
    .check-item span {
      white-space: nowrap;   /* klucz: nie łamie tekstu jak "URZĄDZENIE ZABRANE DO SERWISU" */
    }

    /* Lists (Zakres / Czynności) */
    .task-list {
      margin-top: 10px; padding: 10px; background:#f1f8e9; border-radius: 10px; min-height: 20px;
      border: 1px solid rgba(0,0,0,0.06);
    }
    .task-item {
      padding: 6px 10px; margin: 6px 0; background:#e0f7fa; border-radius: 10px;
      display:flex; align-items:center; justify-content: space-between; gap: 10px;
    }
    
    .task-item span{ flex: 1; }
    .task-controls{ display:flex; align-items:center; gap: 8px; }
    .btn-mini{
      border: 1px solid rgba(0,0,0,0.14);
      background: #fff;
      border-radius: 10px;
      padding: 6px 10px;
      cursor: pointer;
      font-size: 14px;
      line-height: 1;
    }
    .btn-mini:disabled{ opacity: 0.35; cursor: not-allowed; }
.task-item span { flex: 1; }
    .task-item button {
      background:#ef5350; color:white; border:none; border-radius: 8px;
      cursor:pointer; padding: 6px 10px; margin-top: 0; font-size: 0.95rem; flex-shrink: 0;
    }

    #signature-canvas {
      border: 2px dashed var(--blue); border-radius: 12px;
      width: 100%; height: 200px; background: #fff; touch-action: none; display:block;
    }

    .notice {
      padding: 10px 12px;
      border-radius: 12px;
      background: #fff7ed;
      border: 1px solid #fed7aa;
      color: #7c2d12;
      margin-top: 10px;
      display:none;
    }
    .notice strong { font-weight: 800; }

    .template-tools {
      display:flex; gap:10px; align-items:center; flex-wrap: wrap;
      margin-top: 8px;
    }
    .template-tools input[type="file"] { width:auto; }
  
    .order-no-wrap{ display:flex; gap:8px; align-items:center; }
    .order-no-part{ text-align:center; }
    .order-no-part.p1{ max-width: 96px; }
    .order-no-part.p2{ max-width: 64px; }
    .order-no-part.p3{ max-width: 120px; }
    .order-no-sep{ font-weight:700; opacity:0.7; user-select:none; }

    #next-check-dash{ text-align:center; }