* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222;
  background: #f3f3f1;
}
a { color: #2f5d8a; }
h1 { font-size: 20px; margin: 0 0 14px; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 10px; font-weight: 600; }

header {
  background: #2b2b2b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
  padding: 0 16px;
  min-height: 42px;
}
header a { color: #cfcfcf; text-decoration: none; padding: 11px 0 9px; border-bottom: 2px solid transparent; }
header a:hover { color: #fff; }
header a.on { color: #fff; border-bottom-color: #d0a53a; }
header .brand { color: #fff; font-weight: 600; margin-right: 8px; }
header .right { margin-left: auto; }
.count { background: #b4422f; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 9px; margin-left: 3px; }

.bar { padding: 6px 16px; border-bottom: 1px solid; font-size: 13px; }
.bar.warn { background: #fff4cc; border-color: #e6cf7a; }
.bar.off { background: #eee; border-color: #d5d5d5; color: #555; }

main { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; }

.box { background: #fff; border: 1px solid #dcdcd8; padding: 14px 16px; margin-bottom: 16px; }
.flash { background: #eaf3e4; border: 1px solid #b9d3a8; padding: 8px 12px; margin-bottom: 14px; }
.error-text { color: #b4422f; }
.muted, .hint { color: #777; }
.hint { font-size: 12px; margin-top: 3px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }

.tablewrap { overflow-x: auto; background: #fff; border: 1px solid #dcdcd8; margin-bottom: 14px; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 6px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid #ebebe8; }
th { background: #f8f8f6; font-weight: 600; font-size: 12px; color: #555; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfbf7; }
td.num, th.num { text-align: right; }
.clip { max-width: 420px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

button, .btn {
  font: inherit;
  padding: 4px 12px;
  border: 1px solid #aaa;
  background: #f6f6f4;
  color: #222;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}
button:hover, .btn:hover { background: #ecece8; }
button.primary { background: #2f5d8a; border-color: #2f5d8a; color: #fff; }
button.primary:hover { background: #274f76; }
button.danger { color: #a3301f; }
button.link { border: 0; background: none; color: #a3301f; padding: 0; }

input[type=text], input[type=number], input[type=password], input[type=search], select, textarea {
  font: inherit;
  padding: 4px 6px;
  border: 1px solid #bdbdb8;
  background: #fff;
  max-width: 100%;
}
textarea { width: 100%; resize: vertical; }
textarea.code { font: 13px/1.45 Menlo, Consolas, monospace; }
input.wide { width: 100%; }
input.short { width: 90px; }

.form { display: grid; grid-template-columns: 230px 1fr; gap: 12px 18px; align-items: start; }
.form > label { padding-top: 4px; font-weight: 500; }
.form .full { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tabs { display: flex; gap: 2px; margin-bottom: 14px; border-bottom: 1px solid #ccc; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; text-decoration: none; color: #444; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.tabs a.on { background: #fff; border-color: #ccc; color: #222; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: 1px solid #dcdcd8; background: #fff; margin-bottom: 16px; }
.stats div { padding: 10px 14px; border-right: 1px solid #ebebe8; }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font-size: 20px; font-weight: 600; }
.stats span { color: #777; font-size: 12px; }

.st { font-size: 12px; white-space: nowrap; }
.st-new { color: #555; }
.st-review { color: #9a6200; font-weight: 600; }
.st-queued { color: #2f5d8a; }
.st-sent { color: #2c7a2c; }
.st-skipped { color: #888; }
.st-error { color: #b4422f; font-weight: 600; }
.lvl-error { color: #b4422f; }
.lvl-warn { color: #9a6200; }

.stars { color: #c08a00; letter-spacing: 1px; white-space: nowrap; }
.chat { border: 1px solid #ebebe8; background: #fafaf8; padding: 10px; max-height: 420px; overflow-y: auto; }
.msg { margin: 0 0 8px; padding: 6px 10px; max-width: 80%; background: #fff; border: 1px solid #e3e3df; white-space: pre-wrap; }
.msg.seller { margin-left: auto; background: #eef3f8; border-color: #d3dfeb; }
.msg small { display: block; color: #888; font-size: 11px; }
dl.meta { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; margin: 0; }
dl.meta dt { color: #777; }
dl.meta dd { margin: 0; }

.login { max-width: 320px; margin: 12vh auto 0; }
.login input { width: 100%; margin-bottom: 10px; }

@media (max-width: 760px) {
  .form, .grid2 { grid-template-columns: 1fr; }
  .form > label { padding-top: 0; }
  dl.meta { grid-template-columns: 110px 1fr; }
  header .right { margin-left: 0; }
  .msg { max-width: 95%; }
}
