:root {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #16181d;
  background: #f7f8fa;
  font-synthesis: none;
  font-feature-settings: "cv01", "ss03";
  --bg: #f7f8fa;
  --card: #fff;
  --text: #16181d;
  --muted: #6b7280;
  --line: #e8e9ef;
  --purple: #5e6ad2;
  --purple-strong: #4f5ac0;
  --soft: #eef0fe;
  --glass: rgba(255, 255, 255, 0.82);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -8px rgba(16, 24, 40, 0.09);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --safe: env(safe-area-inset-bottom, 0px);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: var(--purple);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a89bf6;
  outline-offset: 3px;
}
svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.3px;
  line-height: 1.18;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.6px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.55;
}
.muted,
.caption {
  color: var(--muted);
}
.caption {
  font-size: 12px;
}
.ambient {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at 95% 0%, #e9e5fd99, transparent 38%),
    radial-gradient(ellipse at 0% 40%, #e8f2fe55, transparent 40%);
  pointer-events: none;
}
.shell {
  max-width: 1140px;
  margin: auto;
  padding: 26px 34px calc(126px + var(--safe));
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 38px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.65px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: #252836;
  font-size: 31px;
  font-weight: 700;
  position: relative;
  font-style: italic;
}
.brand-mark span {
  font-size: 17px;
  position: absolute;
  right: 5px;
  top: 0;
  color: #c4baff;
}
.online {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6c7383;
}
.online i,
.badge i {
  width: 6px;
  height: 6px;
  display: inline-block;
  background: currentColor;
  border-radius: 50%;
}
.online i {
  color: #4baf85;
  box-shadow: 0 0 0 4px #4baf8510;
}
.owner-avatar {
  background: #e8e3fa;
  border: 3px solid var(--card);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #7767b0;
  font-size: 12px;
  font-weight: 700;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 19px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.subheading {
  font-size: 13px;
  color: var(--muted);
  margin-top: 9px;
}
.button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  transition:
    transform 0.15s,
    background 0.15s;
  text-decoration: none;
}
.button:active {
  transform: scale(0.97);
}
.primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 6px 16px #7764ed20;
}
.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}
.danger {
  background: #fff0f1;
  color: #cc5668;
}
.icon-button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 25px;
  flex-shrink: 0;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 25px;
}
.metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.metric-top {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.metric-top svg {
  width: 17px;
  height: 17px;
  color: #9ca3b2;
}
.metric-value {
  font-size: 31px;
  letter-spacing: -1px;
  font-weight: 700;
  margin: 10px 0 4px;
}
.metric-note {
  font-size: 11px;
  color: var(--muted);
}
.metric.featured {
  background: linear-gradient(125deg, #7b69ea, #9482f4);
  border: 0;
  color: #fff;
}
.metric.featured .metric-top,
.metric.featured .metric-note,
.metric.featured svg {
  color: #ffffffbb;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.search {
  position: relative;
  flex: 1;
}
.search svg {
  position: absolute;
  left: 15px;
  top: 13px;
  color: #9299ab;
  width: 19px;
}
.search input {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px 13px 43px;
  width: 100%;
  color: var(--text);
  font-size: 13px;
  height: 46px;
}
.search input::placeholder {
  color: #a0a6b4;
}
select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 13px;
  min-height: 44px;
  font-size: 13px;
  max-width: 100%;
}
.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 24px;
  padding: 2px 0 3px;
}
.chip {
  white-space: nowrap;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  font-size: 12px;
  color: #858b9b;
}
.chip.active {
  color: var(--purple);
  background: var(--soft);
  border-color: #ded8fa;
}
.chip b {
  font-size: 10px;
  border-radius: 6px;
  padding: 2px 5px;
  background: #9097a110;
  font-weight: 600;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 5px 0 17px;
  font-size: 14px;
  font-weight: 650;
}
.section-title span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.account-card {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--text);
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition:
    transform 0.18s,
    box-shadow 0.18s;
  min-width: 0;
}
.account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px #3338540a;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  min-width: 0;
}
.avatar {
  height: 44px;
  width: 44px;
  border-radius: 15px;
  background: var(--soft);
  color: #8270ca;
  display: grid;
  place-items: center;
  font-weight: 650;
  flex-shrink: 0;
  font-size: 15px;
}
.tone-1 {
  background: #e6f1ed;
  color: #679181;
}
.tone-2 {
  background: #f7eee3;
  color: #ae8d69;
}
.tone-3 {
  background: #e5edf9;
  color: #7292ba;
}
.tone-4 {
  background: #f4e9ed;
  color: #b17d90;
}
.account-name {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-weight: 650;
  display: block;
}
.identity {
  min-width: 0;
  flex: 1;
}
.phone {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  letter-spacing: 0.25px;
}
.card-top > .chevron {
  width: 15px;
  color: #b8becb;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 550;
  padding: 5px 8px;
  border-radius: 7px;
  background: #f0f1f5;
  color: #9398a4;
  white-space: nowrap;
}
.badge.ready {
  color: #459d7a;
  background: #eaf7f0;
}
.badge.warming {
  color: #bd9455;
  background: #fcf3e5;
}
.badge.connected {
  color: #7e6fc9;
  background: #f0edfb;
}
.badge.new {
  color: #7196c4;
  background: #edf4fc;
}
.badge.archived,
.badge.attention {
  color: #b57b84;
  background: #faeef0;
}
.card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.country {
  color: var(--muted);
  font-size: 11px;
}
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 13px;
  font-size: 10px;
  color: var(--muted);
  gap: 6px;
}
.card-bottom span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-bottom svg {
  width: 12px;
  height: 12px;
}
.source-note {
  margin: 23px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  color: #a0a6b2;
  line-height: 1.6;
  text-align: center;
}
.source-note svg {
  width: 13px;
  height: 13px;
}
.tabbar {
  position: fixed;
  z-index: 10;
  bottom: calc(20px + var(--safe));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  padding: 8px;
  gap: 5px;
  border: 1px solid #ffffffdd;
  border-radius: 26px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow:
    0 12px 48px #22244317,
    0 2px 8px #ffffff66 inset;
  max-width: calc(100% - 28px);
  width: 490px;
}
.tabbar { width: 560px; }
.tab {
  border: 0;
  background: none;
  color: #9296a5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 19px;
  min-height: 56px;
  flex: 1;
  padding: 8px 3px;
  min-width: 0;
  font-size: 9px;
  font-weight: 600;
}
.tab svg {
  width: 20px;
  height: 20px;
}
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 430px) {
  .tabbar { width: calc(100% - 20px); padding: 7px 5px; gap: 3px; }
  .tab { font-size: 8.5px; padding: 7px 1px; min-height: 52px; }
  .tab svg { width: 19px; height: 19px; }
}
.tab.active {
  background: var(--soft);
  color: var(--purple);
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 23px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.panel-head h2 {
  font-size: 17px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border: 0;
  padding-bottom: 0;
}
.row:first-child {
  padding-top: 0;
}
.row h3 {
  font-size: 13px;
  margin-bottom: 5px;
}
.row p {
  font-size: 11px;
  color: var(--muted);
}
.job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.job-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
}
.job-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 17px;
}
.job-head h3 {
  overflow-wrap: anywhere;
  font-size: 14px;
}
.job-meta {
  font-size: 11px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}
