@font-face { font-family: "WWS Sans"; src: url("/public-wws_sans_regular.ttf") format("truetype"); font-weight: 400; font-style: normal; }
@font-face { font-family: "WWS Sans"; src: url("/public-wws_sans_medium.ttf") format("truetype"); font-weight: 500; font-style: normal; }
@font-face { font-family: "WWS Sans"; src: url("/public-wws_sans_bold.ttf") format("truetype"); font-weight: 700; font-style: normal; }
@font-face { font-family: "WWS Sans"; src: url("/public-wws_sans_italic.ttf") format("truetype"); font-weight: 400; font-style: italic; }

:root {
	--desk: #dfe8f6;
	--edge: #99bbe8;
	--head-ink: #15428b;
	--tab-ink: #416aa3;
	--field-edge: #b5b8c8;
	--ink: #000000;
	--muted: #555c66;
	--link: #0000ee;
	--select: #c4d6f1;
	--hover: #e8eff9;
	--emp-ink: #d42a00;
	--emp-glow: #ffff00;
	--emp-field: #ffff8a;
	--red: #c00000;
	--c-public: #7b2fb0;
	--c-spotter: #e07000;
	--c-media: #1f3fd6;
	--c-em: #23912e;
	--c-tribal: #8b4513;
	--c-local: #00808a;
	--c-state: #a0186a;
	--c-federal: #4a5560;
}

* { box-sizing: border-box; border-radius: 0; }

html, body { height: 100%; margin: 0; }

body {
	font-family: "WWS Sans", Tahoma, Arial, sans-serif;
	font-size: 13px;
	color: var(--ink);
	background: var(--desk);
}

button, input, textarea, select { font: inherit; color: inherit; }

a { color: var(--link); }

