/* ioTab V3.0.36 - custom icon smart input + close guard */
.iotab-add-meta-status{min-height:18px;margin-top:7px;padding:0 4px;font-size:12px;line-height:18px;color:var(--muted-color);transition:color .2s,opacity .2s}
.iotab-add-meta-status.is-loading{color:#4385f1}
.iotab-add-meta-status.is-loading:before{content:"";display:inline-block;width:10px;height:10px;margin-right:6px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-1px;animation:iotabMetaSpin .7s linear infinite}
.iotab-add-meta-status.is-success{color:#19aa2c}
.iotab-add-meta-status.is-error{color:#f1404b}
.iotab-add-meta-status.is-info{color:var(--muted-color)}
.iotab-auto-icon-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px 0;color:var(--muted-color);font-size:12px}
.iotab-auto-icon-preview img{width:68px;height:68px;object-fit:contain;border-radius:16px;background:rgba(var(--main-blur-bg),.65);box-shadow:0 5px 18px var(--main-shadow);padding:5px}
.io-black-mode .iotab-auto-icon-preview img{background:rgba(255,255,255,.08)}
@keyframes iotabMetaSpin{to{transform:rotate(360deg)}}


/* V3.0.36 · custom icon header close button */
.iotab-custom-header-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.iotab-custom-close-btn{display:inline-flex!important;align-items:center;justify-content:center;min-width:72px;border-radius:9px!important;cursor:pointer}
.iotab-custom-close-btn:hover{transform:translateY(-1px)}
.iotab-custom-close-btn:active{transform:translateY(0) scale(.98)}

/* V3.0.36 · unsaved custom-icon confirmation */
.iotab-add-unsaved-overlay{
  position:fixed;inset:0;z-index:2147483200;display:flex;align-items:center;justify-content:center;padding:20px;
  background:rgba(9,16,27,.32);-webkit-backdrop-filter:blur(8px) saturate(135%);backdrop-filter:blur(8px) saturate(135%)
}
.iotab-add-unsaved-dialog{
  width:min(92vw,430px);padding:24px;border-radius:24px;text-align:center;color:#263547;
  background:linear-gradient(145deg,rgba(255,255,255,.90),rgba(245,250,255,.72));
  border:1px solid rgba(255,255,255,.80);box-shadow:0 28px 70px rgba(10,30,55,.24),inset 0 1px 0 rgba(255,255,255,.94)
}
.iotab-add-unsaved-icon{width:48px;height:48px;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:24px;font-weight:900;color:#fff;background:linear-gradient(135deg,#ff9a3c,#ff5f6d);box-shadow:0 10px 22px rgba(255,95,109,.28)}
.iotab-add-unsaved-title{font-size:19px;font-weight:850;margin-bottom:8px}
.iotab-add-unsaved-desc{font-size:13px;line-height:1.65;color:#68788a;margin-bottom:20px}
.iotab-add-unsaved-actions{display:grid;grid-template-columns:1fr 1fr 1.15fr;gap:9px}
.iotab-add-unsaved-actions button{min-height:42px;padding:0 10px;border-radius:13px;border:1px solid rgba(119,137,160,.20);background:rgba(255,255,255,.62);color:#405166;font-size:13px;font-weight:750;cursor:pointer;transition:transform .15s,background .15s,box-shadow .15s}
.iotab-add-unsaved-actions button:hover{background:rgba(255,255,255,.90);transform:translateY(-1px)}
.iotab-add-unsaved-actions button:active{transform:translateY(0) scale(.98)}
.iotab-add-unsaved-actions button:focus-visible{outline:2px solid rgba(77,140,255,.55);outline-offset:2px}
.iotab-add-unsaved-actions .is-primary{color:#fff;border-color:rgba(66,126,255,.30);background:linear-gradient(135deg,#4d8cff,#5ab8ff);box-shadow:0 10px 20px rgba(77,140,255,.22)}
.iotab-add-unsaved-overlay.is-saving{cursor:wait}
.iotab-add-unsaved-overlay.is-saving .iotab-add-unsaved-dialog{opacity:.90}
.iotab-add-unsaved-overlay.is-saving button{cursor:wait}
html.io-black-mode .iotab-add-unsaved-dialog{color:#edf3fa;background:linear-gradient(145deg,rgba(35,43,56,.95),rgba(16,22,31,.90));border-color:rgba(255,255,255,.12);box-shadow:0 30px 80px rgba(0,0,0,.46),inset 0 1px 0 rgba(255,255,255,.08)}
html.io-black-mode .iotab-add-unsaved-desc{color:#a9b8c8}
html.io-black-mode .iotab-add-unsaved-actions button{color:#e8eef6;background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.10)}
html.io-black-mode .iotab-add-unsaved-actions button:hover{background:rgba(255,255,255,.11)}
html.io-black-mode .iotab-add-unsaved-actions .is-primary{background:linear-gradient(135deg,#3d78e8,#4ca8f5)}
@media (max-width:640px){
  .iotab-custom-header-actions{gap:6px}
  .iotab-custom-close-btn{min-width:62px;padding-left:10px!important;padding-right:10px!important}
  .iotab-add-unsaved-overlay{padding:14px;align-items:flex-end}
  .iotab-add-unsaved-dialog{width:100%;border-radius:22px;padding:20px 16px calc(18px + env(safe-area-inset-bottom,0px))}
  .iotab-add-unsaved-actions{grid-template-columns:1fr}
  .iotab-add-unsaved-actions button{min-height:46px;font-size:14px}
  .iotab-add-unsaved-actions .is-primary{order:-1}
}
/* V3.0.37.5: explicit text/background pairs for both desktop and dock dirty confirmations. */
html body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button{color:#405166 !important;-webkit-text-fill-color:#405166 !important;filter:none !important;text-shadow:none !important;opacity:1 !important}
html body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button:hover,html body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button:focus-visible{color:#263e59 !important;-webkit-text-fill-color:#263e59 !important;background:#e8f1fc !important}
html body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button.is-primary,html body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button.is-primary:hover,html body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button.is-primary:focus-visible{color:#ffffff !important;-webkit-text-fill-color:#ffffff !important;background:linear-gradient(135deg,#317cec,#409df5) !important}
html.io-black-mode body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button{color:#e8eef6 !important;-webkit-text-fill-color:#e8eef6 !important;background:#2b3a4d !important}
html.io-black-mode body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button:hover,html.io-black-mode body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button:focus-visible{color:#f3f7fc !important;-webkit-text-fill-color:#f3f7fc !important;background:#364b64 !important}
html.io-black-mode body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button.is-primary,html.io-black-mode body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button.is-primary:hover,html.io-black-mode body .iotab-add-unsaved-overlay .iotab-add-unsaved-actions button.is-primary:focus-visible{color:#fff !important;-webkit-text-fill-color:#fff !important;background:linear-gradient(135deg,#286cce,#328be2) !important}
