/* Messages — Telegram / Twitter DM two-column page
   Light theme (default for html[data-theme="light"]) keeps the mockup palette.
   Dark theme (site default / data-theme="dark"): sidebar #161a21, thread #0e1621. */
.cab-msg {
  --msg-bg: #ffffff;
  --msg-side: #f4f6f8;
  --msg-thread: #ffffff;
  --msg-feed: #fafbfc;
  --msg-line: #e6e9ee;
  --msg-text: #0f1419;
  --msg-muted: #6b7280;
  --msg-blue: #1d9bf0;
  --msg-bubble-out: #1d9bf0;
  --msg-blue-soft: rgba(29, 155, 240, 0.12);
  --msg-in: #eff3f4;
  --msg-online: #13c45c;
  --msg-unread: #1d9bf0;
  --msg-input-bg: #f4f6f8;
  --msg-compose-bg: #ffffff;
  --msg-head-bg: #ffffff;
  --msg-search-bg: #ffffff;
  --msg-day-bg: rgba(255, 255, 255, 0.9);
  --msg-emoji-bg: #ffffff;
  --msg-dot-border: var(--msg-side);
  display: flex;
  height: min(calc(100vh - 140px), 820px);
  min-height: 520px;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--msg-bg);
  color: var(--msg-text);
  border: 1px solid var(--msg-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Dark theme (cabinet default) */
html:not([data-theme="light"]) .cab-msg,
html[data-theme="dark"] .cab-msg {
  --msg-bg: #0e1621;
  --msg-side: #161a21;
  --msg-thread: #0e1621;
  --msg-feed: #0e1621;
  --msg-line: rgba(255, 255, 255, 0.08);
  --msg-text: #ffffff;
  --msg-muted: #9aa4b2;
  --msg-blue: #1d9bf0;
  --msg-bubble-out: #002c48;
  --msg-blue-soft: rgba(0, 44, 72, 0.35);
  --msg-in: #1c2430;
  --msg-online: #13c45c;
  --msg-unread: #1d9bf0;
  --msg-input-bg: #161a21;
  --msg-compose-bg: #0e1621;
  --msg-head-bg: #0e1621;
  --msg-search-bg: #0e1621;
  --msg-day-bg: rgba(22, 26, 33, 0.95);
  --msg-emoji-bg: #161a21;
  --msg-dot-border: #161a21;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.cab-msg-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--msg-side);
  border-right: 1px solid var(--msg-line);
  min-width: 0;
  color: var(--msg-text);
}

.cab-msg-side-head {
  padding: 18px 16px 12px;
  flex-shrink: 0;
}

.cab-msg-title {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--msg-text);
}

.cab-msg-search-wrap {
  position: relative;
}

.cab-msg-search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--msg-muted);
  pointer-events: none;
}

.cab-msg-search {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  background: var(--msg-search-bg);
  color: var(--msg-text);
  font: inherit;
  font-size: 0.92rem;
  padding: 10px 14px 10px 36px;
  outline: none;
  box-shadow: inset 0 0 0 1px var(--msg-line);
}

.cab-msg-search::placeholder {
  color: var(--msg-muted);
}

.cab-msg-search:focus {
  box-shadow: inset 0 0 0 1.5px var(--msg-blue);
}

.cab-msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 12px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
}

.cab-msg-list::-webkit-scrollbar {
  width: 6px;
}

.cab-msg-list::-webkit-scrollbar-track {
  background: transparent;
}

.cab-msg-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 999px;
}

.cab-msg-list::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.34);
}

html:not([data-theme="light"]) .cab-msg-list,
html[data-theme="dark"] .cab-msg-list {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

html:not([data-theme="light"]) .cab-msg-list::-webkit-scrollbar-thumb,
html[data-theme="dark"] .cab-msg-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

html:not([data-theme="light"]) .cab-msg-list::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .cab-msg-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.cab-msg-empty-list {
  padding: 32px 20px;
  text-align: center;
  color: var(--msg-muted);
}

.cab-msg-empty-list p {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--msg-text);
}

