.or-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--glass-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.10),
    inset -1px -1px 0 rgba(0,0,0,0.06);
}
body.nx-light .or-stats {
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.55),
    inset -1px -1px 0 rgba(100,140,220,0.08);
}

.or-stat {
  padding: 16px 12px;
  position: relative;
  text-align: center;
  transition: background 0.15s;
}
.or-stat + .or-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 1px;
  background: var(--glass-border);
}
.or-stat:hover { background: var(--glass-hover); }

.or-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--white-30);
  margin-bottom: 6px;
  transition: color 0.35s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.nx-light .or-stat-label { color: rgba(10,22,60,0.38); }

.or-stat-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  transition: color 0.35s;
}

.or-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}

.or-card {
  background: var(--glass-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.10),
    inset -1px -1px 0 rgba(0,0,0,0.06);
  overflow: hidden;
  transition: background 0.35s, border-color 0.35s;
}
body.nx-light .or-card {
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.55),
    inset -1px -1px 0 rgba(100,140,220,0.08);
}

.or-card-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--glass-border);
  transition: border-color 0.35s;
}
.or-card-hdr-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 14px;
  border: 1px solid var(--glass-border);
  flex-shrink: 0; transition: all 0.35s;
}
body.nx-light .or-card-hdr-icon {
  background: rgba(255,255,255,0.38);
  border-color: rgba(100,150,230,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.60);
}
.or-card-title {
  font-size: 12px; font-weight: 600;
  color: var(--white); letter-spacing: 0.3px;
  transition: color 0.35s;
}
body.nx-light .or-card-title { color: #0a1628; }
.or-card-sub {
  font-size: 9.5px; color: var(--white-40);
  margin-top: 1px; transition: color 0.35s;
}
body.nx-light .or-card-sub { color: rgba(10,22,60,0.50); }

.or-card-badge {
  margin-left: auto;
  font-size: 9px; font-weight: 600;
  padding: 3px 9px; border-radius: 99px;
  background: rgba(52,211,153,0.12);
  border: 1px solid rgba(52,211,153,0.28);
  color: var(--green);
  display: flex; align-items: center; gap: 5px;
}

.or-chart-body { padding: 20px; }
.or-chart-wrap { height: 300px; position: relative; }

.or-list {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--white-10) transparent;
}
.or-list::-webkit-scrollbar { width: 4px; }
.or-list::-webkit-scrollbar-track { background: transparent; }
.or-list::-webkit-scrollbar-thumb { background: var(--white-10); border-radius: 99px; }

.or-item {
  padding: 13px 16px;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.15s;
  cursor: default;
}
.or-item:last-child { border-bottom: none; }
.or-item:hover { background: var(--glass-hover); }

.or-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.or-item-name {
  font-size: 11.5px; font-weight: 500;
  color: var(--white); line-height: 1.4;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.35s;
}
body.nx-light .or-item-name { color: #0a1628; }

.or-status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 99px; border: 1px solid;
  white-space: nowrap; flex-shrink: 0; text-transform: uppercase;
}

.or-item-link {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--white-40);
  background: var(--white-06); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 5px 9px; margin-bottom: 8px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: color 0.35s, background 0.35s;
}
.or-item-link i { color: var(--accent); flex-shrink: 0; }
body.nx-light .or-item-link { color: rgba(10,22,60,0.55); background: rgba(255,255,255,0.22); }

.or-item-bottom {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
}
.or-item-qty { font-size: 10px; color: var(--white-40); transition: color 0.35s; }
body.nx-light .or-item-qty { color: rgba(10,22,60,0.45); }

