.tgr-app{max-width:1100px;margin:0 auto;font-family:'Segoe UI',Arial,sans-serif;background:#FFFDF7;color:#3a2c1a;border:1px solid #eddcb8;border-radius:10px;overflow:hidden;box-shadow:0 2px 10px rgba(166,83,26,0.08);}
.tgr-app *{box-sizing:border-box;}
.tgr-topbar{background:linear-gradient(135deg,#C97A1E,#A6531A);padding:16px 18px;display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;}
.tgr-brand{color:#FFFDF7;font-weight:800;font-size:17px;line-height:1.3;}
.tgr-brand span{font-weight:600;font-size:15px;}
.tgr-topbtns{display:flex;gap:8px;flex-wrap:wrap;}
.tgr-btn{border:none;border-radius:7px;padding:10px 16px;font-weight:700;font-size:14px;cursor:pointer;transition:transform .1s;}
.tgr-btn:active{transform:scale(0.97);}
.tgr-btn-primary{background:#FFFDF7;color:#A6531A;}
.tgr-btn-outline{background:transparent;color:#FFFDF7;border:2px solid #FFFDF7;}
.tgr-btn-green{background:#2e7d32;color:#fff;}
.tgr-btn-red{background:#c62828;color:#fff;}
.tgr-btn-grey{background:#e9dcc3;color:#3a2c1a;}
.tgr-btn:disabled{opacity:.5;cursor:not-allowed;}
.tgr-view-root{padding:16px;min-height:200px;background:#FFFDF7;}
.tgr-loading{text-align:center;padding:40px;color:#A6531A;font-weight:700;}

/* lang toggle */
.tgr-langtoggle{display:flex;gap:6px;margin-bottom:12px;}
.tgr-langtoggle button{border:2px solid #C97A1E;background:#FFF6E8;color:#A6531A;font-weight:700;border-radius:20px;padding:5px 14px;cursor:pointer;font-size:13px;}
.tgr-langtoggle button.active{background:#C97A1E;color:#fff;}

/* search / filter bar */
.tgr-filterbar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px;}
.tgr-filterbar input[type=text],.tgr-filterbar select{flex:1;min-width:180px;padding:10px 12px;border:2px solid #eddcb8;border-radius:7px;font-size:14px;font-weight:700;color:#3a2c1a;background:#fff;}
.tgr-filterbar input[type=text]:focus,.tgr-filterbar select:focus{outline:none;border-color:#C97A1E;background:#FFF9C4;}

/* category blocks */
.tgr-cat{margin-bottom:18px;border:1px solid #eddcb8;border-radius:9px;overflow:hidden;}
.tgr-cat-head{background:#FFF6E8;padding:10px 14px;font-weight:800;color:#A6531A;font-size:15px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;}
.tgr-cat-head small{font-weight:600;color:#8a6a3a;}
.tgr-cat-body{padding:10px;}
.tgr-cat-body.tgr-collapsed{display:none;}

/* item card (distributor edit) */
.tgr-item{background:#fff;border:1px solid #f0e2c4;border-radius:8px;padding:12px;margin-bottom:10px;}
.tgr-item-head{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;margin-bottom:8px;}
.tgr-item-name{font-weight:800;color:#3a2c1a;font-size:15px;}
.tgr-item-name .en{font-weight:600;color:#5a4a35;font-size:13px;display:block;}
.tgr-item-brands{font-size:11.5px;color:#8a6a3a;font-weight:600;}
.tgr-qtyrow{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-top:6px;}
.tgr-qtyfield{display:flex;flex-direction:column;min-width:110px;}
.tgr-qtyfield label{font-size:11.5px;font-weight:700;color:#8a6a3a;margin-bottom:3px;}
.tgr-qtyfield input{padding:9px 8px;border:2px solid #eddcb8;border-radius:6px;font-weight:700;font-size:14px;color:#3a2c1a;background:#fff;width:110px;}
.tgr-qtyfield input:focus{outline:none;background:#FFF9C4;border-color:#C97A1E;}
.tgr-qtyfield.tgr-base input{border-color:#C97A1E;background:#FFF6E8;}
.tgr-autotag{font-size:10px;color:#2e7d32;font-weight:800;margin-top:2px;}
.tgr-overridetag{font-size:10px;color:#A6531A;font-weight:800;margin-top:2px;}
.tgr-item-actions{margin-top:10px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.tgr-savedtag{font-size:12px;color:#2e7d32;font-weight:800;}
.tgr-item-toggle{font-size:12px;font-weight:700;display:flex;align-items:center;gap:5px;}

/* public price list */
.tgr-pub-item{background:#fff;border:1px solid #f0e2c4;border-radius:8px;padding:12px;margin-bottom:8px;}
.tgr-pub-head{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;}
.tgr-pub-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.tgr-chip{background:#FFF6E8;border:1.5px solid #eddcb8;border-radius:7px;padding:6px 10px;font-size:13px;font-weight:700;color:#3a2c1a;}
.tgr-chip b{color:#A6531A;}
.tgr-chip.tgr-nochip{color:#a08a63;font-style:italic;font-weight:600;}
.tgr-updated{font-size:11px;color:#8a6a3a;font-weight:600;margin-top:6px;}

/* stat boxes */
.tgr-stats{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px;}
.tgr-statbox{flex:1;min-width:110px;background:#FFF6E8;border:1px solid #eddcb8;border-radius:8px;padding:10px 12px;text-align:center;}
.tgr-statbox .num{font-size:22px;font-weight:800;color:#A6531A;}
.tgr-statbox .lbl{font-size:11.5px;font-weight:700;color:#8a6a3a;}

/* login */
.tgr-loginbox{max-width:340px;margin:30px auto;text-align:center;}
.tgr-loginbox input{width:100%;padding:14px;font-size:20px;letter-spacing:4px;text-align:center;border:2px solid #eddcb8;border-radius:8px;font-weight:800;color:#3a2c1a;margin-bottom:12px;}
.tgr-loginbox input:focus{outline:none;border-color:#C97A1E;background:#FFF9C4;}
.tgr-loginerr{color:#c62828;font-weight:700;font-size:13px;margin-top:8px;min-height:18px;}

/* popup */
.tgr-overlay{position:fixed;inset:0;background:rgba(58,44,26,0.55);display:flex;align-items:center;justify-content:center;z-index:99999;padding:16px;}
.tgr-popup{background:#FFFDF7;border-radius:12px;max-width:520px;width:100%;max-height:85vh;overflow:auto;padding:20px;box-shadow:0 10px 40px rgba(0,0,0,.3);}
.tgr-popup h3{margin:0 0 12px;color:#A6531A;font-size:17px;}
.tgr-popup table{width:100%;border-collapse:collapse;margin-bottom:14px;}
.tgr-popup table th,.tgr-popup table td{border:1px solid #eddcb8;padding:8px;font-size:13.5px;font-weight:700;text-align:left;color:#3a2c1a;}
.tgr-popup table th{background:#FFF6E8;color:#A6531A;}
.tgr-popup-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;}
.tgr-popup-close{float:right;background:none;border:none;font-size:20px;cursor:pointer;color:#A6531A;font-weight:800;}

/* add item form */
.tgr-addbox{background:#fff;border:1.5px dashed #C97A1E;border-radius:9px;padding:14px;margin-bottom:16px;}
.tgr-addbox h4{margin:0 0 10px;color:#A6531A;}
.tgr-addbox .row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:8px;}
.tgr-addbox input,.tgr-addbox select{padding:9px;border:2px solid #eddcb8;border-radius:6px;font-weight:700;color:#3a2c1a;flex:1;min-width:150px;}
.tgr-addbox input:focus,.tgr-addbox select:focus{outline:none;border-color:#C97A1E;background:#FFF9C4;}
.tgr-qtybuild{display:flex;flex-direction:column;gap:6px;margin-bottom:8px;}
.tgr-qtybuildrow{display:flex;gap:6px;}
.tgr-qtybuildrow input{flex:1;}
.tgr-qtybuildrow button{background:#c62828;color:#fff;border:none;border-radius:6px;width:34px;cursor:pointer;font-weight:800;}

/* popup item editor (mobile card, prev/next) */
.tgr-editor-popup{max-width:400px;padding:18px 16px;}
.tgr-editor-pos{text-align:center;font-size:12px;font-weight:800;color:#8a6a3a;margin-bottom:6px;}
.tgr-editor-head{text-align:center;border-bottom:2px solid #FFF6E8;padding-bottom:12px;margin-bottom:14px;}
.tgr-editor-cat{font-size:11.5px;font-weight:700;color:#8a6a3a;text-transform:uppercase;letter-spacing:.3px;}
.tgr-editor-name-te{font-size:21px;font-weight:800;color:#3a2c1a;margin-top:4px;}
.tgr-editor-name-en{font-size:15px;font-weight:700;color:#5a4a35;margin-top:2px;}
.tgr-editor-body{display:flex;flex-direction:column;gap:12px;margin-bottom:10px;}
.tgr-editor-field{width:100%;}
.tgr-editor-field input{width:100%;font-size:16px;padding:12px;}
.tgr-editor-status{text-align:center;min-height:18px;font-size:12.5px;color:#2e7d32;font-weight:800;margin-bottom:10px;}
.tgr-editor-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.tgr-navarrow{background:#FFF6E8;border:2px solid #eddcb8;color:#A6531A;font-weight:800;border-radius:7px;padding:12px 10px;cursor:pointer;flex:1;font-size:14px;}
.tgr-navarrow:disabled{opacity:.35;cursor:not-allowed;}
.tgr-editor-nav .tgr-btn{flex:1.4;font-size:15px;padding:12px 10px;}

/* admin tabs + tables + compare */
.tgr-admintabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;border-bottom:2px solid #FFF6E8;padding-bottom:10px;}
.tgr-tabbtn{background:#FFF6E8;border:2px solid #eddcb8;color:#8a6a3a;font-weight:800;border-radius:20px;padding:8px 16px;cursor:pointer;font-size:13.5px;}
.tgr-tabbtn.active{background:#C97A1E;border-color:#C97A1E;color:#fff;}
.tgr-admintable{width:100%;border-collapse:collapse;margin-bottom:16px;}
.tgr-admintable th,.tgr-admintable td{border:1px solid #f0e2c4;padding:9px 10px;font-size:13.5px;font-weight:700;color:#3a2c1a;text-align:left;}
.tgr-admintable th{background:#FFF6E8;color:#A6531A;}
.tgr-badge{display:inline-block;border-radius:14px;padding:4px 11px;font-size:12px;font-weight:800;white-space:nowrap;}
.tgr-badge-approved{background:#e6f4ea;color:#2e7d32;border:1.5px solid #b6dfc0;}
.tgr-badge-hold{background:#f0e2c4;color:#8a6a3a;border:1.5px solid #e0cba0;}
.tgr-badge-pending{background:#FFF3CD;color:#8a6a1a;border:1.5px solid #f0dd9a;}
.tgr-distactions{display:flex;gap:6px;flex-wrap:wrap;}
.tgr-distactions .tgr-btn{font-size:12px;padding:7px 10px;}
.tgr-admintable td.tgr-lowcell,.tgr-lowcell{background:#e6f4ea;color:#2e7d32;font-weight:800;}
.tgr-cmp-itemlist{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;max-height:340px;overflow-y:auto;border:1px solid #f0e2c4;border-radius:8px;padding:6px;}
.tgr-cmp-itemrow{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;border-radius:6px;cursor:pointer;font-weight:700;color:#3a2c1a;background:#fff;}
.tgr-cmp-itemrow:hover{background:#FFF6E8;}
.tgr-cmp-badge{background:#FFF6E8;color:#A6531A;font-size:11.5px;font-weight:800;border-radius:12px;padding:3px 9px;white-space:nowrap;}
.tgr-cmp-detailbox{border:1.5px solid #C97A1E;border-radius:9px;padding:14px;background:#fff;}
.tgr-cmp-detailbox h4{margin:0 0 10px;color:#A6531A;font-size:16px;}

.tgr-toolbar-top{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:10px;}
.tgr-logout{font-size:12px;color:#A6531A;font-weight:700;background:none;border:1px solid #A6531A;border-radius:6px;padding:6px 10px;cursor:pointer;}
.tgr-savechanged{position:sticky;bottom:0;background:#FFF6E8;border-top:2px solid #C97A1E;padding:10px;margin:14px -16px -16px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;}

@media (max-width:520px){
  .tgr-qtyfield input{width:90px;}
  .tgr-brand{font-size:14.5px;}
}
