:root {
  color-scheme: light;
  --bg: #f7f6f9;
  --panel: white;
  --ink: #211d2c;
  --muted: #675f73;
  --line: #e3dfe8;
  --accent: #64409a;
  --gold: #dcb677;
  --side: #211a2a;
  font:
    15px/1.5 Inter,
    system-ui,
    sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: #482174;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid #ad94cd;
  outline-offset: 3px;
}
.workspace {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--side);
  color: #fbf7fc;
  padding: 29px 17px 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  font:
    1.82rem Georgia,
    serif;
  letter-spacing: -0.045em;
}
.brand:hover {
  color: inherit;
}
.brand span {
  color: var(--gold);
  font-size: 1.36em;
  line-height: 1;
}
.sidebar > .brand {
  padding: 0 11px 24px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
nav p {
  margin: 21px 12px 5px;
  font-size: 0.71rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9bbc9;
}
nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 7px;
  color: #ece6ee;
  text-decoration: none;
  font-size: 0.93rem;
}
nav a:hover {
  background: #32283d;
  color: white;
}
nav a[aria-current='page'] {
  color: #fff1db;
  background: #403249;
  box-shadow: inset 3px 0 var(--gold);
}
.side-foot {
  margin-top: auto;
  padding: 23px 9px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 15px;
}
.side-foot .signed-in {
  grid-column: 1 / -1;
  color: #ebdeed;
  font-weight: 600;
}
.side-foot a,
.side-foot button {
  color: #ebdeed;
  font-size: 0.86rem;
}
.side-foot button {
  background: none;
  border: 1px solid #625365;
}
.mobile-head {
  display: none;
}
main {
  min-width: 0;
  width: 100%;
  max-width: 1530px;
  margin-inline: auto;
  padding: 34px clamp(18px, 3.5vw, 54px) 56px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.25;
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.055em;
}
h2 {
  font-size: 1.12rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1rem;
}
.page-head,
.panel-head,
.actions,
.segments,
.pager,
.period {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.page-head,
.panel-head {
  justify-content: space-between;
}
.page-head {
  margin: 0 0 25px;
}
#today {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.panel,
.kpis > a,
.kpis > div,
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.panel,
dialog {
  padding: 20px;
  min-width: 0;
}
.panel h2,
.panel h3 {
  margin: 0 0 12px;
}
.panel-head h2 {
  margin: 0;
}
.panel + .panel,
.columns + .panel,
.panel + .columns,
.kpis + .columns,
.kpis + .panel {
  margin-top: 15px;
}
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.columns > .panel {
  margin: 0;
}
.charts {
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 1fr);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kpis > a,
.kpis > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 105px;
  padding: 17px;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}
