/* SeletZAP Atendimento: mesmas cores, botões e cartões do plugin. Tema claro (padrão) e escuro. */
:root {
	--green: #16a34a; --green-2: #22c55e; --green-dark: #15803d; --green-soft: #dcfce7; --green-line: #bbf7d0;
	--ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f1f5f9; --card: #ffffff; --soft: #f8fafc;
	--head-a: #f0fdf4; --head-b: #ecfeff; --head-ink: #052e16; --head-sub: #166534;
	--chat: #efeae2; --dot: rgba(0, 0, 0, .05); --in: #ffffff; --out: #d9fdd3; --bubble-ink: #111b21;
	--red: #dc2626; --red-soft: #fee2e2; --amber: #d97706; --amber-soft: #fef3c7; --blue: #3b82f6; --blue-soft: #e0edff; --purple: #8b5cf6; --purple-soft: #ede9fe;
	--shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 26px -14px rgba(15, 23, 42, .16);
	color-scheme: light;
}
:root[data-theme="dark"] {
	--green-soft: #123524; --green-line: #1f5136; --ink: #e5edf5; --muted: #93a4b8; --line: #25313f; --bg: #0b1118; --card: #121a23; --soft: #17212c;
	--head-a: #0f2a1c; --head-b: #0d2429; --head-ink: #eafff1; --head-sub: #9fd8b4;
	--chat: #0b141a; --dot: rgba(255, 255, 255, .04); --in: #202c33; --out: #005c4b; --bubble-ink: #e9edef;
	--red-soft: #45191c; --amber-soft: #3f2d0b; --blue-soft: #14294a; --purple-soft: #2a2050;
	--shadow: 0 10px 26px -14px rgba(0, 0, 0, .7);
	color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; background: var(--bg); color: var(--ink); }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--green); }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); padding: 9px 15px; border-radius: 12px; font-weight: 600; transition: transform .15s, box-shadow .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); border-color: #94a3b8; }
.btn.primary { background: linear-gradient(135deg, var(--green-2), var(--green-dark)); border-color: var(--green-dark); color: #fff; box-shadow: 0 8px 18px -8px rgba(22, 163, 74, .65); }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.btn.danger { color: var(--red); }
.btn.wide { width: 100%; margin-top: 16px; }
.iconbtn.primary-ic { background: var(--green); border-color: var(--green); color: #fff; }
.btn.link { border: 0; background: none; margin-top: 4px; color: var(--muted); }
.iconbtn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); flex: none; }
.iconbtn:hover { border-color: var(--green); color: var(--green); }
.dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.badge.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.badge.blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.badge.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.badge.purple { background: var(--purple-soft); color: var(--purple); border-color: transparent; }
.badge.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 13px; flex: none; }