.cab-msg-empty-list span {
  font-size: 0.86rem;
  line-height: 1.4;
}

.cab-msg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  border-left: 3px solid transparent;
}

.cab-msg-row:hover {
  background: rgba(128, 128, 128, 0.1);
}

html:not([data-theme="light"]) .cab-msg-row:hover,
html[data-theme="dark"] .cab-msg-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cab-msg-row.is-active {
  background: var(--msg-blue-soft);
  border-left-color: var(--msg-blue);
}

.cab-msg-av {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #94a3b8, #64748b);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.cab-msg-av > img:not(.cab-avatar-club-frame) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cab-msg-av-letter {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

/* Club frames on chat avatars (list + header) */
.cab-msg-av.cab-avatar-club {
  width: 52px;
  height: 60px;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.cab-msg-av.cab-avatar-club .cab-avatar-club-inner {
  position: absolute;
  inset: 9% 12% 9% 12%;
  display: grid;
  place-items: center;
  overflow: hidden;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.cab-msg-av.cab-avatar-club .cab-avatar-club-inner img,
.cab-msg-av.cab-avatar-club .cab-avatar-club-inner .cab-msg-av-letter {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
}

.cab-msg-av.cab-avatar-club .cab-avatar-club-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

.cab-msg-av .online-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--msg-online);
  border: 2px solid var(--msg-dot-border);
  box-sizing: border-box;
  z-index: 3;
}

.cab-msg-av.cab-avatar-club .online-dot {
  right: 2px;
  bottom: 4px;
}

.cab-msg-row.is-active .cab-msg-av .online-dot {
  border-color: var(--msg-dot-border);
}

.cab-msg-row-body {
  min-width: 0;
  flex: 1;
}

.cab-msg-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.cab-msg-row-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cab-msg-row-when {
  font-size: 0.72rem;
  color: var(--msg-muted);
  flex-shrink: 0;
}

.cab-msg-row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.cab-msg-row-preview {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--msg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cab-msg-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--msg-unread);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}

.cab-msg-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--msg-thread);
  color: var(--msg-text);
  position: relative;
}

.cab-msg-placeholder {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--msg-muted);
}

.cab-msg-placeholder[hidden],
.cab-msg-thread[hidden] {
  display: none !important;
}

.cab-msg-placeholder-inner {
  text-align: center;
  max-width: 320px;
}

.cab-msg-placeholder-inner svg {
  color: var(--msg-blue);
  opacity: 0.85;
  margin-bottom: 12px;
}

.cab-msg-placeholder-inner h2 {
  margin: 0 0 8px;
  color: var(--msg-text);
  font-size: 1.2rem;
}

.cab-msg-placeholder-inner p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.cab-msg-thread {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cab-msg-thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--msg-line);
  flex-shrink: 0;
  background: var(--msg-head-bg);
}

.cab-msg-back {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--msg-muted);
  place-items: center;
}

.cab-msg-back:hover {
  background: rgba(128, 128, 128, 0.12);
  color: var(--msg-text);
}

.cab-msg-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.cab-msg-peer .cab-msg-av {
  width: 40px;
  height: 40px;
  font-size: 0.9rem;
}

.cab-msg-peer .cab-msg-av.cab-avatar-club {
  width: 44px;
  height: 50px;
}

.cab-msg-peer-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cab-msg-peer-name {
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cab-msg-peer-status {
  font-size: 0.78rem;
  color: var(--msg-muted);
}

.cab-msg-peer-status.is-online {
  color: var(--msg-online);
}

.cab-msg-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--msg-muted);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cab-msg-icon-btn:hover:not(:disabled) {
  background: rgba(128, 128, 128, 0.12);
  color: var(--msg-text);
}

.cab-msg-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.cab-msg-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.cab-msg-menu-wrap.is-open > .cab-msg-icon-btn {
  background: rgba(128, 128, 128, 0.14);
  color: var(--msg-text);
}