.or-item-amount {
  font-size: 14px; font-weight: 700;
  color: var(--green); transition: color 0.35s;
}
body.nx-light .or-item-amount { color: #059669; }

.or-item-actions {
  display: flex; align-items: center;
  justify-content: flex-end; gap: 6px; margin-top: 8px;
}

.or-chat-btn {
  font-size: 9.5px; font-weight: 600; padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(108,143,255,0.30);
  color: var(--accent); background: transparent;
  cursor: pointer; transition: all 0.18s; font-family: var(--font);
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; line-height: 1.4; position: relative;
}
.or-chat-btn:hover { background: rgba(108,143,255,0.12); }
body.nx-light .or-chat-btn { border-color: rgba(58,106,238,0.30); color: #3a6aee; }

.or-chat-unread-dot {
  position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px; background: #ef4444;
  color: #fff; font-size: 8px; font-weight: 700;
  border-radius: 99px; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

.or-refill-btn {
  font-size: 9.5px; font-weight: 600; padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52,211,153,0.35);
  color: #34d399; background: transparent;
  cursor: pointer; transition: all 0.18s; font-family: var(--font);
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; line-height: 1.4;
}
.or-refill-btn:hover { background: rgba(52,211,153,0.12); }
.or-refill-btn:disabled,
.or-refill-btn.loading {
  opacity: 0.55; cursor: not-allowed; pointer-events: none;
}
.or-refill-btn.pending-state {
  border-color: rgba(251,191,36,0.35);
  color: #fbbf24;
  cursor: default; pointer-events: none;
}
.or-refill-btn.done-state {
  border-color: rgba(52,211,153,0.35);
  color: #34d399;
  opacity: 0.7; cursor: default; pointer-events: none;
}
.or-refill-btn.retry-state {
  border-color: rgba(248,113,113,0.35);
  color: #f87171;
}
.or-refill-btn.retry-state:hover { background: rgba(248,113,113,0.12); }
body.nx-light .or-refill-btn { border-color: rgba(5,150,105,0.35); color: #059669; }
body.nx-light .or-refill-btn.pending-state { border-color: rgba(217,119,6,0.35); color: #d97706; }
body.nx-light .or-refill-btn.retry-state   { border-color: rgba(220,38,38,0.30);  color: #dc2626; }

#or-refill-toast {
  position: fixed; bottom: 80px; right: 20px;
  min-width: 260px; max-width: 320px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 12px; font-weight: 500;
  display: none; align-items: center; gap: 10px;
  z-index: 9999;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  animation: orToastIn 0.25s ease;
}
#or-refill-toast.show { display: flex; }
#or-refill-toast.success {
  background: rgba(18,30,18,0.97);
  border: 1px solid rgba(52,211,153,0.40);
  color: #34d399;
}
#or-refill-toast.error {
  background: rgba(30,12,12,0.97);
  border: 1px solid rgba(248,113,113,0.40);
  color: #f87171;
}
body.nx-light #or-refill-toast.success { background: #f0fdf4; border-color: rgba(5,150,105,0.35); color: #059669; }
body.nx-light #or-refill-toast.error   { background: #fef2f2; border-color: rgba(220,38,38,0.30); color: #dc2626; }
@keyframes orToastIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }

.or-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 20px; gap: 10px; color: var(--white-40);
}
.or-empty i { font-size: 28px; }
.or-empty-title { font-size: 12px; font-weight: 500; }
.or-empty-sub   { font-size: 10px; }
body.nx-light .or-empty { color: rgba(10,22,60,0.40); }

#order-chat-bubble {
  position: fixed; bottom: 20px; right: 20px;
  width: 320px; max-height: 440px;
  display: none; flex-direction: column;
  background: #1a1f35;
  border: 1px solid rgba(108,143,255,0.35);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(108,143,255,0.12);
  z-index: 8888; overflow: hidden; font-family: var(--font);
}
body.nx-light #order-chat-bubble {
  background: #ffffff;
  border-color: rgba(58,106,238,0.30);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 0 0 1px rgba(58,106,238,0.10);
}
#order-chat-bubble.open { display: flex; }

.ocx-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: rgba(108,143,255,0.10);
  border-bottom: 1px solid rgba(108,143,255,0.18);
  flex-shrink: 0; cursor: default; user-select: none;
}
body.nx-light .ocx-header { background: rgba(58,106,238,0.07); border-bottom-color: rgba(58,106,238,0.15); }

