:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #192925;
  background: #f5f7f6;
  font-size: 16px;
  --ink: #142a22;
  --accent: #b5f4aa;
  --line: #dbe2dd;
  --muted: #596b62;
  --side: #13241e;
  --green: #245c41;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.46;
}
a {
  color: #1e6745;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #37906b;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
svg.ico {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -1.1px;
  font-size: 27px;
  color: #effaf2;
}
.mark {
  display: inline-block;
  background: url(/static/mark.svg) center/cover;
  width: 36px;
  height: 36px;
  flex: none;
}
#shell {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 238px;
  background: var(--side);
  color: #e9f3ec;
  padding: 31px 17px 18px;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  flex: none;
}
aside .brand {
  padding-left: 9px;
}
.workspace {
  margin: 35px 1px 29px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 10px;
  border: 1px solid #36483e;
  border-radius: 10px;
}
.workspace-icon,
#avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #e8fae8;
  background: #364d40;
  border-radius: 9px;
}
.workspace b,
.identity b {
  font-size: 14px;
}
.workspace small,
.identity small {
  display: block;
  font-size: 12px;
  margin-top: 3px;
  color: #a8b9ad;
}
nav {
  overflow-y: auto;
}
nav section {
  margin-bottom: 24px;
}
.nav-label,
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #a0b4a7;
  margin: 0 12px 9px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  border: 0;
  color: #c5d5ca;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  border-radius: 7px;
  margin: 2px 0;
}
.nav-item:hover {
  background: #20382c;
}
.nav-item.active {
  background: #2d4736;
  color: #cdffbc;
}
.identity {
  border-top: 1px solid #36483e;
  margin-top: auto;
  padding: 17px 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.identity .icon-button {
  margin-left: auto;
  color: #cad7cc;
}
.identity b {
  overflow-wrap: anywhere;
}
.icon-button {
  background: none;
  border: 0;
  display: inline-grid;
  place-items: center;
  padding: 7px;
  border-radius: 6px;
}
.icon-button:hover {
  background: #7e938021;
}
.body {
  flex: 1;
  min-width: 0;
}
.top {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(20px, 4vw, 68px);
  font-size: 14px;
  color: var(--muted);
}
.top b {
  color: var(--ink);
  font-weight: 550;
}
.slash {
  color: #bcc8be;
}
.top-refresh {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.top-refresh svg {
  width: 15px;
}
#menu {
  display: none;
}
#content {
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(25px, 3vw, 44px) clamp(20px, 4vw, 68px) 40px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
}
.intro h1,
.login-main h1 {
  margin: 0;
  letter-spacing: -0.045em;
  font-size: clamp(30px, 3.1vw, 45px);
  line-height: 1.13;
  font-weight: 650;
}
.intro p,
.muted {
  color: var(--muted);
  line-height: 1.5;
}
.intro p {
  margin: 7px 0 0;
  font-size: 15px;
}
.primary,
.secondary,
.danger {
  border-radius: 8px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  min-height: 39px;
}
.primary {
  border: 1px solid #244c32;
  background: #214b32;
  color: white;
}
.primary:hover {
  background: #183c27;
}
.secondary {
  border: 1px solid var(--line);
  background: #fff;
}
.secondary:hover,
.row:hover {
  background: #f4f8f4;
}
.danger {
  border: 1px solid #e5c7c3;
  color: #963e31;
  background: white;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 29px;
}
.source-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  text-align: left;
  padding: 15px;
  min-height: 116px;
}
.source-card:hover,
.source-card.selected {
  border-color: #5d9371;
}
.source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  border-radius: 9px;
  background: var(--tint, #e6f0e7);
  color: var(--tone, #356b47);
  flex: none;
}
.mail {
  --tint: #e5f0fd;
  --tone: #396dae;
}
.marketing {
  --tint: #f5e9fb;
  --tone: #8657a2;
}
.workspace-g {
  --tint: #ffecd9;
  --tone: #a56130;
}
.meta,
.meta-admin {
  --tint: #e1f3ef;
  --tone: #267d70;
}
.custom {
  --tint: #ebf3df;
  --tone: #587435;
}
.source-name {
  display: block;
  font-size: 17px;
  letter-spacing: -0.02em;
  margin: 13px 0 2px;
}
.source-count,
.status {
  font-size: 12px;
  color: var(--muted);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.status:before {
  content: "";
  background: #468b5c;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status.off:before {
  background: #bf8538;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.panel-head {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-head h2,
.subhead {
  font-size: 20px;
  letter-spacing: -0.035em;
  margin: 0;
  font-weight: 650;
}
.count {
  color: #54715b;
  border-radius: 30px;
  background: #eef4ed;
  padding: 3px 9px;
  font:
    12px ui-monospace,
    monospace;
}
.search {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}
.search svg {
  position: absolute;
  left: 9px;
  width: 15px;
  color: #788d7d;
}
.search input {
  padding: 8px 10px 8px 31px;
  width: 200px;
  font-size: 14px;
}
.filters {
  display: flex;
  gap: 5px;
  padding: 0 20px 14px;
  flex-wrap: wrap;
}
.chip {
  font-size: 13px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 11px;
}
.chip.active {
  color: #254e34;
  background: #e8f2e6;
  border-color: #c6dcc7;
}
.table-head,
.row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(130px, 0.68fr) minmax(
      85px,
      0.48fr
    ) 22px;
  gap: 14px;
  align-items: center;
  padding: 10px 20px;
}
.table-head {
  font-size: 12px;
  color: var(--muted);
  background: #f6f8f6;
  border-block: 1px solid var(--line);
}
.row {
  width: 100%;
  text-align: left;
  background: white;
  border: 0;
  border-bottom: 1px solid #e9edea;
  padding-block: 13px;
  min-height: 63px;
}
.row-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.row-text {
  min-width: 0;
}
.row b {
  font-size: 14px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}
.row-src,
.row-type {
  font-size: 13px;
  color: #526459;
}
.row-src {
  font-weight: 550;
}
.row .end {
  color: #829286;
  width: 15px;
}
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 18px;
  color: var(--muted);
  font-size: 13px;
}
.pager {
  display: flex;
  gap: 5px;
}
.pager button {
  border: 1px solid var(--line);
  background: white;
}
.empty {
  padding: 26px;
  color: var(--muted);
}
input,
textarea,
select {
  border: 1px solid #cbd6ce;
  background: white;
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--ink);
  width: 100%;
}
input[type="checkbox"] {
  width: auto;
}
textarea {
  resize: vertical;
  line-height: 1.45;
}
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form {
  display: grid;
  gap: 15px;
}
.help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
}
.buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.error {
  color: #9b392f;
}
.pad {
  padding: 20px;
}
.api-section {
  margin-bottom: 16px;
}
.api-section h3 {
  margin: 0 0 9px;
  font-size: 17px;
}
.bot-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(640px, 95vw);
  max-height: 88dvh;
  box-shadow: 0 24px 90px #15271d35;
  color: var(--ink);
}
dialog::backdrop {
  background: #0f201b70;
}
#modal-inner {
  padding: 24px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}
