:root {
  color-scheme: dark;
  --base: #10151f;
  --rail: #0d121b;
  --panel: #151c28;
  --surface: #1a2331;
  --line: #283345;
  --text: #f0f4fb;
  --muted: #a4b1c6;
  --faint: #8292aa;
  --accent: #a5edda;
  --accent-ink: #112b2a;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--base); color: var(--text); }
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { cursor: default; }
svg { width: 20px; height: 20px; display: block; flex: none; }
.app { display: grid; grid-template-columns: 72px minmax(315px, 362px) minmax(0, 1fr) 300px; height: 100dvh; overflow: hidden; }
.rail { display: flex; flex-direction: column; align-items: center; background: var(--rail); border-right: 1px solid var(--line); padding: 22px 0 19px; gap: 33px; }
.brand { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 14px; color: var(--accent-ink); background: var(--accent); box-shadow: 0 5px 23px #a5edda24; }
.brand svg { width: 27px; height: 27px; }
.rail-main, .rail-bottom { display: grid; gap: 10px; justify-items: center; }
.rail-bottom { margin-top: auto; }
.rail-button, .icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid transparent; border-radius: 12px; color: var(--muted); }
.rail-button:hover, .icon-button:hover { background: #243044; color: var(--text); }
.rail-button.active { color: var(--accent); background: #213837; border-color: #31504d; }
.rail-sep { width: 30px; height: 1px; background: var(--line); margin: 3px 0; }
.me { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #393453; color: #e1d6ff; font-size: 14px; font-weight: 800; }
.inbox { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-right: 1px solid var(--line); }
.inbox-head { padding: 25px 21px 0; }
.workspace { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.workspace-mark { color: var(--accent); }
.workspace-mark svg { width: 15px; height: 15px; }
.inbox-title { display: flex; align-items: center; gap: 10px; margin: 13px 0 18px; }
h1 { margin: 0; font-size: 29px; line-height: 1.15; font-weight: 800; letter-spacing: -.9px; }
.total-unread { display: grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; border-radius: 7px; color: var(--accent); background: #243f3e; font-size: 12px; font-weight: 800; }
.inbox-accounts { display: none; margin-left: auto; }
.search { display: flex; height: 44px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 0 11px; color: var(--faint); background: #101722; }
.search:focus-within { border-color: #6eb9aa; }
.search svg { width: 17px; height: 17px; }
.search input { outline: none; color: var(--text); background: none; border: 0; min-width: 0; width: 100%; font-size: 14px; }
.search input::placeholder, textarea::placeholder { color: var(--faint); }
kbd { background: #1d2736; border: 1px solid #323e51; border-radius: 5px; width: 21px; flex: none; text-align: center; font: 12px/19px Manrope, sans-serif; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; }
.tab { height: 32px; border-radius: 8px; padding: 0 10px; font-size: 13px; font-weight: 750; color: var(--muted); background: #1d2737; }
.tab:hover { color: var(--text); background: #263346; }
.tab[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.list-header { margin: 20px 0 5px; padding: 0 21px; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--faint); }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; font-size: 12px; font-weight: 750; color: var(--muted); }
.text-button:hover, .text-button[aria-pressed="true"] { color: var(--accent); }
.text-button svg { width: 14px; height: 14px; }
.thread-list { overflow: auto; flex: 1; padding: 4px 9px 8px; scrollbar-width: thin; }
.thread { display: flex; align-items: center; position: relative; width: 100%; gap: 2px; min-height: 77px; border: 1px solid transparent; border-radius: 12px; padding-right: 6px; }
.thread-open { display: flex; align-items: center; align-self: stretch; flex: 1; min-width: 0; gap: 12px; padding: 10px 0 10px 10px; text-align: left; border-radius: 11px; }
.thread-open:focus-visible { outline-offset: -2px; }
.thread:hover { background: #1b2637; }
.thread.selected { background: #213345; border-color: #324960; }
.avatar { width: 47px; height: 47px; display: grid; place-items: center; flex: none; position: relative; }
.avatar img, .avatar-placeholder { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; background: #2a3c51; }
.avatar-placeholder { display: grid; place-items: center; color: #b3c9e3; font-weight: 800; }
.badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 3px; flex: none; border-radius: 6px; font-size: 9px; font-weight: 800; letter-spacing: -.35px; }
.badge svg { width: 13px; height: 13px; }
.avatar .badge { position: absolute; bottom: -3px; right: -4px; box-shadow: 0 0 0 2px var(--panel); }
.selected .avatar .badge { box-shadow: 0 0 0 2px #213345; }
.olx { background: #b9f49e; color: #133c35; }
.prom { background: #a789f0; color: #211044; }
.instagram { background: linear-gradient(135deg,#754be6,#bc3c8a 60%,#dc7869); color: #fff; }
.telegram { background: #73c5f9; color: #11374d; }
.thread-copy { display: grid; flex: 1; min-width: 0; gap: 3px; }
.thread-meta, .thread-preview { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-width: 0; }
.thread-name, .one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-name { font-size: 14px; font-weight: 800; }
.thread.unread .thread-name, .thread.unread time { color: var(--accent); }
.thread time { flex: none; color: var(--faint); font-size: 11px; font-weight: 750; }
.thread .product-name { color: #b4c7dc; font-size: 12px; font-weight: 750; }
.preview-text { font-size: 12px; color: var(--muted); }
.unread-badge { background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; min-width: 19px; height: 19px; border-radius: 10px; text-align: center; line-height: 19px; flex: none; }
.inbox-footer { display: flex; align-items: center; gap: 7px; padding: 9px 19px; min-height: 46px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.inbox-footer button { margin-left: auto; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: #edc77e; flex: none; }
.conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #111925; }
.chat-head { min-height: 82px; display: flex; align-items: center; gap: 12px; padding: 13px 24px; border-bottom: 1px solid var(--line); background: var(--panel); }
.chat-head .avatar { width: 44px; height: 44px; }
.chat-heading { flex: 1; min-width: 0; }
.chat-heading h2 { font-size: 17px; margin: 0 0 4px; font-weight: 800; }
.chat-heading p { color: var(--muted); margin: 0; font-size: 12px; }
.chat-head .icon-button { border-color: var(--line); width: 36px; height: 36px; border-radius: 9px; }
.chat-head .icon-button svg { width: 17px; height: 17px; }
.mobile-back { display: none; }
.messages { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; padding: 23px clamp(16px, 2.4vw, 37px); gap: 12px; scrollbar-width: thin; background-image: radial-gradient(ellipse at 45% 10%, #23334b7a, transparent 68%); }
.date { align-self: center; margin: 2px 0 12px; padding: 5px 12px; color: #b0bdcf; background: #202c3e; border: 1px solid #2c3c51; border-radius: 18px; font-size: 12px; font-weight: 750; }
.message-row { display: flex; gap: 8px; align-items: end; }
.message-row.out { justify-content: end; }
.message-person { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #bccee6; background: #293b52; font-size: 11px; font-weight: 800; }
.bubble { min-width: 84px; max-width: min(88%, 465px); background: #202c3e; border: 1px solid #304058; border-radius: 14px 14px 14px 4px; padding: 10px 13px 7px; color: #f0f4f9; }
.out .bubble { background: #23464a; border-color: #356065; border-radius: 14px 14px 4px 14px; }
.bubble p { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-attachments { display: grid; gap: 7px; }
.bubble p + .message-attachments { margin-top: 8px; }
.attachment-item { min-width: 0; display: grid; gap: 5px; }
.attachment-preview { width: min(280px, 100%); display: block; border-radius: 8px; overflow: hidden; background: #152033; }
.attachment-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.attachment-file {
  display: flex; min-width: 0; align-items: center; gap: 8px; padding: 7px 9px;
  border: 1px solid #ffffff20; border-radius: 8px; background: #101b2b55;
  color: var(--text); font-size: 13px; text-decoration: none;
}
.attachment-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-file:hover { color: var(--accent); border-color: #a5edda70; }
.attachment-file svg { width: 16px; height: 16px; flex: none; }
.attachment-file svg:last-child { margin-left: auto; }
.bubble time { margin-top: 2px; display: flex; align-items: center; justify-content: end; gap: 4px; font-size: 11px; color: #aabbd0; }
.message-status { display: inline-flex; color: var(--muted); }
.message-status.read { color: var(--accent); }
.message-status svg { width: 15px; height: 15px; }
.composer-wrap { background: #141d2a; border-top: 1px solid var(--line); padding: 15px clamp(16px, 2.4vw, 37px) 12px; }
.composer { display: flex; gap: 7px; align-items: end; min-height: 51px; background: #1c2839; border: 1px solid #33435b; border-radius: 13px; padding: 6px 7px 6px 8px; }
.composer:focus-within { border-color: #5a938b; }
.composer textarea { background: none; color: var(--text); border: 0; outline: none; flex: 1; min-width: 0; resize: none; height: 36px; max-height: 112px; padding: 8px 0 5px 3px; font-size: 14px; line-height: 20px; }
.composer .icon-button { width: 36px; height: 36px; }
.composer .icon-button svg { width: 19px; height: 19px; }
.send { width: 38px; height: 36px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; display: grid; place-items: center; }
.send:hover { background: #c2ffee; }
.send:disabled { opacity: .68; }
.composer-meta { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: var(--faint); font-size: 11px; padding: 8px 1px 0; }
.route { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.route .badge { height: 14px; min-width: 15px; border-radius: 4px; font-size: 7px; }
.route .badge svg { width: 10px; height: 10px; }
.details { min-width: 0; overflow: auto; scrollbar-width: thin; background: var(--panel); border-left: 1px solid var(--line); }
.details-head { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 0 19px; border-bottom: 1px solid var(--line); }
.details-head h2 { font-size: 15px; margin: 0; font-weight: 800; }
.details-head .icon-button { height: 34px; width: 34px; }
.details-head svg { width: 16px; height: 16px; }
.detail-section { padding: 19px; border-bottom: 1px solid var(--line); }
.detail-section h3 { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.product-card { overflow: hidden; border: 1px solid #354359; border-radius: 12px; background: #1b2637; }
.product-card img { display: block; width: 100%; height: 145px; object-fit: cover; background: #2c3e53; }
.product-info { padding: 12px; }
.product-info strong { display: block; font-size: 14px; line-height: 1.45; }
.product-link { color: var(--text); text-decoration-color: #72958f; text-underline-offset: 3px; }
.product-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.product-info b { display: block; color: var(--accent); margin-top: 5px; font-size: 16px; }
.product-info p { margin: 6px 0 0; color: var(--faint); font-size: 11px; }
.detail-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.detail-row strong { font-weight: 800; }
.detail-row + .detail-row { margin-top: 14px; }
.detail-label { color: var(--faint); min-width: 68px; }
.detail-action { display: flex; align-items: center; width: 100%; gap: 9px; padding: 9px 0; text-align: left; color: var(--muted); font-size: 13px; font-weight: 750; }
.detail-action:hover { color: var(--accent); }
.detail-action svg { width: 17px; height: 17px; }
.empty { margin: auto; padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty svg { width: 27px; height: 27px; color: var(--faint); margin: 0 auto 11px; }
.no-details { grid-template-columns: 72px minmax(315px, 362px) minmax(0, 1fr); }
.no-details .details { display: none; }
dialog { border: 1px solid #394c61; border-radius: 17px; padding: 22px; width: min(500px, calc(100vw - 28px)); background: var(--panel); color: var(--text); box-shadow: 0 25px 100px #0009; }
dialog::backdrop { background: #050913b9; backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.modal-head h2 { font-size: 20px; margin: 0; }
.modal-text { color: var(--muted); line-height: 1.55; font-size: 14px; }
.account-list { display: grid; gap: 8px; margin: 16px 0 0; }
.account { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #1b2535; border-radius: 10px; padding: 11px; }
.account div { flex: 1; display: grid; gap: 3px; }
.account strong { font-size: 14px; }
.account small, .account-state { color: var(--muted); font-size: 12px; }
.account a { color: var(--accent); text-decoration: none; font-size: 12px; }
.account a:hover { text-decoration: underline; }
.toast { position: fixed; z-index: 3; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 11px 17px; background: #263b4d; border: 1px solid #4a6276; color: var(--text); border-radius: 9px; font-size: 13px; box-shadow: 0 6px 25px #0006; text-align: center; width: max-content; max-width: calc(100vw - 25px); }
.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; max-height: 136px; overflow: auto; margin: 0 0 8px; }
.quick-replies button { padding: 6px 9px; border-radius: 7px; background: #29394e; font-size: 12px; }
.quick-replies [data-quick] { max-width: min(100%, 34ch); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-replies .quick-manage { color: var(--accent); border: 1px solid #415d59; background: transparent; }
.quick-replies button:hover { background: #394f68; }
.reply-editor { display: grid; gap: 8px; margin-top: 12px; }
.reply-editor label, .copy-field { color: var(--muted); font-size: 14px; }
.reply-editor textarea, .copy-field input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); font: inherit; }
.reply-editor textarea { resize: vertical; min-height: 76px; max-height: 35dvh; }
.reply-editor .folder-actions { margin-top: 0; }
.reply-submit { color: var(--accent); }
.reply-submit:disabled { opacity: .55; }
.reply-list { display: grid; max-height: 35dvh; overflow: auto; }
.reply-row { display: grid; grid-template-columns: 1fr 34px 34px; align-items: start; gap: 5px; border-top: 1px solid var(--line); padding: 8px 0; }
.reply-row p { margin: 4px 4px 4px 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-row .icon-button { width: 34px; height: 34px; }
.reply-row svg { width: 16px; height: 16px; }
#reply-status:empty { display: none; }
.copy-field { display: grid; gap: 8px; padding-top: 12px; }
@media (max-width: 1190px) {
  .app { grid-template-columns: 65px minmax(310px, 333px) minmax(0, 1fr) 248px; }
  .no-details { grid-template-columns: 65px minmax(310px, 333px) minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 61px minmax(300px, 325px) minmax(0, 1fr); }
  .details { display: none; }
  .show-details:not(.no-details) .details { display: block; position: absolute; right: 0; top: 0; bottom: 0; width: min(300px, 100%); box-shadow: -14px 0 37px #0009; z-index: 2; }
}
@media (max-width: 660px) {
  .app { grid-template-columns: 52px minmax(0, 1fr); }
  .rail { padding-top: 17px; gap: 26px; }
  .brand { width: 35px; height: 35px; border-radius: 11px; }
  .brand svg { width: 23px; height: 23px; }
  .rail-button { width: 36px; height: 36px; }
  .inbox-head { padding: 17px 13px 0; }
  .list-header { padding: 0 14px; }
  .thread-list { padding: 3px 5px; }
  .conversation { display: none; }
  .mobile-chat { grid-template-columns: minmax(0, 1fr); }
  .mobile-chat .rail, .mobile-chat .inbox { display: none; }
  .mobile-chat .conversation, .mobile-back { display: flex; }
  .mobile-back { align-items: center; justify-content: center; }
  .chat-head { min-height: 67px; padding: 10px 12px; gap: 9px; }
  .messages { padding: 17px 13px; }
  .composer-wrap { padding: 10px 12px; }
  .composer-hint { display: none; }
}

.demo-dot.online { background: var(--accent); }

.bookmark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--muted); padding: 3px; }
.thread > .bookmark svg, .saved-caption .bookmark svg { width: 16px; height: 16px; color: inherit; }
.bookmark:hover, .bookmark:focus-visible, .bookmark[aria-pressed="true"] { color: var(--accent); background: #a5edda15; }
.bookmark[aria-pressed="true"] svg { fill: currentColor; }
.saved-list { margin-top: 12px; display: grid; gap: 10px; max-height: 56dvh; overflow: auto; }
.saved-row { padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.saved-caption { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.saved-caption .bookmark { margin-left: auto; }
.saved-row small { display: block; margin-top: 2px; color: var(--muted); }
.saved-row p { white-space: pre-wrap; font-size: 15px; line-height: 1.5; margin: 9px 0; }
.saved-row .text-button { color: var(--accent); }
.folder-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.folder-button { font-weight: 700; font-size: 14px; padding: 9px 13px; border-radius: 8px; border: 1px solid var(--line); }
.folder-button.danger { color: #ffb6b6; border-color: #754c55; }
.folder-button:hover { background: var(--surface); }
#saved-status:empty { display: none; }