.cab-msg-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--msg-line);
  background: var(--msg-head-bg, #161a21);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

.cab-msg-menu[hidden] {
  display: none !important;
}

.cab-msg-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--msg-text);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}

.cab-msg-menu-item svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.cab-msg-menu-item:hover {
  background: rgba(128, 128, 128, 0.14);
}

.cab-msg-menu-item.is-danger,
.cab-msg-menu-item.is-danger:hover {
  color: #ad3942;
}

.cab-msg-menu-sep {
  height: 1px;
  margin: 4px 8px;
  background: var(--msg-line);
}

.cab-msg-row-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.cab-msg-pin-ico {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  color: var(--msg-muted);
  opacity: 0.85;
}

.cab-msg-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at 1px 1px, rgba(128, 128, 128, 0.12) 1px, transparent 0) 0 0 / 18px 18px,
    var(--msg-feed);
}

html:not([data-theme="light"]) .cab-msg-feed,
html[data-theme="dark"] .cab-msg-feed {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.035) 1px, transparent 0) 0 0 / 18px 18px,
    var(--msg-feed);
}

.cab-msg-day {
  align-self: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--msg-muted);
  background: var(--msg-day-bg);
  border: 1px solid var(--msg-line);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 6px 0;
}

.cab-msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: min(72%, 480px);
  align-self: flex-start;
}

.cab-msg-bubble-wrap.is-mine {
  align-self: flex-end;
  align-items: flex-end;
}

.cab-msg-bubble {
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
  background: var(--msg-in);
  color: var(--msg-text);
  border-bottom-left-radius: 4px;
}

.cab-msg-bubble-wrap.is-mine .cab-msg-bubble {
  background: var(--msg-bubble-out);
  color: #fff;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
}

.cab-msg-bubble .dm-imgs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.cab-msg-bubble .dm-imgs img {
  width: 100%;
  border-radius: 10px;
  display: block;
  cursor: pointer;
}

/* News rubric alert — one home-strip-style card per message */
.cab-msg-bubble-wrap.has-news-card {
  max-width: min(86%, 300px);
}

.cab-msg-bubble.is-news-card {
  padding: 0;
  overflow: hidden;
  background: transparent;
  border-radius: 12px;
}

.cab-msg-bubble-wrap.is-mine .cab-msg-bubble.is-news-card {
  background: transparent;
  color: inherit;
}

.dm-news-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #161a21;
  color: #fff;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}

.dm-news-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

html[data-theme="light"] .dm-news-card {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .dm-news-card:hover {
  border-color: rgba(15, 23, 42, 0.2);
}

.dm-news-card-img {
  position: relative;
  flex: 0 0 118px;
  height: 118px;
  overflow: hidden;
  background: linear-gradient(135deg, #1c2430, #0e1621);
}

.dm-news-card-img.is-empty {
  flex-basis: 56px;
  height: 56px;
}

.dm-news-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.08) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.dm-news-card-img.is-empty::after {
  display: none;
}

.dm-news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.dm-news-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 0;
}

.dm-news-card-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 550;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  color: inherit;
  opacity: 0.92;
}

.dm-news-card-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dm-news-card:hover .dm-news-card-more {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] .dm-news-card-more {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .dm-news-card:hover .dm-news-card-more {
  background: rgba(15, 23, 42, 0.1);
}

.cab-msg-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 0.68rem;
  color: var(--msg-muted);
}

.cab-msg-bubble-wrap.is-mine .cab-msg-meta {
  justify-content: flex-end;
}

.cab-msg-ticks {
  letter-spacing: -1px;
  font-size: 0.75rem;
}

.cab-msg-ticks.is-read {
  color: var(--msg-blue);
}

.cab-msg-feed-empty {
  margin: auto;
  text-align: center;
  color: var(--msg-muted);
  font-size: 0.9rem;
  padding: 24px;
}

