@font-face { font-family: "Mina"; src: url("/assets/fonts/Mina-VF.woff2") format("woff2"), url("/assets/fonts/Mina-VF.woff") format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --font: "Mina", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Vazirmatn", "Dana", "Yekan Bakh", "IRANSans", Tahoma, sans-serif;
  --brand: #346bf1;
  --brand-hover: #2355d6;
  --brand-dark: #1940a8;
  --brand-soft: #eff4ff;
  --brand-border: #c7d7fe;
  --ink: #09090b;
  --body: #334155;
  --subtle: #64748b;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --bg: #f4f6fa;
  --card: #ffffff;
  --rail: #08090c;
  --emerald: #10b981;
  --emerald-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --rose: #f43f5e;
  --rose-soft: #fff1f2;
  --note: #fef3c7;
  --note-ink: #92400e;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, .05), 0 2px 6px -1px rgba(0, 0, 0, .03);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .3);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss02";
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
.dc-boot { height: 100vh; display: grid; place-items: center; background: var(--rail); }
.dc-boot-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--brand); box-shadow: 0 0 40px rgba(52, 107, 241, .6); animation: dc-pulse 1.4s infinite ease-in-out; }
@keyframes dc-pulse { 50% { transform: scale(.88); opacity: .7; } }

.dc-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 80% 10%, rgba(52, 107, 241, .35), transparent 45%), radial-gradient(circle at 10% 90%, rgba(16, 185, 129, .14), transparent 40%), var(--rail); }
.dc-login-card { width: min(420px, 100%); background: #fff; border-radius: var(--r-lg); padding: 34px 30px 28px; box-shadow: var(--shadow-lg); }
.dc-login-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.dc-logo { width: 50px; height: 50px; border-radius: 15px; background: linear-gradient(135deg, #181920, #101116); border: 1px solid rgba(52, 107, 241, .45); color: var(--brand); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(52, 107, 241, .3); }
.dc-login-head h1 { margin: 0; font-size: 21px; font-weight: 900; color: var(--ink); line-height: 1.3; }
.dc-login-head p { margin: 2px 0 0; font-size: 13px; color: var(--subtle); }
.dc-field { display: block; margin-bottom: 14px; }
.dc-field span { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.dc-input { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; min-height: 44px; }
.dc-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(52, 107, 241, .15); }
.dc-input[dir="ltr"] { text-align: left; }
.dc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-sm); padding: 10px 18px; font-weight: 700; font-size: 13.5px; background: var(--brand); color: #fff; transition: background .2s, transform .2s; white-space: nowrap; }
.dc-btn:hover { background: var(--brand-hover); }
.dc-btn:disabled { opacity: .6; cursor: default; }
.dc-btn.block { width: 100%; min-height: 46px; margin-top: 6px; }
.dc-btn.ghost { background: #f1f5f9; color: var(--ink); border: 1px solid var(--line); }
.dc-btn.ghost:hover { background: #e2e8f0; }
.dc-btn.danger { background: transparent; color: var(--rose); border: 1px solid #fecdd3; }
.dc-btn.danger:hover { background: var(--rose-soft); }
.dc-btn.sm { padding: 6px 12px; font-size: 12.5px; }
.dc-error { background: var(--rose-soft); color: #be123c; border: 1px solid #fecdd3; border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.dc-login-foot { margin-top: 20px; text-align: center; font-size: 12px; color: var(--muted); }
.dc-login-foot a { text-decoration: none; font-weight: 700; }

.dc-shell { height: 100vh; height: 100dvh; display: grid; grid-template-columns: 68px 340px minmax(0, 1fr) 300px; }
.dc-shell.no-info { grid-template-columns: 68px 340px minmax(0, 1fr) 0; }

.dc-rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 6px; position: relative; overflow: hidden; }
.dc-rail::after { content: ""; position: absolute; top: -80px; left: -60px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(52, 107, 241, .35), transparent 70%); pointer-events: none; }
.dc-rail > * { position: relative; z-index: 1; }
.dc-rail .dc-logo { width: 42px; height: 42px; border-radius: 13px; margin-bottom: 14px; }
.dc-rail-btn { width: 44px; height: 44px; border-radius: 13px; border: 0; background: transparent; color: #94a3b8; display: grid; place-items: center; position: relative; transition: background .2s, color .2s; }
.dc-rail-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.dc-rail-btn.active { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(52, 107, 241, .45); }
.dc-rail-badge { position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rose); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center; }
.dc-rail-spacer { flex: 1; }
.dc-me { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: transparent; position: relative; }
.dc-me .dc-avatar { width: 40px; height: 40px; font-size: 15px; }
.dc-me-dot { position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--rail); background: var(--emerald); }
.dc-me-dot.away { background: var(--amber); }
.dc-me-dot.offline { background: var(--muted); }
.dc-conn { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); margin-top: 8px; box-shadow: 0 0 8px var(--emerald); }
.dc-conn.down { background: var(--rose); box-shadow: 0 0 8px var(--rose); animation: dc-pulse 1s infinite; }

.dc-menu { position: fixed; z-index: 50; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; animation: dc-pop .18s var(--ease); }
.dc-menu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.dc-menu-head strong { display: block; color: var(--ink); font-size: 14px; }
.dc-menu-head span { font-size: 12px; color: var(--subtle); }
.dc-menu button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px; text-align: right; font-size: 13px; color: var(--body); }
.dc-menu button:hover { background: var(--line-soft); color: var(--ink); }
.dc-menu button.on { color: var(--brand); font-weight: 700; }
.dc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
@keyframes dc-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

.dc-col { background: var(--card); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dc-col-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line-soft); }
.dc-col-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dc-col-title h2 { margin: 0; font-size: 17px; font-weight: 900; color: var(--ink); }
.dc-ws-name { font-size: 12px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.dc-search { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid transparent; border-radius: 12px; padding: 0 12px; color: var(--muted); transition: border-color .2s, background .2s; }
.dc-search:focus-within { border-color: var(--brand); background: #fff; }
.dc-search input { flex: 1; border: 0; background: transparent; outline: none; padding: 9px 0; font-size: 13px; color: var(--ink); min-width: 0; }
.dc-tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; }
.dc-tabs::-webkit-scrollbar { display: none; }
.dc-tab { border: 0; background: transparent; padding: 7px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 700; color: var(--subtle); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .2s, color .2s; }
.dc-tab:hover { background: var(--line-soft); color: var(--ink); }
.dc-tab.active { background: var(--brand-soft); color: var(--brand); }
.dc-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: #e2e8f0; color: #475569; font-size: 11px; line-height: 19px; text-align: center; }
.dc-tab.active .dc-count { background: var(--brand); color: #fff; }
.dc-count.hot { background: var(--rose); color: #fff; }

.dc-list { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.dc-item { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line-soft); background: #fff; text-align: right; transition: background .15s; position: relative; }
.dc-item:hover { background: #fafbfd; }
.dc-item.active { background: var(--brand-soft); }
.dc-item.active::before { content: ""; position: absolute; right: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px 0 0 3px; background: var(--brand); }
.dc-avatar { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; flex: none; position: relative; overflow: hidden; }
.dc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dc-online { position: absolute; bottom: -1px; left: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--emerald); border: 2px solid #fff; }
.dc-item-body { display: block; flex: 1; min-width: 0; }
.dc-item-top { display: flex; align-items: center; gap: 6px; }
.dc-item-name { font-weight: 800; color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.dc-item-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dc-item-preview { display: block; font-size: 12.5px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dc-item-preview.typing { color: var(--emerald); font-weight: 600; }
.dc-item-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.dc-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
.dc-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--line-soft); color: var(--subtle); white-space: nowrap; }
.dc-tag.queued { background: var(--amber-soft); color: #b45309; }
.dc-tag.open { background: var(--emerald-soft); color: #047857; }
.dc-tag.closed { background: #f1f5f9; color: var(--muted); }
.dc-tag.ai { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: var(--brand-dark); }
.dc-tag.mine { background: var(--brand-soft); color: var(--brand); }
.dc-empty { padding: 50px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.dc-empty svg { margin: 0 auto 12px; color: #cbd5e1; }
.dc-more { display: block; width: calc(100% - 32px); margin: 12px 16px; }

.dc-chat { background: var(--bg); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.dc-chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--line); min-height: 68px; }
.dc-chat-head .dc-avatar { width: 40px; height: 40px; }
.dc-chat-title { flex: 1; min-width: 0; }
.dc-chat-title strong { display: block; color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-chat-title > span { font-size: 12px; color: var(--subtle); display: flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; }
.dc-chat-actions { display: flex; gap: 6px; align-items: center; }
.dc-icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--subtle); display: grid; place-items: center; transition: all .2s; }
.dc-icon-btn:hover { color: var(--ink); background: var(--line-soft); }
.dc-icon-btn.active { color: var(--brand); border-color: var(--brand-border); background: var(--brand-soft); }
.dc-back { display: none; }

.dc-messages { flex: 1; overflow-y: auto; padding: 20px 22px 10px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.dc-day { align-self: center; font-size: 11.5px; color: var(--subtle); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; margin: 12px 0 8px; }
.dc-msg { display: flex; flex-direction: column; max-width: min(72%, 560px); margin-top: 6px; }
.dc-msg.in { align-self: flex-start; align-items: flex-start; }
.dc-msg.out { align-self: flex-end; align-items: flex-end; }
.dc-msg.cont { margin-top: 1px; }
.dc-bubble { padding: 9px 14px; border-radius: 18px; font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.dc-msg.in .dc-bubble { background: #fff; border: 1px solid var(--line); color: var(--body); border-start-start-radius: 6px; }
.dc-msg.out .dc-bubble { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-start-end-radius: 6px; box-shadow: 0 6px 16px -8px rgba(52, 107, 241, .6); }
.dc-msg.out .dc-bubble a { color: #fff; }
.dc-msg.bot .dc-bubble { background: linear-gradient(135deg, #eef2ff, #e0e7ff); border: 1px solid var(--brand-border); color: #312e81; box-shadow: none; }
.dc-msg.note .dc-bubble { background: var(--note); border: 1px dashed #f59e0b; color: var(--note-ink); box-shadow: none; }
.dc-msg.pending .dc-bubble { opacity: .65; }
.dc-msg.failed .dc-bubble { background: var(--rose-soft); color: #be123c; border: 1px solid #fecdd3; }
.dc-msg-meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); margin-top: 3px; padding: 0 6px; }
.dc-msg-meta .who { font-weight: 700; color: var(--subtle); }
.dc-ticks { color: var(--muted); }
.dc-ticks.seen { color: var(--brand); }
.dc-system { align-self: center; font-size: 12px; color: var(--subtle); background: rgba(255, 255, 255, .7); border: 1px dashed var(--line); padding: 4px 14px; border-radius: 999px; margin: 10px 0; display: flex; gap: 8px; align-items: center; }
.dc-img { display: block; max-width: 280px; max-height: 320px; border-radius: 14px; border: 1px solid var(--line); background: #fff; object-fit: cover; cursor: zoom-in; }
.dc-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-width: 220px; }
.dc-file-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.dc-file strong { display: block; font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-file span { font-size: 11px; color: var(--muted); }
.dc-ghost { align-self: flex-start; max-width: 72%; margin-top: 8px; padding: 8px 14px; border-radius: 18px; border: 1px dashed var(--brand-border); background: rgba(255, 255, 255, .6); color: var(--subtle); font-size: 13px; }
.dc-ghost b { color: var(--brand); font-size: 11px; display: block; }
.dc-typing-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dc-typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); animation: dc-blink 1.2s infinite both; }
.dc-typing-dots i:nth-child(2) { animation-delay: .2s; }
.dc-typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.dc-composer { background: #fff; border-top: 1px solid var(--line); padding: 10px 14px 12px; }
.dc-composer.note-mode { background: #fffdf5; border-top-color: #fde68a; }
.dc-composer-row { display: flex; align-items: flex-end; gap: 8px; }
.dc-composer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--bg); outline: none; min-height: 46px; max-height: 180px; line-height: 1.7; transition: border-color .2s, background .2s; }
.dc-composer textarea:focus { border-color: var(--brand); background: #fff; }
.dc-composer.note-mode textarea { border-color: #fbbf24; background: #fffbeb; }
.dc-send { width: 46px; height: 46px; border-radius: 14px; border: 0; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; display: grid; place-items: center; flex: none; }
.dc-send:disabled { opacity: .5; }
.dc-composer.note-mode .dc-send { background: var(--amber); }
.dc-composer-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dc-tool { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--subtle); display: inline-flex; align-items: center; gap: 6px; }
.dc-tool:hover { color: var(--ink); background: var(--line-soft); }
.dc-tool.on { background: var(--amber-soft); border-color: #fde68a; color: #b45309; }
.dc-hint { margin-inline-start: auto; font-size: 11px; color: var(--muted); }
.dc-closed-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; background: #fff; border-top: 1px solid var(--line); font-size: 13px; color: var(--subtle); }
.dc-drop { position: absolute; inset: 0; background: rgba(52, 107, 241, .08); border: 2px dashed var(--brand); border-radius: 18px; margin: 10px; display: grid; place-items: center; font-weight: 800; color: var(--brand); font-size: 15px; pointer-events: none; z-index: 5; }
.dc-welcome { flex: 1; display: grid; place-items: center; text-align: center; padding: 40px; color: var(--subtle); }
.dc-welcome .dc-logo { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 18px; }
.dc-welcome h3 { margin: 0 0 6px; color: var(--ink); font-size: 18px; }
.dc-welcome p { margin: 0; font-size: 13px; max-width: 360px; }
.dc-welcome .dc-btn { margin-top: 18px; }

.dc-info { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; min-width: 0; }
.dc-info-card { padding: 22px 20px 18px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.dc-info-card .dc-avatar { width: 64px; height: 64px; border-radius: 20px; font-size: 24px; margin: 0 auto 10px; }
.dc-info-card strong { display: block; font-size: 16px; color: var(--ink); }
.dc-info-card span { font-size: 12px; color: var(--subtle); }
.dc-info-sec { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.dc-info-sec h4 { margin: 0 0 10px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .02em; }
.dc-kv { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; font-size: 13px; }
.dc-kv svg { color: var(--muted); margin-top: 3px; }
.dc-kv span { flex: 1; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.dc-kv span.muted { color: var(--muted); }
.dc-kv a { text-decoration: none; }
.dc-page { display: block; padding: 10px 12px; border-radius: 12px; background: var(--bg); text-decoration: none; color: var(--ink); font-size: 12.5px; }
.dc-page small { display: block; color: var(--muted); direction: ltr; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-prev { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent; padding: 7px 8px; border-radius: 9px; font-size: 12.5px; color: var(--body); text-align: right; }
.dc-prev:hover { background: var(--line-soft); }
.dc-prev em { font-style: normal; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.dc-meta-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 12px; }
.dc-meta-grid dt { color: var(--muted); }
.dc-meta-grid dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

.dc-visitors { flex: 1; overflow-y: auto; padding: 18px; }
.dc-visitors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dc-vcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.dc-vcard-top { display: flex; gap: 10px; align-items: center; }
.dc-vcard-top strong { display: block; color: var(--ink); font-size: 14px; }
.dc-vcard-top span { font-size: 11.5px; color: var(--muted); }

.dc-settings { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.dc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow); }
.dc-card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 800; color: var(--ink); }
.dc-card h4 { margin: 4px 0 0; font-size: 13px; font-weight: 800; color: var(--ink); }
.dc-muted { font-size: 12.5px; color: var(--subtle); margin: 0 0 12px; }
.dc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; align-items: end; }
.dc-form-grid .wide, .dc-form-actions, .dc-check { grid-column: 1 / -1; }
.dc-form-grid.mt, .mt { margin-top: 14px; }
.dc-form-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.dc-form-actions .dc-muted { margin: 0; }
.dc-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0 12px; }
.dc-check input { accent-color: var(--brand); width: 16px; height: 16px; }
.dc-input[type=color] { padding: 4px; height: 44px; cursor: pointer; }
textarea.dc-input { resize: vertical; line-height: 1.7; }
.dc-input.sm { min-height: 34px; padding: 5px 10px; width: auto; font-size: 12.5px; }
.dc-code { display: flex; align-items: center; gap: 8px; background: #0b0c10; color: #e2e8f0; border-radius: 12px; padding: 10px 12px; direction: ltr; }
.dc-code code { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 12px; overflow-x: auto; white-space: nowrap; }
.dc-code .dc-icon-btn { background: transparent; border-color: rgba(255, 255, 255, .15); color: #cbd5e1; width: 32px; height: 32px; }
.dc-code .dc-icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.dc-code.sm { padding: 6px 8px 6px 12px; }
.dc-team { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.dc-team-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.dc-team-row:last-child { border-bottom: 0; }
.dc-team-row.off { opacity: .6; }
.dc-team-row .dc-avatar { width: 36px; height: 36px; font-size: 14px; border-radius: 12px; }
.dc-team-info { flex: 1; min-width: 140px; }
.dc-team-info strong { display: block; font-size: 13.5px; color: var(--ink); }
.dc-team-info span { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .dc-form-grid { grid-template-columns: 1fr; } .dc-settings { padding: 12px; } }
.dc-toast-shelf { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.dc-toast { background: rgba(9, 9, 11, .94); color: #fff; padding: 11px 22px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: 0 12px 36px rgba(0, 0, 0, .4); display: flex; align-items: center; gap: 10px; animation: dc-pop .3s var(--ease); }
.dc-toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.dc-toast.danger i { background: var(--rose); box-shadow: 0 0 10px var(--rose); }
.dc-banner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12.5px; border-bottom: 1px solid var(--brand-border); }
.dc-banner .dc-btn { margin-inline-start: auto; }
.dc-banner a.dc-btn { text-decoration: none; white-space: nowrap; }
.dc-sub.warn { background: var(--amber-soft); color: #92400e; border-bottom-color: #fde68a; }
.dc-sub.danger { background: var(--rose-soft); color: #9f1239; border-bottom-color: #fecdd3; }
.dc-sub.danger .dc-btn { background: var(--rose); }
.dc-lightbox { position: fixed; inset: 0; background: rgba(9, 9, 11, .88); z-index: 200; display: grid; place-items: center; padding: 30px; cursor: zoom-out; animation: dc-pop .2s var(--ease); }
.dc-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

@media (max-width: 1280px) {
  .dc-shell { grid-template-columns: 68px 310px minmax(0, 1fr) 0; }
  .dc-shell.show-info { grid-template-columns: 68px 310px minmax(0, 1fr) 290px; }
  .dc-shell:not(.show-info) .dc-info { display: none; }
}
@media (max-width: 860px) {
  .dc-shell, .dc-shell.show-info, .dc-shell.no-info { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 62px; }
  .dc-rail { order: 2; flex-direction: row; justify-content: space-around; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
  .dc-rail .dc-logo, .dc-rail-spacer, .dc-conn { display: none; }
  .dc-shell > .dc-col, .dc-shell > .dc-chat, .dc-shell > .dc-info { grid-row: 1; grid-column: 1; }
  .dc-shell.view-list .dc-chat, .dc-shell.view-list .dc-info { display: none; }
  .dc-shell.view-chat .dc-col, .dc-shell.view-chat .dc-info { display: none; }
  .dc-shell.view-info .dc-col, .dc-shell.view-info .dc-chat { display: none; }
  .dc-shell.view-info .dc-info { display: block; }
  .dc-back { display: grid; }
  .dc-msg { max-width: 86%; }
  .dc-messages { padding: 14px 12px 8px; }
  .dc-hint { display: none; }
  .dc-composer textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.dc-login-card.wide { width: min(560px, 100%); }
.dc-login-switch { margin-top: 14px; text-align: center; font-size: 13px; color: var(--subtle); }
.dc-login-switch a { font-weight: 800; text-decoration: none; }
.dc-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.dc-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; background: var(--line-soft); color: var(--subtle); }
.dc-pill.ok { background: var(--emerald-soft); color: #047857; }
.dc-pill.warn { background: var(--amber-soft); color: #b45309; }
.dc-pill.danger { background: var(--rose-soft); color: #be123c; }
.dc-pill.trial { background: #f5f3ff; color: #6d28d9; }
.dc-pay-result { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid; }
.dc-pay-result strong { font-size: 15px; font-weight: 900; }
.dc-pay-result span { font-size: 13px; line-height: 1.9; }
.dc-pay-result.ok { background: var(--emerald-soft); border-color: #a7f3d0; color: #065f46; }
.dc-pay-result.warn { background: var(--amber-soft); border-color: #fde68a; color: #92400e; }
.dc-pay-result.danger { background: var(--rose-soft); border-color: #fecdd3; color: #9f1239; }
.dc-sub-card { padding: 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.dc-sub-card.ok { background: linear-gradient(135deg, #ecfdf5, #fff 70%); border-color: #a7f3d0; }
.dc-sub-card.trial { background: linear-gradient(135deg, #f5f3ff, #fff 70%); border-color: #ddd6fe; }
.dc-sub-card.danger { background: linear-gradient(135deg, #fff1f2, #fff 70%); border-color: #fecdd3; }
.dc-sub-card strong { display: block; margin-top: 8px; font-size: 20px; font-weight: 900; color: var(--ink); }
.dc-sub-card small { display: block; font-size: 12.5px; color: var(--subtle); line-height: 1.8; }
.dc-sub-bar { height: 6px; margin-top: 14px; border-radius: 999px; background: rgba(15, 23, 42, .07); overflow: hidden; }
.dc-sub-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.dc-sub-card.ok .dc-sub-bar i { background: var(--emerald); }
.dc-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.dc-plan { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 20px 16px 16px; text-align: start; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); transition: border-color .2s, box-shadow .2s, transform .2s; }
.dc-plan:hover { border-color: var(--brand-border); transform: translateY(-2px); box-shadow: var(--shadow); }
.dc-plan.featured { border-color: var(--brand-border); }
.dc-plan.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(52, 107, 241, .15), var(--shadow); }
.dc-plan-badge { position: absolute; top: -11px; inset-inline-start: 14px; padding: 2px 12px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 800; }
.dc-plan-name { font-size: 15px; font-weight: 800; color: var(--ink); }
.dc-plan-price { font-size: 22px; font-weight: 900; color: var(--ink); line-height: 1.5; }
.dc-plan-price del { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); line-height: 1.4; }
.dc-plan-sub { font-size: 12.5px; color: var(--subtle); }
.dc-plan-sub em { font-style: normal; font-weight: 800; color: #047857; background: var(--emerald-soft); padding: 1px 8px; border-radius: 999px; margin-inline-start: 4px; font-size: 11.5px; }
.dc-plan-desc { font-size: 12.5px; color: var(--body); }
.dc-plan ul { list-style: none; margin: 8px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 4px; }
.dc-plan li { font-size: 12.5px; color: var(--body); padding-inline-start: 18px; position: relative; }
.dc-plan li:before { content: ""; position: absolute; inset-inline-start: 2px; top: 7px; width: 9px; height: 5px; border-inline-start: 2px solid var(--emerald); border-bottom: 2px solid var(--emerald); transform: rotate(-45deg) scaleX(-1); }
.dc-plan-pick { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 800; color: var(--brand); }
.dc-plan.selected .dc-plan-pick { color: var(--emerald); }
.dc-plan.selected .dc-plan-pick:before { content: "✓ "; }
.dc-checkout { margin-top: 16px; padding: 16px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.dc-checkout-row { display: flex; gap: 8px; }
.dc-checkout-row .dc-input { flex: 1; text-transform: uppercase; }
.dc-summary { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.dc-summary div { display: flex; justify-content: space-between; gap: 10px; }
.dc-summary .off { color: #047857; }
.dc-summary .total { padding-top: 8px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink); }
.dc-summary .total b { font-weight: 900; }
.dc-secure { margin: 0; text-align: center; }
.dc-orders { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.dc-order-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.dc-order-row:last-child { border-bottom: 0; }
.dc-order-row strong { display: block; font-size: 13.5px; color: var(--ink); }
.dc-order-row span { font-size: 12px; color: var(--muted); }
.dc-order-row > b { font-size: 13.5px; color: var(--ink); white-space: nowrap; }
.dc-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(9, 9, 11, .5); backdrop-filter: blur(2px); animation: dc-pop .2s; overflow-y: auto; }
.dc-modal-card { width: min(640px, 100%); background: #fff; border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-lg); }
.dc-inv-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.dc-inv-head h2 { margin: 0; font-size: 20px; font-weight: 900; color: var(--ink); }
.dc-inv-head span { font-size: 12.5px; color: var(--subtle); }
.dc-inv-brand { text-align: end; }
.dc-inv-brand strong { display: block; font-size: 16px; font-weight: 900; color: var(--brand); }
.dc-inv-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.dc-inv-meta span { display: block; font-size: 11.5px; color: var(--muted); }
.dc-inv-meta b { display: block; font-size: 13.5px; color: var(--ink); }
.dc-inv-meta small { display: block; font-size: 11.5px; color: var(--subtle); }
.dc-inv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dc-inv-table th { text-align: start; padding: 8px 10px; background: var(--bg); color: var(--subtle); font-size: 12px; }
.dc-inv-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); }
.dc-inv-sum { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0 auto; width: min(280px, 100%); font-size: 13px; }
.dc-inv-sum div { display: flex; justify-content: space-between; }
.dc-inv-sum .total { padding-top: 8px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink); font-weight: 900; }
.dc-inv-pay { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 12.5px; color: var(--body); }
.dc-inv-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
@media (max-width: 640px) { .dc-order-row { grid-template-columns: 1fr auto; } .dc-inv-meta { grid-template-columns: 1fr 1fr; } .dc-modal-card { padding: 20px; } }
@media print {
  body { overflow: visible !important; background: #fff !important; }
  body > *:not(.dc-modal) { display: none !important; }
  .dc-modal { position: static; background: none; padding: 0; backdrop-filter: none; }
  .dc-modal-card { box-shadow: none; width: 100%; }
  .dc-inv-actions { display: none; }
}
