/* =============================================================================
   Chat Styles: Landing Page Buttons, Guest /messages & Owner /panel/chat
   ============================================================================= */

/* --- Floating Buttons on Landing Page --- */
.floating-chat-btn {
  position: fixed;
  bottom: 24px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 50px;
  background: var(--btn-bg, var(--biz-gold, var(--accent, #3b82f6)));
  color: var(--btn-color, var(--biz-bg, #ffffff));
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(10px);
}

.floating-chat-bottom_right {
  right: 24px;
}

.floating-chat-bottom_left {
  left: 24px;
}

.floating-chat-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.floating-chat-icon {
  font-size: 18px;
  line-height: 1;
}

.chat-btn-icon {
  font-size: 16px;
  line-height: 1;
  display: inline-block;
  margin-right: 4px;
}

.chat-header-btn,
.chat-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 600px) {
  .floating-chat-btn {
    bottom: 16px;
    padding: 12px;
    border-radius: 50%;
  }
  .floating-chat-bottom_right { right: 16px; }
  .floating-chat-bottom_left { left: 16px; }
  .floating-chat-label { display: none; }
}

/* --- Guest Live Chat Page (/messages) --- */
.chat-page-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f172a;
  color: #f8fafc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chat-container {
  width: 100%;
  max-width: 680px;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  padding: 0;
}

@media (min-width: 700px) {
  .chat-container {
    height: 90vh;
    max-height: 850px;
    padding: 16px;
  }
}

.chat-card {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.chat-state-card {
  padding: 40px 24px;
  text-align: center;
  justify-content: center;
  align-items: center;
}

.state-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.state-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: center;
}

.chat-password-form {
  width: 100%;
  max-width: 320px;
  margin-top: 20px;
}

.chat-input-field {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
}
.chat-input-field:focus {
  border-color: #3b82f6;
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-back-btn {
  color: #94a3b8;
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  border-radius: 8px;
}
.chat-back-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chat-title-group {
  display: flex;
  flex-direction: column;
}

.chat-site-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}
.status-dot.offline { background: #94a3b8; }

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.panel-chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .panel-chat-action-btn .action-btn-label {
    display: none;
  }
}

/* Toast Notifications */
.chat-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #f8fafc;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 90vw;
  text-align: center;
}
.chat-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.chat-toast.error {
  background: #991b1b;
  border-color: #ef4444;
  color: #ffffff;
}
.chat-toast.success {
  background: #166534;
  border-color: #22c55e;
  color: #ffffff;
}

.chat-badge-expires {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.chat-icon-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: #cbd5e1;
}
.chat-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.chat-dropdown {
  position: relative;
}

.chat-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  min-width: 220px;
  padding: 6px 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.chat-dropdown-menu[hidden] {
  display: none !important;
}

.chat-menu-item {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #e2e8f0;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.chat-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.chat-menu-item.danger {
  color: #ef4444;
}

.chat-dropdown-menu hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* PUSH Banner in Chat */
.chat-push-banner {
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-push-banner[hidden] { display: none !important; }

.push-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.push-banner-btn {
  background: #ffffff;
  color: #1e3a8a;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.push-banner-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

/* Messages Stream */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-msg-row {
  display: flex;
  width: 100%;
}

.chat-msg-row.visitor {
  justify-content: flex-end;
}

.chat-msg-row.owner {
  justify-content: flex-start;
}

.chat-msg-row.system {
  justify-content: center;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.45;
  word-break: break-word;
  position: relative;
}

.chat-msg-row.visitor .chat-bubble {
  background: #2563eb;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-msg-row.owner .chat-bubble {
  background: #334155;
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
}

.chat-msg-row.system .chat-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 13px;
  border-radius: 10px;
  text-align: center;
  max-width: 90%;
  padding: 6px 12px;
}

.msg-time {
  font-size: 11px;
  opacity: 0.65;
  margin-top: 4px;
  display: block;
  text-align: right;
}

/* Attachments */
.msg-attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.msg-attachment-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.msg-attachment-img:hover {
  opacity: 0.9;
}

/* Typing Indicator */
.chat-typing-indicator {
  padding: 6px 18px;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-typing-indicator[hidden] { display: none !important; }

.chat-typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.chat-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Attachments preview before sending */
.chat-attachments-preview {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.chat-attachments-preview[hidden] { display: none !important; }

.preview-thumb {
  position: relative;
  width: 50px;
  height: 50px;
}
.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.preview-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chat Footer / Input bar */
.chat-footer {
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-attach-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  line-height: 1;
}
.chat-attach-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.chat-textarea {
  flex: 1;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 14.5px;
  resize: none;
  max-height: 120px;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
}
.chat-textarea:focus {
  border-color: #3b82f6;
}

.chat-send-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}
.chat-send-btn:hover {
  background: #1d4ed8;
}

/* Modals */
.chat-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.chat-modal[hidden] { display: none !important; }

.chat-modal-box {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.chat-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
}

.modal-hint {
  font-size: 13.5px;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.4;
}

.share-url-box {
  display: flex;
  gap: 8px;
}

/* --- Owner Panel Chat Manager (/panel/chat) Styles --- */
.panel-chat-wrapper {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  height: 500px;
  max-height: calc(100vh - 230px);
  min-height: 360px;
  margin-top: 16px;
}

@media (max-width: 860px) {
  .panel-chat-wrapper {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }
}

.chat-inbox-sidebar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.chat-inbox-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-filter-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.chat-filter-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
}
.chat-filter-btn.active {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.chat-search-box {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.chat-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
  transition: border-color 0.15s, background 0.15s;
}

.chat-search-input:focus {
  border-color: #3b82f6;
  background: #ffffff;
}

.chat-thread-no-search {
  padding: 24px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  list-style: none;
}

.chat-thread-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chat-thread-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-thread-item:hover {
  background: #f8fafc;
}
.chat-thread-item.active {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
}

.chat-thread-item.is-pinned {
  background: #f8fafc;
  border-left: 3px solid #f59e0b;
}
.chat-thread-item.is-pinned:hover {
  background: #f1f5f9;
}
.chat-thread-item.is-pinned.active {
  background: #fef3c7;
  border-left: 3px solid #d97706;
}

.thread-pinned-tag {
  font-size: 11px;
  margin-right: 2px;
  display: inline-block;
  vertical-align: middle;
}

.panel-chat-action-btn.active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.chat-thread-item.is-deleted {
  opacity: 0.85;
  background: #fafafa;
  border-left: 3px solid #ef4444;
}
.chat-thread-item.is-deleted:hover {
  opacity: 1;
  background: #fef2f2;
}
.chat-thread-item.is-deleted.active {
  background: #fee2e2;
  border-left: 3px solid #dc2626;
}

.thread-deleted-tag {
  display: inline-block;
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.thread-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.thread-id {
  font-weight: 600;
  font-size: 13.5px;
  color: #1e293b;
}

.thread-time {
  font-size: 11.5px;
  color: #94a3b8;
}

.thread-preview {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-unread-badge {
  background: #3b82f6;
  color: #ffffff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.chat-main-area {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.chat-main-area .chat-messages {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  background: #f1f5f9;
}

.chat-empty-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94a3b8;
  gap: 12px;
}

/* =============================================================================
   Telegram-Style Guest Chat (/messages)
   Scoped under .chat-page-body to not affect the owner panel (/panel/chat)
   ============================================================================= */
.chat-page-body {
  background: #f0f2f5;
}

.chat-page-body .chat-card {
  background: #8fae8b url('/img/chat-bg.jpg') center / cover;
  border: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  backdrop-filter: none;
}

/* Header — Telegram blue bar */
.chat-page-body .chat-header {
  background: #517da2;
  border-bottom: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

.chat-page-body .chat-site-name {
  color: #ffffff;
}

.chat-page-body .chat-status {
  color: rgba(255, 255, 255, 0.75);
}

.chat-page-body .status-dot {
  background: #5be15f;
}
.chat-page-body .status-dot.offline {
  background: rgba(255, 255, 255, 0.5);
}

.chat-page-body .chat-back-btn {
  color: #ffffff;
}
.chat-page-body .chat-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.chat-page-body .chat-avatar {
  background: rgba(255, 255, 255, 0.18);
}

.chat-page-body .chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-page-body .chat-badge-expires {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.chat-page-body .chat-icon-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.chat-page-body .chat-icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* Dropdown menu — light */
.chat-page-body .chat-dropdown-menu {
  background: #ffffff;
  border: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.chat-page-body .chat-menu-item {
  color: #17212b;
}
.chat-page-body .chat-menu-item:hover {
  background: #f1f3f5;
}
.chat-page-body .chat-menu-item.danger {
  color: #d74a4a;
}

.chat-page-body .chat-dropdown-menu hr {
  border-top-color: #e7ebf0;
}

/* PUSH banner — Telegram accent blue */
.chat-page-body .chat-push-banner {
  background: #3390ec;
  border-bottom: none;
}

.chat-page-body .push-banner-btn {
  color: #3390ec;
}

/* Messages stream — background image shows through */
.chat-page-body .chat-messages {
  background: transparent;
  gap: 8px;
}

/* Bubbles — Telegram light style */
.chat-page-body .chat-bubble {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 35, 47, 0.15);
  color: #17212b !important;
}

.chat-page-body .chat-msg-row.visitor .chat-bubble {
  background: #effdde;
  color: #17212b !important;
  border-bottom-right-radius: 4px;
}

.chat-page-body .chat-msg-row.owner .chat-bubble {
  background: #ffffff;
  color: #17212b !important;
  border-bottom-left-radius: 4px;
}

.chat-page-body .chat-msg-row.visitor .msg-text,
.chat-page-body .chat-msg-row.owner .msg-text {
  color: #17212b !important;
}

.chat-page-body .chat-msg-row.system .chat-bubble {
  background: rgba(22, 35, 25, 0.45);
  color: #ffffff !important;
  box-shadow: none;
}

.chat-page-body .chat-msg-row.system .msg-text {
  color: #ffffff !important;
}

.chat-page-body .msg-time {
  color: #707579;
  opacity: 1;
}

.chat-page-body .chat-msg-row.visitor .msg-time {
  color: #4fae4e;
}

/* Panel attachments preview */
.chat-main-area .chat-attachments-preview {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Typing indicator */
.chat-page-body .chat-typing-indicator {
  color: #47624f;
}
.chat-page-body .chat-typing-indicator span {
  background: #47624f;
}

/* Attachments preview — light */
.chat-page-body .chat-attachments-preview {
  background: #ffffff;
  border-top: 1px solid #e7ebf0;
}

/* Footer / input bar — white like Telegram */
.chat-page-body .chat-footer {
  background: #ffffff;
  border-top: 1px solid #e7ebf0;
}

.chat-page-body .chat-attach-btn {
  color: #8e9aa6;
}
.chat-page-body .chat-attach-btn:hover {
  color: #3390ec;
  background: transparent;
}

.chat-page-body .chat-textarea {
  background: #ffffff;
  border: 1px solid #d6dde3;
  border-radius: 20px;
  color: #17212b;
}
.chat-page-body .chat-textarea::placeholder {
  color: #9aa5ad;
}
.chat-page-body .chat-textarea:focus {
  border-color: #3390ec;
}

.chat-page-body .chat-send-btn {
  background: #3390ec;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-page-body .chat-send-btn:hover {
  background: #2b7cd3;
}

/* State cards (disabled / expired / password) — light */
.chat-page-body .chat-state-card {
  background: rgba(255, 255, 255, 0.94);
  color: #17212b;
}
.chat-page-body .chat-state-card h2 {
  color: #17212b;
}
.chat-page-body .chat-state-card p {
  color: #4f5a64;
}

.chat-page-body .chat-input-field {
  background: #ffffff;
  border: 1px solid #d6dde3;
  color: #17212b;
}
.chat-page-body .chat-input-field:focus {
  border-color: #3390ec;
}

/* Modals — light */
.chat-page-body .chat-modal-box {
  background: #ffffff;
  border: none;
  color: #17212b;
}
.chat-page-body .chat-modal-box h3 {
  color: #17212b;
}
.chat-page-body .chat-modal-close {
  color: #707579;
}
.chat-page-body .modal-hint {
  color: #707579;
}

/* Toast — Telegram-style dark snackbar */
.chat-page-body .chat-toast {
  background: #212121;
  border: none;
  color: #ffffff;
}
.chat-page-body .chat-toast.error {
  background: #c24a4a;
  border: none;
}
.chat-page-body .chat-toast.success {
  background: #3d8b40;
  border: none;
}