.ocx-header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ocx-online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  flex-shrink: 0; animation: blink 2s ease-in-out infinite;
}
.ocx-title {
  font-size: 11px; font-weight: 700; color: var(--white);
  letter-spacing: 0.3px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 180px;
}
body.nx-light .ocx-title { color: #0a1628; }
.ocx-sub { font-size: 9px; color: rgba(108,143,255,0.75); margin-top: 1px; }
body.nx-light .ocx-sub { color: rgba(58,106,238,0.70); }

.ocx-close {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: var(--white-40); width: 24px; height: 24px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.18s;
}
.ocx-close:hover { background: rgba(248,113,113,0.15); color: #f87171; border-color: rgba(248,113,113,0.25); }
body.nx-light .ocx-close { background: rgba(10,22,60,0.06); border-color: rgba(10,22,60,0.12); color: rgba(10,22,60,0.45); }

.ocx-messages {
  flex: 1; overflow-y: auto; padding: 12px 12px 6px;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.10) transparent;
}
body.nx-light .ocx-messages { scrollbar-color: rgba(10,22,60,0.10) transparent; }

.ocx-msg {
  max-width: 85%; padding: 8px 12px; border-radius: 12px;
  font-size: 12px; line-height: 1.5; word-break: break-word;
}
.ocx-msg.user {
  align-self: flex-end;
  background: rgba(108,143,255,0.18); color: var(--white);
  border-bottom-right-radius: 4px;
}
body.nx-light .ocx-msg.user { background: rgba(58,106,238,0.14); color: #0a1628; }
.ocx-msg.admin {
  align-self: flex-start;
  background: rgba(255,255,255,0.07); color: var(--white-80);
  border-bottom-left-radius: 4px;
}
body.nx-light .ocx-msg.admin { background: rgba(10,22,60,0.07); color: rgba(10,22,60,0.80); }

.ocx-msg-time { font-size: 9px; color: var(--white-20); margin-top: 3px; text-align: right; }
body.nx-light .ocx-msg-time { color: rgba(10,22,60,0.30); }
.ocx-msg.admin .ocx-msg-time { text-align: left; }

.ocx-empty {
  text-align: center; padding: 20px 10px; font-size: 11px;
  color: var(--white-20); display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
body.nx-light .ocx-empty { color: rgba(10,22,60,0.30); }
.ocx-empty i { font-size: 22px; opacity: 0.35; }

.ocx-input-row {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 10px; border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0;
}
body.nx-light .ocx-input-row { border-top-color: rgba(10,22,60,0.08); }

.ocx-input {
  flex: 1; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10); border-radius: 20px;
  color: var(--white); font-size: 12px; font-family: var(--font);
  padding: 8px 13px; outline: none; resize: none;
  max-height: 80px; overflow-y: auto; transition: border-color 0.2s; line-height: 1.4;
}
.ocx-input:focus { border-color: rgba(108,143,255,0.45); }
.ocx-input::placeholder { color: var(--white-20); }
body.nx-light .ocx-input { background: rgba(10,22,60,0.05); border-color: rgba(10,22,60,0.12); color: #0a1628; }
body.nx-light .ocx-input:focus { border-color: rgba(58,106,238,0.45); }
body.nx-light .ocx-input::placeholder { color: rgba(10,22,60,0.30); }

.ocx-send {
  width: 34px; height: 34px; flex-shrink: 0;
  background: rgba(108,143,255,0.18); border: 1px solid rgba(108,143,255,0.35);
  border-radius: 50%; color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: all 0.18s;
}
.ocx-send:hover { background: rgba(108,143,255,0.30); }
body.nx-light .ocx-send { background: rgba(58,106,238,0.12); border-color: rgba(58,106,238,0.30); color: #3a6aee; }
body.nx-light .ocx-send:hover { background: rgba(58,106,238,0.22); }

#order-chat-bubble.minimized .ocx-messages,
#order-chat-bubble.minimized .ocx-input-row { display: none; }
#order-chat-bubble.minimized { max-height: unset; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

@media (max-width: 900px) {
  .or-layout { grid-template-columns: 1fr; }
  #order-chat-bubble { display: none !important; }
}
@media (max-width: 640px) {
  .or-stat-val   { font-size: 15px; letter-spacing: -0.3px; }
  .or-stat-label { font-size: 8px; letter-spacing: 0.8px; }
  .or-stat       { padding: 13px 8px; }
}
@media (max-width: 380px) {
  .or-stat-val   { font-size: 13px; }
  .or-stat-label { font-size: 7.5px; letter-spacing: 0.5px; }
}


.ib-wrap {
  padding: 24px;
  box-sizing: border-box;
}

.ib-page-heading {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
}
.ib-page-heading-icon {
  width: 40px; height: 40px; background: rgba(143,163,184,0.12);
  border: 1px solid rgba(143,163,184,0.35); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--accent); box-shadow: 0 0 14px var(--glow-pink);
  flex-shrink: 0; transition: all 0.35s;
}
body.nx-light .ib-page-heading-icon {
  background: rgba(63,112,137,0.10); border-color: rgba(63,112,137,0.35);
  box-shadow: none; color: #3f5a7a;
}
.ib-page-heading-title { font-size: 18px; font-weight: 700; color: var(--white); transition: color 0.35s; }
body.nx-light .ib-page-heading-title { color: #1c2430; }
.ib-page-heading-sub  { font-size: 11px; color: var(--white-40); margin-top: 2px; transition: color 0.35s; }
.ib-page-heading-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--glass-border), transparent); }
.ib-page-heading-badge {
  font-size: 10px; color: var(--accent); border: 1px solid rgba(143,163,184,0.30);
  padding: 3px 10px; border-radius: 99px; background: rgba(143,163,184,0.08);
  flex-shrink: 0; font-weight: 600; letter-spacing: 0.3px;
}

.ib-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  min-height: 560px;
  background: var(--glass-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.10),
    inset -1px -1px 0 rgba(0,0,0,0.06);
  overflow: hidden;
  transition: background 0.35s, border-color 0.35s;
}
body.nx-light .ib-container {
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.55),
    inset -1px -1px 0 rgba(90,105,130,0.08);
}