.modal-head h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
  margin: 0;
  overflow-wrap: anywhere;
}
.modal-info {
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.detail-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 650;
  margin-top: 19px;
}
code,
pre,
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
code {
  font-size: 0.88em;
  overflow-wrap: anywhere;
}
pre {
  background: #f0f4f0;
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.6;
  max-height: 300px;
  overflow: auto;
}
summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--green);
  padding: 9px 0;
}
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #192e22;
  color: #fff;
  padding: 12px 19px;
  border-radius: 8px;
  z-index: 10;
}
#login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) 1fr;
}
.login-art {
  background-color: #15291e;
  background-image: radial-gradient(#ffffff26 1px, transparent 1px);
  background-size: 22px 22px;
  padding: clamp(24px, 5vw, 80px);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.orbit {
  position: relative;
  margin: auto;
  display: grid;
  place-items: center;
  width: 90%;
  aspect-ratio: 1;
  max-width: 400px;
}
.orbit i {
  position: absolute;
  inset: 9%;
  border: 1px solid #77a87d88;
  border-radius: 22%;
  transform: rotate(30deg);
}
.orbit i:nth-child(2) {
  inset: 18%;
  transform: rotate(50deg);
}
.orbit i:nth-child(3) {
  inset: 27%;
  transform: rotate(70deg);
}
.orbit .mark {
  width: 76px;
  height: 76px;
  transform: rotate(-8deg);
}
.login-caption {
  color: #c2d9bf;
  font-size: 18px;
}
.login-main {
  display: grid;
  place-items: center;
  padding: 30px;
  background: #f8faf7;
}
.login-main form {
  width: min(370px, 100%);
  display: grid;
  gap: 19px;
}
.login-main .eyebrow {
  margin: 0;
  color: #567360;
}
#login-error {
  color: #9b392f;
  margin: 0;
}
@media (max-width: 1000px) {
  aside {
    width: 195px;
  }
  .source-card {
    padding: 12px;
  }
  .status {
    font-size: 11px;
  }
  .top,
  #content {
    padding-inline: 22px;
  }
}
@media (max-width: 760px) {
  aside {
    position: fixed;
    z-index: 4;
    left: 0;
    transform: translateX(-100%);
    width: 235px;
    box-shadow: 0 0 30px #1113;
  }
  aside.open {
    transform: none;
  }
  #menu {
    display: inline-grid;
  }
  .top {
    height: 52px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
  }
  .source-card {
    min-height: 88px;
  }
  .source-name {
    margin-top: 7px;
  }
  .table-head,
  .row {
    grid-template-columns: minmax(130px, 1fr) 86px 14px;
    gap: 5px;
    padding-inline: 13px;
  }
  .row-type,
  .table-head span:nth-child(3) {
    display: none;
  }
  .panel-head {
    padding: 14px;
  }
  .search {
    width: 100%;
    order: 3;
  }
  .search input {
    width: 100%;
  }
  .filters {
    padding-inline: 14px;
  }
  .intro {
    align-items: flex-start;
  }
  .intro .primary {
    white-space: nowrap;
  }
  .top,
  #content {
    padding-inline: 15px;
  }
  #login {
    display: block;
  }
  .login-art {
    padding: 22px;
  }
  .orbit,
  .login-caption {
    display: none;
  }
  .login-main {
    min-height: 75dvh;
  }
  .top-refresh span {
    display: none;
  }
}
@media (max-width: 410px) {
  .intro {
    flex-wrap: wrap;
  }
  .row-main .glyph {
    display: none;
  }
}
/* CRM chat */
.crm-panel {
  margin-bottom: 16px;
}
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 30px;
  padding: 3px 9px;
  margin-right: 6px;
  font-size: 12px;
  background: #f0f3f1;
  color: var(--muted);
  border: 1px solid var(--line);
}
.tag.ok {
  background: #eef4ed;
  color: #254e34;
  border-color: #c6dcc7;
}
.tag.info {
  background: #eef2f7;
  color: #2f4a66;
  border-color: #cfdbe8;
}
.tag.warn {
  background: #fbf0ee;
  color: #963e31;
  border-color: #e5c7c3;
}
.crm-mode {
  padding-top: 0;
}
.crm-table {
  border-top: 1px solid var(--line);
}
.crm-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1fr 0.6fr;
  gap: 12px;
  align-items: center;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.crm-row:last-child {
  border-bottom: 0;
}
.crm-th {
  color: var(--muted);
  font-size: 12px;
  background: #fafbfa;
}
.crm-log {
  grid-template-columns: 1.1fr 0.7fr 1fr 1.2fr 2fr;
}
.crm-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.crm-item,
.crm-agent {
  padding: 15px 20px;
  border-top: 1px solid var(--line);
}
.crm-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.crm-item pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.crm-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 0;
}
.chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.crm-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.crm-fields label {
  display: grid;
  gap: 5px;
  font-size: 13px;
}
.crm-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 12px 0;
  font-size: 13px;
}
.crm-tight {
  padding-top: 0;
}
.crm-kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 9px 18px;
  margin: 0 0 14px;
}
.crm-kv dt {
  color: var(--muted);
  font-size: 13px;
}
.crm-kv dd {
  margin: 0;
}
@media (max-width: 760px) {
  .crm-row,
  .crm-log,
  .crm-fields {
    grid-template-columns: 1fr;
  }
  .crm-th {
    display: none;
  }
}
.login-remember {
  margin: 4px 0 2px;
}
#login-info {
  margin: 0;
}
.confidential {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid #e5c7c3;
  border-radius: 10px;
  background: #fbf0ee;
  color: #963e31;
  font-weight: 600;
}
.crm-item details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.crm-item details pre,
pre.backlog {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 480px;
  overflow: auto;
}

