:root {
  color-scheme: light;
  font-family: Tahoma, Arial, sans-serif;
  background: #f6f7f8;
  color: #202326;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.loginPanel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #f6f7f8;
}

.loginCard {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  background: #fff;
  border: 1px solid #d9dde3;
  border-radius: 8px;
}

.loginCard h2 {
  margin: 0;
  font-size: 19px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid #c9ced6;
  background: #fff;
  color: #202326;
  border-radius: 6px;
  padding: 9px 13px;
  cursor: pointer;
}

button:hover {
  background: #f0f2f4;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary {
  background: #175cd3;
  border-color: #175cd3;
  color: #fff;
}

.primary:hover {
  background: #124cae;
}

.danger {
  border-color: #c73333;
  color: #a31818;
}

.danger:hover {
  background: #fff2f2;
}

.topbar {
  min-height: 82px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: #ffffff;
  border-bottom: 1px solid #d9dde3;
}

h1 {
  margin: 0 0 7px;
  font-size: 20px;
  font-weight: 700;
}

p {
  margin: 0;
  color: #626b76;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.layout {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  height: calc(100vh - 82px);
}

.sidebar {
  border-left: 1px solid #d9dde3;
  background: #ffffff;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.searchBox {
  padding: 14px;
  display: grid;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c9ced6;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: #202326;
}

textarea {
  resize: vertical;
  line-height: 1.9;
}

.stats {
  padding: 0 14px 12px;
  color: #626b76;
  font-size: 13px;
}

.list {
  overflow: auto;
  border-top: 1px solid #edf0f3;
}

.item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  border-radius: 0;
  text-align: right;
  padding: 12px 14px;
  background: #fff;
}

.item.active {
  background: #eaf1ff;
}

.itemTitle {
  display: block;
  color: #202326;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itemAnswer {
  display: block;
  color: #727b86;
  font-size: 12px;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor {
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

form {
  max-width: 980px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 700;
}

.editorActions {
  display: flex;
  justify-content: flex-start;
}

.empty {
  max-width: 520px;
  padding: 22px;
  background: #fff;
  border: 1px solid #d9dde3;
  border-radius: 8px;
  color: #626b76;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  left: 22px;
  bottom: 22px;
  max-width: 560px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #202326;
  color: #fff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  white-space: pre-wrap;
  direction: rtl;
}

@media (max-width: 820px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar {
    min-height: 45vh;
    border-left: 0;
    border-bottom: 1px solid #d9dde3;
  }
}
