#tat-defect-logger-root, #tat-defect-logger-root * { box-sizing: border-box; }
#tat-defect-logger-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid #E9D9BC;
  border-radius: 14px;
  overflow: hidden;
  color: #241019;
  position: relative;
}
.tat-app { display: flex; flex-direction: column; min-height: 520px; background: #fff; }

.tat-header { background: #56002A; padding: 18px 18px 14px; }
.tat-header-top { display: flex; align-items: center; justify-content: space-between; }
.tat-header-actions { display: flex; gap: 8px; }
.tat-brand-title { font-weight: 800; color: #fff; font-size: 17px; }
.tat-brand-sub { color: #E8C9D6; font-size: 12px; margin-top: 2px; }
.tat-export-btn { background: rgba(255,255,255,0.14); color: #fff; border: none; padding: 8px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; white-space: nowrap; }

#tat-defect-logger-root:fullscreen,
#tat-defect-logger-root:-webkit-full-screen {
  max-width: 100%;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  background: #fff;
}
#tat-defect-logger-root:fullscreen .tat-app,
#tat-defect-logger-root:-webkit-full-screen .tat-app {
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.tat-chips { display: flex; gap: 8px; margin-top: 14px; }
.tat-chip { flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px; }
.tat-chip-value { color: #fff; font-weight: 800; font-size: 15px; }
.tat-chip-label { color: #fff; font-size: 9px; opacity: 0.9; }

.tat-log { flex: 1; overflow-y: auto; padding: 14px 14px 90px; }
.tat-empty { text-align: center; color: #7A6F72; padding: 50px 20px; font-size: 13.5px; line-height: 1.6; }
.tat-entry { border: 1.5px solid #E9D9BC; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.tat-entry-head { width: 100%; background: #fff; border: none; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; text-align: left; }
.tat-entry-left { display: flex; align-items: center; gap: 10px; }
.tat-entry-num { color: #790034; font-weight: 800; font-size: 13px; }
.tat-entry-facility { font-weight: 600; font-size: 14px; }
.tat-entry-item { font-size: 12px; color: #7A6F72; }
.tat-entry-right { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #7A6F72; white-space: nowrap; }
.tat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.tat-entry-detail { background: #FBF1DE; padding: 4px 14px 14px; }
.tat-photo { border-radius: 10px; margin: 10px 0; max-width: 220px; width: 100%; display: block; }
.tat-detail-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #E9D9BC; font-size: 12.5px; }
.tat-detail-label { color: #790034; font-weight: 600; flex-shrink: 0; }
.tat-detail-value { text-align: right; }
.tat-delete-btn { margin-top: 8px; background: none; border: none; color: #C0392B; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 0; }

.tat-fab { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #D69600; color: #56002A; border: none; padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; box-shadow: 0 4px 14px rgba(0,0,0,0.2); cursor: pointer; z-index: 10; }

.tat-wizard { flex: 1; display: flex; flex-direction: column; padding: 16px 18px 24px; }
.tat-wizard-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tat-back-btn { background: none; border: none; color: #7A6F72; font-size: 13px; cursor: pointer; }
.tat-step-label { font-size: 11px; color: #7A6F72; text-transform: uppercase; letter-spacing: 0.4px; }
.tat-progress-track { width: 100%; height: 4px; border-radius: 4px; background: #E9D9BC; margin-bottom: 20px; }
.tat-progress-fill { height: 4px; border-radius: 4px; background: #D69600; transition: width 0.2s ease; }
.tat-question { font-weight: 800; font-size: 20px; margin: 0 0 16px; line-height: 1.3; }
.tat-option { display: block; width: 100%; text-align: left; padding: 13px 16px; border-radius: 12px; margin-bottom: 9px; border: 1.5px solid #E9D9BC; background: #fff; font-size: 15px; font-weight: 500; color: #241019; cursor: pointer; }
.tat-option:hover { border-color: #790034; background: #FBF1DE; }
.tat-input, .tat-textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #E9D9BC; font-size: 15px; margin-bottom: 10px; font-family: inherit; }
.tat-textarea { resize: none; }
.tat-primary { background: #790034; color: #fff; border: none; padding: 13px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; cursor: pointer; width: 100%; }
.tat-primary:disabled { opacity: 0.45; }
.tat-full { width: 100%; }
.tat-skip { display: block; width: 100%; background: none; border: none; color: #7A6F72; font-size: 13.5px; font-weight: 500; padding: 10px 0; cursor: pointer; }
.tat-photo-drop { display: flex; align-items: center; justify-content: center; padding: 40px 0; border: 1.5px dashed #E9D9BC; border-radius: 12px; margin-bottom: 10px; color: #7A6F72; font-size: 13.5px; cursor: pointer; }
.tat-photo-preview { border-radius: 12px; margin-bottom: 10px; max-width: 260px; width: 100%; display: block; }

.tat-review { flex: 1; padding: 18px; overflow-y: auto; }
.tat-review-title { font-weight: 800; font-size: 19px; }
.tat-review-sub { color: #7A6F72; font-size: 13px; margin: 4px 0 14px; }
.tat-review-table { border: 1.5px solid #E9D9BC; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.tat-review-table .tat-detail-row { padding: 9px 14px; margin: 0; }
.tat-review-table .tat-detail-row:nth-child(odd) { background: #FBF1DE; }

.tat-reports { flex: 1; padding: 18px; overflow-y: auto; }
.tat-field-label { font-size: 12.5px; color: #7A6F72; margin: 12px 0 6px; }
.tat-quick-row { display: flex; gap: 8px; margin-top: 4px; }
.tat-quick-btn { margin-bottom: 0; text-align: center; font-size: 13px; padding: 10px; }
.tat-warning { background: #FBF1DE; border: 1.5px solid #E9D9BC; border-radius: 10px; padding: 14px; font-size: 13.5px; color: #241019; line-height: 1.5; margin-top: 10px; }
