.th-auth-user{position:fixed;right:18px;bottom:18px;z-index:99999;display:flex;align-items:center;gap:10px;max-width:min(440px,calc(100vw - 36px));padding:8px 9px 8px 13px;border:1px solid rgba(124,137,178,.28);border-radius:999px;background:rgba(10,16,31,.92);box-shadow:0 14px 38px rgba(0,0,0,.28);backdrop-filter:blur(14px);color:#dce4f8;font:600 12px/1.2 Inter,ui-sans-serif,system-ui,sans-serif}.th-auth-user span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.th-auth-user button{border:1px solid rgba(129,142,184,.28);border-radius:999px;background:#17213a;color:#cdd7ef;padding:7px 10px;cursor:pointer;font:700 11px/1 Inter,ui-sans-serif,system-ui,sans-serif}.th-auth-user button:hover{background:#222f50}@media(max-width:600px){.th-auth-user{right:10px;bottom:10px;max-width:calc(100vw - 20px)}}
.th-notify-btn{
  border:1px solid rgba(129,142,184,.28);
  border-radius:999px;
  background:#17213a;
  color:#dce4f8;
  padding:7px 9px;
  cursor:pointer;
  font:700 13px/1 Inter,ui-sans-serif,system-ui,sans-serif;
}

.th-notify-btn:hover{
  background:#26365c;
}

.th-notification-panel{
  position:fixed;
  right:18px;
  bottom:70px;
  z-index:100000;
  width:min(360px,calc(100vw - 36px));
  padding:20px;
  border:1px solid rgba(124,137,178,.30);
  border-radius:20px;
  background:rgba(10,16,31,.96);
  box-shadow:0 20px 60px rgba(0,0,0,.45);
  backdrop-filter:blur(18px);
  color:#dce4f8;
  font:500 14px/1.4 Inter,ui-sans-serif,system-ui,sans-serif;
}

.th-notification-panel h3{
  margin:0 0 16px;
  font-size:17px;
}

.th-notification-panel label{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:12px 0;
}

.th-notification-panel label:first-of-type,
.th-notification-panel label:nth-of-type(2){
  flex-direction:row;
  align-items:center;
}

.th-notification-panel select,
.th-notification-panel input:not([type="checkbox"]){
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(129,142,184,.25);
  border-radius:10px;
  background:#121b32;
  color:#dce4f8;
  padding:9px;
}

.th-notification-panel button{
  width:100%;
  margin-top:12px;
  border:0;
  border-radius:12px;
  padding:10px;
  background:#2563eb;
  color:white;
  cursor:pointer;
  font-weight:700;
}

.th-notification-panel button:hover{
  background:#1d4ed8;
}


.th-notification-count{
  margin-bottom:14px;
  font-weight:700;
  color:#60a5fa;
}

.th-notification-item{
  padding:14px;
  margin-bottom:12px;
  border:1px solid rgba(124,137,178,.22);
  border-radius:14px;
  background:rgba(18,27,50,.75);
  cursor:pointer;
  transition:.2s;
}

.th-notification-item:hover{
  background:rgba(37,99,235,.18);
  border-color:rgba(96,165,250,.5);
}

.th-notification-source{
  font-size:12px;
  color:#93c5fd;
  margin-bottom:6px;
}

.th-notification-title{
  font-size:14px;
  line-height:1.4;
  color:#f1f5f9;
  margin-bottom:8px;
}

.th-notification-meta{
  font-size:12px;
  color:#94a3b8;
}


/* ============================================================
   v009.16.3 — Notification Center UI
   ============================================================ */

.th-notify-btn{
  position:relative;
  min-width:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.th-notify-badge{
  position:absolute;
  top:-6px;
  right:-7px;
  min-width:17px;
  height:17px;
  padding:0 4px;
  box-sizing:border-box;
  border:2px solid #0a101f;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font:800 9px/13px Inter,ui-sans-serif,system-ui,sans-serif;
  text-align:center;
  box-shadow:0 4px 12px rgba(239,68,68,.35);
}

.th-notify-badge[hidden]{
  display:none !important;
}

.th-notification-panel{
  width:min(420px,calc(100vw - 36px));
  max-height:min(680px,calc(100vh - 100px));
  overflow:hidden;
  padding:0;
}

.th-notification-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px 14px;
  border-bottom:1px solid rgba(124,137,178,.18);
}

.th-notification-header h3{
  margin:0;
  font-size:17px;
}

.th-notification-subtitle{
  margin-top:3px;
  color:#71809f;
  font-size:11px;
}

.th-notification-panel .th-notification-settings-button{
  width:34px;
  height:34px;
  min-width:34px;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(129,142,184,.24);
  border-radius:10px;
  background:#121b32;
  color:#cbd5e1;
  font-size:16px;
}

#thNotificationBody{
  padding:14px 14px 16px;
  max-height:560px;
  overflow-y:auto;
  box-sizing:border-box;
}