.ib-main {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  overflow: hidden;
  transition: border-color 0.35s;
  min-height: 560px;
}

.ib-main-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  transition: border-color 0.35s;
}
.ib-main-hdr-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(143,163,184,0.35);
  color: var(--accent); flex-shrink: 0; transition: all 0.35s;
}
body.nx-light .ib-main-hdr-icon {
  background: rgba(255,255,255,0.38); border-color: rgba(63,112,137,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.60); color: #3f5a7a;
}
.ib-main-hdr-title { font-size: 12px; font-weight: 600; color: var(--white); letter-spacing: 0.3px; transition: color 0.35s; }
body.nx-light .ib-main-hdr-title { color: #1c2430; }
.ib-main-hdr-sub { font-size: 9.5px; color: var(--white-40); margin-top: 1px; transition: color 0.35s; }
body.nx-light .ib-main-hdr-sub { color: rgba(28,36,48,0.50); }

.ib-main-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

#ib-panel-new {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}
#ib-panel-new::-webkit-scrollbar { width: 4px; }
#ib-panel-new::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 99px; }

#ib-panel-conv {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.ib-new-msg { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 560px; margin: 0 auto; }
.ib-new-msg > * { width: 100%; box-sizing: border-box; min-width: 0; }
.ib-new-msg-title {
  font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
body.nx-light .ib-new-msg-title { color: #1c2430; }

.ib-field { display: flex; flex-direction: column; gap: 6px; }
.ib-label {
  font-size: 9.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--white-40); display: flex; align-items: center; gap: 5px;
  transition: color 0.35s;
}
body.nx-light .ib-label { color: rgba(28,36,48,0.48); }

.ib-input {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--white);
  font-size: 13px; font-family: var(--font); padding: 9px 13px;
  transition: border-color 0.2s, background 0.35s, color 0.35s;
  outline: none; box-sizing: border-box;
}
.ib-input:focus { border-color: rgba(143,163,184,0.55); background: rgba(143,163,184,0.06); }
.ib-input::placeholder { color: var(--white-20); }
body.nx-light .ib-input { background: rgba(255,255,255,0.35); color: #1c2430; border-color: rgba(90,105,130,0.32); }
body.nx-light .ib-input:focus { border-color: rgba(63,112,137,0.55); background: rgba(255,255,255,0.50); }
body.nx-light .ib-input::placeholder { color: rgba(28,36,48,0.28); }

.ib-current-value {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 9px 13px; font-size: 13px;
  color: var(--white-50); font-family: var(--font);
  display: flex; align-items: center; gap: 8px;
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.ib-current-value i { font-size: 11px; opacity: 0.55; flex-shrink: 0; }
body.nx-light .ib-current-value { background: rgba(0,0,0,0.03); color: rgba(28,36,48,0.50); border-color: rgba(90,105,130,0.22); }

.ib-inline-send-row { display: flex; align-items: center; gap: 8px; }
.ib-inline-send-row .ib-input { flex: 1; width: auto; }
.ib-inline-send-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(143,163,184,0.18); border: 1px solid rgba(143,163,184,0.35);
  border-radius: var(--radius-sm); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; transition: all 0.18s;
}
.ib-inline-send-btn:hover:not(:disabled) { background: rgba(143,163,184,0.30); box-shadow: 0 0 10px var(--glow-pink); }
.ib-inline-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
body.nx-light .ib-inline-send-btn { background: rgba(63,112,137,0.12); border-color: rgba(63,112,137,0.30); color: #3f5a7a; }

.ib-alert-ok {
  background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.25);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 11px;
  color: var(--green); display: flex; align-items: center; gap: 8px;
}
.ib-alert-err {
  background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.25);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 11px;
  color: #f87171; display: flex; align-items: center; gap: 8px;
}
.ib-account-notice {
  background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.22);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 11px;
  color: #fbbf24; display: flex; align-items: flex-start; gap: 8px; line-height: 1.6;
}
body.nx-light .ib-account-notice { color: #d97706; }

.ib-conv-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ib-conv-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}
.ib-conv-messages::-webkit-scrollbar { width: 4px; }
.ib-conv-messages::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 99px; }

