:root{--hj-purple:#5B2D8E;--bg:#F0F2F5;--red:#b91c1c;--green:#16a34a;--active-orange:#f25c21;--surface:#ffffff;--sube-dark:#1e3a8a;--nps-dark:#0f766e;--tes-dark:#8B2500;--admin-dark:#1e293b;}
*{
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:"Segoe UI",system-ui,-apple-system,sans-serif;
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}
input, textarea, select {
  -webkit-user-select:text;
  user-select:text;
}
body{background-color:var(--bg);color:#333;overflow-x:hidden;min-height:100vh;min-height:100dvh;overscroll-behavior-y:none;}
#render-container{background-color:var(--bg);width:100%;display:flex;flex-direction:column;min-height:100vh;min-height:100dvh;touch-action:pan-y;}
.hdr-wrapper{padding:8px 8px 4px;position:relative;}
.hdr{background:var(--hj-purple);color:white;padding:8px 12px;display:flex;justify-content:space-between;align-items:center;width:100%;min-height:45px;border-radius:12px;box-shadow:0 4px 10px rgba(91,45,142,0.15);overflow:hidden;}
#mainTitle{font-weight:900;font-size:0.85rem;text-align:center;white-space:nowrap;flex:1;overflow:hidden;text-overflow:ellipsis;margin:0 8px;}
.hdr-icons{display:flex;gap:6px;align-items:center;z-index:1000;}
.icon-btn{background:rgba(255,255,255,0.2);border:none;width:40px;height:40px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:0.2s;flex-shrink:0;padding:0;position:relative;z-index:20;}
.icon-btn svg{width:20px;height:20px;fill:white;display:block;pointer-events:none;}
.icon-btn.clear-hdr{background:var(--red);display:none;}
.dev-contact-btn{background:#f1f5f9;border:none;width:22px;height:22px;border-radius:50%;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;transition:0.15s;}
.dev-contact-btn:active{transform:scale(0.9);background:#e2e8f0;}
.dev-contact-btn svg{width:12px;height:12px;fill:#475569;display:block;pointer-events:none;}
.pin-eye-btn{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;padding:0;background:none;border:none;}
.pin-eye-btn svg{width:14px;height:14px;fill:#94a3b8;display:block;pointer-events:none;}
#upload-section{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;min-height:100dvh;padding:15px;text-align:center;}
.upload-card{background:var(--surface);padding:25px 20px;border-radius:28px;box-shadow:0 10px 25px rgba(0,0,0,0.05);width:100%;max-width:340px;display:flex;flex-direction:column;align-items:center;}
.upload-icon-wrapper{position:relative;width:120px;height:120px;margin-bottom:14px;display:flex;align-items:center;justify-content:center;}
.upload-icon-circle{width:120px;height:120px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:transparent;}
.upload-icon-circle img{width:120px;height:120px;object-fit:contain;display:block;transform:scale(1.15);}
.acc-header{font-size:0.75rem;font-weight:900;color:#1e293b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:14px 18px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;transition:0.2s;margin-top:10px;}
.acc-header.active{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none;}
.acc-content{display:none;padding:15px;background:#f8fafc;border:1px solid #e2e8f0;border-top:none;border-bottom-left-radius:16px;border-bottom-right-radius:16px;width:100%;flex-direction:column;gap:10px;}
.acc-content.active{display:flex;animation:slideDown 0.2s ease-out;}
@keyframes slideDown{from{opacity:0;transform:translateY(-5px);}to{opacity:1;transform:translateY(0);}}
.btn-primary{background:var(--hj-purple);color:white;border:none;padding:12px 30px;border-radius:100px;font-weight:700;font-size:0.9rem;cursor:pointer;width:100%;transition:0.2s;display:flex;justify-content:center;align-items:center;}
.btn-primary:active{transform:scale(0.98);}
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px 8px;}
.sc{background:white;padding:2px;border-radius:12px;text-align:center;box-shadow:0 1px 2px rgba(0,0,0,0.05);border-bottom:2px solid #ddd;}
.sc-val{font-size:1rem;font-weight:900;line-height:1;}
.sc-lbl{font-size:0.45rem;font-weight:bold;color:#888;text-transform:uppercase;}
.stats-grid.large{gap:6px;padding:8px;}
.stats-grid.large .sc{padding:10px 5px;border-bottom-width:4px;}
.stats-grid.large .sc-val{font-size:1.6rem;}
.tabs-wrapper{padding:0 8px;margin:4px 0;}
.tabs{display:flex;background:#e2e8f0;border-radius:12px;padding:3px;width:100%;}
.tab{flex:1;padding:8px 1px;text-align:center;font-size:0.65rem;font-weight:800;color:#64748b;cursor:pointer;border-radius:10px;transition:0.3s;}
.tab.active{color:white;background-color:var(--active-orange)!important;box-shadow:0 2px 6px rgba(0,0,0,0.1);}
#filter-container{display:none;padding:4px 8px;}
.filter-row{display:flex;gap:4px;align-items:center;}
.search-wrapper{position:relative;flex:1.5;display:flex;align-items:center;}
.search-wrapper input,.filter-row select{width:100%;padding:6px 24px 6px 8px;border-radius:10px;border:1px solid #ddd;font-size:0.7rem;outline:none;background:white;height:32px;}
.clear-btn-inline{position:absolute;right:8px;color:#bbb;cursor:pointer;font-weight:bold;font-size:1rem;}
.grid-container{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:0 8px 8px;contain:layout style;}
.branch-card{background:white;border-radius:8px;border:1px solid #e2e8f0;cursor:pointer;display:flex;align-items:center;min-height:30px;overflow:hidden;-webkit-tap-highlight-color:transparent;}
.branch-name-main{font-size:0.75rem;font-weight:800;color:#1e293b;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;line-height:1.2;padding-left:2px;flex:1;}
.sube-tag{font-size:0.58rem;color:#94a3b8;font-weight:700;text-transform:uppercase;margin-left:6px;cursor:pointer;transition:0.2s;flex-shrink:0;}
.stat-val{font-size:0.82rem;font-weight:900;text-align:center;min-width:32px;display:flex;align-items:center;justify-content:center;height:100%;}
.grid-row{display:grid;align-items:center;gap:3px;padding:0 6px;height:26px;}
.sub-rows{display:none;background:#f8fafc;grid-column:span 2;width:100%;border-radius:0 0 10px 10px;margin-bottom:3px;will-change:auto;border:1px solid #e2e8f0;border-top:none;}
.sub-rows.active{display:block;}
.barcode-item{display:flex;justify-content:space-between;align-items:center;padding:3px 8px;border-bottom:1px solid #f1f5f9;min-height:26px;}
.barcode-code{color:var(--red);font-weight:800;font-size:0.72rem;font-family:monospace;letter-spacing:0.2px;}
.barcode-status{color:#64748b;font-size:0.65rem;font-weight:600;}
#toast{visibility:hidden;min-width:250px;background-color:#333;color:#fff;text-align:center;border-radius:50px;padding:12px 20px;position:fixed;z-index:9999;left:50%;bottom:-50px;transform:translateX(-50%);font-size:0.75rem;font-weight:700;opacity:0;transition:opacity 0.3s,bottom 0.3s;box-shadow:0 10px 30px rgba(0,0,0,0.2);}
#toast.show{visibility:visible;opacity:1;bottom:30px;}
#toast.error{background-color:var(--red);}#toast.success{background-color:var(--green);}
details.custom-select{position:relative;flex:1;margin:0;}
details.custom-select summary{padding:8px 6px;border:1px solid #ddd;border-radius:10px;font-size:0.65rem;font-weight:800;color:#475569;background:white;cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
details.custom-select summary::-webkit-details-marker{display:none;}
details.custom-select summary::after{content:'▼';font-size:0.55rem;color:#94a3b8;margin-left:4px;flex-shrink:0;}
details.custom-select[open] summary::after{content:'▲';}
details.custom-select .opts{position:absolute;top:calc(100% + 4px);left:0;min-width:180px;background:white;border:1px solid #e2e8f0;border-radius:8px;z-index:1000;max-height:250px;overflow-y:auto;padding:4px;box-shadow:0 10px 25px rgba(0,0,0,0.15);}
.opts label{display:flex;align-items:center;gap:6px;font-size:0.7rem;font-weight:700;color:#1e293b;padding:8px 6px;border-bottom:1px solid #f1f5f9;cursor:pointer;white-space:nowrap;}
.opts input[type="checkbox"]{width:16px;height:16px;accent-color:var(--hj-purple);cursor:pointer;}
#comment-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.6);z-index:9999;justify-content:center;align-items:center;padding:20px;}
.modal-content{background:white;width:100%;max-width:400px;border-radius:20px;max-height:80vh;max-height:80dvh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 15px 35px rgba(0,0,0,0.2);}
.modal-header{padding:15px;color:white;background:var(--nps-dark);font-weight:900;display:flex;justify-content:space-between;align-items:center;flex-shrink:0;}
.modal-body{padding:15px;overflow-y:auto;flex:1;background:#f8fafc;min-height:0;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;}
.comment-box{background:white;border:1px solid #e2e8f0;border-radius:10px;padding:10px;margin-bottom:10px;}
.comment-date{font-size:0.55rem;color:#94a3b8;font-weight:bold;}
.comment-type{font-size:0.65rem;font-weight:900;margin-top:2px;}
.comment-text{font-size:0.75rem;color:#333;margin-top:4px;font-style:italic;word-break:break-word;overflow-wrap:anywhere;}

.pin-btn{
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:50%;
  width:76px;
  height:76px;
  color:white;
  font-size:1.6rem;
  font-weight:400;
  font-family:'Segoe UI',system-ui,-apple-system,sans-serif;
  cursor:pointer;
  transition:background 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  line-height:1;
}
.pin-btn:active{
  background:rgba(255,255,255,0.28) !important;
  transform:scale(0.92);
}
.pin-backspace{
  background:transparent;
  border:none;
  border-radius:50%;
  width:76px;
  height:76px;
  color:rgba(255,255,255,0.6);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  transition:background 0.15s ease;
}
.pin-backspace:active{
  background:rgba(255,255,255,0.12);
}
.pin-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  border:1.5px solid rgba(255,255,255,0.35);
  background:transparent;
  transition:0.2s ease;
}