.th-notification-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.th-notification-count{
  margin:0;
  color:#93c5fd;
  font-size:12px;
  font-weight:700;
}

.th-notification-panel .th-notification-read-all{
  width:auto;
  margin:0;
  padding:7px 10px;
  border-radius:9px;
  background:rgba(37,99,235,.16);
  color:#93c5fd;
  font-size:11px;
  white-space:nowrap;
}

.th-notification-panel .th-notification-read-all:hover{
  background:rgba(37,99,235,.28);
}

.th-notification-panel .th-notification-read-all:disabled{
  opacity:.55;
  cursor:default;
}

.th-notification-list{
  display:flex;
  flex-direction:column;
  gap:9px;
}

.th-notification-item{
  position:relative;
  margin:0;
  padding:13px 14px;
}

.th-notification-item.is-unread{
  border-color:rgba(59,130,246,.48);
  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.16),
      rgba(18,27,50,.86)
    );
}

.th-notification-item.is-unread::before{
  content:"";
  position:absolute;
  top:15px;
  right:13px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#3b82f6;
  box-shadow:0 0 12px rgba(59,130,246,.7);
}

.th-notification-item-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-right:12px;
}

.th-notification-priority{
  color:#64748b;
  font-size:9px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.th-notification-message{
  margin:0 0 8px;
  color:#aebbd3;
  font-size:12px;
  line-height:1.45;
}

.th-notification-meta{
  font-size:10px;
}

.th-notification-empty{
  padding:24px 14px;
  border:1px dashed rgba(124,137,178,.22);
  border-radius:14px;
  color:#7f8ca7;
  text-align:center;
  font-size:12px;
  line-height:1.55;
}

@media(max-width:600px){
  .th-notification-panel{
    right:10px;
    bottom:62px;
    width:calc(100vw - 20px);
    max-height:calc(100vh - 82px);
  }

  #thNotificationBody{
    max-height:calc(100vh - 160px);
  }
}


/* ============================================================
   v009.20.0 SMART NOTIFICATION CENTER
   ============================================================ */

.th-notification-item.is-deadline{
  border-color:rgba(245,158,11,.32);
  background:
    linear-gradient(
      135deg,
      rgba(245,158,11,.075),
      rgba(18,27,50,.92)
    );
}

.th-notification-item.is-deadline.is-unread{
  border-color:rgba(245,158,11,.52);
  background:
    linear-gradient(
      135deg,
      rgba(245,158,11,.15),
      rgba(18,27,50,.92)
    );
}

.th-notification-item.is-deadline.is-unread::before{
  background:#f59e0b;
  box-shadow:0 0 12px rgba(245,158,11,.7);
}

.th-notification-item.is-high-priority
.th-notification-priority{
  color:#fbbf24;
}

.th-notification-item.is-high-priority
.th-notification-source{
  color:#fcd34d;
}


/* ============================================================
   v009.22.1 — Saved Tender Change Notification
   ============================================================ */

.th-notification-item.is-tender-change{
  border-color:rgba(56,189,248,.48);
  background:
    linear-gradient(
      135deg,
      rgba(14,165,233,.12),
      rgba(18,27,50,.88)
    );
}

.th-notification-item.is-tender-change:hover{
  border-color:rgba(125,211,252,.72);
  background:
    linear-gradient(
      135deg,
      rgba(14,165,233,.20),
      rgba(18,27,50,.92)
    );
}

.th-notification-item.is-tender-change
.th-notification-source{
  color:#7dd3fc;
  font-weight:800;
}

.th-notification-item.is-tender-change
.th-notification-title{
  color:#f8fafc;
}

.th-notification-item.is-tender-change
.th-notification-message{
  color:#cbd5e1;
}


/* ============================================================
   v009.28.0 — Telegram connection settings
   ============================================================ */

.th-notification-settings{
  width:min(460px,calc(100vw - 36px));
}

.th-notification-settings .th-settings-body{
  box-sizing:border-box;
  max-height:min(620px,calc(100vh - 185px));
  overflow-y:auto;
  padding:14px 16px 18px;
}

.th-notification-settings .th-settings-section{
  margin:0 0 12px;
  padding:14px;
  border:1px solid rgba(124,137,178,.18);
  border-radius:14px;
  background:rgba(18,27,50,.55);
}

.th-settings-section-title{
  margin:0 0 11px;
  color:#94a3b8;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.th-notification-settings .th-settings-switch{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:11px;
  margin:0;
  cursor:pointer;
}

.th-settings-switch input{
  flex:0 0 auto;
  margin:3px 0 0;
}

.th-settings-switch-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:3px;
}

.th-settings-switch-copy strong{
  color:#e5edf9;
  font-size:13px;
}

.th-settings-switch-copy small{
  color:#7787a5;
  font-size:10px;
  line-height:1.45;
}

