.login-error{background:#fde8e8;color:#c0392b;padding:14px 18px;border-radius:14px;margin-bottom:24px;font-size:0.9rem;text-align:center;border-right:4px solid #c0392b;animation:slideDown 0.4s ease-out;display:none;}.login-error.show{display:block;}@keyframes slideDown{from{opacity:0;transform:translateY(-12px);}to{opacity:1;transform:translateY(0);}}.login-field.shake input{animation:shake 0.4s ease-in-out;border-color:#c0392b!important;}@keyframes shake{0%,100%{transform:translateX(0);}25%{transform:translateX(-8px);}75%{transform:translateX(8px);}}.login-submit:disabled{opacity:0.7;cursor:not-allowed;}.dots{display:inline-flex;gap:4px;margin-right:6px;}.dots span{display:inline-block;width:6px;height:6px;background:white;border-radius:50%;animation:dotBounce 1.2s infinite;}.dots span:nth-child(2){animation-delay:0.2s;}.dots span:nth-child(3){animation-delay:0.4s;}@keyframes dotBounce{0%,80%,100%{transform:scale(0.6);opacity:0.4;}40%{transform:scale(1);opacity:1;}}


/* ==========================================================================
   NBZ MOBILE LAYOUT PATCH
   هدف: چیدمان 320–430px بدون overflow صفحه و بدون هم‌پوشانی.
   فقط overrideهای موبایل؛ رنگ/برندینگ/تم دست‌نخورده می‌ماند.
   ========================================================================== */
@media (max-width:640px){
  html,body{width:100%;max-width:100%;overflow-x:hidden;}
  .dash-shell,.dash-main,.dash-content,.dash-header,.dash-card,.box,.card,.panel,.panel-card,
  .content-card,.section-card,.table-wrap,.form-card,.modal-content{box-sizing:border-box;max-width:100%;min-width:0;}
  .dash-main{width:100%;margin-right:0;min-width:0;overflow-x:hidden;}
  .dash-content{width:100%;max-width:100%;padding:18px 14px 50px;margin:0;overflow-x:hidden;}
  .dash-sidebar{width:min(85vw,320px);max-width:85vw;min-width:0;right:0;transform:translateX(105%);z-index:200;}
  .dash-sidebar.open{transform:translateX(0);}
  .sidebar-overlay{z-index:190;}
  .dash-header{width:100%;max-width:100%;min-width:0;padding:12px 14px;gap:8px;flex-wrap:nowrap;overflow:visible;}
  .dash-header h1{min-width:0;max-width:100%;flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1rem;}
  .header-actions{margin-right:0;gap:6px;flex:0 0 auto;min-width:0;display:flex;align-items:center;flex-wrap:nowrap;}
  .global-search{display:none!important;}
  .hamburger-btn,.bell-btn{width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;}
  .header-user{gap:6px;min-width:44px;flex:0 0 auto;}
  .header-user .sidebar-avatar{width:44px;height:44px;min-width:44px;min-height:44px;}
  .header-user .name{display:none!important;}
  .bell-wrap{position:relative;flex:0 0 44px;}
  .bell-dropdown{position:fixed!important;top:68px!important;right:8px!important;left:auto!important;width:min(92vw,340px)!important;max-width:calc(100vw - 16px)!important;box-sizing:border-box!important;}
  .dash-grid,.dash-overview-grid,.view-stats,.stats,.report-cards,.cards-grid,.card-grid{grid-template-columns:1fr!important;}
  .dash-grid>*,.dash-overview-grid>* ,.view-stats>*,.stats>*,.report-cards>*,.cards-grid>*,.card-grid>*{min-width:0;max-width:100%;}
  .form-row{width:100%;max-width:100%;flex-direction:column;align-items:stretch;gap:10px;}
  .form-row>*{width:100%;max-width:100%;min-width:0;flex:1 1 auto;}
  .form-row input,.form-row select,.form-row textarea{min-width:0;width:100%;max-width:100%;box-sizing:border-box;}
  .form-actions,.chat-manage,.call-actions,.telegram-actions,.action-bar,.actions-row{width:100%;max-width:100%;display:flex;flex-wrap:wrap;gap:8px;min-width:0;}
  .form-actions>* ,.chat-manage>* ,.call-actions>* ,.telegram-actions>* ,.action-bar>* ,.actions-row>*{min-width:44px;min-height:44px;max-width:100%;box-sizing:border-box;}
  .btn,.button,button,[role="button"],a.btn,.icon-btn,.action-btn{min-height:44px;}
  img,svg,video,canvas,iframe{max-width:100%;height:auto;}
  pre,code{max-width:100%;overflow-x:auto;box-sizing:border-box;}
  input,select,textarea{max-width:100%;min-width:0;box-sizing:border-box;}
  input[type="date"],input[type="time"],select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .table-wrap{width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;position:relative;box-sizing:border-box;}
  .table-wrap::after{content:"";position:absolute;top:0;bottom:0;right:0;width:18px;pointer-events:none;background:linear-gradient(to left,rgba(0,0,0,.10),transparent);opacity:.65;}
  table{max-width:none;}
  table.data-table,table.report-modal-table{min-width:640px;}
  .report-grid-wrap{width:100%;max-width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;}
  .report-grid-wrap::after{content:"";position:absolute;top:0;bottom:0;right:0;width:18px;pointer-events:none;background:linear-gradient(to left,rgba(0,0,0,.10),transparent);}
  .mega-drawer,.info-drawer,.dropdown-panel,.modal,.modal-dialog,.modal-content,.chat-modal,.chat-modal-overlay .chat-modal{
    box-sizing:border-box;max-width:92vw;width:min(92vw,960px);min-width:0;
  }
  .mega-drawer{width:min(85vw,320px);max-width:85vw;}
  .wheel-picker,.wp-sheet{box-sizing:border-box;max-width:92vw;width:min(92vw,420px);min-width:0;}
  .wp-sheet{padding-left:14px;padding-right:14px;}
  .wp-wheels,.wp-col,.wp-col-list{min-width:0;max-width:100%;}
  .wp-foot{gap:8px;}
  .wp-btn{min-height:44px;min-width:0;}
  .back-top{width:48px;height:48px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:180;}
  .pulse-hero,.dash-card,.box,.card,.panel,.panel-card{overflow-wrap:anywhere;}
  .dash-card.wide{grid-column:span 1!important;}
  .cell-user,.stat-card{min-width:0;}
  .cell-user>* ,.stat-card>*{min-width:0;max-width:100%;}
  .stat-card{gap:10px;}
  .stat-card .stat-icon{width:48px;height:48px;min-width:48px;}
  .stat-card .stat-num,.stat-card .stat-label{overflow-wrap:anywhere;}
}

/* Hard safety for images and embedded media at every size. */
img,svg,video,canvas,iframe{max-width:100%;}
.table-wrap{max-width:100%;box-sizing:border-box;}
'"'"


@media (max-width:640px){
  button,.btn,.button,[role="button"],input[type="button"],input[type="submit"],input[type="reset"],
  .icon-btn,.action-btn,.hamburger-btn,.bell-btn{min-width:44px;min-height:44px;}
  .modal{max-width:100%;width:100%;}
  .modal-dialog,.modal-content{width:min(92vw,960px);max-width:92vw;min-width:0;}
}
