* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f3f4f6; min-height: 100vh; }
.container { max-width: 500px; margin: 0 auto; padding: 1rem; }
h1 { font-size: 1.25rem; color: #1f2937; margin-bottom: 1rem; text-align: center; }
h2 { font-size: 1.1rem; color: #374151; margin-bottom: 0.75rem; }
h3 { font-size: 1rem; color: #4b5563; margin-bottom: 0.5rem; }
.screen { display: none; }
.screen.active { display: block; }
.btn { display: inline-block; padding: 0.75rem 1.5rem; border: none; border-radius: 0.5rem; font-size: 1rem; cursor: pointer; transition: background 0.2s; width: 100%; margin-bottom: 0.5rem; text-align: center; }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: white; color: #374151; border: 1px solid #d1d5db; }
.btn-outline:hover { background: #f9fafb; }
.card { background: white; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 1rem; }
.info-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6; }
.info-row:last-child { border-bottom: 0; }
.info-label { color: #6b7280; font-size: 0.875rem; }
.info-value { color: #1f2937; font-weight: 600; }

.grid-blok { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.btn-blok { padding: 0.75rem 0.25rem; border: 2px solid #d1d5db; border-radius: 0.5rem; background: white; cursor: pointer; text-align: center; transition: all 0.2s; font-size: 0.875rem; position: relative; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.btn-blok:hover { border-color: #3b82f6; }
.btn-blok.selected { border-color: #3b82f6; background: #eff6ff; }
.btn-blok.checked { background: #d1fae5; border-color: #10b981; }
.btn-blok .blok-num { font-weight: 700; font-size: 1rem; }
.btn-blok .blok-count { font-size: 0.7rem; color: #6b7280; margin-top: 2px; }

.field-group { margin-bottom: 1rem; }
.field-group label { display: block; font-size: 0.875rem; color: #374151; margin-bottom: 0.25rem; font-weight: 600; }
.field-group input { width: 100%; padding: 0.75rem; border: 1px solid #d1d5db; border-radius: 0.5rem; font-size: 1.25rem; text-align: center; outline: none; }
.field-group input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.field-group input.error { border-color: #ef4444; }
.error-text { color: #ef4444; font-size: 0.8rem; margin-top: 0.25rem; display: none; }
.error-text.show { display: block; }

.hasil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.hasil-item { background: white; border: 1px solid #d1d5db; border-radius: 0.5rem; padding: 0.75rem; text-align: center; }
.hasil-item.ok { border-color: #10b981; background: #d1fae5; }
.hasil-item.defect { border-color: #ef4444; background: #fee2e2; }
.hasil-item .hasil-label { font-size: 0.75rem; color: #6b7280; margin-bottom: 0.25rem; }
.hasil-item .hasil-value { font-size: 1.25rem; font-weight: 700; color: #1f2937; }

.merk-select { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.btn-merk { padding: 1rem 1.5rem; border: 2px solid #d1d5db; border-radius: 0.75rem; background: white; cursor: pointer; font-size: 1rem; font-weight: 600; transition: all 0.2s; }
.btn-merk:hover { border-color: #3b82f6; }
.btn-merk.selected { border-color: #3b82f6; background: #eff6ff; }

.dialog-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; z-index: 100; }
.dialog-overlay.show { display: flex; }
.dialog { background: white; border-radius: 1rem; padding: 1.5rem; max-width: 350px; width: 90%; text-align: center; }
.dialog h3 { margin-bottom: 0.75rem; }
.dialog p { color: #6b7280; margin-bottom: 1rem; font-size: 0.9rem; }
.dialog .btn { margin-bottom: 0.5rem; }
.dialog .btn:last-child { margin-bottom: 0; }

.review-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem; }
.review-table th, .review-table td { padding: 0.5rem; text-align: left; border-bottom: 1px solid #e5e7eb; }
.review-table th { background: #f9fafb; font-weight: 600; color: #374151; }

.notification { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); background: #1f2937; color: white; padding: 0.75rem 1.5rem; border-radius: 0.5rem; font-size: 0.9rem; z-index: 200; display: none; }
.notification.show { display: block; }
.notification.success { background: #10b981; }
.notification.error { background: #ef4444; }

.merk-badge { display: inline-block; background: #eff6ff; color: #1d4ed8; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