.th-notification-settings .th-settings-field{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:7px;
  margin:11px 0 0;
}

.th-settings-field > span{
  color:#93a3bd;
  font-size:11px;
  font-weight:700;
}

.th-telegram-card{
  margin:0 0 12px;
  padding:14px;
  border:1px solid rgba(56,189,248,.24);
  border-radius:16px;
  background:
    linear-gradient(
      135deg,
      rgba(14,165,233,.08),
      rgba(18,27,50,.70)
    );
}

.th-telegram-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.th-telegram-brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.th-telegram-logo{
  display:flex;
  width:35px;
  height:35px;
  flex:0 0 35px;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:rgba(14,165,233,.18);
  color:#7dd3fc;
  font-size:17px;
  box-shadow:
    inset 0 0 0 1px rgba(125,211,252,.16);
}

.th-telegram-brand > div{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:2px;
}

.th-telegram-brand strong{
  color:#f1f5f9;
  font-size:14px;
}

.th-telegram-brand small{
  color:#7f8da8;
  font-size:10px;
}

.th-telegram-status{
  flex:0 0 auto;
  padding:5px 8px;
  border:1px solid;
  border-radius:999px;
  font-size:9px;
  font-weight:800;
  white-space:nowrap;
}

.th-telegram-status.is-off{
  border-color:rgba(148,163,184,.22);
  background:rgba(148,163,184,.08);
  color:#94a3b8;
}

.th-telegram-status.is-on{
  border-color:rgba(52,211,153,.30);
  background:rgba(16,185,129,.10);
  color:#6ee7b7;
}

.th-telegram-account{
  margin:12px 0;
  color:#aab8cf;
  font-size:11px;
  line-height:1.5;
}

.th-telegram-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.th-notification-panel .th-telegram-actions button{
  width:auto;
  min-height:34px;
  margin:0;
  padding:8px 11px;
  border-radius:9px;
  font-size:10px;
}

.th-notification-panel .th-telegram-actions button[hidden]{
  display:none !important;
}

.th-notification-panel .th-telegram-primary{
  background:#0ea5e9;
  color:#fff;
}

.th-notification-panel .th-telegram-primary:hover{
  background:#0284c7;
}

.th-notification-panel .th-telegram-secondary{
  border:1px solid rgba(125,211,252,.22);
  background:rgba(14,165,233,.10);
  color:#7dd3fc;
}

.th-notification-panel .th-telegram-secondary:hover{
  background:rgba(14,165,233,.18);
}

.th-notification-panel .th-telegram-danger{
  border:1px solid rgba(248,113,113,.22);
  background:rgba(239,68,68,.08);
  color:#fca5a5;
}

.th-notification-panel .th-telegram-danger:hover{
  background:rgba(239,68,68,.16);
}

.th-telegram-manual-link{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  box-sizing:border-box;
  padding:8px 10px;
  border:1px solid rgba(125,211,252,.20);
  border-radius:9px;
  color:#7dd3fc;
  font-size:10px;
  font-weight:700;
  text-decoration:none;
}

.th-telegram-manual-link[hidden]{
  display:none !important;
}

.th-notification-settings .th-telegram-toggle{
  margin-top:13px;
  padding-top:12px;
  border-top:1px solid rgba(125,211,252,.12);
}

.th-telegram-toggle:has(input:disabled){
  opacity:.55;
  cursor:not-allowed;
}

.th-settings-status{
  margin:10px 0 0;
  padding:10px 11px;
  border:1px solid rgba(96,165,250,.18);
  border-radius:11px;
  background:rgba(37,99,235,.08);
  color:#bfdbfe;
  font-size:10px;
  line-height:1.5;
}

.th-settings-status[hidden]{
  display:none !important;
}

.th-settings-status.is-success{
  border-color:rgba(52,211,153,.22);
  background:rgba(16,185,129,.08);
  color:#86efac;
}

.th-settings-status.is-error{
  border-color:rgba(248,113,113,.24);
  background:rgba(239,68,68,.08);
  color:#fca5a5;
}

.th-settings-status.is-info{
  border-color:rgba(56,189,248,.22);
  background:rgba(14,165,233,.07);
  color:#bae6fd;
}

.th-notification-panel .th-settings-save{
  width:100%;
  min-height:40px;
  margin-top:12px;
}

.th-notification-panel button:disabled{
  opacity:.55;
  cursor:not-allowed;
}

@media(max-width:600px){

  .th-notification-settings{
    width:calc(100vw - 20px);
  }

  .th-notification-settings .th-settings-body{
    max-height:calc(100vh - 145px);
  }

  .th-telegram-card-head{
    flex-direction:column;
  }

  .th-telegram-actions{
    flex-direction:column;
  }

  .th-notification-panel .th-telegram-actions button,
  .th-telegram-manual-link{
    width:100%;
    justify-content:center;
  }
}
