:root {
  --g: #00a884;
  --bg: #efeae2;
  --line: #e9edef;
  --muted: #667781;
}
.screen-modal{position:fixed;inset:0;z-index:100;background:#071b18d9;display:grid;place-items:center;padding:18px}.screen-dialog{width:min(520px,96vw);height:min(94vh,980px);background:#111;border-radius:16px;overflow:hidden;box-shadow:0 24px 80px #0008}.screen-dialog header{height:52px;padding:8px 12px;background:#173c35;color:#fff;display:flex;align-items:center;justify-content:space-between}.screen-dialog header button{width:auto}.screen-dialog iframe{width:100%;height:calc(100% - 52px);border:0;background:#000}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 14px system-ui;
  color: #111b21;
  background: #dfe5e7;
}
button,
input,
select,
textarea {
  font: inherit;
}
.hidden {
  display: none !important;
}
.login {
  height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(var(--g) 28%, #e9edef 28%);
}
.login form {
  width: 390px;
  background: white;
  padding: 35px;
  display: grid;
  gap: 13px;
  border-radius: 8px;
  box-shadow: 0 8px 30px #0002;
}
.login input,
input,
select,
textarea {
  padding: 10px;
  border: 1px solid #d8dfe1;
  border-radius: 7px;
}
.login button,
#send,
.manage > button,
form button,
.slot button {
  background: var(--g);
  color: white;
  border: 0;
  padding: 11px;
  border-radius: 7px;
}
.manage .bulk-form { display:grid; grid-template-columns:1fr 1fr; align-items:start }
.bulk-form h3,.bulk-form textarea,.bulk-form output { grid-column:1/-1 }
.bulk-form output { color:#08785f; min-height:20px }
.identity{display:block;color:#667781;font-size:10px;line-height:1.45;margin:7px 0;overflow-wrap:anywhere}.slot .test{background:#e7f7f3;color:#08785f;border:1px solid #9bd7c9}.result{display:block;min-height:28px;padding:6px 2px;font-size:11px;overflow-wrap:anywhere}.result.ok{color:#08785f}.result.bad{color:#a22}
.app {
  height: 100vh;
  display: flex;
  background: #fff;
}
.app > nav {
  width: 58px;
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 5px;
}
.app > nav b {
  color: var(--g);
  font-size: 28px;
}
.app > nav button {
  border: 0;
  background: none;
  font-size: 21px;
  padding: 10px;
}
.app > nav i {
  flex: 1;
}
.page {
  flex: 1;
  min-width: 0;
}
.chats {
  display: flex;
}
.chats > aside {
  width: 370px;
  border-right: 1px solid #ddd;
}
.chats aside header,
.chats article header {
  height: 64px;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  gap: 10px;
}
.chats aside header button {
  margin-left: auto;
}
.chats aside > input {
  margin: 8px;
  width: calc(100% - 16px);
  background: #f0f2f5;
}
.conv {
  width: 100%;
  height: 72px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 9px;
}
.conv.on,
.conv:hover {
  background: #f0f2f5;
}
.conv span {
  min-width: 0;
}
.conv b,
.conv small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv small,
.row small,
#chatMeta {
  color: var(--muted);
}
.avatar {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #dfe5e7;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 18px;
}
.chats > article {
  flex: 1;
  background: var(--bg);
}
#empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 22px;
}
#active {
  height: 100%;
  display: flex;
  flex-direction: column;
}
#active header > div:nth-child(2) {
  flex: 1;
}
#bubbles {
  flex: 1;
  overflow: auto;
  padding: 25px 8%;
  background-image: radial-gradient(#ccd1ca 1px, transparent 1px);
  background-size: 18px 18px;
}
#bubbles p {
  max-width: 70%;
  width: max-content;
  padding: 9px 11px;
  border-radius: 8px;
  background: white;
  margin: 5px;
}
#bubbles p.out {
  margin-left: auto;
  background: #d9fdd3;
}
#bubbles small {
  display: block;
  text-align: right;
  color: var(--muted);
  font-size: 10px;
}
footer {
  display: flex;
  padding: 10px;
  background: #f0f2f5;
  gap: 10px;
}
footer textarea {
  flex: 1;
  resize: none;
}
footer button {
  width: 46px;
}
.manage {
  padding: 20px;
  overflow: auto;
  background: #f7f9fa;
}
.manage form {
  background: #fff;
  padding: 15px;
  border-radius: 9px;
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.row b {
  min-width: 150px;
}
.row small {
  flex: 1;
}
.row em {
  font-style: normal;
  color: #08785f;
}
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  margin: 15px 0;
}
.slot {
  background: #fff;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid #ddd;
}
.slot input,
.slot select {
  width: 100%;
  margin-top: 6px;
}
.slot label {
  display: block;
  margin-top: 7px;
}
.slot label input {
  width: auto;
}
.slot button {
  width: 100%;
  margin-top: 8px;
}
#toast {
  position: fixed;
  z-index: 10;
  right: 20px;
  top: 20px;
  background: #111b21;
  color: #fff;
  padding: 12px 18px;
  border-radius: 7px;
  opacity: 0;
}
#toast.show {
  opacity: 1;
}
#toast.err {
  background: #a22;
}
@media (max-width: 900px) {
  .slots {
    grid-template-columns: 1fr 1fr;
  }
  .chats > aside {
    width: 310px;
  }
}