button {
	border: 1px solid var(--edge);
	background: linear-gradient(#ffffff, #dbe5f3);
	color: #000;
	padding: 3px 12px;
	cursor: pointer;
	font-size: 12px;
	min-height: 23px;
}

button:hover { background: linear-gradient(#fff9e5, #f9dc8c); border-color: #c39b39; }
button:active { background: #f2c94f; }
button:disabled { opacity: 0.5; cursor: default; background: linear-gradient(#ffffff, #dbe5f3); border-color: var(--edge); }
button.danger { color: var(--red); }
button.link { background: none; border: none; color: var(--link); padding: 0; text-decoration: underline; min-height: 0; font-size: inherit; }
button.link:hover { background: none; border: none; }

input[type=text], input[type=password], textarea, select {
	border: 1px solid var(--field-edge);
	background: #fff linear-gradient(#f3f3f3, #fff 4px);
	padding: 3px 5px;
	width: 100%;
	outline: none;
	font-size: 13px;
}

input:focus, textarea:focus, select:focus { border-color: #7eadd9; }

.panel { border: 1px solid var(--edge); background: #fff; display: flex; flex-direction: column; min-height: 0; min-width: 0; }

.panel-head {
	background: linear-gradient(#f6f9fd, #d2e0f2);
	border-bottom: 1px solid var(--edge);
	color: var(--head-ink);
	font-weight: 700;
	font-size: 12px;
	padding: 4px 6px;
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 24px;
}

.panel-head .spacer { flex: 1; }
.panel-head button { min-height: 18px; padding: 0 6px; font-size: 11px; font-weight: 400; }
.panel-body { flex: 1; overflow-y: auto; min-height: 0; }

.field { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 6px; margin: 0 0 6px; }
.field > span { font-size: 12px; text-align: left; }
.field.stack { grid-template-columns: 1fr; gap: 3px; }
.check { display: flex; align-items: center; gap: 6px; margin: 3px 0; cursor: pointer; font-size: 12px; }
.check input { margin: 0; }
.error { color: var(--red); min-height: 16px; margin: 4px 0; font-size: 12px; }
.ok { color: #1d6b35; }
.muted { color: var(--muted); }

.gate { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px 12px; }
.window { width: 100%; max-width: 470px; background: #cbdaf0; border: 1px solid var(--edge); padding: 4px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); }
.window > .panel-head { border: 1px solid var(--edge); margin-bottom: 4px; }
.window-inner { background: #fff; border: 1px solid var(--edge); }
.tab-strip { background: var(--desk); border-bottom: 1px solid var(--edge); padding: 3px 3px 0; display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; flex-shrink: 0; }
.tab {
	border: 1px solid var(--edge);
	border-bottom: none;
	background: linear-gradient(#f2f6fc, #cddbf0);
	color: var(--tab-ink);
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	min-height: 0;
	position: relative;
	top: 1px;
}
.tab:hover { background: linear-gradient(#fbfdff, #dce7f6); border-color: var(--edge); }
.tab.on { background: #fff; color: var(--head-ink); }
.tab.unread { color: var(--red); }
.tab .x { color: #6a7e99; font-weight: 400; padding: 0 2px; }
.tab .x:hover { color: var(--red); }

.login-body { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 12px; align-items: start; }
.login-body img { width: 112px; height: 112px; }
.login-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.login-note { margin: 0 12px 12px; border: 1px solid var(--edge); padding: 5px 7px; font-size: 12px; line-height: 1.45; }
.card-link {
	display: inline-block;
	border: 1px solid var(--edge);
	background: linear-gradient(#ffffff, #dbe5f3);
	color: #000;
	text-decoration: none;
	padding: 4px 14px;
	font-size: 12px;
}
.card-link:hover { background: linear-gradient(#fff9e5, #f9dc8c); border-color: #c39b39; }

.shell { display: grid; grid-template-rows: 30px 1fr; height: 100%; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 14px; }
.topbar img { width: 24px; height: 24px; }
.topbar .product { font-weight: 700; }
.topbar .spacer { flex: 1; }
.topbar .links { display: flex; gap: 0; font-size: 13px; }
.topbar .links button.link { padding: 0 7px; border-left: 1px solid #8796ab; }
.topbar .links button.link:first-child { border-left: none; }
.topbar .who { font-size: 12px; color: var(--muted); }
.topbar .toggle { display: none; }

.desk { display: grid; grid-template-columns: 220px 1fr 220px; gap: 4px; padding: 0 4px 4px; min-height: 0; }

.rooms .group { background: var(--desk); border-bottom: 1px solid var(--edge); color: var(--head-ink); font-weight: 700; font-size: 11px; padding: 3px 6px; display: flex; justify-content: space-between; align-items: center; }
.rooms .group button { min-height: 16px; padding: 0 6px; font-size: 11px; }
.room { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 8px; cursor: pointer; border: none; background: none; text-align: left; font-size: 13px; min-height: 0; }
.room:hover { background: var(--hover); border: none; }
.room.on { background: var(--select); }
.room.unread .label { font-weight: 700; }
.room .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .count { color: var(--red); font-weight: 700; font-size: 12px; }
.room .lock { font-size: 10px; color: #7a5d00; border: 1px solid #c9a227; padding: 0 3px; background: #fff8e1; }

.center { display: flex; flex-direction: column; min-height: 0; min-width: 0; border: 1px solid var(--edge); background: #fff; }
.room-head { padding: 4px 8px; border-bottom: 1px solid #d0d9e6; font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; background: #f7f9fc; }
.room-head .name { font-weight: 700; color: var(--head-ink); font-size: 13px; }
.room-head .tag { border: 1px solid var(--edge); padding: 0 4px; font-size: 11px; background: #fff; }

.log { flex: 1; overflow-y: auto; padding: 4px 0 6px; min-height: 0; }
.log .older { text-align: center; padding: 4px; }
.day { text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; margin: 8px 0 2px; border-top: 1px solid #e3e8f0; padding-top: 3px; }

.line { padding: 2px 8px; font-size: 15px; line-height: 1.35; position: relative; overflow-wrap: anywhere; }
.line:hover { background: #f4f7fb; }
.line .stamp, .line .who { font-weight: 700; }
.line .txt { white-space: pre-wrap; }
.line .txt a { color: var(--link); text-decoration: underline; }
.line.emp .stamp, .line.emp .who { color: #000; }
.line.emp .txt { color: var(--emp-ink); background: var(--emp-glow); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.line.bot .stamp, .line.bot .who { font-weight: 400; color: #000; }
.line.bot .txt { color: #000; }
.line.bot .txt a.product { color: var(--link); text-decoration: underline; }
.line .gone { color: var(--muted); font-style: italic; }
.line .edited { color: var(--muted); font-size: 11px; margin-left: 4px; }
.line .at { font-weight: 700; }
.line.mentioned { background: #fff4cc; }
.line .tools { display: none; margin-left: 8px; font-size: 11px; }
.line:hover .tools { display: inline; }
.line .tools button.link { margin-left: 6px; font-size: 11px; color: #45648f; }
.line .tools button.link.danger { color: var(--red); }

.r-public { color: var(--c-public); }
.r-spotter { color: var(--c-spotter); }
.r-media { color: var(--c-media); }
.r-em { color: var(--c-em); }
.r-tribal { color: var(--c-tribal); }
.r-local { color: var(--c-local); }
.r-state { color: var(--c-state); }
.r-federal { color: var(--c-federal); }
.r-emp { color: #000; }
.r-bot { color: #000; font-weight: 400 !important; }

.files { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.file { position: relative; border: 1px solid var(--edge); background: #000; }
.file img { display: block; max-width: 340px; max-height: 260px; cursor: zoom-in; }
.file video { display: block; max-width: 420px; max-height: 300px; }
.file .remove { position: absolute; top: 3px; right: 3px; display: none; color: var(--red); }
.file:hover .remove { display: block; }

.composer { border-top: 1px solid var(--edge); background: var(--desk); padding: 4px; flex-shrink: 0; }
.composer .row { display: flex; gap: 4px; align-items: stretch; }
.composer textarea { resize: none; min-height: 44px; max-height: 200px; font-size: 15px; background: #fff; }
.composer.emp textarea { background: var(--emp-field); color: var(--emp-ink); }
.composer .buttons { display: flex; flex-direction: column; gap: 4px; }
.composer .pending { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.chip { display: flex; align-items: center; gap: 4px; border: 1px solid var(--edge); background: #fff; padding: 1px 2px 1px 6px; font-size: 12px; }
.chip button { min-height: 0; padding: 0 4px; border: none; background: none; color: var(--red); }
.chip.busy { color: var(--muted); }
.chip.bad { color: var(--red); }
.composer .note { font-size: 12px; color: var(--red); min-height: 0; }
.drop { outline: 2px dashed var(--head-ink); outline-offset: -4px; }

.members .person { display: flex; align-items: center; gap: 6px; padding: 2px 8px; font-size: 13px; cursor: pointer; border: none; background: none; width: 100%; text-align: left; min-height: 0; }
.members .person:hover { background: var(--hover); border: none; }
.members .person .dot { width: 8px; height: 8px; background: #b9c2cf; flex-shrink: 0; }
.members .person.on .dot { background: #2fa043; }
.members .person .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.members .person.off .name { opacity: 0.55; }
.members .count { font-weight: 400; }

.empty { margin: auto; text-align: center; color: var(--muted); padding: 40px 12px; }

.overlay { position: fixed; inset: 0; background: rgba(160, 175, 200, 0.45); display: flex; align-items: center; justify-content: center; padding: 12px; z-index: 20; }
.overlay .window { max-width: 460px; max-height: 92vh; display: flex; flex-direction: column; }
.overlay .window.wide { max-width: 760px; }
.overlay .window-inner { overflow-y: auto; padding: 10px 12px; }
.overlay .actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }
.code { font-size: 22px; font-weight: 700; letter-spacing: 0.08em; background: #f7f9fc; border: 1px solid var(--edge); padding: 10px; text-align: center; margin: 8px 0; user-select: all; }
.picker { max-height: 320px; overflow-y: auto; border: 1px solid var(--edge); margin-top: 6px; }
.picker button { display: block; width: 100%; border: none; border-bottom: 1px solid #e3e8f0; background: #fff; text-align: left; padding: 4px 8px; font-size: 13px; min-height: 0; }
.picker button:hover { background: var(--hover); border-color: #e3e8f0; }
.picker small { color: var(--muted); margin-left: 6px; font-weight: 400; }

.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); z-index: 30; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 94vh; }

.admin { flex: 1; overflow-y: auto; padding: 8px 10px 30px; min-height: 0; }
.admin .bar { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.admin .bar input[type=text] { max-width: 240px; }
.admin table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin th { text-align: left; background: linear-gradient(#f6f9fd, #d2e0f2); border: 1px solid var(--edge); padding: 3px 6px; color: var(--head-ink); white-space: nowrap; }
.admin td { border: 1px solid #e0e6ef; padding: 3px 6px; vertical-align: top; }
.admin tr.pick { cursor: pointer; }
.admin tr.pick:hover td { background: var(--hover); }
.admin .tag { border: 1px solid var(--edge); padding: 0 4px; font-size: 11px; margin: 0 2px 2px 0; display: inline-block; background: #f7f9fc; }
.state-off { color: var(--red); font-weight: 700; }
.state-wait { color: #8a6400; font-weight: 700; }
.roles-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 12px; margin: 2px 0 8px; }
.roles-pick h4 { margin: 0 0 2px; font-size: 11px; color: var(--head-ink); }
.sub { border-top: 1px solid var(--edge); margin-top: 10px; padding-top: 8px; }
.sub h3 { margin: 0 0 6px; font-size: 12px; color: var(--head-ink); }
.list-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid #e3e8f0; font-size: 12px; }
.log-detail { color: var(--muted); font-size: 11px; }

.product-page { padding: 10px; }
.product { max-width: 900px; margin: 0 auto; }
.product .product-meta { padding: 4px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid #e3e8f0; }
.product pre { margin: 0; padding: 10px; font-family: Consolas, "Courier New", monospace; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 900px) {
	.desk { grid-template-columns: 1fr; }
	.desk > .rooms, .desk > .members { display: none; }
	.shell.show-rooms .desk > .rooms, .shell.show-members .desk > .members { display: flex; position: fixed; top: 30px; bottom: 4px; width: 78vw; max-width: 300px; z-index: 10; }
	.shell.show-rooms .desk > .rooms { left: 4px; }
	.shell.show-members .desk > .members { right: 4px; }
	.topbar .toggle { display: inline-block; }
	.topbar .who { display: none; }
	.file img, .file video { max-width: 100%; }
	.roles-pick { grid-template-columns: 1fr 1fr; }
	.line .tools { display: inline; }
	.login-body { grid-template-columns: 1fr; justify-items: center; }
	.login-body > div { width: 100%; }
	.admin table { font-size: 11px; }
}

.card-status { color: #000; }
.center-wrap { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.gap { margin: 0 0 6px; }
.gap-top { margin-top: 6px; }

.inline { display: flex; gap: 4px; }