.ib-msg {
  max-width: 75%; padding: 10px 14px;
  border-radius: 14px; font-size: 12.5px; line-height: 1.6;
  word-break: break-word;
}
.ib-msg.user {
  align-self: flex-end;
  background: rgba(143,163,184,0.18); color: var(--white);
  border-bottom-right-radius: 4px;
}
body.nx-light .ib-msg.user { background: rgba(63,112,137,0.14); color: #1c2430; }
.ib-msg.admin {
  align-self: flex-start;
  background: rgba(255,255,255,0.07); color: var(--white-80);
  border-bottom-left-radius: 4px;
}
body.nx-light .ib-msg.admin { background: rgba(28,36,48,0.07); color: rgba(28,36,48,0.80); }
.ib-msg-time { font-size: 9px; color: var(--white-20); margin-top: 4px; text-align: right; }
body.nx-light .ib-msg-time { color: rgba(28,36,48,0.30); }
.ib-msg.admin .ib-msg-time { text-align: left; }

.ib-conv-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--white-20); font-size: 11px; padding: 24px;
}
body.nx-light .ib-conv-empty { color: rgba(28,36,48,0.30); }
.ib-conv-empty i { font-size: 28px; opacity: 0.35; }

.ib-ac-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 99px; border: 1px solid; margin-left: 8px;
}
.ib-ac-status.pending  { background: rgba(251,191,36,0.10); border-color: rgba(251,191,36,0.30); color: #fbbf24; }
.ib-ac-status.approved { background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.30); color: var(--green); }
.ib-ac-status.rejected { background: rgba(248,113,113,0.10); border-color: rgba(248,113,113,0.30); color: #f87171; }

.ib-conv-footer {
  flex-shrink: 0;
  padding: 0 24px 20px;
}
.ib-conv-input-row { display: flex; align-items: flex-end; gap: 8px; }
.ib-conv-textarea {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--white);
  font-size: 12px; font-family: var(--font);
  padding: 9px 13px; outline: none; resize: none;
  max-height: 100px; overflow-y: auto;
  transition: border-color 0.2s, background 0.35s, color 0.35s;
  line-height: 1.5; min-height: 38px;
}
.ib-conv-textarea:focus { border-color: rgba(143,163,184,0.55); background: rgba(143,163,184,0.04); }
.ib-conv-textarea::placeholder { color: var(--white-20); }
body.nx-light .ib-conv-textarea { background: rgba(255,255,255,0.35); color: #1c2430; border-color: rgba(90,105,130,0.32); }
body.nx-light .ib-conv-textarea:focus { border-color: rgba(63,112,137,0.55); background: rgba(255,255,255,0.50); }
body.nx-light .ib-conv-textarea::placeholder { color: rgba(28,36,48,0.28); }

.ib-conv-send {
  width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(143,163,184,0.18); border: 1px solid rgba(143,163,184,0.35);
  border-radius: var(--radius-sm); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; transition: all 0.18s;
}
.ib-conv-send:hover { background: rgba(143,163,184,0.30); box-shadow: 0 0 10px var(--glow-pink); }
body.nx-light .ib-conv-send { background: rgba(63,112,137,0.12); border-color: rgba(63,112,137,0.30); color: #3f5a7a; }

.ib-sidebar {
  display: flex; flex-direction: column;
  overflow: hidden;
  background: rgba(0,0,0,0.04);
  transition: background 0.35s;
}
body.nx-light .ib-sidebar { background: rgba(255,255,255,0.06); }

.ib-sidebar-section {
  display: flex; flex-direction: column;
  border-bottom: 1px solid var(--glass-border);
  transition: border-color 0.35s;
  min-height: 0;
}
.ib-sidebar-section:last-child { border-bottom: none; flex: 1; overflow: hidden; }

.ib-sidebar-hdr {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 9px;
  font-size: 9.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--white-40); flex-shrink: 0;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.35s;
}
body.nx-light .ib-sidebar-hdr { color: rgba(28,36,48,0.48); background: rgba(255,255,255,0.10); }
.ib-sidebar-hdr i { font-size: 11px; }
.ib-sidebar-badge {
  margin-left: auto; background: #ef4444; color: #fff;
  font-size: 8px; font-weight: 700; padding: 1px 5px;
  border-radius: 99px; display: none;
}
.ib-sidebar-badge.show { display: inline-block; }

.ib-activity-list {
  max-height: 180px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--glass-border) transparent;
}
.ib-activity-list::-webkit-scrollbar { width: 3px; }
.ib-activity-list::-webkit-scrollbar-thumb { background: var(--glass-border); }

