.tnwl{--tnwl-green:#1a6b2a;--tnwl-green-d:#155923;max-width:760px;margin:0 auto;color:#1F2937;font-size:14px;line-height:1.5}
.tnwl *{box-sizing:border-box}

.tnwl-search{background:#fff;border:1px solid #E5E7EB;border-radius:12px;padding:1.5rem;margin-bottom:1.5rem}
.tnwl-head{display:flex;align-items:center;gap:16px;margin-bottom:1.25rem;padding-bottom:1rem;border-bottom:1px solid #E5E7EB}
.tnwl-head:empty,.tnwl-head:not(:has(*)){display:none}
.tnwl-logo img{display:block;height:44px;width:auto}
.tnwl-title{font-size:16px;font-weight:700;margin:0;color:#111827}

.tnwl-input-row{display:flex;gap:8px;flex-wrap:wrap}
.tnwl-input{flex:1 1 220px;max-width:380px;height:42px;padding:0 14px;border:1px solid #D1D5DB;border-radius:8px;font-size:14px;color:#1F2937;outline:none;transition:border-color .2s,box-shadow .2s}
.tnwl-input:focus{border-color:var(--tnwl-green);box-shadow:0 0 0 3px rgba(26,107,42,.1)}

.tnwl-btn{height:42px;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;flex-shrink:0;transition:background .15s,opacity .15s}
.tnwl-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.tnwl-btn-search{padding:0 20px;background:var(--tnwl-green);color:#fff}
.tnwl-btn-search:hover{background:var(--tnwl-green-d)}
.tnwl-btn-search.is-loading{opacity:.65;cursor:default}
.tnwl-btn-scan{padding:0 20px;background:#F3F4F6;color:#374151}
.tnwl-btn-scan:hover{background:#E5E7EB}

.tnwl-hint{font-size:12px;color:#9CA3AF;margin:8px 0 0}
.tnwl-error{background:#FEF2F2;border:1px solid #FECACA;border-radius:8px;padding:.75rem 1rem;color:#B91C1C;font-size:14px;margin-top:.75rem;display:none}

.tnwl-result{min-height:140px}
.tnwl-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.tnwl-card{background:#fff;border:1px solid #E5E7EB;border-radius:12px;padding:1.5rem}
.tnwl-card-full{grid-column:1/-1}
.tnwl-card-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:#6B7280;margin-bottom:1.25rem}

.tnwl-field{margin-bottom:14px}
.tnwl-field:last-child{margin-bottom:0}
.tnwl-field label{font-size:12px;color:#9CA3AF;display:block;margin-bottom:3px}
.tnwl-val{font-size:14px;color:#1F2937;font-weight:600;display:block;line-height:1.5;word-break:break-word}
.tnwl-wdate{color:#065F46}
.tnwl-wfields{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem}

.tnwl-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border-radius:20px;font-size:13px;font-weight:500;background:#ECFDF5;color:#065F46;border:1px solid #A7F3D0;align-self:flex-start;flex-shrink:0}
.tnwl-badge-off{background:#FEF2F2;color:#B91C1C;border-color:#FECACA}
.tnwl-badge-pending{background:#FFFBEB;color:#92400E;border-color:#FDE68A}
.tnwl-dot{width:7px;height:7px;border-radius:50%;background:#10B981;flex-shrink:0}
.tnwl-badge-off .tnwl-dot{background:#EF4444}
.tnwl-badge-pending .tnwl-dot{background:#F59E0B}

.tnwl-product-row{display:flex;gap:14px;align-items:flex-start}
.tnwl-product-img{width:96px;height:80px;border-radius:10px;background:#F9FAFB;border:1px solid #E5E7EB;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}
.tnwl-product-img img{width:100%;height:100%;object-fit:contain;border-radius:10px}
.tnwl-product-info{flex:1;min-width:0}
.tnwl-product-info h3{font-size:15px;font-weight:600;margin:0 0 4px;line-height:1.4;color:#111827}
.tnwl-product-info p{font-size:13px;color:#6B7280;margin:0}
.tnwl-tag{display:inline-block;padding:2px 10px;border-radius:4px;font-size:12px;background:#F3F4F6;color:#6B7280;margin-top:6px}

.tnwl-empty{text-align:center;padding:2.5rem 1rem;color:#9CA3AF}
.tnwl-empty svg{width:48px;height:48px;stroke:#D1D5DB;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;margin:0 auto 1rem;display:block}
.tnwl-empty p{font-size:14px;margin:0}
.tnwl-empty-danger svg{stroke:#FCA5A5}
.tnwl-empty-danger p{color:#B91C1C}

/* QR scanner overlay */
.tnwl-scan{position:fixed;inset:0;z-index:99999;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;padding:1rem}
.tnwl-scan-box{position:relative;width:100%;max-width:360px;background:#000;border-radius:12px;overflow:hidden}
.tnwl-scan-box video,.tnwl-scan-reader{width:100%;display:block}
.tnwl-scan-close{position:absolute;top:8px;right:8px;z-index:2;width:36px;height:36px;border:none;border-radius:50%;background:rgba(255,255,255,.92);color:#111;font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}

@media (max-width:560px){
  .tnwl-input{max-width:none;flex-basis:100%}
  .tnwl-grid,.tnwl-wfields{grid-template-columns:1fr}
  .tnwl-search{padding:1.25rem}
  .tnwl-card{padding:1.25rem}
}