/* Estrutura: tela inteira com menu lateral */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.side { display: flex; flex-direction: column; gap: 14px; background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.brand strong { display: block; font-size: 19px; line-height: 1.1; }
.brand small { color: var(--muted); font-size: 12px; }
.logo { width: 42px; height: 42px; border-radius: 12px; background: var(--green); display: grid; place-items: center; flex: none; }
.logo img { width: 26px; height: 26px; }
#menu { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none; padding: 10px 12px; border-radius: 12px; font-weight: 600; color: var(--muted); text-align: left; }
.item:hover { background: var(--soft); color: var(--ink); }
.item.on { background: linear-gradient(135deg, var(--green-2), var(--green-dark)); color: #fff; box-shadow: 0 6px 14px -6px rgba(22, 163, 74, .6); }
.item .count { margin-left: auto; font-size: 11px; background: var(--red); color: #fff; border-radius: 99px; padding: 1px 7px; }
.side-foot { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.seg { display: flex; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin-bottom: 4px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--green); color: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.title h1 { margin: 0; font-size: 19px; }
.proto { font-size: 11px; color: var(--amber); font-weight: 700; }
.top-right { display: flex; align-items: center; gap: 10px; position: relative; }
#view { flex: 1; min-height: 0; overflow: auto; }
.pop { position: absolute; right: 0; top: 48px; z-index: 30; width: 340px; max-width: calc(100vw - 24px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .35); padding: 8px; }
.pop h4 { margin: 6px 8px; }
.note { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 8px; border-radius: 12px; }
.note:hover { background: var(--soft); }
.note small { display: block; color: var(--muted); }

/* Atendimentos */
.desk { display: grid; grid-template-columns: 340px minmax(0, 1fr) 300px; height: 100%; }
.desk.no-info { grid-template-columns: 340px minmax(0, 1fr); }
.desk.no-info .info { display: none; }
.list { display: flex; flex-direction: column; min-height: 0; background: var(--card); border-right: 1px solid var(--line); }
.search { padding: 12px 12px 8px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 12px 8px; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; }
.tabs button { border: 0; background: none; border-radius: 10px; padding: 7px 4px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.tabs button.on { background: linear-gradient(135deg, var(--green-2), var(--green-dark)); color: #fff; }
.rows { flex: 1; overflow: auto; padding: 0 8px 8px; }
.group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 8px 4px; }
.row { display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left; border: 1px solid transparent; background: none; padding: 10px; border-radius: 14px; cursor: pointer; }
.row:hover { background: var(--soft); }
.row.on { background: var(--head-a); border-color: var(--green-line); }
.row .mid { flex: 1; min-width: 0; }
.row .l1 { display: flex; justify-content: space-between; gap: 8px; }
.row .l1 strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.row .l1 small { color: var(--muted); font-size: 11.5px; flex: none; }
.row p { margin: 2px 0 5px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.row .l3 { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.row .unread { margin-left: auto; background: var(--green); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 6px; }

.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .who strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-head .who small { color: var(--muted); }
.msgs { flex: 1; overflow: auto; padding: 16px clamp(12px, 5%, 60px); background-color: var(--chat); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.day, .sys { align-self: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; max-width: 90%; }
.sys.call { color: var(--red); display: flex; gap: 6px; align-items: center; }
.msg { max-width: min(560px, 85%); padding: 7px 10px 5px; border-radius: 12px; background: var(--in); color: var(--bubble-ink); box-shadow: 0 1px 1px rgba(0, 0, 0, .13); align-self: flex-start; border-top-left-radius: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.out { align-self: flex-end; background: var(--out); border-radius: 12px; border-top-right-radius: 2px; }
.msg .author { display: block; font-size: 12px; font-weight: 700; color: var(--green-2); }
.msg time { float: right; margin: 6px 0 0 12px; font-size: 10.5px; opacity: .6; }
.audio { display: flex; align-items: center; gap: 10px; min-width: 230px; }
.audio .play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 26px; }
.wave i { flex: 1; background: currentColor; opacity: .35; border-radius: 2px; }
.file { display: flex; align-items: center; gap: 10px; background: rgba(127, 127, 127, .12); border-radius: 10px; padding: 9px 12px; }
.composer { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--card); border-top: 1px solid var(--line); }
.composer input { border-radius: 999px; }
.composer .send { background: var(--green); border-color: var(--green); color: #fff; }
.rec { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--red); font-weight: 700; }
.rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }
.takebar { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 14px; background: var(--card); border-top: 1px solid var(--line); }
.empty { margin: auto; text-align: center; color: var(--muted); padding: 30px; }

.info { background: var(--card); border-left: 1px solid var(--line); overflow: auto; padding: 16px; }
.info .center { text-align: center; }
.info .center .avatar { width: 72px; height: 72px; font-size: 22px; margin: 0 auto 8px; }
.info h4 { margin: 18px 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv span { color: var(--muted); }
.person { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.person .avatar { width: 32px; height: 32px; font-size: 11px; }
.person small { display: block; color: var(--muted); }
.close-info { display: none; }

/* Páginas gerais */
.page { padding: 20px clamp(14px, 2.5vw, 32px) 32px; }
.pagehead { display: flex; align-items: center; gap: 16px; padding: 20px 24px; margin-bottom: 18px; border-radius: 20px; background: linear-gradient(135deg, var(--head-a), var(--head-b)); border: 1px solid var(--green-line); flex-wrap: wrap; }
.pagehead .hic { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--green-2), var(--green-dark)); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 20px -8px rgba(22, 163, 74, .6); }
.pagehead .hic .ic { width: 26px; height: 26px; }
.pagehead h2 { margin: 0 0 2px; font-size: 21px; color: var(--head-ink); }
.pagehead p { margin: 0; color: var(--head-sub); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi, .card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }
.kpi { border-top: 4px solid var(--green); }
.kpi.amber { border-top-color: var(--amber); } .kpi.blue { border-top-color: var(--blue); } .kpi.purple { border-top-color: var(--purple); }
.kpi b { display: block; font-size: 34px; line-height: 1.1; }
.kpi span { color: var(--muted); font-weight: 600; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--soft); padding: 10px 12px; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }

/* Entrada, janelas e avisos */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, var(--head-a), var(--head-b)); }
.login-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.login-card h2 { margin: 22px 0 4px; }
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 14px 0 6px; }
.code input { text-align: center; font-size: 22px; font-weight: 700; padding: 10px 0; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(2, 6, 23, .55); display: grid; place-items: center; padding: 16px; }
.modal-box { width: min(440px, 100%); max-height: 90vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.modal-box h3 { margin: 0 0 4px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 78px; transform: translateX(-50%); background: #052e16; color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; max-width: 92vw; text-align: center; }
.bottom { display: none; }
.back { display: none; }

@media (max-width: 1600px) {
	.chat-head .btn span { display: none; }
}
@media (max-width: 1280px) {
	.app { grid-template-columns: 76px minmax(0, 1fr); }
	.side { padding: 14px 10px; align-items: stretch; }
	.side .brand .txt, .side .item span.lbl, .seg { display: none; }
	.side .item { justify-content: center; position: relative; }
	.item .count { position: absolute; top: 2px; right: 4px; margin: 0; }
	.desk { grid-template-columns: 320px minmax(0, 1fr); }
	.desk .info { display: none; }
	.desk.show-info .info { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(320px, 100%); z-index: 20; box-shadow: -20px 0 40px -20px rgba(0, 0, 0, .4); }
	.close-info { display: inline-flex; }
}
@media (max-width: 760px) {
	.app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
	.side { display: none; }
	.bottom { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); padding: 6px; gap: 4px; }
	.bottom .item { flex-direction: column; gap: 2px; font-size: 11px; justify-content: center; text-align: center; padding: 6px 2px; }
	.top { padding: 8px 12px; }
	.top .pill span, .proto { display: none; }
	.desk, .desk.no-info { grid-template-columns: minmax(0, 1fr); }
	.desk .chat { display: none; }
	.desk.open .list { display: none; }
	.desk.open .chat { display: flex; }
	.back { display: grid; }
	.chat-head .btn span { display: none; }
	.chat-head { gap: 6px; padding: 8px; }
	.chat-head .avatar { display: none; }
	.cols { grid-template-columns: 1fr; }
}
.search { display: flex; gap: 8px; align-items: center; }
.chips { display: flex; gap: 6px; padding: 0 12px 8px; flex-wrap: wrap; }
.chips button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.chips button.on { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.chips .ic { width: 14px; height: 14px; }
.tabs { grid-template-columns: repeat(3, 1fr) 38px; }
.tabs.solo { grid-template-columns: 1fr 38px; }
.tabs .ic { width: 16px; height: 16px; margin: auto; display: block; }
.row { position: relative; }
.row .more { position: absolute; right: 6px; bottom: 8px; width: 26px; height: 22px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; line-height: 1; }
.row .more:hover { background: var(--card); color: var(--ink); }
.row .unread { margin-right: 24px; }
.rowmenu { position: absolute; right: 8px; top: calc(100% - 8px); z-index: 25; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .4); display: flex; flex-direction: column; }
.rowmenu button { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 9px 10px; border-radius: 9px; text-align: left; }
.rowmenu button:hover { background: var(--soft); }
.sectors { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dash { overflow: auto; }
.chat > .page { overflow: auto; }
.chat .kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi.red { border-top-color: var(--red); }
.num { display: block; min-width: 64px; text-align: center; padding: 3px 8px; border-radius: 8px; font-weight: 700; color: #fff; background: var(--green); }
.num.blue { background: var(--blue); } .num.amber { background: var(--amber); } .num.red { background: var(--red); }
.num.zero { background: none; color: var(--muted); font-weight: 500; }
.desk .rail { display: none; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; background: var(--card); border-left: 1px solid var(--line); overflow: auto; }
.rail button { position: relative; border: 0; background: none; padding: 0; }
.rail .st { position: absolute; right: 0; top: 0; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--card); background: #94a3b8; }
.rail .st.on { background: var(--green-2); }
.desk.is-dash .info { display: none; }
@media (min-width: 1281px) {
	.desk.is-dash { grid-template-columns: 340px minmax(0, 1fr) 62px; }
	.desk.is-dash .rail { display: flex; }
}
@media (min-width: 1600px) {
	.desk { grid-template-columns: 340px minmax(0, 1fr) 300px 62px; }
	.desk.no-info { grid-template-columns: 340px minmax(0, 1fr) 62px; }
	.desk .rail { display: flex; }
}
@media (max-width: 760px) { .top .support { display: none; } }
.tabs { grid-template-columns: 1fr 1.15fr 1.35fr 34px; }
.tabs.solo { grid-template-columns: 1fr 34px; }
.tabs button { white-space: nowrap; font-size: 12px; padding: 7px 2px; }
.chat .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bottom .item { position: relative; }
@media (max-width: 760px) { .chat .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.close-info { display: inline-grid; }
#alerts:empty { display: none; }
.alerts { background: var(--amber-soft); border-bottom: 1px solid var(--amber); padding: 8px 18px; display: flex; flex-direction: column; gap: 6px; max-height: 128px; overflow: auto; }
.alert-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.alert-row .ic { color: var(--amber); }
.alert-row span.t { flex: 1; min-width: 200px; }
.chat-head .iconbtn.on { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.chat-head .mobile-more { display: none; }
.findbar { display: flex; gap: 8px; align-items: center; padding: 8px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
mark { background: #fde047; color: #111; border-radius: 3px; padding: 0 1px; }
.info { position: relative; }
.info-top { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 6px; }
.ptabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); margin: 14px -16px 4px; }
.ptabs button { border: 0; background: none; padding: 10px 4px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.ptabs button.on { color: var(--green); border-bottom-color: var(--green); }
details.sec { border-bottom: 1px solid var(--line); }
details.sec summary { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 0; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); list-style: none; }
details.sec summary::-webkit-details-marker { display: none; }
details.sec summary::after { content: "\25BE"; margin-left: auto; }
details.sec[open] summary::after { content: "\25B4"; }
details.sec > div { padding-bottom: 12px; }
.comment { background: var(--amber-soft); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.comment small { display: block; color: var(--muted); }
.timeline { list-style: none; margin: 8px 0; padding: 0; }
.timeline li { border-left: 3px solid var(--green-line); padding: 4px 0 8px 12px; }
.timeline small { display: block; color: var(--muted); }
.picklist { max-height: 300px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.chipsel { display: flex; flex-wrap: wrap; gap: 6px; }
.chipsel label { display: inline-flex; margin: 0; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.chipsel label:has(input:checked) { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.subnav { display: inline-flex; gap: 4px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.subnav button { border: 0; background: none; padding: 8px 16px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.subnav button.on { background: linear-gradient(135deg, var(--green-2), var(--green-dark)); color: #fff; }
.users { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.user { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.user .uh { display: flex; gap: 10px; align-items: center; }
.user .uh div { flex: 1; min-width: 0; }
.user .uh small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.switch { display: flex; gap: 10px; align-items: center; margin: 0; font-weight: 500; font-size: 13px; cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--line); border: 0; padding: 0; position: relative; flex: none; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 21px; }
.secline { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.secline b.n { width: 26px; height: 26px; border-radius: 8px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.secline div { flex: 1; min-width: 0; }
.secline small { display: block; color: var(--muted); }
.preview { background: var(--chat); border-radius: 14px; padding: 16px; }
.preview .msg { max-width: 100%; display: block; }
.mini-float { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(340px, calc(100vw - 32px)); height: 440px; max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .5); }
.mini { display: flex; flex-direction: column; height: 100%; height: 100dvh; max-height: 100%; background: var(--card); }
.mini .msgs { padding: 12px; }
.ret-done { opacity: .55; }
@media (max-width: 760px) {
	.chat-head .opt { display: none; }
	.chat-head .mobile-more { display: grid; }
	.alerts { padding: 8px 12px; }
}
.chat-head { gap: 6px; }
.chat-head .iconbtn { width: 34px; height: 34px; border-radius: 10px; }
.chat-head .who small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 761px) and (max-width: 1599px) { .chat-head > .avatar { display: none; } }
@media (max-width: 760px) {
	.alert-row { flex-wrap: nowrap; gap: 6px; }
	.alert-row span.t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.alert-row .ic { display: none; }
	.alerts { max-height: 92px; }
	.alert-row .btn.primary { font-size: 11.5px; padding: 5px 8px; white-space: nowrap; }
	.alert-row .btn:not(.primary) { font-size: 11.5px; padding: 5px 8px; }
}