.ib-activity-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
  cursor: pointer;
}
.ib-activity-item:hover { background: var(--glass-hover); }
.ib-activity-item:last-child { border-bottom: none; }
.ib-activity-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.ib-activity-dot.user  { background: var(--accent); }
.ib-activity-dot.admin { background: var(--green); }
.ib-activity-body { flex: 1; min-width: 0; }
.ib-activity-who { font-size: 9px; font-weight: 600; color: var(--white-40); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
body.nx-light .ib-activity-who { color: rgba(28,36,48,0.42); }
.ib-activity-msg { font-size: 10.5px; color: var(--white-60); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.nx-light .ib-activity-msg { color: rgba(28,36,48,0.65); }
.ib-activity-time { font-size: 8.5px; color: var(--white-20); flex-shrink: 0; margin-top: 5px; }
body.nx-light .ib-activity-time { color: rgba(28,36,48,0.30); }

.ib-thread-list {
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--glass-border) transparent;
}
.ib-thread-list::-webkit-scrollbar { width: 3px; }
.ib-thread-list::-webkit-scrollbar-thumb { background: var(--glass-border); }

.ib-thread-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer; transition: background 0.15s; position: relative;
}
.ib-thread-item:hover { background: var(--glass-hover); }
.ib-thread-item.active { background: rgba(143,163,184,0.08); border-left: 2px solid var(--accent); }
body.nx-light .ib-thread-item.active { background: rgba(63,112,137,0.06); }
.ib-thread-item:last-child { border-bottom: none; }

.ib-thread-avatar {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; border: 1px solid var(--glass-border); transition: all 0.35s;
}
.ib-thread-body { flex: 1; min-width: 0; }
.ib-thread-title {
  font-size: 11px; font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.35s; margin-bottom: 2px;
}
body.nx-light .ib-thread-title { color: #1c2430; }
.ib-thread-preview {
  font-size: 10px; color: var(--white-30);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.35s;
}
body.nx-light .ib-thread-preview { color: rgba(28,36,48,0.40); }
.ib-thread-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ib-thread-time { font-size: 8.5px; color: var(--white-20); }
body.nx-light .ib-thread-time { color: rgba(28,36,48,0.30); }
.ib-thread-unread {
  background: #ef4444; color: #fff; font-size: 8px; font-weight: 700;
  padding: 1px 5px; border-radius: 99px; display: none;
}
.ib-thread-unread.show { display: inline-block; }

.ib-no-threads {
  padding: 20px 14px; font-size: 10px; color: var(--white-20); text-align: center;
}
body.nx-light .ib-no-threads { color: rgba(28,36,48,0.28); }

.ib-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 40px; align-self: center; width: 100%;
}
.ib-spinner i { font-size: 20px; color: var(--accent); animation: ib-spin 1s linear infinite; }
@keyframes ib-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { display: none; }