/* Reklamy */
.ads-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ads-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
.ads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ads-table th,
.ads-table td {
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.ads-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: #fafbfa;
}
.ads-table tr:last-child td {
  border-bottom: 0;
}
.ads-missing {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}
#ads-card .crm-panel {
  margin-bottom: 0;
}
/* Marketingový přehled */
.ads-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ads-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ads-kpi span,
.ads-kpi small {
  color: var(--muted);
  font-size: 12px;
}
.ads-kpi b {
  color: var(--ink);
  font-size: 20px;
}
.ads-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.ads-date input {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
}
.ads-chart {
  width: 100%;
  height: auto;
  max-height: 240px;
}
.ads-chart text {
  fill: var(--muted);
  font-size: 11px;
}
.ads-axis {
  stroke: var(--line);
}
.ads-bar {
  fill: var(--green);
  opacity: 0.75;
}
.ads-bar-missing {
  fill: var(--line);
}
.ads-line {
  fill: none;
  stroke: #a56130;
  stroke-width: 2;
}
.ads-dot {
  fill: #a56130;
}
.ads-legend {
  display: inline-block;
  width: 12px;
  height: 10px;
  margin: 0 4px 0 8px;
  vertical-align: middle;
}
.ads-legend.bar {
  background: var(--green);
  opacity: 0.75;
}
.ads-legend.line {
  height: 2px;
  background: #a56130;
}
.ads-sort {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.ads-delta.up {
  color: var(--green);
}
.ads-delta.down {
  color: #a56130;
}
.ads-links {
  margin: 0;
  padding-left: 18px;
  line-height: 1.9;
}
.ads-links a {
  color: var(--green);
  font-weight: 600;
}
