/* ============================================================
   SAMA inline image manager (admin only)
   ============================================================ */
body.sama-admin [data-img-key]{ position:relative; }
body.sama-admin [data-img-key].sama-img-empty{
  display:flex; align-items:center; justify-content:center;
  background:repeating-linear-gradient(45deg,#f1f3f5,#f1f3f5 10px,#e6eaee 10px,#e6eaee 20px);
  border:2px dashed #c8ced3;
  min-height:240px;
  border-radius:12px;
  color:#5a6065;
  font-size:13px;
}
body.sama-admin [data-img-key].sama-img-empty::before{
  content:"\f03e  이미지 등록 (관리자)";
  font-family:"Font Awesome 6 Free", sans-serif;
  font-weight:900;
}
body.sama-admin .sama-img-edit-btn{
  position:absolute;
  top:10px; right:10px;
  z-index:9990;
  width:36px; height:36px;
  border-radius:50%;
  background:rgba(212,32,32,.95);
  color:#fff;
  border:2px solid #fff;
  box-shadow:0 4px 14px rgba(0,0,0,.25);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  font-size:14px;
  transition:transform .15s ease;
}
body.sama-admin .sama-img-edit-btn:hover{ transform:scale(1.12); background:#b01818; }

/* Modal */
.sama-imgmgr-modal{
  position:fixed; inset:0; z-index:99999;
  background:rgba(0,0,0,.55);
  display:none; align-items:center; justify-content:center;
  padding:24px;
}
.sama-imgmgr-modal.is-open{ display:flex; }
.sama-imgmgr-modal-inner{
  width:100%; max-width:520px;
  background:#fff; border-radius:16px;
  padding:28px;
  box-shadow:0 30px 80px rgba(0,0,0,.4);
}
.sama-imgmgr-modal h3{
  margin:0 0 6px; font-size:20px; font-weight:800; color:#0a0b0c;
}
.sama-imgmgr-modal .key{
  font-size:12px; color:#7c8385; margin-bottom:18px; word-break:break-all;
  font-family:'Inter',monospace;
}
.sama-imgmgr-drop{
  border:2px dashed #c8ced3; border-radius:12px;
  padding:36px 20px; text-align:center;
  color:#5a6065; cursor:pointer;
  transition:all .2s ease;
  background:#fafbfc;
}
.sama-imgmgr-drop:hover, .sama-imgmgr-drop.is-over{
  border-color:#d42020; background:#fff5f5; color:#0a0b0c;
}
.sama-imgmgr-drop i{ font-size:34px; display:block; margin-bottom:10px; color:#d42020; }
.sama-imgmgr-preview{
  margin-top:14px;
  max-height:160px; max-width:100%;
  display:none; border-radius:8px;
}
.sama-imgmgr-preview.show{ display:block; margin-left:auto; margin-right:auto; }
.sama-imgmgr-actions{
  display:flex; gap:10px; margin-top:20px; justify-content:flex-end;
}
.sama-imgmgr-actions button{
  padding:11px 22px; border-radius:99px;
  border:0; cursor:pointer; font-size:14px; font-weight:700;
}
.sama-imgmgr-actions .btn-cancel{ background:#eef0f2; color:#3a3f44; }
.sama-imgmgr-actions .btn-save{ background:#d42020; color:#fff; }
.sama-imgmgr-actions .btn-save:disabled{ opacity:.5; cursor:wait; }
.sama-imgmgr-msg{ margin-top:12px; font-size:13px; color:#d42020; min-height:18px; }

/* Image manager: fit + position options */
.sama-imgmgr-options{ margin-top:18px; display:flex; flex-direction:column; gap:14px; }
.sama-imgmgr-row{ display:flex; align-items:center; gap:14px; }
.sama-imgmgr-row > label{
  flex:0 0 90px; font-size:12px; color:#5a6065; font-weight:600;
}
.sama-imgmgr-pills{ display:flex; gap:6px; flex-wrap:wrap; }
.sama-imgmgr-pills button{
  padding:7px 14px; border-radius:99px;
  border:1.5px solid #dfe3e6; background:#fff; color:#3a3f44;
  font-size:12px; font-weight:600; cursor:pointer;
  transition:all .15s ease;
}
.sama-imgmgr-pills button:hover{ border-color:#0a0b0c; }
.sama-imgmgr-pills button.is-on{ background:#d42020; color:#fff; border-color:#d42020; }
.sama-imgmgr-grid9{
  display:grid; grid-template-columns:repeat(3, 28px); gap:4px;
}
.sama-imgmgr-grid9 button{
  width:28px; height:28px;
  border:1.5px solid #dfe3e6; background:#fff;
  border-radius:6px; padding:0; cursor:pointer;
  position:relative;
  transition:all .15s ease;
}
.sama-imgmgr-grid9 button::before{
  content:''; position:absolute;
  width:6px; height:6px; border-radius:50%;
  background:#bcc1c6;
  top:50%; left:50%; transform:translate(-50%,-50%);
}
.sama-imgmgr-grid9 button:hover{ border-color:#0a0b0c; }
.sama-imgmgr-grid9 button:hover::before{ background:#0a0b0c; }
.sama-imgmgr-grid9 button.is-on{ border-color:#d42020; background:#fff5f5; }
.sama-imgmgr-grid9 button.is-on::before{ background:#d42020; }

/* ============================================================
   Hero slide editor (admin only)
   ============================================================ */
.sama-slide-toolbar{
  position:absolute; top:24px; right:24px; z-index:50;
  display:flex; align-items:center; gap:8px;
  background:rgba(10,11,12,.75); backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.12);
  padding:8px 10px; border-radius:99px;
}
.sama-slide-tag{
  color:#fff; font-size:12px; font-weight:600; padding:0 8px;
  font-family:'Pretendard',sans-serif;
  display:inline-flex; align-items:center; gap:6px;
}
.sama-slide-tag i{ color:#d42020; }
.sama-slide-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 13px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0;
  font-size:12px; font-weight:600; cursor:pointer;
  transition:transform .15s ease, background .15s ease;
}
.sama-slide-toolbar button:hover{ transform:translateY(-1px); }
.sama-slide-toolbar button[data-act="del"]{ background:rgba(212,32,32,.95); color:#fff; }
.sama-slide-toolbar button[data-act="del"]:hover{ background:#b01818; }

.sama-slide-modal .sama-slide-inner{ max-width:920px; width:96vw; max-height:92vh; overflow:auto; }
.sama-slide-grid{
  display:grid; grid-template-columns:1fr 1.2fr; gap:24px;
  margin-top:14px;
}
.sama-slide-col{ display:flex; flex-direction:column; gap:10px; }
.sama-slide-col label{
  font-size:12px; font-weight:600; color:#3a3f44;
  margin-bottom:-4px;
}
.sama-slide-col label small{ color:#9097a0; font-weight:400; margin-left:6px; }
.sama-slide-col input,
.sama-slide-col textarea{
  width:100%; padding:10px 14px;
  border:1.5px solid #dfe3e6; border-radius:10px;
  font-size:14px; color:#0a0b0c; outline:none;
  font-family:'Pretendard',sans-serif;
  resize:vertical;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.sama-slide-col input:focus,
.sama-slide-col textarea:focus{
  border-color:#d42020;
  box-shadow:0 0 0 3px rgba(212,32,32,.08);
}
.sama-slide-2col{ display:grid; grid-template-columns:1fr 1.4fr; gap:10px; }
.sama-slide-drop{ min-height:200px; }
.sama-slide-fname{ font-size:11px; color:#5a6065; margin-top:6px; }

@media (max-width:760px){
  .sama-slide-grid{ grid-template-columns:1fr; }
  .sama-slide-toolbar{ top:auto; bottom:96px; right:16px; left:16px; justify-content:center; }
}

/* ============================================================
   Inline text editor (admin only)
   ============================================================ */
body.sama-admin .sama-text-editable{
  outline:1px dashed transparent;
  transition:outline-color .15s ease;
}
body.sama-admin .sama-text-editable:hover{
  outline-color:rgba(212,32,32,.4);
  outline-offset:4px;
}
body.sama-admin .sama-text-pencil{
  position:absolute; top:-12px; right:-12px;
  width:28px; height:28px;
  border-radius:50%;
  background:rgba(10,11,12,.85);
  color:#fff; border:2px solid #fff;
  display:none; align-items:center; justify-content:center;
  cursor:pointer; font-size:11px;
  z-index:9990;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  transition:background .15s ease, transform .15s ease;
}
body.sama-admin .sama-text-pencil:hover{ background:#d42020; transform:scale(1.1); }
body.sama-admin .sama-text-editable:hover > .sama-text-pencil{ display:flex; }

body.sama-admin .sama-editing{
  outline:2px solid #d42020 !important;
  outline-offset:6px;
  background:rgba(255,245,245,.4);
  cursor:text;
}
body.sama-admin .sama-editing > .sama-text-pencil{ display:none; }

.sama-text-tb{
  position:fixed; z-index:99998;
  user-select:none; -webkit-user-select:none;
  display:flex; align-items:center; gap:4px;
  padding:6px 8px;
  background:#0a0b0c; color:#fff;
  border-radius:10px;
  box-shadow:0 12px 30px rgba(0,0,0,.4);
}
.sama-text-tb button{
  width:32px; height:32px;
  background:transparent; color:#fff; border:0;
  border-radius:6px; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:13px;
  transition:background .12s ease;
}
.sama-text-tb button:hover{ background:rgba(255,255,255,.15); }
.sama-text-tb button.x{ color:#ff8b8b; }
.sama-text-tb button.ok{
  background:#d42020; padding:0 14px; width:auto; gap:6px;
  font-size:12px; font-weight:700;
}
.sama-text-tb button.ok:hover{ background:#b01818; }
.sama-text-tb .sep{ width:1px; height:18px; background:rgba(255,255,255,.2); margin:0 4px; }

.sama-text-msg{
  position:fixed; bottom:24px; right:24px;
  z-index:99999;
  padding:14px 22px; border-radius:99px;
  background:#0a0b0c; color:#fff;
  font-size:13px; font-weight:600;
  opacity:0; transform:translateY(10px);
  transition:all .25s ease;
  pointer-events:none;
  box-shadow:0 12px 30px rgba(0,0,0,.3);
}
.sama-text-msg.show{ opacity:1; transform:translateY(0); }
.sama-text-msg.ok{ background:#157a3c; }
.sama-text-msg.err{ background:#d42020; }

/* Heroes / sub-banners — camera button at bottom-right to avoid fixed header */
body.sama-admin .sama-img-edit-btn{ z-index:10010; }
body.sama-admin .sama-img-edit-btn.is-hero-pos{
  top:auto !important; right:auto !important;
  left:50% !important; bottom:24px !important;
  transform:translateX(-50%);
  width:max-content; min-width:44px; height:44px; font-size:14px;
  padding:0 18px; border-radius:24px;
  background:rgba(212,32,32,.96);
  display:inline-flex; align-items:center; gap:8px;
  white-space:nowrap;
  z-index:10050 !important;
  pointer-events:auto;
  box-shadow:0 8px 22px rgba(0,0,0,.28);
}
body.sama-admin .sama-img-edit-btn.is-hero-pos *{ pointer-events:none; }
body.sama-admin .sama-img-edit-btn.is-hero-pos:hover{
  transform:translateX(-50%) scale(1.06);
}
body.sama-admin .sama-img-edit-btn.is-hero-pos::after{
  content:"이미지 변경";
  font-size:13px; font-weight:600; letter-spacing:.02em;
}
@media (max-width:760px){
  body.sama-admin .sama-img-edit-btn.is-hero-pos{
    bottom:14px !important;
    height:38px; padding:0 12px;
  }
  body.sama-admin .sama-img-edit-btn.is-hero-pos::after{ font-size:12px; }
}


/* Font controls — admin only */
body.sama-admin .sama-fonts-fab{
  position:fixed; right:24px; bottom:84px;
  width:48px; height:48px; border-radius:50%;
  background:#0a0b0c; color:#fff; border:0;
  box-shadow:0 12px 30px rgba(0,0,0,.3);
  cursor:pointer; font-size:16px;
  display:flex; align-items:center; justify-content:center;
  z-index:9989;
  transition:background .15s ease, transform .15s ease;
}
body.sama-admin .sama-fonts-fab:hover{ background:#d42020; transform:scale(1.08); }
.sama-fonts-modal .sama-fonts-row{
  display:flex; flex-direction:column; gap:8px;
  margin:14px 0;
}
.sama-fonts-row label{
  font-size:12px; font-weight:600; color:#3a3f44;
  display:flex; justify-content:space-between; align-items:center;
}
.sama-fonts-row label em{
  font-style:normal; color:#d42020; font-weight:700;
  background:#fff5f5; padding:2px 8px; border-radius:6px; font-size:11px;
}
.sama-fonts-row select,
.sama-fonts-row input[type=range]{
  width:100%; padding:9px 12px;
  border:1.5px solid #dfe3e6; border-radius:10px;
  font-size:13px; outline:none;
}
.sama-fonts-row select:focus{ border-color:#d42020; }
.sama-fonts-row input[type=range]{ padding:8px 0; accent-color:#d42020; }
.sama-fonts-preview{
  margin-top:14px; padding:18px;
  background:#f6f8f7; border-radius:10px;
  border:1px solid #e6eae8;
}
.sama-fonts-preview h2{ margin:0 0 10px; color:#0a0b0c; }
.sama-fonts-preview p{ margin:0; color:#5a6065; line-height:1.65; }

/* Color picker indicator dot inside the color button */
.sama-text-tb button[data-cmd="color"]{ position:relative; }
.sama-text-tb button[data-cmd="color"] .color-dot{
  position:absolute; bottom:5px; left:50%; transform:translateX(-50%);
  width:14px; height:3px; border-radius:2px;
  background:#d42020;
  pointer-events:none;
}
.sama-text-tb svg, .sama-text-pencil svg, .sama-img-edit-btn svg, .sama-fonts-fab svg, .sn-fab-top svg{
  display:block;
}

/* History page admin CRUD */
body.sama-admin .sama-hist-toolbar{
  background:#0a0b0c; color:#fff;
  padding:14px 20px; border-radius:14px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:30px; font-size:13px;
}
body.sama-admin .sama-hist-toolbar .lbl{ display:inline-flex; align-items:center; gap:6px; font-weight:700; }
body.sama-admin .sama-hist-toolbar .lbl svg{ color:#d42020; }
body.sama-admin .sama-hist-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:8px 14px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:12px; font-weight:600;
  transition:transform .15s ease;
}
body.sama-admin .sama-hist-toolbar button:hover{ transform:translateY(-1px); }
body.sama-admin .sama-hist-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-hist-toolbar .msg{ margin-left:auto; font-size:12px; opacity:.8; }
body.sama-admin .sama-hist-toolbar .msg.ok{ color:#5fdb86; }
body.sama-admin .sama-hist-toolbar .msg.err{ color:#ff8b8b; }

body.sama-admin .sama-hist-edit{
  position:relative;
  outline:1px dashed rgba(212,32,32,.35);
  outline-offset:4px;
  padding-right:30px !important;
  cursor:text;
}
body.sama-admin .sama-hist-edit:focus{
  outline:2px solid #d42020; background:rgba(255,245,245,.4);
}
body.sama-admin .sama-hist-del-year, body.sama-admin .sama-hist-del-event{
  position:absolute; top:50%; right:-4px; transform:translateY(-50%);
  width:20px; height:20px; border-radius:50%;
  background:#d42020; color:#fff; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s ease;
}
body.sama-admin .sama-hist-edit:hover > .sama-hist-del-year,
body.sama-admin .sama-hist-edit:hover > .sama-hist-del-event{ opacity:1; }
body.sama-admin .sama-hist-add-event{
  display:inline-flex; align-items:center; gap:5px;
  padding:6px 12px; margin-top:10px;
  border:1.5px dashed #c8ced3; background:#fafbfc; color:#5a6065;
  border-radius:99px; cursor:pointer; font-size:11.5px; font-weight:600;
  transition:all .15s ease;
}
body.sama-admin .sama-hist-add-event:hover{ border-color:#d42020; color:#d42020; }

/* Generic table editor (admin only) */
body.sama-admin .sama-tbl-toolbar{
  background:#0a0b0c; color:#fff;
  padding:12px 18px; border-radius:12px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:14px; font-size:12.5px;
}
body.sama-admin .sama-tbl-toolbar .lbl{ display:inline-flex; align-items:center; gap:6px; font-weight:700; }
body.sama-admin .sama-tbl-toolbar .lbl svg{ color:#d42020; }
body.sama-admin .sama-tbl-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 13px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:11.5px; font-weight:600;
  transition:transform .15s ease;
}
body.sama-admin .sama-tbl-toolbar button:hover{ transform:translateY(-1px); }
body.sama-admin .sama-tbl-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-tbl-toolbar .msg{ margin-left:auto; font-size:11.5px; opacity:.85; }
body.sama-admin .sama-tbl-toolbar .msg.ok{ color:#5fdb86; }
body.sama-admin .sama-tbl-toolbar .msg.err{ color:#ff8b8b; }

body.sama-admin .sama-tbl-cell{
  outline:1px dashed transparent;
  transition:outline-color .15s ease;
  cursor:text;
}
body.sama-admin .sama-tbl-cell:hover{ outline-color:rgba(212,32,32,.4); outline-offset:-2px; }
body.sama-admin .sama-tbl-cell:focus{ outline:2px solid #d42020; outline-offset:-2px; background:rgba(255,245,245,.4); }

body.sama-admin .sama-tbl-del-row{
  position:absolute; top:50%; right:6px; transform:translateY(-50%);
  width:20px; height:20px; border-radius:50%;
  background:#d42020; color:#fff; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s ease;
}
body.sama-admin .sama-tbl-row:hover .sama-tbl-del-row{ opacity:1; }

/* History month tag — clickable but not editable */
body.sama-admin .sama-hist-month-tag{
  cursor:pointer;
  border-bottom:1px dotted #d42020;
  user-select:none;
}
body.sama-admin .sama-hist-month-tag:hover{ background:rgba(212,32,32,.1); }

/* Generic list/cards editor (admin only) */
body.sama-admin .sama-list-toolbar{
  background:#0a0b0c; color:#fff;
  padding:12px 18px; border-radius:12px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:14px; font-size:12.5px;
}
body.sama-admin .sama-list-toolbar .lbl{ display:inline-flex; align-items:center; gap:6px; font-weight:700; }
body.sama-admin .sama-list-toolbar .lbl svg{ color:#d42020; }
body.sama-admin .sama-list-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 13px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:11.5px; font-weight:600;
  transition:transform .15s ease;
}
body.sama-admin .sama-list-toolbar button:hover{ transform:translateY(-1px); }
body.sama-admin .sama-list-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-list-toolbar .msg{ margin-left:auto; font-size:11.5px; opacity:.85; }
body.sama-admin .sama-list-toolbar .msg.ok{ color:#5fdb86; }
body.sama-admin .sama-list-toolbar .msg.err{ color:#ff8b8b; }

body.sama-admin .sama-list-field{
  outline:1px dashed transparent;
  transition:outline-color .15s ease;
  cursor:text;
  display:inline-block; min-width:50px;
}
body.sama-admin .sama-list-field:hover{ outline-color:rgba(212,32,32,.4); outline-offset:2px; }
body.sama-admin .sama-list-field:focus{ outline:2px solid #d42020; outline-offset:2px; background:rgba(255,245,245,.4); }
body.sama-admin .sama-list-field:empty::before{
  content:'\2014  ' attr(data-placeholder);
  color:#bcc1c6; font-style:italic;
}

body.sama-admin .sama-list-del{
  position:absolute; top:8px; left:50%;
  transform:translateX(-50%) scale(.85);
  width:28px; height:28px; border-radius:50%;
  background:#d42020; color:#fff; border:2px solid #fff;
  cursor:pointer; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  transition:opacity .15s ease, transform .15s ease, background .12s ease;
  z-index:20;
}
body.sama-admin .sama-list-item:hover > .sama-list-del,
body.sama-admin .sama-list-del:hover{
  opacity:1; pointer-events:auto;
  transform:translateX(-50%) scale(1);
}
body.sama-admin .sama-list-del:hover{ background:#b01818; transform:translateX(-50%) scale(1.1); }

/* ============================================================
   Section management (admin only)
   ============================================================ */
body.sama-admin section[data-section-key]{ outline:1px dashed transparent; transition:outline-color .15s ease; }
body.sama-admin section[data-section-key]:hover{ outline-color:rgba(212,32,32,.25); outline-offset:-1px; }
body.sama-admin .sama-sec-bar{
  position:absolute; top:14px; right:14px; z-index:9985;
  display:flex; align-items:center; gap:8px;
  background:rgba(10,11,12,.92); backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.14);
  padding:10px 14px; border-radius:99px;
  opacity:0; transform:translateY(-4px);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:none;
}
/* Show on section hover OR when the bar itself / its popover is hovered/focused —
   prevents flicker when mouse crosses the gap between buttons. */
body.sama-admin section[data-section-key]:hover > .sama-sec-bar,
body.sama-admin section[data-section-key] > .sama-sec-bar:hover,
body.sama-admin section[data-section-key] > .sama-sec-bar:focus-within,
body.sama-admin section[data-section-key]:has(.sama-sec-bgpop) > .sama-sec-bar{
  opacity:1; transform:translateY(0); pointer-events:auto;
}
/* Invisible hit-area extension around the bar so mouse can't "fall off" between buttons */
body.sama-admin .sama-sec-bar::before{
  content:""; position:absolute;
  inset:-12px -12px -16px -12px;
  pointer-events:auto;
}
body.sama-admin .sama-sec-bar .kid{
  font-family:'Inter',monospace; font-size:11px; color:rgba(255,255,255,.6);
  padding:0 8px; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  position:relative; z-index:1;
}
body.sama-admin .sama-sec-bar button{
  width:36px; height:36px; border-radius:50%;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  transition:transform .12s ease, background .12s ease, color .12s ease;
  position:relative; z-index:1;
  font-size:14px;
}
body.sama-admin .sama-sec-bar button svg{ width:14px; height:14px; }
body.sama-admin .sama-sec-bar button:hover{ background:#d42020; color:#fff; transform:scale(1.08); }
body.sama-admin .sama-sec-bar button.is-on{ background:#d42020; color:#fff; }
body.sama-admin .sama-sec-hidden-preview{
  opacity:.35; outline:2px dashed #d42020 !important;
  position:relative;
}
body.sama-admin .sama-sec-hidden-preview::before{
  content:'숨김 (저장 시 일반 사용자에게 보이지 않음)';
  position:absolute; top:8px; left:8px; z-index:9984;
  background:#d42020; color:#fff;
  padding:6px 14px; border-radius:99px;
  font-size:11px; font-weight:700;
}
.sama-sec-savebar{
  position:fixed; top:80px; right:24px; z-index:99996;
  background:#0a0b0c; color:#fff;
  padding:10px 14px; border-radius:99px;
  display:flex; align-items:center; gap:8px;
  box-shadow:0 14px 30px rgba(0,0,0,.3);
  font-size:12px;
}
.sama-sec-savebar .lbl{ font-weight:600; padding:0 8px; }
.sama-sec-savebar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 14px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:11px; font-weight:700;
}
.sama-sec-savebar button.ok{ background:#d42020; color:#fff; }

/* ============================================================
   Icon picker (admin only)
   ============================================================ */
body.sama-admin i.sama-icon-editable{
  position:relative;
  outline:1px dashed transparent; outline-offset:3px;
  border-radius:4px;
  transition:outline-color .15s ease;
}
body.sama-admin i.sama-icon-editable:hover{ outline-color:#d42020; }
.sama-icon-modal .sama-icon-search{
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
  margin:14px 0 10px;
}
.sama-icon-search input{
  padding:10px 14px; border:1.5px solid #dfe3e6; border-radius:10px;
  font-size:13px; outline:none; font-family:inherit;
}
.sama-icon-search input:focus{ border-color:#d42020; }
.sama-icon-grid{
  max-height:360px; overflow-y:auto;
  padding:10px; background:#fafbfc; border-radius:10px;
}
.sama-icon-group-label{
  font-size:11px; font-weight:700; color:#5a6065;
  letter-spacing:.1em; text-transform:uppercase;
  margin:14px 0 8px;
}
.sama-icon-group-label:first-child{ margin-top:0; }
.sama-icon-row{ display:grid; grid-template-columns:repeat(auto-fill, minmax(48px, 1fr)); gap:6px; }
.sama-icon-btn{
  width:100%; aspect-ratio:1; padding:0;
  background:#fff; border:1.5px solid #eef0f2;
  border-radius:8px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  font-size:18px; color:#5a6065;
  transition:all .12s ease;
}
.sama-icon-btn:hover{ border-color:#0a0b0c; color:#0a0b0c; transform:scale(1.05); }
.sama-icon-btn.is-on{ background:#d42020; border-color:#d42020; color:#fff; }

/* Organization chart admin (admin only) */
body.sama-admin .sama-org-toolbar{
  background:#0a0b0c; color:#fff;
  padding:12px 18px; border-radius:12px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:24px; font-size:12.5px;
}
body.sama-admin .sama-org-toolbar .lbl{ display:inline-flex; align-items:center; gap:6px; font-weight:700; }
body.sama-admin .sama-org-toolbar .lbl svg{ color:#d42020; }
body.sama-admin .sama-org-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 13px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:11.5px; font-weight:600;
}
body.sama-admin .sama-org-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-org-toolbar .msg{ margin-left:auto; font-size:11.5px; opacity:.85; }
body.sama-admin .sama-org-toolbar .msg.ok{ color:#5fdb86; }
body.sama-admin .sama-org-toolbar .msg.err{ color:#ff8b8b; }

body.sama-admin .sn-org .row, body.sama-admin .sn-org .top{
  position:relative; padding:6px;
  outline:1px dashed transparent; transition:outline-color .15s ease; border-radius:8px;
}
body.sama-admin .sn-org .row:hover, body.sama-admin .sn-org .top:hover{ outline-color:rgba(212,32,32,.3); outline-offset:4px; }
body.sama-admin .sn-org .sama-org-edit{
  cursor:text;
  outline:1px dashed transparent;
}
body.sama-admin .sn-org .sama-org-edit:hover{ outline-color:rgba(212,32,32,.5); outline-offset:2px; }
body.sama-admin .sn-org .sama-org-edit:focus{ outline:2px solid #d42020; outline-offset:2px; }
body.sama-admin .sn-org .sama-org-del{
  position:absolute; top:-8px; right:-8px;
  width:20px; height:20px; border-radius:50%;
  background:#d42020; color:#fff; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s ease;
  z-index:10;
}
body.sama-admin .sn-org .sama-org-edit:hover > .sama-org-del{ opacity:1; }
body.sama-admin .sn-org .sama-org-add-box{
  width:36px; height:36px; border-radius:50%;
  background:#fff; border:1.5px dashed #c8ced3; color:#5a6065; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  margin-left:6px; align-self:center;
  opacity:0; transition:opacity .15s ease, all .15s ease;
}
body.sama-admin .sn-org .row:hover .sama-org-add-box,
body.sama-admin .sn-org .top:hover .sama-org-add-box{ opacity:1; }
body.sama-admin .sn-org .sama-org-add-box:hover{ border-color:#d42020; color:#d42020; transform:scale(1.1); }
body.sama-admin .sn-org .sama-org-del-row{
  position:absolute; top:6px; right:6px;
  width:24px; height:24px; border-radius:50%;
  background:#d42020; color:#fff; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s ease;
  z-index:10;
}
body.sama-admin .sn-org .row:hover > .sama-org-del-row,
body.sama-admin .sn-org .top:hover > .sama-org-del-row{ opacity:1; }

/* Admin shortcuts FAB stack (admin only) */
body.sama-admin .sama-admin-shortcuts{
  position:fixed; right:24px; top:96px; z-index:9988;
  display:flex; flex-direction:column; gap:8px; align-items:flex-end;
}
body.sama-admin .sama-admin-shortcuts .trig{
  width:44px; height:44px; border-radius:50%;
  background:#0a0b0c; color:#fff; border:0; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 12px 30px rgba(0,0,0,.3);
  transition:all .2s ease;
}
body.sama-admin .sama-admin-shortcuts .trig:hover{ background:#d42020; transform:scale(1.1); }
body.sama-admin .sama-admin-shortcuts.is-open .trig{ transform:rotate(45deg); background:#d42020; }
body.sama-admin .sama-admin-shortcuts .ic{
  width:38px; height:38px; border-radius:50%;
  background:#fff; color:#0a0b0c;
  display:flex; align-items:center; justify-content:center;
  text-decoration:none; cursor:pointer; border:1.5px solid #eef0f2;
  box-shadow:0 6px 16px rgba(0,0,0,.12);
  opacity:0; pointer-events:none;
  transform:scale(.5) translateX(20px);
  transition:all .15s ease;
  position:relative;
}
body.sama-admin .sama-admin-shortcuts.is-open .ic{ opacity:1; pointer-events:auto; transform:scale(1) translateX(0); }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(2){ transition-delay:0s; }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(3){ transition-delay:.04s; }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(4){ transition-delay:.08s; }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(5){ transition-delay:.12s; }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(6){ transition-delay:.16s; }
body.sama-admin .sama-admin-shortcuts .ic:hover{ background:#0a0b0c; color:#fff; border-color:#0a0b0c; transform:scale(1.1); }
body.sama-admin .sama-admin-shortcuts .ic.ic-out:hover{ background:#d42020; border-color:#d42020; }
body.sama-admin .sama-admin-shortcuts .ic[data-t]::before{
  content:attr(data-t);
  position:absolute; right:48px; top:50%; transform:translateY(-50%);
  background:#0a0b0c; color:#fff;
  padding:5px 10px; border-radius:6px;
  font-size:11px; font-weight:600; white-space:nowrap;
  opacity:0; pointer-events:none;
  transition:opacity .15s ease;
}
body.sama-admin .sama-admin-shortcuts .ic:hover::before{ opacity:1; }

/* Color customizer */
.sama-color-row{ display:flex; flex-direction:column; gap:8px; margin:14px 0; }
.sama-color-row label{ font-size:12px; font-weight:600; color:#3a3f44; }
.sama-color-row .ipt{ display:flex; gap:8px; align-items:center; }
.sama-color-row input[type="color"]{
  width:48px; height:38px; border:1.5px solid #dfe3e6; border-radius:8px;
  padding:2px; cursor:pointer; background:#fff;
}
.sama-color-row input[type="text"]{
  flex:1; padding:9px 12px; border:1.5px solid #dfe3e6; border-radius:8px;
  font-family:'Inter',monospace; font-size:13px; color:#0a0b0c; outline:none;
}
.sama-color-row input[type="text"]:focus{ border-color:#d42020; }
.sama-color-presets{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  margin-top:18px; padding-top:14px; border-top:1px solid #eef0f2;
}
.sama-color-presets .lbl{ font-size:11px; color:#7c8385; font-weight:600; margin-right:4px; }
.sama-color-presets button{
  width:30px; height:30px; border-radius:50%; border:2px solid #fff;
  outline:1px solid #dfe3e6; cursor:pointer;
  transition:all .15s ease;
}
.sama-color-presets button:hover{ transform:scale(1.15); outline-color:#0a0b0c; }
.sama-color-preview{
  margin-top:18px; padding:18px; border-radius:10px;
  background:#f6f8f7; border:1px solid #e6eae8;
}
.sama-color-preview h2{ margin:0 0 8px; padding-bottom:8px; font-size:18px; }
.sama-color-preview p{ margin:0 0 12px; font-size:13px; }
.sama-color-preview .btn-p{
  padding:8px 18px; border-radius:99px; border:0; font-size:12px; font-weight:700;
  cursor:pointer;
}

/* Section bg-color popover */
body.sama-admin .sama-sec-bgpop{
  position:absolute; top:64px; right:14px; z-index:10020;
  background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.22); padding:12px; width:240px;
}
body.sama-admin .sama-sec-bgpop .row{ display:grid; grid-template-columns:repeat(6,1fr); gap:6px; margin-bottom:8px; }
body.sama-admin .sama-sec-bgpop .row button{ width:100%; aspect-ratio:1/1; border:1px solid #d1d5db; border-radius:6px; cursor:pointer; padding:0; }
body.sama-admin .sama-sec-bgpop .row button:hover{ border-color:#0a0b0c; transform:scale(1.06); }
body.sama-admin .sama-sec-bgpop .row2{ display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:11px; }
body.sama-admin .sama-sec-bgpop .row2 label{ display:flex; align-items:center; gap:4px; }
body.sama-admin .sama-sec-bgpop .row2 input[type=color]{ width:30px; height:24px; border:1px solid #d1d5db; border-radius:4px; padding:0; cursor:pointer; }
body.sama-admin .sama-sec-bgpop .row2 button{ background:#f1f3f5; border:1px solid #d1d5db; border-radius:4px; padding:3px 8px; font-size:10px; cursor:pointer; }
body.sama-admin .sama-sec-bgpop .row2 button:hover{ background:#e5e7eb; }

/* Org chart — drag/drop visual indicators + spacing */
body.sama-admin .sn-org [data-org-box]{
  cursor:grab;
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
body.sama-admin .sn-org [data-org-box]:hover{
  box-shadow:0 6px 16px rgba(0,0,0,.12);
}
body.sama-admin .sn-org [data-org-box].is-dragging{
  opacity:.4;
  cursor:grabbing;
}
body.sama-admin .sn-org [data-org-box].is-drop-before{
  box-shadow:-3px 0 0 0 #d42020, 0 6px 16px rgba(0,0,0,.12);
}
body.sama-admin .sn-org [data-org-box].is-drop-after{
  box-shadow:3px 0 0 0 #d42020, 0 6px 16px rgba(0,0,0,.12);
}
body.sama-admin .sn-org .row.is-drop-row,
body.sama-admin .sn-org .top.is-drop-row{
  background:rgba(212,32,32,.05);
  outline:2px dashed rgba(212,32,32,.4);
  outline-offset:4px;
  border-radius:8px;
}
/* Public + admin — boxes never overlap text */
.sn-org .box{ word-break:keep-all; max-width:280px; }
.sn-org .row, .sn-org .top{ row-gap:16px; }

/* ===== Mobility hotspot admin editor ===== */
body.sama-admin .sama-mob-bar{
  position:absolute; top:18px; left:18px; z-index:30;
  display:flex; align-items:center; gap:10px;
  background:rgba(10,11,12,.92); color:#fff;
  border:1px solid rgba(255,255,255,.14);
  padding:8px 12px; border-radius:99px;
  font-size:12px; font-weight:600;
  box-shadow:0 6px 20px rgba(0,0,0,.2);
}
body.sama-admin .sama-mob-bar .lbl{ padding:0 4px; }
body.sama-admin .sama-mob-bar button{
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  padding:6px 14px; border-radius:99px; font-size:12px; font-weight:700;
  transition:all .12s ease;
}
body.sama-admin .sama-mob-bar button:hover{ background:#d42020; color:#fff; transform:translateY(-1px); }
body.sama-admin .sama-mob-bar .msg{ font-size:11px; padding:0 6px; opacity:0; transition:opacity .15s ease; }
body.sama-admin .sama-mob-bar .msg.ok{ opacity:1; color:#86efac; }
body.sama-admin .sama-mob-bar .msg.err{ opacity:1; color:#fca5a5; }

/* hotspots in admin mode */
body.sama-admin .mb5 .hot.is-admin{ cursor:grab; }
body.sama-admin .mb5 .hot.is-admin.is-dragging{ cursor:grabbing; opacity:.8; z-index:50; }
body.sama-admin .mb5 .car-stage.is-admin-drag .hot{ pointer-events:none; }
body.sama-admin .mb5 .car-stage.is-admin-drag .hot.is-dragging{ pointer-events:auto; }
body.sama-admin .mb5 .hot.is-admin .mob-del,
body.sama-admin .mb5 .hot.is-admin .mob-edit{
  position:absolute; width:26px; height:26px; border-radius:50%;
  background:#fff; color:#0a0b0c; border:2px solid #fff;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; font-size:14px; font-weight:700; line-height:1;
  box-shadow:0 4px 12px rgba(0,0,0,.35);
  z-index:60; padding:0;
  opacity:0; transform:scale(.6); pointer-events:none;
  transition:opacity .15s ease, transform .15s ease, background .12s ease, color .12s ease;
}
body.sama-admin .mb5 .hot.is-admin .mob-del{ top:-13px; right:-13px; color:#d42020; }
body.sama-admin .mb5 .hot.is-admin .mob-edit{ top:-13px; left:-13px; color:#16a34a; }
/* Visible only when JS sets is-hovered (with 250ms hide delay → click reliable) */
body.sama-admin .mb5 .hot.is-admin.is-hovered .mob-del,
body.sama-admin .mb5 .hot.is-admin.is-hovered .mob-edit{
  opacity:1; transform:scale(1); pointer-events:auto;
}
body.sama-admin .mb5 .hot.is-admin .mob-del:hover{ background:#d42020; color:#fff; transform:scale(1.16); }
body.sama-admin .mb5 .hot.is-admin .mob-edit:hover{ background:#16a34a; color:#fff; transform:scale(1.16); }
body.sama-admin .mb5 .hot.is-admin .mob-del:hover{ background:#d42020; color:#fff; }
body.sama-admin .mb5 .hot.is-admin .mob-edit:hover{ background:#16a34a; color:#fff; }

/* edit modal */
body.sama-admin .sama-mob-modal{
  position:fixed; inset:0; z-index:99999;
  background:rgba(0,0,0,.55); backdrop-filter:blur(4px);
  display:none; align-items:center; justify-content:center;
  padding:24px;
}
body.sama-admin .sama-mob-modal.open{ display:flex; }
body.sama-admin .sama-mob-modal .box{
  background:#fff; border-radius:14px;
  width:100%; max-width:480px; max-height:90vh; overflow:auto;
  box-shadow:0 30px 80px rgba(0,0,0,.3);
}
body.sama-admin .sama-mob-modal header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid #e5e7eb;
}
body.sama-admin .sama-mob-modal header .t{ font-size:16px; font-weight:800; color:#0a0b0c; }
body.sama-admin .sama-mob-modal header .x{ background:transparent; border:0; font-size:22px; cursor:pointer; color:#6b7280; width:30px; height:30px; border-radius:50%; }
body.sama-admin .sama-mob-modal header .x:hover{ background:#f3f4f6; color:#0a0b0c; }
body.sama-admin .sama-mob-modal .body{ padding:18px 22px; display:grid; gap:14px; }
body.sama-admin .sama-mob-modal label{ display:block; font-size:12px; font-weight:600; color:#374151; }
body.sama-admin .sama-mob-modal input[type=text],
body.sama-admin .sama-mob-modal input[type=number],
body.sama-admin .sama-mob-modal select,
body.sama-admin .sama-mob-modal textarea{
  width:100%; margin-top:6px;
  padding:9px 12px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px; font-family:inherit;
}
body.sama-admin .sama-mob-modal input:focus,
body.sama-admin .sama-mob-modal select:focus,
body.sama-admin .sama-mob-modal textarea:focus{
  border-color:#d42020; outline:0; box-shadow:0 0 0 3px rgba(212,32,32,.12);
}
body.sama-admin .sama-mob-modal label.coords{ display:flex; gap:10px; align-items:flex-end; }
body.sama-admin .sama-mob-modal label.coords input{ width:80px; }
body.sama-admin .sama-mob-modal footer{
  padding:14px 22px; border-top:1px solid #e5e7eb;
  display:flex; justify-content:flex-end; gap:8px;
}
body.sama-admin .sama-mob-modal footer button{
  padding:8px 18px; border-radius:8px; border:1px solid #d1d5db;
  background:#fff; cursor:pointer; font-size:13px; font-weight:600;
}
body.sama-admin .sama-mob-modal footer button.ok{ background:#d42020; color:#fff; border-color:#d42020; }
body.sama-admin .sama-mob-modal footer button.ok:hover{ background:#b01818; }

/* Mobility editor preview block */
body.sama-admin .sama-mob-modal .preview-row{
  display:flex; gap:14px; align-items:center;
  padding:14px; background:#f9fafb;
  border:1px solid #e5e7eb; border-radius:10px;
}
body.sama-admin .sama-mob-modal .preview-pic{
  width:120px; height:78px; border-radius:8px;
  background:#1a202c center/cover no-repeat;
  flex-shrink:0;
  border:1px solid #e5e7eb;
  background-size:cover;
}
body.sama-admin .sama-mob-modal .preview-meta{ display:flex; flex-direction:column; gap:4px; min-width:0; }
body.sama-admin .sama-mob-modal .preview-cat{
  font-family:"Montserrat", sans-serif; font-size:10px; letter-spacing:.18em;
  color:#d42020; font-weight:700;
}
body.sama-admin .sama-mob-modal .preview-name{
  font-size:14px; font-weight:700; color:#0a0b0c;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* Mobility — never clip tooltips (overrides .car-stage{overflow:hidden}) */
body.sama-admin .mb5 .car-stage{ overflow:visible !important; }
body.sama-admin .mb5 .hotspots{ overflow:visible !important; }
/* Prevent overlong tip from running off — allow internal scroll */
.mb5 .hot .tip{ max-height:min(60vh, 320px); overflow:auto; }
.mb5 .hot .tip .pic{ flex-shrink:0; }

/* ===== Organization chart admin chrome ===== */
body.sama-admin .sama-org-toolbar{
  position:sticky; top:80px; z-index:100;
  display:flex; align-items:center; gap:8px;
  background:rgba(10,11,12,.92); color:#fff;
  border:1px solid rgba(255,255,255,.14); border-radius:99px;
  padding:8px 14px; margin:0 auto 24px; width:fit-content;
  font-size:12px; box-shadow:0 6px 20px rgba(0,0,0,.18);
}
body.sama-admin .sama-org-toolbar .lbl{ font-weight:600; padding:0 4px; }
body.sama-admin .sama-org-toolbar button{
  background:#fff; color:#0a0b0c; border:0;
  padding:7px 14px; border-radius:99px; cursor:pointer;
  font-size:12px; font-weight:700;
  display:inline-flex; align-items:center; gap:5px;
  transition:all .12s ease;
}
body.sama-admin .sama-org-toolbar button:hover{ background:#f3f4f6; transform:translateY(-1px); }
body.sama-admin .sama-org-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-org-toolbar button.ok:hover{ background:#b01818; }
body.sama-admin .sama-org-toolbar .msg{ font-size:11px; opacity:0; transition:opacity .15s ease; padding-left:6px; }
body.sama-admin .sama-org-toolbar .msg.ok{ opacity:1; color:#86efac; }
body.sama-admin .sama-org-toolbar .msg.err{ opacity:1; color:#fca5a5; }

body.sama-admin .org-box.sama-org-edit{ position:relative; }
body.sama-admin .org-box .sama-org-del,
body.sama-admin .org-box .sama-org-edit-btn{
  position:absolute; width:24px; height:24px; border-radius:50%;
  background:#fff; border:2px solid #fff; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:10;
  box-shadow:0 3px 8px rgba(0,0,0,.2);
  opacity:0; transform:scale(.85);
  transition:opacity .12s ease, transform .12s ease, background .12s ease;
}
body.sama-admin .org-box .sama-org-del{ top:-10px; right:-10px; color:#d42020; }
body.sama-admin .org-box .sama-org-edit-btn{ top:-10px; left:-10px; color:#16a34a; }
body.sama-admin .org-box:hover .sama-org-del,
body.sama-admin .org-box:hover .sama-org-edit-btn,
body.sama-admin .org-box .sama-org-del:hover,
body.sama-admin .org-box .sama-org-edit-btn:hover{
  opacity:1; transform:scale(1);
}
body.sama-admin .org-box .sama-org-del:hover{ background:#d42020; color:#fff; }
body.sama-admin .org-box .sama-org-edit-btn:hover{ background:#16a34a; color:#fff; }

body.sama-admin .org-row{ position:relative; }
body.sama-admin .sama-org-add-box,
body.sama-admin .sama-org-del-row{
  background:rgba(255,255,255,.9); border:1px dashed #d42020;
  color:#d42020; padding:0; cursor:pointer;
  width:32px; height:32px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  margin:auto 0;
  opacity:0; transition:opacity .15s ease, background .12s ease;
}
body.sama-admin .org-row:hover .sama-org-add-box,
body.sama-admin .org-row:hover .sama-org-del-row{ opacity:.85; }
body.sama-admin .sama-org-add-box:hover,
body.sama-admin .sama-org-del-row:hover{ opacity:1; background:#d42020; color:#fff; }

/* Drag indicators */
body.sama-admin .org-box[draggable="true"]{ cursor:grab; }
body.sama-admin .org-box.is-dragging{ opacity:.4; }
body.sama-admin .org-box.is-drop-before{ box-shadow:-3px 0 0 0 #d42020; }
body.sama-admin .org-box.is-drop-after{ box-shadow:3px 0 0 0 #d42020; }

/* Edit modal */
body.sama-admin .sama-org-modal{
  position:fixed; inset:0; z-index:99999;
  background:rgba(0,0,0,.55); backdrop-filter:blur(4px);
  display:none; align-items:center; justify-content:center; padding:24px;
}
body.sama-admin .sama-org-modal.open{ display:flex; }
body.sama-admin .sama-org-modal .box{
  background:#fff; border-radius:14px;
  width:100%; max-width:460px; max-height:90vh; overflow:auto;
  box-shadow:0 30px 80px rgba(0,0,0,.3);
}
body.sama-admin .sama-org-modal header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid #e5e7eb;
}
body.sama-admin .sama-org-modal header .t{ font-size:16px; font-weight:800; }
body.sama-admin .sama-org-modal header .x{
  background:transparent; border:0; font-size:22px; cursor:pointer;
  width:30px; height:30px; border-radius:50%; color:#6b7280;
}
body.sama-admin .sama-org-modal header .x:hover{ background:#f3f4f6; }
body.sama-admin .sama-org-modal .body{ padding:18px 22px; display:grid; gap:12px; }
body.sama-admin .sama-org-modal label{ display:block; font-size:12px; font-weight:600; color:#374151; }
body.sama-admin .sama-org-modal input[type=text],
body.sama-admin .sama-org-modal textarea{
  width:100%; margin-top:5px;
  padding:9px 12px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px; font-family:inherit;
}
body.sama-admin .sama-org-modal input:focus,
body.sama-admin .sama-org-modal textarea:focus{
  border-color:#d42020; outline:0; box-shadow:0 0 0 3px rgba(212,32,32,.12);
}
body.sama-admin .sama-org-modal .chk{ display:flex; align-items:center; gap:8px; padding:6px 0; }
body.sama-admin .sama-org-modal .chk input{ width:16px; height:16px; }
body.sama-admin .sama-org-modal .preview-wrap{
  display:flex; justify-content:center; padding:14px;
  background:#f9fafb; border:1px solid #e5e7eb; border-radius:10px;
  margin-bottom:6px;
}
body.sama-admin .sama-org-modal .preview{ pointer-events:none; }
body.sama-admin .sama-org-modal footer{
  padding:14px 22px; border-top:1px solid #e5e7eb;
  display:flex; justify-content:flex-end; gap:8px;
}
body.sama-admin .sama-org-modal footer button{
  padding:8px 18px; border-radius:8px; border:1px solid #d1d5db;
  background:#fff; cursor:pointer; font-size:13px; font-weight:600;
}
body.sama-admin .sama-org-modal footer button.ok{ background:#d42020; color:#fff; border-color:#d42020; }
body.sama-admin .sama-org-modal footer button.ok:hover{ background:#b01818; }

/* ===== Org TREE editor admin chrome ===== */
body.sama-admin .org-card{ position:relative; }
body.sama-admin .org-card .sama-org-del,
body.sama-admin .org-card .sama-org-edit-btn,
body.sama-admin .org-card .sama-org-add-child,
body.sama-admin .org-card .sama-org-add-sibling{
  position:absolute; width:22px; height:22px; border-radius:50%;
  background:#fff; border:2px solid #fff;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; padding:0; line-height:1;
  font-size:12px; font-weight:700;
  box-shadow:0 3px 8px rgba(0,0,0,.2);
  z-index:30;
  opacity:0; transform:scale(.8);
  transition:opacity .15s ease, transform .15s ease, background .12s ease, color .12s ease;
}
body.sama-admin .org-card .sama-org-del{ top:-10px; right:-10px; }
body.sama-admin .org-card .sama-org-edit-btn{ top:-10px; left:-10px; }
body.sama-admin .org-card .sama-org-add-child{ bottom:-10px; left:50%; transform:translateX(-50%) scale(.8); }
body.sama-admin .org-card .sama-org-add-sibling{ top:50%; right:-12px; transform:translateY(-50%) scale(.8); }
body.sama-admin .org-card:hover .sama-org-del,
body.sama-admin .org-card:hover .sama-org-edit-btn,
body.sama-admin .org-card:hover .sama-org-add-child,
body.sama-admin .org-card:hover .sama-org-add-sibling{
  opacity:1; transform:scale(1);
}
body.sama-admin .org-card:hover .sama-org-add-child{ transform:translateX(-50%) scale(1); }
body.sama-admin .org-card:hover .sama-org-add-sibling{ transform:translateY(-50%) scale(1); }
body.sama-admin .org-card .sama-org-del:hover{ background:#d42020; color:#fff !important; transform:scale(1.18); }
body.sama-admin .org-card .sama-org-edit-btn:hover{ background:#16a34a; color:#fff !important; transform:scale(1.18); }
body.sama-admin .org-card .sama-org-add-child:hover{ background:#2563eb; color:#fff !important; transform:translateX(-50%) scale(1.18); }
body.sama-admin .org-card .sama-org-add-sibling:hover{ background:#9333ea; color:#fff !important; transform:translateY(-50%) scale(1.18); }

/* drag */
body.sama-admin .org-card[draggable="true"]{ cursor:grab; }
body.sama-admin .org-card[draggable="true"]:active{ cursor:grabbing; }
body.sama-admin .org-node.is-dragging{ opacity:.4; }
body.sama-admin .org-node.is-drop-target > .org-card .org-card-inner{
  outline:3px dashed #d42020; outline-offset:4px;
  background:rgba(212,32,32,.08) !important;
}

/* toolbar */
body.sama-admin .sama-org-toolbar{
  position:sticky; top:80px; z-index:100;
  display:flex; align-items:center; gap:8px;
  background:rgba(10,11,12,.92); color:#fff;
  border:1px solid rgba(255,255,255,.14); border-radius:99px;
  padding:8px 14px; margin:0 auto 24px; width:fit-content;
  font-size:12px; box-shadow:0 6px 20px rgba(0,0,0,.18);
  flex-wrap:wrap; max-width:100%;
}
body.sama-admin .sama-org-toolbar .lbl{ font-weight:600; padding:0 4px; }
body.sama-admin .sama-org-toolbar button{
  background:#fff; color:#0a0b0c; border:0;
  padding:7px 14px; border-radius:99px; cursor:pointer;
  font-size:12px; font-weight:700;
  transition:all .12s ease;
}
body.sama-admin .sama-org-toolbar button:hover{ background:#f3f4f6; transform:translateY(-1px); }
body.sama-admin .sama-org-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-org-toolbar button.ok:hover{ background:#b01818; }
body.sama-admin .sama-org-toolbar .msg{ font-size:11px; opacity:0; transition:opacity .15s ease; padding-left:6px; }
body.sama-admin .sama-org-toolbar .msg.ok{ opacity:1; color:#86efac; }
body.sama-admin .sama-org-toolbar .msg.err{ opacity:1; color:#fca5a5; }

/* edit modal */
body.sama-admin .sama-org-modal{
  position:fixed; inset:0; z-index:99999;
  background:rgba(0,0,0,.55); backdrop-filter:blur(4px);
  display:none; align-items:center; justify-content:center; padding:24px;
}
body.sama-admin .sama-org-modal.open{ display:flex; }
body.sama-admin .sama-org-modal .box{
  background:#fff; border-radius:14px;
  width:100%; max-width:460px; max-height:90vh; overflow:auto;
  box-shadow:0 30px 80px rgba(0,0,0,.3);
}
body.sama-admin .sama-org-modal header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid #e5e7eb;
}
body.sama-admin .sama-org-modal header .t{ font-size:16px; font-weight:800; }
body.sama-admin .sama-org-modal header .x{
  background:transparent; border:0; font-size:22px; cursor:pointer;
  width:30px; height:30px; border-radius:50%; color:#6b7280;
}
body.sama-admin .sama-org-modal header .x:hover{ background:#f3f4f6; }
body.sama-admin .sama-org-modal .body{ padding:18px 22px; display:grid; gap:12px; }
body.sama-admin .sama-org-modal label{ display:block; font-size:12px; font-weight:600; color:#374151; }
body.sama-admin .sama-org-modal input[type=text],
body.sama-admin .sama-org-modal select,
body.sama-admin .sama-org-modal textarea{
  width:100%; margin-top:5px;
  padding:9px 12px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px; font-family:inherit;
}
body.sama-admin .sama-org-modal input:focus,
body.sama-admin .sama-org-modal select:focus,
body.sama-admin .sama-org-modal textarea:focus{
  border-color:#d42020; outline:0; box-shadow:0 0 0 3px rgba(212,32,32,.12);
}
body.sama-admin .sama-org-modal .chk{ display:flex; align-items:center; gap:8px; padding:6px 0; }
body.sama-admin .sama-org-modal .chk input{ width:16px; height:16px; }
body.sama-admin .sama-org-modal footer{
  padding:14px 22px; border-top:1px solid #e5e7eb;
  display:flex; justify-content:flex-end; gap:8px;
}
body.sama-admin .sama-org-modal footer button{
  padding:8px 18px; border-radius:8px; border:1px solid #d1d5db;
  background:#fff; cursor:pointer; font-size:13px; font-weight:600;
}
body.sama-admin .sama-org-modal footer button.ok{ background:#d42020; color:#fff; border-color:#d42020; }
body.sama-admin .sama-org-modal footer button.ok:hover{ background:#b01818; }

/* ===== Icon picker v2 ===== */
.sama-icon-modal .sama-imgmgr-modal-inner{ max-width:780px; }
.sama-icon-preview-bar{
  display:flex; align-items:center; gap:18px;
  background:#f3f4f6; border-radius:12px;
  padding:14px 18px; margin:12px 0 14px;
  border:1px solid #e5e7eb;
}
.sama-icon-preview-bar .preview-tile{
  width:64px; height:64px; border-radius:12px;
  background:#fff; border:1px solid #e5e7eb;
  display:flex; align-items:center; justify-content:center;
  font-size:32px; color:#d42020;
  flex-shrink:0;
}
.sama-icon-preview-bar .preview-tile .empty{ font-size:11px; color:#9ca3af; }
.sama-icon-preview-bar .preview-meta{ display:flex; flex-direction:column; gap:6px; min-width:0; flex:1; }
.sama-icon-preview-bar .preview-meta > div{ font-size:12px; color:#6b7280; }
.sama-icon-preview-bar .preview-meta code{
  background:#fff; padding:2px 8px; border-radius:4px;
  font-family:ui-monospace, monospace; color:#0a0b0c;
  border:1px solid #e5e7eb;
}

.sama-icon-search{ display:flex; gap:8px; margin-bottom:14px; }
.sama-icon-search input{
  width:100%; flex:1;
  padding:10px 14px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px;
}
.sama-icon-search input:focus{ border-color:#d42020; outline:0; box-shadow:0 0 0 3px rgba(212,32,32,.12); }

.sama-icon-grid{
  max-height:420px; overflow-y:auto;
  border:1px solid #e5e7eb; border-radius:10px;
  padding:14px; background:#fafbfc;
}
.sama-icon-grid::-webkit-scrollbar{ width:8px; }
.sama-icon-grid::-webkit-scrollbar-thumb{ background:#cbd5e1; border-radius:4px; }
.sama-icon-group-label{
  font-size:11px; font-weight:700; letter-spacing:.08em;
  color:#6b7280; text-transform:uppercase;
  margin:14px 0 6px; padding-bottom:4px;
  border-bottom:1px dashed #e5e7eb;
}
.sama-icon-group-label:first-child{ margin-top:0; }
.sama-icon-row{
  display:grid; grid-template-columns:repeat(8, 1fr); gap:6px;
  margin-bottom:6px;
}
.sama-icon-btn{
  background:#fff; border:1px solid #e5e7eb; border-radius:8px;
  padding:10px 4px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  font-size:18px; color:#374151;
  transition:all .12s ease;
}
.sama-icon-btn .name{
  font-size:9px; color:#9ca3af; font-weight:500;
  letter-spacing:.02em; max-width:100%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.sama-icon-btn:hover{ border-color:#d42020; color:#d42020; transform:translateY(-1px); box-shadow:0 4px 8px rgba(0,0,0,.06); }
.sama-icon-btn.is-on{ background:#d42020; color:#fff; border-color:#d42020; }
.sama-icon-btn.is-on .name{ color:rgba(255,255,255,.9); }

.sama-icon-empty{
  text-align:center; padding:40px 20px;
  color:#9ca3af; font-size:13px;
}

.sama-icon-actions{ display:flex; gap:8px; margin-top:14px; }
.sama-icon-actions .btn-cancel{
  background:#fff; color:#0a0b0c; border:1px solid #d1d5db;
  padding:9px 18px; border-radius:8px; cursor:pointer; font-weight:600;
}
.sama-icon-actions .btn-cancel:hover{ background:#f3f4f6; }
.sama-icon-actions .btn-remove{
  background:#fff5f5; color:#d42020; border:1px solid #fecaca;
  padding:9px 16px; border-radius:8px; cursor:pointer; font-weight:600;
  margin-left:auto;
}
.sama-icon-actions .btn-remove:hover{ background:#fee2e2; }
.sama-icon-actions .btn-save{
  background:#d42020; color:#fff; border:0;
  padding:9px 22px; border-radius:8px; cursor:pointer; font-weight:700;
}
.sama-icon-actions .btn-save:hover:not(:disabled){ background:#b01818; }
.sama-icon-actions .btn-save:disabled{ background:#cbd5e1; cursor:not-allowed; }

/* Removed-icon placeholder (admin-only re-add target) */
body.sama-admin .sama-icon-placeholder{
  display:inline-flex; align-items:center; justify-content:center;
  width:1.4em; height:1.4em; min-width:24px; min-height:24px;
  border:2px dashed #cbd5e1; border-radius:6px;
  background:#fafbfc; color:#9ca3af;
  font-size:14px; font-weight:600; line-height:1;
  cursor:pointer; padding:0;
  vertical-align:middle;
  transition:all .15s ease;
}
body.sama-admin .sama-icon-placeholder:hover{
  border-color:#d42020; color:#d42020; background:#fff5f5;
  transform:scale(1.08);
}
body.sama-admin .sama-icon-placeholder span{ display:inline-block; }

/* Editable icon visual hint */
body.sama-admin .sama-icon-editable{
  outline:1px dashed transparent; outline-offset:2px;
  transition:outline-color .15s ease;
  border-radius:4px;
}
body.sama-admin .sama-icon-editable:hover{ outline-color:rgba(212,32,32,.5); }

/* ===================================================================
   Mobility — Product Gallery (auto from hotspots) + Lightbox modal
   =================================================================== */

/* ----- Gallery section ----- */
.mb5-gallery{
  background:linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
  padding:80px 24px 100px;
  border-top:1px solid #e5e7eb;
}
.mb5-gallery-inner{ max-width:1400px; margin:0 auto; }
.mb5-gallery-head{ text-align:center; margin-bottom:36px; }
.mb5-gallery-head .eyebrow{
  display:inline-block; font-family:"Montserrat", sans-serif;
  font-size:11px; font-weight:700; letter-spacing:.32em;
  color:#d42020; margin-bottom:14px;
}
.mb5-gallery-head h2{
  font-size:clamp(28px, 3.4vw, 42px); font-weight:800;
  color:#0a0b0c; letter-spacing:-.025em; line-height:1.2;
  margin:0 0 12px;
}
.mb5-gallery-head .lead{
  font-size:14px; color:#6b7280; max-width:520px;
  margin:0 auto; line-height:1.65;
}
.mb5-gallery-tabs{
  display:flex; justify-content:center; gap:6px;
  margin:0 auto 32px; padding:6px;
  background:#fff; border:1px solid #e5e7eb; border-radius:99px;
  width:fit-content;
}
.mb5-gallery-tabs .gtab{
  background:transparent; border:0; padding:8px 22px;
  font-family:"Montserrat", sans-serif;
  font-size:12px; font-weight:700; letter-spacing:.18em;
  color:#6b7280; cursor:pointer; border-radius:99px;
  transition:all .2s ease;
}
.mb5-gallery-tabs .gtab:hover{ color:#0a0b0c; }
.mb5-gallery-tabs .gtab.is-active{
  background:#d42020; color:#fff;
  box-shadow:0 4px 12px rgba(212,32,32,.32);
}

.mb5-gallery-grid{
  display:grid; gap:18px;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
}
.mb5-gallery-empty{
  text-align:center; padding:60px 20px;
  color:#9ca3af;
}
.mb5-gallery-empty i{ font-size:48px; color:#cbd5e1; margin-bottom:14px; display:block; }
.mb5-gallery-empty p{ font-size:14px; line-height:1.65; margin:0; }

/* Gallery card */
.mb5-gcard{
  background:#fff; border:1px solid #e5e7eb; border-radius:14px;
  overflow:hidden; cursor:pointer;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display:flex; flex-direction:column;
}
.mb5-gcard:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 36px rgba(0,0,0,.10);
  border-color:#d42020;
}
.mb5-gcard-img{
  width:100%; aspect-ratio:4 / 3;
  background:#f3f4f6 center/cover no-repeat;
  position:relative; overflow:hidden;
}
.mb5-gcard-img.is-svg{ background-size:cover; }
.mb5-gcard-img::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, transparent 60%, rgba(0,0,0,.18));
  opacity:0; transition:opacity .25s ease;
}
.mb5-gcard:hover .mb5-gcard-img::after{ opacity:1; }
.mb5-gcard-zoom{
  position:absolute; top:12px; right:12px;
  width:34px; height:34px; border-radius:50%;
  background:rgba(255,255,255,.95); color:#0a0b0c;
  display:flex; align-items:center; justify-content:center;
  opacity:0; transform:translateY(-4px) scale(.9);
  transition:opacity .25s ease, transform .25s ease;
  font-size:13px;
}
.mb5-gcard:hover .mb5-gcard-zoom{ opacity:1; transform:translateY(0) scale(1); }
.mb5-gcard-meta{ padding:14px 16px 18px; }
.mb5-gcard-cat{
  font-family:"Montserrat", sans-serif;
  font-size:10px; font-weight:700; letter-spacing:.18em;
  color:#d42020; margin-bottom:6px;
}
.mb5-gcard-name{
  font-size:14px; font-weight:700; color:#0a0b0c;
  line-height:1.4; word-break:keep-all;
}
.mb5-gcard-view{
  display:inline-block; margin-top:6px;
  font-size:10px; padding:2px 8px; border-radius:99px;
  background:#f3f4f6; color:#6b7280; font-weight:600;
}

/* ----- Lightbox modal (2-column) ----- */
.mb5-lightbox{
  position:fixed; inset:0; z-index:9999;
  display:none; align-items:center; justify-content:center;
  padding:24px;
}
.mb5-lightbox.is-open{ display:flex; }
.mb5-lb-backdrop{
  position:absolute; inset:0;
  background:rgba(10,11,12,.78); backdrop-filter:blur(6px);
  cursor:pointer;
  animation:mb5LbFadeIn .25s ease;
}
.mb5-lb-box{
  position:relative; z-index:1;
  width:100%; max-width:1080px; max-height:90vh;
  background:#fff; border-radius:18px;
  box-shadow:0 40px 100px rgba(0,0,0,.45);
  overflow:hidden;
  animation:mb5LbZoomIn .3s cubic-bezier(.16,1,.3,1);
}
@keyframes mb5LbFadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes mb5LbZoomIn { from { opacity:0; transform:scale(.94) } to { opacity:1; transform:scale(1) } }

.mb5-lb-grid{
  display:grid; grid-template-columns:1.1fr 1fr;
  min-height:480px; max-height:90vh;
}
.mb5-lb-image{
  background:#fff center/contain no-repeat;
  position:relative;
  display:flex; align-items:center; justify-content:center;
  border-right:1px solid #f3f4f6;
}
.mb5-lb-empty{
  color:#cbd5e1; font-size:80px;
}
.mb5-lb-content{
  padding:48px 44px;
  display:flex; flex-direction:column; gap:14px;
  overflow-y:auto;
}
.mb5-lb-cat{
  font-family:"Montserrat", sans-serif;
  font-size:11px; font-weight:700; letter-spacing:.28em;
  color:#d42020; text-transform:uppercase;
}
.mb5-lb-title{
  font-size:30px; font-weight:800; color:#0a0b0c;
  letter-spacing:-.02em; line-height:1.2;
  margin:0; word-break:keep-all;
}
.mb5-lb-desc{
  font-size:15px; line-height:1.75; color:#374151;
  margin:6px 0 0; word-break:keep-all;
  white-space:pre-line;
}
.mb5-lb-meta{
  margin-top:auto; padding-top:24px;
  border-top:1px solid #e5e7eb;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12px; color:#9ca3af;
}
.mb5-lb-view{ font-weight:700; color:#d42020; }

.mb5-lb-close{
  position:absolute; top:14px; right:14px; z-index:10;
  width:40px; height:40px; border-radius:50%;
  background:rgba(255,255,255,.95); color:#0a0b0c; border:0;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.18);
  transition:all .2s ease;
}
.mb5-lb-close:hover{ background:#d42020; color:#fff; transform:rotate(90deg); }

.mb5-lb-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:48px; height:48px; border-radius:50%;
  background:rgba(255,255,255,.95); color:#0a0b0c; border:0;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,.2);
  transition:all .2s ease;
  z-index:10;
}
.mb5-lb-nav.prev{ left:16px; }
.mb5-lb-nav.next{ right:16px; }
.mb5-lb-nav:hover{ background:#d42020; color:#fff; transform:translateY(-50%) scale(1.08); }

@media (max-width:760px){
  .mb5-lightbox{ padding:0; }
  .mb5-lb-box{ max-width:100%; max-height:100vh; border-radius:0; }
  .mb5-lb-grid{
    grid-template-columns:1fr;
    grid-template-rows:46vh 1fr;
    max-height:100vh;
  }
  .mb5-lb-content{ padding:28px 22px; }
  .mb5-lb-title{ font-size:22px; }
  .mb5-lb-desc{ font-size:14px; }
  .mb5-lb-nav{ width:40px; height:40px; }
  .mb5-lb-nav.prev{ left:8px; }
  .mb5-lb-nav.next{ right:8px; }
}
