:root {
  color-scheme: light;
  --ink: #1b2540;
  --muted: #64708a;
  --line: #e7eaf2;
  --white: #fff;
  --soft: #f6f7fb;
  --accent: #474cdf;
  --accent-dark: #383cbf;
  --lavender: #eeefff;
  --nav: #161d36;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--ink); }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .62; }
:focus-visible { outline: 2px solid #6a6af0; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loading { padding: 28px; color: var(--muted); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: white; width: max-content; }
.brand strong { font-size: 23px; font-weight: 720; letter-spacing: -.9px; }
.brand strong span { color: #b6baff; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: #6367f4; display: flex; justify-content: center; align-items: end; gap: 3px; padding-bottom: 11px; box-shadow: inset 0 1px 0 #ffffff35; }
.brand-mark i { width: 4px; background: white; border-radius: 2px; height: 9px; transform: skewY(-16deg); }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 12px; }

.workspace { display: grid; grid-template-columns: 235px 325px minmax(0, 1fr) 254px; height: 100vh; height: 100dvh; overflow: hidden; }
.workspace.details-hidden { grid-template-columns: 235px 325px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 0; background: var(--nav); color: #d7ddf1; padding: 26px 15px 16px; position: relative; z-index: 3; }
.sidebar > .brand { margin: 0 10px 38px; }
.side-section { margin-bottom: 29px; }
.side-label { display: block; padding: 0 10px 8px; color: #a4acc9; font-size: .75rem; font-weight: 650; letter-spacing: .045em; }
.side-button { border: 0; width: 100%; color: #dce1f4; border-radius: 9px; background: transparent; display: flex; align-items: center; text-align: left; gap: 11px; padding: 9px 10px; min-height: 44px; margin-bottom: 3px; font-size: .875rem; }
.side-button:hover { background: #272f4a; color: white; }
.side-button.active { background: #343c69; color: #fff; font-weight: 650; }
.side-button .icon { width: 19px; height: 19px; color: #b9c3e8; }
.side-button > span:nth-child(2) { flex: 1; }
.side-button em { font-style: normal; color: #aeb9de; font-size: .75rem; }
.side-button.active em { color: #e5e9ff; background: #ffffff19; border-radius: 6px; min-width: 22px; text-align: center; }
.side-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid #303750; }
.account-menu { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; border-radius: 9px; padding: 8px 7px; }
.account-trigger::-webkit-details-marker { display: none; }
.account-trigger:hover, .account-menu[open] .account-trigger { background: #272f4a; }
.account-trigger > span:nth-child(2) { flex: 1; min-width: 0; }
.account-trigger b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f1f3fc; font-size: .875rem; }
.account-trigger small, .account-popover small { display: block; font-size: .75rem; color: #aeb8d5; }
.account-popover { position: absolute; bottom: calc(100% + 10px); left: 0; width: 242px; border: 1px solid #3d4664; border-radius: 11px; background: #222b46; color: white; padding: 8px; box-shadow: 0 15px 30px #12172d40; }
.account-popover p { margin: 6px 8px; color: #aeb8d5; font-size: .76rem; }
.account-list { max-height: 220px; overflow-y: auto; }
.account-popover button { display: flex; width: 100%; align-items: center; gap: 8px; text-align: left; background: transparent; color: inherit; padding: 8px; border: 0; border-radius: 6px; font-size: .875rem; }
.account-popover button:not(:disabled):hover { background: #343d5e; }

.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; position: relative; color: inherit; vertical-align: middle; }
.icon::before, .icon::after { content: ""; position: absolute; display: block; }
.icon-inbox::before { inset: 3px 1px 2px; border: 1.65px solid currentColor; border-radius: 4px; }
.icon-inbox::after { inset: 9px 6px 6px; border: 1.65px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; }
.icon-settings::before { inset: 2px; border: 1.65px dashed currentColor; border-radius: 50%; }
.icon-settings::after { inset: 6px; border: 1.65px solid currentColor; border-radius: 50%; }
.icon-search::before { left: 2px; top: 2px; width: 12px; height: 12px; border: 1.6px solid currentColor; border-radius: 50%; }
.icon-search::after { width: 7px; height: 1.6px; background: currentColor; transform: rotate(45deg); left: 12px; top: 14px; border-radius: 1px; }
.icon-panel::before { inset: 3px 1px; border: 1.7px solid currentColor; border-radius: 3px; }
.icon-panel::after { inset: 4px 6px 4px auto; width: 1.6px; background: currentColor; }
.icon-close::before, .icon-close::after { width: 13px; height: 1.65px; left: 3.5px; top: 9px; background: currentColor; border-radius: 2px; transform: rotate(45deg); }
.icon-close::after { transform: rotate(-45deg); }
.icon-plus::before, .icon-plus::after { width: 11px; height: 1.65px; left: 4.5px; top: 9px; background: currentColor; border-radius: 2px; }
.icon-plus::after { transform: rotate(90deg); }
.icon-chevrons::before, .icon-chevrons::after { width: 6px; height: 6px; left: 7px; top: 4px; border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor; transform: rotate(45deg); }
.icon-chevrons::after { top: 9px; transform: rotate(225deg); }
.icon-filter::before { width: 13px; height: 1.6px; left: 3px; top: 5px; background: currentColor; box-shadow: 0 4px currentColor; }
.icon-filter::after { width: 6px; height: 1.6px; left: 6.5px; top: 13px; background: currentColor; }
.icon-tag::before { inset: 5px 2px 5px 3px; border: 1.5px solid currentColor; border-radius: 2px 5px 5px 2px; transform: rotate(-42deg); }
.icon-tag::after { width: 2.5px; height: 2.5px; left: 12.5px; top: 6px; border-radius: 50%; background: currentColor; }
.icon-back::before { width: 8px; height: 8px; border: solid currentColor; border-width: 0 0 1.7px 1.7px; top: 6px; left: 4px; transform: rotate(45deg); }
.icon-back::after { width: 12px; height: 1.7px; background: currentColor; top: 9px; left: 4px; }
.icon-send::before { inset: 3px 2px 3px 3px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%, 20% 56%, 66% 50%, 20% 44%); }
.icon-lock::before { inset: 8px 3px 2px; border: 1.7px solid currentColor; border-radius: 3px; }
.icon-lock::after { inset: 2px 6px 11px; border: 1.7px solid currentColor; border-radius: 5px 5px 0 0; }
.icon-clock::before { inset: 2px; border: 1.7px solid currentColor; border-radius: 50%; }
.icon-clock::after { left: 9px; top: 5px; width: 5px; height: 6px; border: solid currentColor; border-width: 0 0 1.7px 1.7px; }
.icon-logout::before { inset: 3px 8px 3px 3px; border: 1.6px solid currentColor; border-right: 0; border-radius: 3px 0 0 3px; }
.icon-logout::after { inset: 6px 3px 6px 7px; background: currentColor; clip-path: polygon(0 40%, 65% 40%, 50% 0, 100% 50%, 50% 100%, 65% 60%, 0 60%); }

.channel-icon { display: inline-grid; place-items: center; width: 23px; height: 23px; flex: 0 0 auto; color: #fff; background: #65709b; border-radius: 8px; font-size: .67rem; font-weight: 850; line-height: 1; }
.channel-icon.telegram { background: #2199db; }
.channel-icon.vk { background: #1572e4; letter-spacing: -.7px; }
.channel-icon.max { background: linear-gradient(140deg, #586df0, #9a45da); }
.channel-icon.whatsapp { background: #147d52; }
.channel-icon.instagram { background: linear-gradient(140deg, #a424ad, #c23876 58%, #db774b); }
.avatar { width: 40px; height: 40px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 14px; font-weight: 720; font-size: .84rem; color: #4a43ab; background: #e9e7ff; white-space: nowrap; }
.tone-0 { color: #4a43ab; background: #e9e7ff; }
.tone-1 { color: #5844b8; background: #ebe4ff; }
.tone-2 { color: #046b62; background: #dcefe9; }
.tone-3 { color: #a05225; background: #fbe9dc; }
.tone-4 { color: #943d69; background: #fde7f1; }
.tone-5 { color: #245c9e; background: #e0edff; }
.avatar.large { width: 66px; height: 66px; border-radius: 22px; font-size: 1.25rem; }
.avatar.mini { width: 28px; height: 28px; font-size: .68rem; border-radius: 9px; margin-top: 2px; }
.badge { --label: #4d59b5; display: inline-flex; align-items: center; width: max-content; max-width: 100%; gap: 5px; height: 23px; padding: 0 8px; border-radius: 6px; font-size: .75rem; font-weight: 650; color: color-mix(in srgb, var(--label) 82%, #171a2a); background: color-mix(in srgb, var(--label) 11%, white); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.badge i { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: var(--label); }
.badge.success { --label: #138251; }
.badge.muted { --label: #68728c; }

.inbox { background: white; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.inbox-header { padding: 25px 20px 10px; border-bottom: 1px solid var(--line); }
.eyebrow { color: #535c77; font-size: .78rem; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #6669ed; }
h1 { font-size: 1.85rem; line-height: 1.15; letter-spacing: -.045em; }
.inbox h1 { margin: 7px 0 18px; }
.search { height: 42px; display: flex; align-items: center; gap: 8px; background: #f5f6fa; color: #626d89; padding: 0 11px; border: 1px solid #ebedf4; border-radius: 9px; }
.search input { width: 100%; background: transparent; border: 0; outline: 0; color: var(--ink); font-size: .875rem; }
.search:focus-within { border-color: #9c9fff; }
::placeholder { color: #68748e; opacity: 1; }
.filters { display: flex; min-height: 35px; margin-top: 9px; align-items: center; justify-content: space-between; gap: 8px; }
.list-count { color: var(--muted); font-size: .8rem; font-weight: 650; }
.select-filter { display: flex; align-items: center; gap: 3px; color: #596584; }
.select-filter .icon { width: 17px; }
select { appearance: none; background: linear-gradient(45deg, transparent 50%, #546180 50%) right 14px center / 5px 5px no-repeat, linear-gradient(135deg, #546180 50%, transparent 50%) right 9px center / 5px 5px no-repeat, #fff; border: 1px solid #dde2ed; border-radius: 8px; padding: 7px 27px 7px 10px; color: var(--ink); font-size: .875rem; }
.select-filter select { border: 0; background: transparent; padding: 4px 0; color: #525f7c; max-width: 145px; cursor: pointer; }
#chat-list { min-height: 0; overflow-y: auto; padding: 6px 9px; scrollbar-width: thin; }
.chat-item { position: relative; }
.chat-row { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 10px; display: flex; gap: 11px; padding: 12px 10px; text-align: left; min-height: 86px; color: var(--ink); margin: 2px 0; }
.chat-row:not(.selected):hover { background: #f5f6fb; }
.chat-row.selected { border-color: #dedfff; background: #eff0ff; }
.chat-avatar { position: relative; align-self: start; }
.chat-avatar > .channel-icon { position: absolute; inset: auto -3px -3px auto; width: 18px; height: 18px; border: 2px solid #fff; font-size: .55rem; border-radius: 6px; }
.chat-preview { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.chat-row-head { display: flex; justify-content: space-between; gap: 7px; align-items: baseline; }
.chat-row-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.chat-row time { color: #68738c; font-size: .72rem; white-space: nowrap; }
.chat-channel { color: #54618c; font-size: .75rem; font-weight: 650; }
.preview-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #626d86; font-size: .82rem; }
.chat-row .badge { height: 20px; font-size: .69rem; }
.chat-labels, .preview-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
.chat-status, .preview-labels > .badge { max-width: 100%; }
.preview-labels .badge { border: 1px solid color-mix(in srgb, var(--label) 28%, white); }
.chat-item.has-action .preview-text, .chat-item.has-action .chat-labels { margin-right: 28px; }
.chat-item > .label-action { position: absolute; right: 9px; bottom: 11px; }
.list-empty { text-align: center; padding: 34px 12px; display: grid; justify-items: center; gap: 8px; }
.list-empty span { color: var(--muted); font-size: .85rem; }
.pagination { display: flex; justify-content: space-between; padding: 10px 8px; }

.conversation { min-width: 0; min-height: 0; background: #f5f6fb; display: flex; flex-direction: column; }
.conversation-header { display: flex; align-items: center; gap: 11px; padding: 17px 22px; border-bottom: 1px solid var(--line); background: white; min-height: 75px; }
.conversation-identity { flex: 1; min-width: 0; }
.conversation-identity h2 { font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; line-height: 1.3; }
.conversation-identity > span, .contact-person > span:last-child { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.conversation-identity .channel-icon, .contact-person .channel-icon { width: 16px; height: 16px; font-size: .53rem; border-radius: 5px; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; background: white; border: 1px solid var(--line); color: #65708c; padding: 0; }
.icon-button:hover { background: var(--lavender); color: var(--accent); }
.demo { align-self: center; color: #586381; background: #f0f2f8; padding: 4px 7px; border-radius: 6px; font-size: .73rem; white-space: nowrap; }
.mobile-back { display: none; }
.messages { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 8px 28px 20px; }
.date-divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 17px 0 24px; color: #5e6984; font-weight: 600; font-size: .78rem; }
.date-divider::before, .date-divider::after { content: ""; width: min(94px, 22%); height: 1px; background: #e1e4ee; }
.message { display: flex; gap: 8px; align-items: start; margin: 0 0 17px; }
.message.out { justify-content: flex-end; }
.message-body { min-width: 0; max-width: min(78%, 550px); }
.message-body time { display: block; font-size: .72rem; color: #65708b; white-space: nowrap; }
.message.in time { margin-left: 3px; }
.message-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 3px; min-height: 20px; }
.message.out .message-meta { justify-content: flex-end; }
.message-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.label-action { width: 28px; height: 28px; }
.message-meta .label-action { width: 25px; height: 25px; }
.label-action .icon { transform: scale(.85); }
@media (hover: hover) and (pointer: fine) {
  .label-action { opacity: 0; }
  .message:hover .label-action, .chat-item:hover .label-action,
  .message:focus-within .label-action, .chat-item:focus-within .label-action { opacity: 1; }
}
.message-author { display: block; text-align: right; margin: 0 3px 3px 0; font-size: .73rem; color: #5b65a0; }
.bubble { padding: 10px 13px; white-space: pre-wrap; overflow-wrap: anywhere; background: white; border: 1px solid #e6e9f1; border-radius: 4px 15px 15px 15px; font-size: .91rem; line-height: 1.48; }
.message.out .bubble { background: #e7e8ff; border: 1px solid #e0e2fd; border-radius: 15px 4px 15px 15px; color: #282d57; }
.history { text-align: center; margin-top: 14px; }
.composer { flex: 0 0 auto; background: white; border: 1px solid #e0e4ef; border-radius: 12px; margin: 0 22px 18px; box-shadow: 0 3px 7px #171e4108; }
.composer textarea { display: block; width: 100%; border: 0; color: var(--ink); background: transparent; padding: 12px 13px 4px; resize: vertical; min-height: 62px; max-height: 32vh; font-size: .9rem; outline: 0; }
.composer:focus-within { border-color: #a4a7f6; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 5px 9px 8px 13px; }
.composer-footer > span { color: var(--muted); font-size: .73rem; }
.composer-disabled { padding: 16px 27px; background: #eef0f8; font-size: .875rem; color: var(--muted); }
.conversation-empty { flex: 1; display: grid; justify-items: center; align-content: center; gap: 8px; padding: 25px; text-align: center; }
.conversation-empty h2 { font-size: 1.22rem; }
.conversation-empty p { font-size: .9rem; color: var(--muted); }

.contact { min-height: 0; overflow: auto; background: white; border-left: 1px solid var(--line); }
.details-hidden .contact { display: none; }
.contact-heading { height: 75px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid var(--line); }
.contact-heading h2 { font-size: .98rem; }
.contact-person { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; margin: 27px 12px 23px; }
.contact-person b { margin-top: 6px; overflow-wrap: anywhere; }
.contact-person > span:last-child { margin-top: 0; }
.contact-block { margin: 0 16px; padding: 15px 2px; border-top: 1px solid var(--line); }
.contact-block h3 { font-size: .79rem; color: var(--muted); margin-bottom: 7px; font-weight: 650; }
.status-select { display: block; margin-top: 10px; }
.status-select select { width: 100%; }
.contact-time { font-size: .87rem; }
.contact-note { margin: 5px 16px; padding: 12px; color: #5b6681; border-radius: 8px; background: #f4f5fa; font-size: .8rem; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 8px; min-height: 40px; padding: 7px 12px; font-size: .875rem; font-weight: 650; text-align: center; white-space: nowrap; }
.button.primary { color: white; background: var(--accent); border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary { color: var(--ink); background: white; border-color: #dfe3ee; }
.button.secondary:hover:not(:disabled) { background: #f2f3ff; border-color: #d1d4f1; }
.button.small { min-height: 34px; padding: 5px 9px; font-size: .8rem; }
.button.wide { width: 100%; }
.button.send { min-height: 36px; }
.feature-icon { display: inline-grid; place-items: center; color: var(--accent); background: #ececff; width: 45px; height: 45px; border-radius: 13px; }

.workspace.admin-workspace { grid-template-columns: 235px minmax(0, 1fr); }
.admin { overflow: auto; padding: 32px clamp(18px, 4vw, 58px); background: #f5f6fb; }
.admin-header h1 { margin: 8px 0 21px; }
.tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; border-bottom: 1px solid #dfe3ef; margin-bottom: 23px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; padding: 9px 12px; background: transparent; color: #596680; font-size: .9rem; font-weight: 650; }
.tabs button[aria-current] { border-color: var(--accent); color: var(--accent-dark); }
.tabs button:hover { color: var(--accent-dark); }
#pending-count { display: inline-block; padding: 0 5px; margin-left: 5px; border-radius: 6px; background: var(--lavender); font-size: .74rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.section-head h2, .editor h2 { font-size: 1.25rem; letter-spacing: -.025em; }
.section-head p { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.panel { background: white; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 495px; border-collapse: collapse; }
th, td { padding: 12px 15px; text-align: left; font-size: .87rem; border-bottom: 1px solid var(--line); }
th { font-weight: 650; color: #52607e; background: #fafbfe; }
tr:last-child td { border-bottom: 0; }
.metric-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { padding: 14px; display: flex; flex-direction: column; color: var(--muted); font-size: .88rem; }
.metric strong { color: var(--ink); font-size: 1.7rem; }
.identity, .platform { display: inline-flex; align-items: center; gap: 8px; }
.identity small, .device-info small { display: block; color: var(--muted); }
.identity .avatar { width: 34px; height: 34px; border-radius: 10px; }
.actions, .badge-group { display: flex; gap: 6px; flex-wrap: wrap; }
.subheading { font-size: 1rem; margin: 25px 0 11px; }
.empty-panel { padding: 23px; color: var(--muted); }
.editor { width: min(500px, calc(100% - 24px)); max-height: calc(100dvh - 26px); padding: 22px; color: var(--ink); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 15px 80px #1419353c; }
.editor::backdrop { background: #14193578; }
.editor-heading, .editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.editor-actions { justify-content: flex-end; margin-top: 5px; }
.message-label-editor .label-message-preview { padding: 10px 12px; border-left: 3px solid #aeb2ee; background: var(--soft); border-radius: 0 8px 8px 0; color: #505d79; font-size: .86rem; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.message-label-options { display: grid; gap: 11px; align-content: start; max-height: min(320px, 42dvh); overflow: auto; padding: 2px 4px 2px 0; }
.message-label-choices { display: flex; flex-wrap: wrap; gap: 5px; }
.stack .message-label-option { display: flex; align-items: center; cursor: pointer; gap: 5px; padding: 2px 5px; border: 1px solid transparent; border-radius: 7px; }
.message-label-option:has(input:checked) { border-color: #b5b7ee; background: #f0f1ff; }
.message-label-option input { margin: 0; }
.picker-empty { color: var(--muted); font-size: .9rem; }
fieldset { margin: 0; border: 1px solid #e2e5ef; padding: 8px 12px 12px; border-radius: 8px; color: var(--muted); font-size: .875rem; }
legend { padding: 0 4px; font-weight: 650; }
.check-list { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.stack { display: grid; gap: 13px; }
.stack label { display: grid; gap: 5px; font-size: .875rem; font-weight: 620; }
.stack label.check { display: flex; gap: 6px; align-items: center; margin: 3px 0; }
.stack input:not([type=checkbox]) { height: 43px; width: 100%; border: 1px solid #dce1ed; border-radius: 8px; padding: 8px 10px; color: var(--ink); background: #fff; font-size: .94rem; font-weight: 400; }
.stack input[type=color] { width: 74px; }
.stack input[type=checkbox] { accent-color: var(--accent); }
.form-error { color: #a13241; font-size: .86rem; }

.signin { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, .95fr) minmax(420px, 1fr); background: white; }
.signin-art { display: flex; flex-direction: column; position: relative; overflow: hidden; color: white; background: radial-gradient(ellipse at 92% 91%, #343885 0%, #232951 37%, #161d36 72%); padding: 42px clamp(28px, 6vw, 92px); }
.signin-art .brand { z-index: 1; }
.signin-presentation { margin: auto 0; padding: 4vh 0 18vh; z-index: 1; }
.signin-channel-row { display: flex; gap: 8px; margin-bottom: 25px; }
.signin-channel-row .channel-icon { width: 30px; height: 30px; border-radius: 9px; border: 1px solid #ffffff36; }
.signin-presentation h1 { font-size: clamp(2.4rem, 5vw, 5rem); letter-spacing: -.055em; line-height: 1.01; max-width: 580px; }
.signin-presentation p { color: #c3cbe9; max-width: 330px; margin-top: 20px; font-size: 1.06rem; }
.art-cards { position: absolute; inset: auto -12px -30px auto; width: 310px; height: 196px; transform: rotate(-12deg); opacity: .72; }
.art-card { display: flex; flex-direction: column; gap: 9px; position: absolute; width: 224px; height: 96px; padding: 15px 12px 12px 55px; border-radius: 15px; border: 1px solid #aeb4ff55; background: #b1b8ff25; box-shadow: 0 15px 40px #10143240; }
.art-card span { position: absolute; inset: 15px auto auto 15px; width: 28px; height: 28px; border-radius: 8px; background: #b1b8ff55; }
.art-card i { width: 72%; height: 6px; border-radius: 5px; background: #bec4ffa1; }
.art-card i:last-child { width: 55%; background: #bec4ff5d; }
.art-back { right: 12px; top: 5px; }
.art-front { left: 0; top: 71px; background: #696ce176; }
.signin-main { display: grid; place-items: center; padding: 35px 20px; }
.signin-panel { width: min(100%, 385px); }
.signin-panel h2 { margin: 12px 0 5px; font-size: 1.8rem; letter-spacing: -.04em; }
.signin-panel > p { color: var(--muted); margin-bottom: 20px; }
.signin-panel .button.wide { margin-top: 3px; min-height: 44px; }
.remembered { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 15px; max-height: 240px; overflow: auto; }
.remembered h3 { font-size: .91rem; margin: 0 0 7px; }
.remembered-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: white; color: var(--ink); border: 0; border-radius: 8px; padding: 6px; }
.remembered-item:hover { background: var(--soft); }
.remembered-item small { display: block; color: var(--muted); }

#toast { display: none; }
#toast.visible { display: block; position: fixed; z-index: 10; right: 18px; bottom: 18px; max-width: min(420px, calc(100% - 36px)); padding: 11px 15px; border-radius: 9px; background: #243154; color: white; box-shadow: 0 10px 25px #20244635; font-size: .875rem; }
#toast.error { background: #902f43; }

@media (max-width: 1210px) {
  .workspace { grid-template-columns: 202px 289px minmax(0, 1fr) 216px; }
  .workspace.details-hidden { grid-template-columns: 202px 289px minmax(0, 1fr); }
  .workspace.admin-workspace { grid-template-columns: 202px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .side-button { gap: 8px; }
  .messages { padding-inline: 16px; }
}
@media (max-width: 1050px) {
  .workspace, .workspace.details-hidden { grid-template-columns: 195px 275px minmax(0, 1fr); }
  .workspace.admin-workspace { grid-template-columns: 195px minmax(0, 1fr); }
  .contact { display: none; }
  .workspace:not(.details-hidden).chat-open .contact { display: block; position: absolute; z-index: 2; top: 74px; bottom: 0; right: 0; width: min(260px, 92vw); box-shadow: -10px 0 34px #2b345227; }
  .contact-heading { height: 61px; }
}
@media (max-width: 760px) {
  .workspace, .workspace.details-hidden, .workspace.admin-workspace { grid-template-columns: 59px minmax(0, 1fr); }
  .sidebar { padding: 12px 6px; }
  .sidebar > .brand { margin: 0 auto 20px; }
  .sidebar .brand strong, .side-label, .side-button > span:nth-child(2), .side-button em,
  .account-trigger > span:nth-child(2), .account-trigger .icon { display: none !important; }
  .side-button { justify-content: center; padding: 8px; }
  .side-section { margin-bottom: 12px; }
  .account-trigger { padding: 3px; }
  .conversation { display: none; }
  .chat-open .inbox { display: none; }
  .chat-open .conversation { display: flex; }
  .mobile-back { display: inline-grid; }
  .conversation-header { padding-inline: 9px; gap: 7px; }
  .conversation-header > .avatar { display: none; }
  .composer { margin: 0 8px 8px; }
  .composer-footer > span { display: none; }
  .composer-footer { justify-content: flex-end; }
  .messages { padding-inline: 10px; }
  .message-body { max-width: 87%; }
  .admin { padding: 17px 10px; }
  .admin h1 { font-size: 1.45rem; }
  .section-head { align-items: start; flex-direction: column; }
  .metric-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .metric { padding: 8px; }
  .signin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .signin-art { min-height: auto; padding: 16px 19px; }
  .signin-presentation, .art-cards { display: none; }
  .signin-main { align-items: start; padding-top: 34px; }
}
@media (max-height: 595px) {
  .sidebar .channels { min-height: 0; overflow: auto; scrollbar-width: thin; }
  .sidebar > .brand { margin-bottom: 14px; }
  .side-section { margin-bottom: 12px; }
}