.ib-select-wrap { position: relative; width: 100%; }

.ib-select-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--white-60);
  font-family: var(--font); font-size: 13px; padding: 9px 13px;
  cursor: pointer; transition: all 0.18s; box-sizing: border-box;
}
.ib-select-trigger:hover { border-color: rgba(143,163,184,0.40); background: rgba(143,163,184,0.05); }
.ib-select-wrap.open .ib-select-trigger { border-color: rgba(143,163,184,0.55); background: rgba(143,163,184,0.06); }
.ib-select-trigger-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: left; }
.ib-select-trigger-text.placeholder { color: var(--white-20); }
body.nx-light .ib-select-trigger-text.placeholder { color: rgba(28,36,48,0.28); }

.ib-select-chevron { color: var(--white-20); transition: transform 0.2s; flex-shrink: 0; margin-left: 8px; font-size: 10px; }
.ib-select-wrap.open .ib-select-chevron { transform: rotate(180deg); color: var(--accent); }

body.nx-light .ib-select-trigger { background: rgba(255,255,255,0.35); color: rgba(28,36,48,0.65); border-color: rgba(90,105,130,0.32); }
body.nx-light .ib-select-trigger:hover { border-color: rgba(63,112,137,0.40); }
body.nx-light .ib-select-wrap.open .ib-select-trigger { border-color: rgba(63,112,137,0.55); }
body.nx-light .ib-select-chevron { color: rgba(28,36,48,0.28); }

.ib-select-panel {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 999;
  background: var(--glass-dd-bg); backdrop-filter: var(--glass-blur-dd);
  -webkit-backdrop-filter: var(--glass-blur-dd); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); box-shadow: 0 16px 40px rgba(0,0,0,0.30);
  max-height: 240px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--white-10) transparent;
}
.ib-select-wrap.open .ib-select-panel { display: block; }
.ib-select-panel::-webkit-scrollbar { width: 4px; }
.ib-select-panel::-webkit-scrollbar-thumb { background: var(--white-10); border-radius: 4px; }

.ib-select-option {
  padding: 10px 13px; font-size: 12.5px; color: var(--white-60); font-family: var(--font);
  cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ib-select-option:last-child { border-bottom: none; }
.ib-select-option:hover { background: var(--glass-hover); color: var(--white); }
.ib-select-option.selected { color: var(--accent); background: var(--accent-dim); }
.ib-select-option-empty { padding: 14px 13px; font-size: 11px; color: var(--white-20); text-align: center; }
body.nx-light .ib-select-option { color: rgba(28,36,48,0.65); }
body.nx-light .ib-select-option:hover { color: #1c2430; }
body.nx-light .ib-select-option.selected { color: #3f5a7a; background: rgba(63,112,137,0.12); }

@media (max-width: 560px) {
  .ib-select-trigger { padding: 11px 14px; font-size: 13.5px; }
  .ib-select-option   { padding: 13px 14px; font-size: 13px; }
  .ib-select-panel {
    max-height: 50vh;
    position: fixed;
    left: 12px; right: 12px;
    top: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  }
  .ib-select-wrap.open .ib-select-panel { display: block; }
}

@media (max-width: 900px) {
  .ib-container { grid-template-columns: 1fr; min-height: auto; }
  .ib-main { min-height: 460px; border-right: none; border-bottom: 1px solid var(--glass-border); }
  .ib-sidebar { max-height: 480px; }
  .ib-wrap { padding: 12px 8px; }
}
@media (max-width: 560px) {
  .ib-wrap { padding: 8px 4px; }
  .ib-page-heading-line { display: none; }
  .ib-page-heading-title { font-size: 15px; }
}