.job-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.job-foot .button {
  font-size: 11px;
  padding: 8px 12px;
  min-height: 38px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
}
.intro {
  background: linear-gradient(120deg, #ebe7ff, #f2f0ff 65%, #eaf4f3);
  border-radius: 23px;
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.intro h2 {
  font-size: 26px;
  max-width: 360px;
  line-height: 1.25;
}
.intro p {
  font-size: 12px;
  color: #88829f;
  margin-top: 10px;
  max-width: 380px;
}
.intro .orb {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 30px solid #a99bd529;
  border-radius: 50%;
  right: -35px;
  top: -35px;
}
.chart {
  width: 100%;
  height: 190px;
  display: block;
  overflow: visible;
}
.chart-wrap {
  margin: 10px 0 7px;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  padding-top: 12px;
}
.chart svg {
  width: 100%;
}
.chart-empty {
  padding: 45px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.progress-track {
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.progress-track i {
  display: block;
  background: #9786ea;
  height: 100%;
  border-radius: 4px;
}
.activity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.activity:last-child {
  border: 0;
}
.activity .avatar {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  font-size: 12px;
}
.activity h3 {
  font-size: 12px;
  margin-bottom: 4px;
}
.activity p {
  font-size: 10px;
  color: var(--muted);
}
.activity time {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.warning {
  background: #fff7e9;
  color: #a38b5f;
  font-size: 12px;
  padding: 13px 16px;
  border-radius: 13px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.notice {
  background: var(--soft);
  color: #8a7ab9;
  font-size: 12px;
  padding: 14px 16px;
  border-radius: 13px;
  line-height: 1.65;
}
.empty {
  text-align: center;
  padding: 50px 20px;
}
.empty-symbol {
  font-size: 50px;
  color: #b3a7df;
  margin-bottom: 15px;
}
.empty p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.boot {
  min-height: 85dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 32px;
  gap: 18px;
}
.boot h1 {
  font-size: 33px;
}
.boot p {
  color: var(--muted);
  font-size: 13px;
  max-width: 330px;
}
.boot .brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 48px;
}
.boot .brand-mark span {
  font-size: 24px;
  right: 10px;
}
.spinner {
  height: 20px;
  width: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  transform: translate(-50%, 15px);
  bottom: calc(110px + var(--safe));
  padding: 13px 20px;
  border-radius: 14px;
  background: #272936ed;
  color: #fff;
  box-shadow: 0 8px 30px #2222;
  font-size: 12px;
  max-width: 90%;
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--card);
  color: var(--text);
  width: min(500px, calc(100% - 28px));
  max-height: 86dvh;
  box-shadow: 0 30px 100px #17172d33;
}
dialog::backdrop {
  background: #25263855;
  backdrop-filter: blur(5px);
}
#sheet-content {
  padding: 24px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.sheet-head h2 {
  font-size: 20px;
}
.sheet-head .icon-button {
  border: 0;
  background: var(--bg);
}
.detail-hero {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}
.detail-hero .avatar {
  width: 58px;
  height: 58px;
  font-size: 21px;
}
.detail-list {
  margin: 20px 0;
}
.detail-list .row {
  font-size: 12px;
}
.detail-list .row > span:first-child {
  color: var(--muted);
}
.detail-list .row > span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 65%;
}
textarea {
  display: block;
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.65;
  margin: 16px 0;
}
.full {
  width: 100%;
  margin-top: 12px;
}
.file-input {
  font-size: 12px;
  max-width: 100%;
  margin: 17px 0;
}
.toggle {
  width: 42px;
  height: 26px;
  accent-color: var(--purple);
  flex-shrink: 0;
  cursor: pointer;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.version {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  text-align: center;
  margin-top: 26px;
}
.error-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fae9ee;
  color: #b7657a;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 12px;
  margin-bottom: 16px;
}
.error-bar button {
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  min-height: 36px;
}
.spaced {
  margin-top: 18px;
}
.muted-link {
  background: none;
  border: 0;
  color: var(--purple);
  font-size: 12px;
  min-height: 44px;
}
.count-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  display: inline-block;
  margin-right: 7px;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181a22;
  --card: #22252f;
  --text: #e7e8ef;
  --muted: #959bae;
  --line: #303440;
  --soft: #37304f;
  --glass: #252735bd;
  --shadow: none;
  background: var(--bg);
  color: var(--text);
}
[data-theme="dark"] .ambient {
  opacity: 0.07;
}
[data-theme="dark"] .tabbar {
  border-color: #46424f;
}
[data-theme="dark"] .intro {
  background: linear-gradient(120deg, #39314f, #2f2b40);
}
[data-theme="dark"] .badge {
  filter: saturate(0.7);
  opacity: 0.8;
}
[data-theme="dark"] .warning {
  background: #3d3425;
}
[data-theme="dark"] .danger {
  background: #3e2931;
}
@media (min-width: 1200px) {
  .shell {
    padding-top: 34px;
  }
  .account-grid {
    gap: 18px;
  }
  .account-card {
    padding: 22px;
  }
  .topbar {
    margin-bottom: 43px;
  }
}
@media (max-width: 760px) {
  .shell {
    padding: 20px 19px calc(122px + var(--safe));
  }
  .topbar {
    margin-bottom: 29px;
  }
  .brand {
    font-size: 18px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 27px;
  }
  .header-tools {
    gap: 12px;
  }
  .online {
    font-size: 10px;
  }
  .owner-avatar {
    width: 33px;
    height: 33px;
  }
  .page-head {
    margin-bottom: 23px;
  }
  h1 {
    font-size: 30px;
  }
  .page-head .button {
    font-size: 0;
    width: 44px;
    padding: 0;
    border-radius: 14px;
  }
  .page-head .button svg {
    width: 21px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 22px;
  }
  .metric {
    border-radius: 17px;
    padding: 16px;
  }
  .metric-value {
    font-size: 28px;
    margin-top: 9px;
  }
  .metric-top {
    font-size: 11px;
  }
  .metric-note {
    font-size: 10px;
  }
  .account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .account-card {
    padding: 14px;
    border-radius: 17px;
  }
  .card-top {
    gap: 8px;
    margin-bottom: 14px;
  }
  .avatar {
    height: 36px;
    width: 36px;
    border-radius: 12px;
    font-size: 12px;
  }
  .account-name {
    font-size: 12px;
  }
  .phone {
    font-size: 9px;
  }
  .card-top > .chevron {
    display: none;
  }
  .card-status {
    padding-bottom: 12px;
    gap: 3px;
  }
  .badge {
    font-size: 9px;
    padding: 4px 6px;
  }
  .country {
    font-size: 9px;
  }
  .card-bottom {
    font-size: 9px;
    padding-top: 11px;
  }
  .card-bottom svg {
    width: 11px;
  }
  .card-bottom .last-active {
    display: none;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar > select {
    max-width: 92px;
    font-size: 11px;
  }
  .chips {
    margin-bottom: 20px;
  }
  .chip {
    font-size: 11px;
    padding: 8px 11px;
  }
  .section-title {
    font-size: 13px;
  }
  .section-title span {
    font-size: 10px;
  }
  .tabbar {
    bottom: calc(13px + var(--safe));
    padding: 6px;
    gap: 2px;
    border-radius: 25px;
    width: 390px;
  }
  .tab {
    min-height: 58px;
    font-size: 9px;
    border-radius: 19px;
    gap: 6px;
  }
  .tab svg {
    height: 20px;
    width: 20px;
  }
  .two-col,
  .settings-grid,
  .job-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .job-grid {
    gap: 12px;
  }
  .panel {
    padding: 20px;
    border-radius: 19px;
  }
  .panel-head {
    align-items: flex-start;
  }
  .panel-head h2 {
    font-size: 15px;
  }
  .intro {
    padding: 25px 22px;
  }
  .intro h2 {
    font-size: 24px;
    max-width: 235px;
  }
  .intro p {
    max-width: 240px;
  }
  .chart {
    height: 160px;
  }
  .source-note {
    font-size: 9px;
    margin-top: 20px;
  }
  .subheading {
    font-size: 11px;
  }
  .settings-grid .row select {
    max-width: 143px;
    font-size: 11px;
  }
  .header-tools .icon-button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
  .header-tools .icon-button svg {
    width: 17px;
  }
}
@media (max-width: 360px) {
  .shell {
    padding-left: 14px;
    padding-right: 14px;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .online {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Real profile data and actionable reports. */
.avatar {
  position: relative;
  overflow: hidden;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.country {
  white-space: normal;
  text-align: right;
  line-height: 1.4;
}
.country-groups {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 0 0 17px;
  scrollbar-width: none;
}
.country-group {
  background: #f1f2f6;
  color: var(--text);
  border-radius: 10px;
  min-height: 40px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  white-space: nowrap;
  border: none;
}
.country-group b {
  color: var(--purple);
  font-size: 11px;
}
.country-group.active {
  background: #e7eaff;
}
.account-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.account-results > div {
  background: var(--bg);
  border-radius: 13px;
  padding: 14px;
  text-align: center;
}
.account-results strong {
  display: block;
  font-size: 23px;
}
.account-results span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.sync-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.sync-panel strong {
  font-size: 12px;
}
.sync-panel p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.job-purpose {
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  min-height: 35px;
}
.account-report {
  margin-top: 16px;
  max-height: 450px;
  overflow: auto;
}
.report-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  background: none;
  color: var(--text);
  font-size: 12px;
  min-height: 54px;
}
.report-row > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.report-row > span:last-child {
  text-align: right;
  flex-shrink: 0;
}
.report-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.report-row .error-text {
  color: #c76e83;
}
@media (max-width: 760px) {
  .country {
    font-size: 9px;
    max-width: 80px;
  }
  .card-status {
    align-items: start;
  }
  .account-card .avatar {
    height: 40px;
    width: 40px;
  }
  .sync-panel {
    gap: 16px;
  }
  .country-group {
    font-size: 11px;
  }
}

/* Список кампаний (вкладка «Абьюз») */
.campaign-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.campaign-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--bg);
}
.campaign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.campaign-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.campaign-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.campaign-schedule {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.campaign-stats { font-size: 12px; color: var(--text); margin-top: 4px; opacity: .85; }
.campaign-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }

/* ---- Направления ---- */
.dir-hero {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 14px;
  background: linear-gradient(135deg, #7764ed 0%, #9b6bf2 55%, #b06ff0 100%);
  color: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 14px 34px #7764ed2e;
  margin-bottom: 14px;
}
.dir-hero-main { display: flex; flex-direction: column; gap: 4px; }
.dir-hero-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .78; }
.dir-hero-value { font-size: 40px; font-weight: 750; line-height: 1; letter-spacing: -.02em; }
.dir-hero-sub { font-size: 12px; opacity: .9; }
.dir-bar { height: 6px; border-radius: 99px; background: #ffffff33; margin-top: 8px; overflow: hidden; }
.dir-bar i { display: block; height: 100%; background: #fff; border-radius: 99px; transition: width .4s; }
.dir-hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dir-hero .kpi { background: #ffffff1f; border-radius: 14px; padding: 8px 10px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.kpi-title { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dir-hero .kpi-title { color: #ffffffc2; }
.kpi-value { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.kpi-note { font-size: 11px; color: var(--muted); }
.dir-hero .kpi-note { color: #ffffffb8; }

.dir-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.dir-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.dir-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--dir-accent);
  opacity: .9;
}
.dir-top { display: flex; align-items: flex-start; gap: 10px; }
.dir-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--dir-accent) 14%, transparent);
  color: var(--dir-accent);
}
.dir-icon svg { width: 19px; height: 19px; }
.dir-name { flex: 1; min-width: 0; }
.dir-name h3 { margin: 0; font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
.dir-name p { margin: 3px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 620; white-space: nowrap; }
.chip.on { background: #e9f8ef; color: #1f8f4e; }
.chip.off { background: #f3f4f8; color: #868c9c; }
.chip.violet { background: #f1ecff; color: #6b4fd8; }
.dir-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: var(--muted); }
.dir-schedule { display: inline-flex; align-items: center; gap: 5px; }
.dir-schedule svg { width: 13px; height: 13px; }
.dir-nums { font-weight: 600; color: var(--text); }
.dir-hint { font-size: 11px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 6px 9px; }
.dir-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.dir-foot .button { min-height: 38px; padding: 8px 12px; font-size: 12px; border-radius: 12px; }
.dir-foot .button svg { width: 14px; height: 14px; }
.dir-limit { font-size: 10.5px; color: var(--muted); text-align: right; }

.queue { display: flex; flex-direction: column; gap: 8px; }
.queue-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.queue-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.queue-main strong { font-size: 13px; font-weight: 650; }
.queue-main .muted { font-size: 11px; }
.queue-row .button { min-height: 34px; padding: 6px 10px; font-size: 11.5px; border-radius: 10px; }

.ref-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.ref-list { display: flex; flex-direction: column; }
.ref-row { display: grid; grid-template-columns: 78px 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.ref-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.ref-src { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.ref-pay { font-weight: 650; }

.log-tail { max-height: 260px; overflow: auto; font-size: 10.5px; line-height: 1.5; color: var(--muted); background: var(--bg); border-radius: 12px; padding: 10px; margin: 8px 0 0; white-space: pre-wrap; }
details.panel > summary { cursor: pointer; font-weight: 650; font-size: 13px; }

.send-count { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.pick-list { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.pick:last-child { border-bottom: 0; }
.pick input { width: 18px; height: 18px; accent-color: var(--purple); flex-shrink: 0; }
.pick-avatar { width: 28px; height: 28px; border-radius: 9px; background: var(--soft); color: var(--purple); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.pick-body { display: flex; flex-direction: column; min-width: 0; }
.pick-name { font-size: 12.5px; font-weight: 600; }
.pick-meta { font-size: 11px; color: var(--muted); }

.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.plan-list { display: flex; flex-direction: column; max-height: 40vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.plan-row { display: grid; grid-template-columns: 46px 52px 74px 1fr; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 11.5px; align-items: center; }
.plan-row:last-child { border-bottom: 0; }
.plan-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-start { font-weight: 650; font-variant-numeric: tabular-nums; }
.plan-quota { color: var(--muted); }
.plan-scen { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-block { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.field-label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.field { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--text); background: var(--card); }
.field:focus { outline: 2px solid #7764ed33; border-color: var(--purple); }
.button.armed { background: #cc5668; }
.button.full { width: 100%; margin-top: 10px; }
@media (max-width: 620px) {
  .dir-hero { grid-template-columns: 1fr; }
  .dir-grid { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: 1fr 1fr; }
  .dir-hero-value { font-size: 34px; }
}

/* ---- Журнал жизни проекта ---- */
.log-panel { padding: 20px; }
.log-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.log-kpi { display: flex; flex-direction: column; gap: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 13px 15px; }
.log-kpi-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.log-kpi-value { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.log-kpi-note { font-size: 11px; color: var(--muted); }
.log-kpi.ok .log-kpi-value { color: #15803d; }
.log-kpi.error .log-kpi-value { color: #e11d48; }
.log-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 14px; }
.log-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.log-chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.log-chips.scroll::-webkit-scrollbar { display: none; }
.log-chip { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.log-chip.active { background: var(--purple); border-color: transparent; color: #fff; }
.log-panel .log-chips + .log-chips, .log-panel .log-chips + .log-chips.scroll { margin-top: 8px; }
.log-search { width: 100%; margin-top: 12px; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 11px 14px; font: inherit; font-size: 13px; color: var(--text); }
.log-search:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
.log-feed-wrap { display: flex; flex-direction: column; gap: 8px; }
.log-feed { display: flex; flex-direction: column; gap: 8px; }
.log-day { position: sticky; top: 6px; z-index: 2; align-self: flex-start; margin: 14px 0 2px; padding: 5px 12px; border-radius: 999px; background: #ffffffee; border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--muted); backdrop-filter: blur(10px); }
.log-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line); border-left: 3px solid #d7dbe4; border-radius: 15px; padding: 11px 14px; cursor: pointer; }
.log-row.ok { border-left-color: #22c55e; }
.log-row.error { border-left-color: #f43f5e; }
.log-row.recorded { border-left-color: #94a3b8; }
.log-row.open { box-shadow: 0 8px 24px #22244312; }
.log-time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 1px; }
.log-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13.5px; line-height: 1.35; }
.log-country { font-size: 13px; }
.log-act { color: var(--muted); }
.log-target { color: var(--purple); font-size: 12.5px; }
.log-sub { margin-top: 3px; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.log-error { margin-top: 5px; font-size: 12px; color: #e11d48; word-break: break-word; }
.log-badge { font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--soft); color: #5b616e; white-space: nowrap; }
.log-badge.ok { background: #e8f8ee; color: #15803d; }
.log-badge.error { background: #fdecef; color: #be123c; }
.log-detail { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; cursor: default; }
.log-pair { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px; font-size: 12px; padding: 3px 0; }
.log-pair dt { color: var(--muted); }
.log-pair dd { margin: 0; word-break: break-word; }
.log-raw { margin-top: 10px; }
.log-raw summary { cursor: pointer; font-size: 12px; color: var(--purple); font-weight: 600; }
.log-raw pre { margin: 8px 0 0; padding: 12px; border-radius: 12px; background: #12141c; color: #d7dce8; font-size: 11px; line-height: 1.5; overflow: auto; max-height: 260px; }
.log-more { margin: 12px 0 18px; }
.log-hint { font-size: 12.5px; }
.log-src-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.log-src-row b { display: block; font-size: 13px; }
.log-src-row .muted { font-size: 11.5px; }
.log-src-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex: none; }
.log-src-row.missing .log-src-dot { background: #f43f5e; }
.log-src-last { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.log-jobs-title { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.log-job { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.log-job-main b { display: block; font-size: 12.5px; font-weight: 650; }
.log-job-main .muted { font-size: 11.5px; }
.log-job.off { opacity: .55; }
.log-job-times { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.log-job-status { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 999px; background: var(--soft); }
.log-job-status.ok { background: #e8f8ee; color: #15803d; }
.log-job-status.error, .log-job-status.failed { background: #fdecef; color: #be123c; }
@media (max-width: 720px) {
  .log-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-panel { padding: 16px; }
  .log-row { grid-template-columns: 52px minmax(0, 1fr) auto; padding: 10px 12px; }
  .log-pair { grid-template-columns: 104px minmax(0, 1fr); }
  .log-tools { flex-direction: column; }
}

/* ─────────── Design system 2.0 (Inter, Linear-style) ─────────── */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
b, strong { font-weight: 650; }
.num, .log-kpi-value, .metric b, .stat b { font-variant-numeric: tabular-nums; }

/* Период: сегментированный контрол */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  padding: 3px;
  background: #f1f2f6;
  border-radius: 12px;
}
.segmented-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: -0.01em;
  padding: 8px 6px;
  border-radius: 9px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.segmented-item.active {
  background: #fff;
  color: #16181d;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 1px rgba(16, 24, 40, 0.04);
}
.segmented-item:active { transform: scale(0.98); }

/* Фильтры-селекты */
.log-filterbar { display: grid; gap: 10px; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-select {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.filter-select svg { width: 15px; height: 15px; color: #9ca3af; margin-left: auto; transform: rotate(90deg); }
.filter-select .filter-caption { display: block; font-size: 10.5px; line-height: 1.2; color: #8a8f98; font-weight: 500; }
.filter-select .filter-value { display: block; font-size: 13px; line-height: 1.3; color: #16181d; font-weight: 570; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.filter-select .filter-caption + .filter-value { margin-top: 1px; }
.filter-select > span:first-child { min-width: 0; }
.filter-select.picked { border-color: #c9cdf7; background: #f7f8ff; }
.filter-select.picked svg { color: var(--purple); }

/* Поиск */
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  height: 44px;
  background: #f5f6f9;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.search-field:focus-within { background: #fff; border-color: #c9cdf7; }
.search-field svg { width: 17px; height: 17px; color: #9ca3af; }
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}
.search-field input::placeholder { color: #9ca3af; }

/* KPI лога */
.log-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.log-kpi {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  background: #fafbfc;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  min-width: 0;
}
.log-kpi-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8f98; }
.log-kpi-value { font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-kpi-note { font-size: 11.5px; color: #8a8f98; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-kpi.ok .log-kpi-value { color: #15803d; }
.log-kpi.error .log-kpi-value { color: #e11d48; }

/* Шторка-список */
.sheet-list { display: grid; gap: 2px; margin: -4px -4px 0; }
.sheet-option {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
}
.sheet-option.active { background: #f1f2ff; color: var(--purple); font-weight: 600; }
.sheet-option .check { font-size: 14px; color: var(--purple); }
.sheet-option:active { background: #f5f6f9; }

/* Лента лога — чище */
.log-panel { display: grid; gap: 14px; }
.log-row { border-radius: 14px; }
.log-row .log-title b { font-weight: 620; }
.log-badge { font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; padding: 4px 8px; }
.log-day { font-size: 11.5px; letter-spacing: 0.05em; }

/* Дашборд: распределение по направлениям */
.deploy-panel { display: grid; gap: 14px; }
.deploy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deploy-card {
  appearance: none;
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.deploy-card:active { transform: scale(0.985); }
.deploy-card:hover { border-color: #d7d9e3; box-shadow: var(--shadow); }
.deploy-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.deploy-title { font-size: 12px; font-weight: 600; color: #6b7280; letter-spacing: -0.01em; }
.deploy-num { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; color: #16181d; font-variant-numeric: tabular-nums; }
.deploy-people { display: flex; align-items: center; gap: 4px; min-height: 28px; }
.deploy-person {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 650; color: #fff;
  background: linear-gradient(135deg, #7c86e8, #5e6ad2);
  border: 2px solid #fff; margin-left: -7px;
}
.deploy-person:first-child { margin-left: 0; }
.deploy-card.dir-passive .deploy-person { background: linear-gradient(135deg, #4ecdc4, #2ba9a0); }
.deploy-card.dir-masslook .deploy-person { background: linear-gradient(135deg, #f5a623, #e08c00); }
.deploy-card.dir-quests .deploy-person { background: linear-gradient(135deg, #b07cf5, #8b5cf6); }
.deploy-card.dir-warmup .deploy-person { background: linear-gradient(135deg, #7c86e8, #5e6ad2); }
.deploy-more { font-size: 11px; font-weight: 600; color: #6b7280; margin-left: 2px; }
.deploy-empty { font-size: 11.5px; color: #9ca3af; }
.deploy-legend { font-size: 11px; color: #9ca3af; }

/* Кто в направлении — карточка */
.dir-crew { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; }
.dir-crew-avatars { display: flex; align-items: center; min-height: 24px; }
.dir-crew-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 650; color: #fff; letter-spacing: -0.01em;
  background: linear-gradient(135deg, #7c86e8, #5e6ad2);
  border: 2px solid #fff; margin-left: -4px;
}
.dir-crew-avatar:first-child { margin-left: 0; }
.dir-crew-more { font-size: 10.5px; font-weight: 600; color: #6b7280; margin-left: 3px; }
.dir-crew-empty { font-size: 11px; color: #9ca3af; }
.dir-crew-count { font-size: 11px; color: #8a8f98; font-weight: 550; white-space: nowrap; }

/* Модели */
.model-panel { display: grid; gap: 12px; }
.model-panel .panel-head { margin-bottom: 0; }
.model-list { display: grid; gap: 8px; }
.model-option {
  appearance: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.model-option.active { border-color: #c9cdf7; background: #f7f8ff; }
.model-text { display: grid; gap: 2px; min-width: 0; }
.model-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.model-tag { font-size: 9.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--purple); background: #eef0fe; border-radius: 6px; padding: 2px 5px; }
.model-note { font-size: 12px; color: var(--muted); line-height: 1.35; }
.model-id { font-size: 10.5px; color: #9ca3af; }
.model-check { color: var(--purple); font-size: 15px; line-height: 1.2; }
.model-effort-head { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #8a8f98; }
.effort-row { display: grid; grid-auto-flow: column; gap: 6px; }
.effort-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--muted);
}
.effort-chip.active { border-color: #c9cdf7; background: #f1f2ff; color: var(--purple); font-weight: 600; }

/* Десктоп: боковая навигация вместо нижней пилюли */
.deploy-names { font-size: 11.5px; color: #6b7280; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Шторка и формы 2.0 ---- */
dialog {
  max-height: min(92dvh, 820px);
  overflow: hidden;
  border-radius: 22px;
}
#sheet-content {
  max-height: min(92dvh, 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 22px calc(20px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
.sheet-head { margin-bottom: 18px; align-items: flex-start; }
.sheet-title { display: grid; gap: 3px; min-width: 0; }
.sheet-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.025em; }
.sheet-note { font-size: 12px; color: var(--muted); }
.sheet-head .icon-button.sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: #f3f4f7;
  color: #8a8f98;
  font-size: 20px;
  line-height: 1;
}
.sheet-head .icon-button.sheet-close:active { background: #e9eaf0; }

.ff { display: grid; gap: 6px; margin: 0; }
.ff-label { font-size: 12px; font-weight: 550; color: #4b5563; letter-spacing: 0; text-transform: none; }
.ff-control {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ff-control:focus-within { border-color: #b9bef0; box-shadow: 0 0 0 3px #5e6ad215; }
.ff-control .field {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
}
.ff-control .field:focus { outline: none; box-shadow: none; }
.ff-control .field::placeholder { color: #b6bac4; font-weight: 450; }
.ff-suffix { font-size: 13px; color: #9ca3af; }
.ff-hint { font-size: 11px; color: #a0a5b0; }
.ff-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 12px; }
.ff-grid-2 { grid-template-columns: 1fr 1fr; }
.ff-section { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #8a8f98; margin: 16px 0 8px; }
.ff-summary {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f8fa;
}
.ff-stat { font-size: 12.5px; font-weight: 550; color: #4b5563; font-variant-numeric: tabular-nums; }
.ff-stat.negative { color: #c2415b; }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="date"] { font-family: inherit; }

.button.full { margin-top: 16px; min-height: 46px; border-radius: 12px; font-size: 14.5px; font-weight: 600; }
.button.full:disabled { opacity: .6; }

@media (max-width: 430px) {
  #sheet-content { padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
  .ff-grid, .ff-grid-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ff-grid:first-of-type { grid-template-columns: 1fr 1fr; }
  .ff-hint { font-size: 10.5px; }
}
.sheet-head .icon-button.sheet-close:focus { outline: none; }
.sheet-head .icon-button.sheet-close:focus-visible { outline: none; box-shadow: inset 0 0 0 1px #d9dbe6; }
#sheet-content > .button.full {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 14px;
  box-shadow: 0 -16px 20px -16px rgba(255, 255, 255, .98);
}
.sheet-head { margin-bottom: 14px; }
.ff-section { margin: 12px 0 7px; }
@media (min-width: 700px) and (max-height: 720px) {
  .ff-hint { display: none; }
  .ff-control { height: 42px; }
  .ff-section { margin: 10px 0 6px; }
  .sheet-note { display: none; }
  .sheet-head { margin-bottom: 10px; }
}
input[type="checkbox"] { accent-color: #5e6ad2; width: 18px; height: 18px; margin: 0; }
.pick-body { min-width: 0; }
.pick-name { font-weight: 560; }
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1.5px solid #d3d6e0;
  border-radius: 5px;
  background: #fff;
  position: relative;
  transition: background .12s ease, border-color .12s ease;
}
input[type="checkbox"]:checked { background: #5e6ad2; border-color: #5e6ad2; }
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sheet-list { display: grid; gap: 2px; margin: -4px -4px 0; }
.sheet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: background .12s ease;
}
.sheet-option:hover, .sheet-option:active { background: #f6f7fa; }
.sheet-option.active { background: #f2f3fb; }
.sheet-option-icon {
  width: 36px; height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid; place-items: center;
  background: #f3f4f7;
  color: #5b6472;
}
.sheet-option-icon svg { width: 18px; height: 18px; }
.sheet-option.active .sheet-option-icon { background: #e8eafb; color: #5e6ad2; }
.sheet-option-body { display: grid; gap: 1px; flex: 1; min-width: 0; }
.sheet-option-body b { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.sheet-option-body span { font-size: 11.5px; color: #8a8f98; }
.sheet-option-arrow { color: #c3c7d1; display: grid; place-items: center; }
.sheet-option-arrow svg { width: 16px; height: 16px; }
.pick-group { display: grid; }
.pick-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8a8f98;
}
.pick-group-head:first-child { padding-top: 4px; }
.pick-group-num {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f2f6;
  color: #6b7280;
  font-size: 10px;
  text-align: center;
  letter-spacing: 0;
}
.pick-busy {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f8fa;
}
.pick-busy-title { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a8f98; }
.pick-busy-line { font-size: 12.5px; color: #4b5563; font-variant-numeric: tabular-nums; }