.kpis > a:hover {
  border-color: #ac93bf;
}
.kpis strong {
  color: var(--ink);
  font-size: 1.95rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.kpis.money {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.money small {
  font-size: 0.77rem;
}
.feedback,
.muted {
  color: var(--muted);
  font-size: 0.86rem;
}
.feedback,
.muted:not(:last-child) {
  margin: 8px 0 12px;
}
.feedback:empty,
.muted:empty {
  display: none;
}
input,
select,
textarea,
button,
.button-link {
  border-radius: 7px;
  border: 1px solid #cec8d5;
}
input,
textarea,
select {
  background: #fff;
  padding: 8px 10px;
  min-width: 0;
  width: 100%;
}
button,
.button-link {
  cursor: pointer;
  background: white;
  padding: 8px 12px;
  white-space: normal;
  text-decoration: none;
  font-weight: 500;
}
button:hover,
.button-link:hover {
  border-color: #9674ae;
  background: #faf7fe;
}
button:disabled {
  opacity: 0.54;
  cursor: default;
}
.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.primary:hover {
  background: #553481;
  color: #fff;
}
.danger {
  color: #933c43;
  border-color: #cea6aa;
}
label {
  display: block;
  font-size: 0.87rem;
  font-weight: 550;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 4px;
  font-weight: 400;
}
.filters,
.period {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 15px;
}
.filters label {
  flex: 1 1 135px;
}
.filters label:first-child {
  flex: 2 1 208px;
}
.period {
  align-items: center;
}
.period label {
  font-size: 0.79rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.period input {
  margin: 0;
  width: 145px;
}
.segments {
  gap: 1px;
  padding: 2px;
  background: #ece8f1;
  border-radius: 8px;
}
.segments button {
  border: 0;
  background: transparent;
  font-size: 0.83rem;
}
.segments button[aria-pressed='true'] {
  background: #fff;
  box-shadow: 0 1px 3px #d5cddc;
}
.stack {
  display: grid;
  gap: 12px;
}
.stack .check {
  display: flex;
  align-items: center;
  gap: 7px;
}
.check input {
  width: auto;
  margin: 0;
}
.stack > .primary {
  justify-self: start;
}
.pager:not(:empty) {
  margin-top: 15px;
}
.pager {
  font-size: 0.84rem;
}
.scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
td,
th {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line);
}
th {
  font-weight: 550;
  color: var(--muted);
  font-size: 0.78rem;
}
tr:last-child td {
  border: 0;
}
.text-button {
  border: 0;
  padding: 1px 0;
  background: none;
  text-decoration: underline;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.detail {
  margin: 0 0 15px;
  border-top: 3px solid #9a78b1;
}
.detail h2,
.customer-text {
  overflow-wrap: anywhere;
}
dl {
  display: grid;
  grid-template-columns: minmax(90px, max-content) minmax(0, 1fr);
  gap: 4px 14px;
  margin: 9px 0 15px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.ticket {
  padding: 12px 0;
}
.ticket + .ticket {
  border-top: 1px solid var(--line);
}
.ticket .actions,
.detail .actions {
  margin-top: 8px;
}
.customer-text {
  white-space: pre-wrap;
}
#activity {
  width: 100%;
  height: 164px;
  display: block;
}
.legend {
  display: flex;
  gap: 16px;
  font-size: 0.76rem;
  color: var(--muted);
}
.legend span:before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 3px;
  background: #705098;
  vertical-align: middle;
  margin-right: 6px;
}
.legend span + span:before {
  background: #ad782b;
}
.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
#overview-channels {
  margin-bottom: 12px;
}
.button-link {
  display: inline-block;
  margin-top: 10px;
}
.detail .wallet-area {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
dialog {
  width: min(500px, calc(100% - 26px));
  box-shadow: 0 18px 80px #24182d33;
  color: var(--ink);
}
dialog::backdrop {
  background: #1a142399;
}
dialog h2 {
  margin-bottom: 10px;
}
dialog form {
  margin-top: 15px;
}
dialog .actions {
  margin-top: 8px;
}
textarea {
  resize: vertical;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 60% 23%, #43344e, #241c30 66%);
}
.login-box {
  width: min(385px, calc(100% - 32px));
  background: white;
  border: 1px solid #ded6df;
  border-radius: 16px;
  box-shadow: 0 14px 65px #110d1850;
  padding: 30px;
}
.login-box .brand {
  color: #32243d;
}
.login-box h1 {
  font-size: 1.65rem;
  margin: 20px 0 15px;
}
.login-box input {
  margin: 5px 0 12px;
}
.login-box .primary {
  width: 100%;
}
.login-box #status {
  color: #913a45;
  font-size: 0.87rem;
}
.back-site {
  display: inline-block;
  margin-top: 17px;
  font-size: 0.85rem;
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .charts {
    grid-template-columns: 1fr 1fr;
  }
  main {
    padding: 27px 21px;
  }
  .kpis {
    gap: 8px;
  }
  .kpis > a,
  .kpis > div {
    padding: 12px;
  }
}
@media (max-width: 800px) {
  .workspace {
    display: block;
  }
  .mobile-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--side);
    color: white;
    padding: 10px 16px;
  }
  .mobile-head button {
    background: transparent;
    color: white;
    border-color: #6f6275;
  }
  .mobile-head .brand {
    font-size: 1.4rem;
  }
  .sidebar {
    display: none;
    position: static;
    height: auto;
    padding: 8px 12px 16px;
  }
  .sidebar.open {
    display: flex;
  }
  .sidebar > .brand {
    display: none;
  }
  nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  nav p {
    grid-column: 1/-1;
    margin: 10px 10px 2px;
  }
  nav .home-link {
    grid-column: 1/-1;
  }
  main {
    padding: 21px 14px 40px;
  }
  .columns,
  .charts {
    grid-template-columns: 1fr;
  }
  .kpis,
  .kpis.money {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpis > a,
  .kpis > div {
    min-height: 81px;
  }
  .panel {
    padding: 15px;
  }
  .page-head {
    margin-bottom: 16px;
  }
}
@media (max-width: 470px) {
  .period label {
    flex: 1 1 42%;
  }
  .period input {
    width: 100%;
  }
  .period .segments {
    flex-basis: 100%;
    width: max-content;
  }
  .period .segments button {
    flex: 1;
  }
  .filters label:first-child {
    flex-basis: 100%;
  }
  .money.kpis {
    grid-template-columns: 1fr;
  }
  .money.kpis > div {
    min-height: 0;
  }
  .kpis strong {
    font-size: 1.6rem;
  }
}

.tariff {
  min-width: 5.4em;
  max-width: 8em;
  width: 100%;
}
.campaign-card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.campaign-card:last-child {
  border-bottom: 0;
}
#partner-detail code {
  overflow-wrap: anywhere;
}
#traffic-list .actions {
  min-width: 5.2em;
}
