/* iHelp247 VBX. Dark console: fixed left menu, blue accent, bordered cards. Fonts are served from this folder. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500 700; font-style: normal; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }

:root {
	--bg: #101418; --panel: #171c22; --panel2: #1d232b; --line: #2a323c; --ink: #e6e9ee; --mute: #8c97a5;
	--accent: #0095d5; --accent2: #36b4ea; --good: #2fb36b; --warn: #e0a526; --bad: #e5484d;
	--r: 8px; --side: 232px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "IBM Plex Sans", sans-serif; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { font-weight: 500; margin: 0; }
h2 { font-size: 16px; margin-bottom: 12px; }
code { font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--panel2); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.bad { color: var(--bad); }
.ic { width: 20px; height: 20px; flex: none; }

/* frame */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line); min-height: 60px; }
.brand:hover { text-decoration: none; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mark { background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .04em; border-radius: 6px; padding: 5px 7px; }
.side nav { padding: 10px 0; flex: 1; overflow-y: auto; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: #c4ccd6; border-left: 3px solid transparent; }
.side nav a:hover { background: var(--panel2); text-decoration: none; }
.side nav a.on { border-left-color: var(--accent); background: var(--panel2); color: #fff; }
.side nav a.on .ic { color: var(--accent2); }
.count { margin-left: auto; background: var(--accent); color: #fff; font-style: normal; font-size: 12px; font-weight: 500; border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.side-foot { padding: 12px 18px; font-size: 12px; color: var(--mute); border-top: 1px solid var(--line); }
.top { position: sticky; top: 0; margin-left: var(--side); height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(16, 20, 24, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); z-index: 10; }
.top h1 { font-size: 20px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 14px; }
.who form { margin: 0; }
.linkish { background: none; border: 0; color: var(--mute); cursor: pointer; padding: 6px; display: flex; }
.linkish:hover { color: var(--ink); }
.burger { display: none; cursor: pointer; font-size: 22px; }
.nav-toggle { display: none; }
.main { margin-left: var(--side); padding: 24px 28px 60px; max-width: 1280px; }

/* pieces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.is-key { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.grid2 .card { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; color: var(--ink); display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--accent); }
.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile b { font-size: 30px; font-weight: 500; line-height: 1.1; }
.tile span { color: var(--mute); font-size: 13px; }
.checks { list-style: none; margin: 0 0 8px; padding: 0; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border: 0; }
.checks .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none; }
.checks .is-done .dot { background: var(--good); }
.checks .is-bad .dot { background: var(--bad); }
.checks em { margin-left: auto; font-style: normal; color: var(--mute); font-size: 13px; }
.checks .is-bad em { margin-left: 8px; color: var(--ink); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li a { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.feed li a:hover { text-decoration: none; background: var(--panel2); }
.feed b { font-weight: 500; }
.feed span { grid-column: 1; color: var(--mute); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed time { grid-row: 1; grid-column: 2; color: var(--mute); font-size: 13px; }
.pill { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--panel2); color: var(--mute); border: 1px solid var(--line); white-space: nowrap; }
.pill.is-good { color: var(--good); border-color: rgba(47, 179, 107, .4); background: rgba(47, 179, 107, .1); }
.pill.is-bad { color: var(--bad); border-color: rgba(229, 72, 77, .4); background: rgba(229, 72, 77, .1); }
.flash { padding: 10px 14px; border-radius: var(--r); margin-bottom: 14px; border: 1px solid rgba(47, 179, 107, .4); background: rgba(47, 179, 107, .1); }
.flash.is-bad { border-color: rgba(229, 72, 77, .5); background: rgba(229, 72, 77, .12); }
.pad { padding: 14px 18px; margin: 0; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--mute); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.bar p { margin: 0; flex: 1 1 320px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 12px; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; }

/* tables */
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel2); }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list .end { text-align: right; white-space: nowrap; }
.list b { font-weight: 500; }
.card:not(.flush) .list td { padding-left: 0; }
audio { display: block; margin-top: 6px; height: 34px; max-width: 280px; }
.transcript { margin: 6px 0 0; color: var(--mute); font-size: 14px; max-width: 46ch; }

/* forms */
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: #c4ccd6; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.fields .wide, .fields fieldset.wide { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
legend { color: #c4ccd6; font-size: 14px; padding: 0 4px; }
fieldset.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
fieldset.keys label { flex-direction: row; align-items: center; gap: 8px; }
fieldset.keys b { width: 18px; text-align: center; color: var(--accent2); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row input:not([type=checkbox]), .row select { width: auto; flex: 1 1 200px; }
.grow { flex: 1; }
.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.inline select { width: auto; min-width: 160px; }
.choice { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 500; font-size: 14px; color: var(--ink); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 16px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #0a85bd; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 8px; padding: 11px; }
.btn:disabled { opacity: .45; cursor: default; }
.search { display: flex; gap: 8px; flex: 1 1 320px; }
.search select { width: auto; }

/* flows */
.steps { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: s; }
.step { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; background: var(--panel2); }
.step header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.step header b { font-weight: 500; flex: 1; }
.step .tools { display: flex; gap: 6px; }
.step .fields { margin: 0; }
.sticky { position: sticky; bottom: 0; background: var(--panel); padding: 12px 0 2px; border-top: 1px solid var(--line); }

/* inbox */
.inbox { display: grid; grid-template-columns: 340px 1fr; gap: 18px; height: calc(100vh - 60px - 24px - 40px); min-height: 480px; }
.inbox .card { margin: 0; display: flex; flex-direction: column; min-height: 0; }
.threads .search { padding: 12px; border-bottom: 1px solid var(--line); flex: none; }
.threads ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.threads li a { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.threads li a:hover { background: var(--panel2); text-decoration: none; }
.threads li.on a { background: var(--panel2); box-shadow: inset 3px 0 var(--accent); }
.threads b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads time { color: var(--mute); font-size: 12px; }
.threads span { grid-column: 1 / -1; color: var(--mute); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads .count { grid-row: 1; grid-column: 2; margin: 0; justify-self: end; }
.threads li a:has(.count) time { display: none; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex: none; }
.thread-head div { flex: 1; display: flex; flex-direction: column; }
.thread-head b { font-weight: 500; }
.thread-head .back { display: none; font-size: 26px; line-height: 1; }
.bubbles { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column-reverse; gap: 10px; }
.bubble { max-width: 72%; padding: 9px 13px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); align-self: flex-start; }
.bubble.is-out { align-self: flex-end; background: #0b4f70; border-color: #106a95; }
.bubble p { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.bubble small { display: block; margin-top: 3px; color: #a8b4c2; font-size: 12px; }
.bubble .media { display: inline-block; margin-top: 4px; font-size: 13px; }
.compose { border-top: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.compose .row { justify-content: flex-end; }
.compose .row select { flex: 0 1 220px; }

/* sign-in and install */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.auth-card.wide-card { max-width: 640px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card h2 { margin: 18px 0 0; }
.brand.big { border: 0; padding: 0 0 18px; font-size: 20px; }

/* phones and small screens */
@media (max-width: 900px) {
	.side { transform: translateX(-100%); transition: transform .2s; }
	.nav-toggle:checked ~ .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); }
	.top, .main { margin-left: 0; }
	.top { padding: 0 16px; }
	.burger { display: block; }
	.main { padding: 16px 16px 60px; }
	.inbox { grid-template-columns: 1fr; height: auto; }
	.inbox.has-open .threads { display: none; }
	.inbox:not(.has-open) .thread { display: none; }
	.inbox.has-open .thread { height: calc(100vh - 60px - 32px); }
	.thread-head .back { display: block; }
	.list thead { display: none; }
	.list tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
	.list td { display: block; border: 0; padding: 4px 14px; }
	.list .end { text-align: left; }
	.who span { display: none; }
	.bubble { max-width: 88%; }
}
.card form + h2, .card .facts + h2, .card p + h2 { margin-top: 20px; }
.list tr.group td { background: var(--panel2); color: var(--accent2); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; padding: 8px 14px; }
.row.pad { padding: 12px 14px; margin: 0; border-top: 1px solid var(--line); }