.cab-msg-compose {
  position: relative;
  flex-shrink: 0;
  border-top: 1px solid var(--msg-line);
  background: var(--msg-compose-bg);
  padding: 10px 12px 12px;
}

.cab-msg-preview {
  margin-bottom: 8px;
  position: relative;
}

.cab-msg-preview[hidden] {
  display: none !important;
}

.cab-msg-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}

.cab-msg-preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.cab-msg-preview-rm {
  position: absolute;
  top: -6px;
  right: -2px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.cab-msg-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.cab-msg-input-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  background: var(--msg-input-bg);
  border-radius: 20px;
  border: 1px solid var(--msg-line);
  padding: 0 4px 0 14px;
}

.cab-msg-input-wrap textarea::placeholder {
  color: var(--msg-muted);
}

.cab-msg-input-wrap textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--msg-text);
  font: inherit;
  font-size: 0.95rem;
  padding: 10px 0;
  outline: none;
  line-height: 1.35;
}

.cab-msg-emoji-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--msg-muted);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.cab-msg-emoji-btn:hover {
  color: var(--msg-text);
}

.cab-msg-send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--msg-blue);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.45;
}

.cab-msg-send.is-ready {
  opacity: 1;
}

.cab-msg-send.is-ready:hover {
  filter: brightness(1.06);
}

.cab-msg-send:disabled {
  cursor: default;
}

.cab-msg-emoji-pop {
  position: absolute;
  left: 12px;
  bottom: 64px;
  z-index: 8;
  width: min(300px, calc(100% - 24px));
  max-height: 180px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--msg-line);
  background: var(--msg-emoji-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

html:not([data-theme="light"]) .cab-msg-emoji-pop button:hover,
html[data-theme="dark"] .cab-msg-emoji-pop button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cab-msg-emoji-pop[hidden] {
  display: none !important;
}

.cab-msg-emoji-pop button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 1.2rem;
  line-height: 1.4;
  cursor: pointer;
  padding: 4px;
}

.cab-msg-emoji-pop button:hover {
  background: rgba(128, 128, 128, 0.12);
}

@media (max-width: 860px) {
  .cab-msg {
    height: min(calc(100vh - 110px), 900px);
    border-radius: 12px;
  }

  .cab-msg.is-chat-open .cab-msg-sidebar {
    display: none;
  }

  .cab-msg:not(.is-chat-open) .cab-msg-main {
    display: none;
  }

  .cab-msg-sidebar {
    width: 100%;
    border-right: 0;
  }

  .cab-msg-back {
    display: grid;
  }
}

@media (max-width: 640px) {
  .cab-msg {
    max-width: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    height: calc(100vh - 100px);
    min-height: 420px;
  }

  .cab-msg-bubble-wrap {
    max-width: 88%;
  }
}

/* In-app confirm (replaces browser window.confirm) */
.cab-msg-confirm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cab-msg-confirm[hidden] {
  display: none !important;
}

.cab-msg-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.cab-msg-confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  background: #161920;
  color: #fff;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 22px 22px 18px;
}

html[data-theme="light"] .cab-msg-confirm-dialog {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
}

.cab-msg-confirm-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.cab-msg-confirm-text {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #9aa3af;
}

html[data-theme="light"] .cab-msg-confirm-text {
  color: #64748b;
}

.cab-msg-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cab-msg-confirm-btn {
  min-width: 88px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}

.cab-msg-confirm-btn.is-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.cab-msg-confirm-btn.is-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .cab-msg-confirm-btn.is-ghost {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

html[data-theme="light"] .cab-msg-confirm-btn.is-ghost:hover {
  background: rgba(15, 23, 42, 0.1);
}

.cab-msg-confirm-btn.is-ok {
  background: #13c45c;
  color: #0a0f0c;
}

.cab-msg-confirm-btn.is-ok:hover {
  filter: brightness(1.06);
}

.cab-msg-confirm-btn.is-danger {
  background: #ad3942;
  color: #fff;
}

.cab-msg-confirm-btn.is-danger:hover {
  filter: brightness(1.08);
}
