:root {
  --ink: #151712;
  --muted: #72766b;
  --paper: #f2f0e8;
  --card: #fbfaf5;
  --line: #dcd9cf;
  --acid: #d7ff4f;
  --acid-deep: #b9ec11;
  --green: #243e2e;
  --rust: #bd5a36;
  --shadow: 0 24px 60px rgba(31, 35, 25, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(215, 255, 79, 0.14), transparent 28rem),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  min-height: 100vh;
  background: var(--paper);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  width: 100%;
  padding: 10vh clamp(28px, 7vw, 110px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--ink);
  background: var(--acid);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.eyebrow {
  margin: 28px 0 10px;
  color: #717568;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.login-panel h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 7vw, 98px);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.login-copy {
  max-width: 430px;
  margin: 30px 0 38px;
  color: #555a50;
  font-size: 17px;
  line-height: 1.8;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.stack-form label {
  font-size: 12px;
  font-weight: 800;
}

.stack-form input,
.search-input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  background: white;
  padding: 15px 16px;
  color: var(--ink);
}

.stack-form input:focus,
.search-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(215, 255, 79, 0.45);
}

.manual-source-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.manual-source-form input {
  min-width: 0;
  border: 1px solid var(--line);
  outline: none;
  background: white;
  padding: 11px 12px;
  font-size: 12px;
}

.button {
  border: 1px solid transparent;
  padding: 13px 18px;
  background: transparent;
  color: inherit;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.button.primary {
  background: var(--ink);
  color: white;
}

.button.primary:hover {
  background: #2d3128;
}

.button.light {
  border-color: rgba(255, 255, 255, 0.55);
  color: white;
}

.button.outline {
  border-color: var(--line);
  background: var(--card);
}

.button.ghost {
  color: var(--muted);
}

.button.wide {
  width: 100%;
}

.button.compact {
  padding: 9px 13px;
  font-size: 12px;
}

.form-error,
.inline-message {
  min-height: 20px;
  margin: 0;
  color: var(--rust);
  font-size: 12px;
  line-height: 1.5;
}

.privacy-note {
  margin-top: 30px;
  color: #989b92;
  font-size: 11px;
}

.login-aside {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #11130f;
}

.login-aside > p {
  position: absolute;
  right: 34px;
  bottom: 28px;
  margin: 0;
  color: rgba(255, 255, 255, 0.34);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.15em;
  text-align: right;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
}

.orb-one {
  width: 380px;
  height: 380px;
  top: -100px;
  right: -70px;
  background: rgba(215, 255, 79, 0.18);
}

.orb-two {
  width: 300px;
  height: 300px;
  bottom: -120px;
  left: -80px;
  background: rgba(189, 90, 54, 0.18);
}

.scan-frame {
  position: relative;
  width: min(48vw, 410px);
  aspect-ratio: 0.82;
  background:
    radial-gradient(ellipse at center 42%, #343a2f 0 16%, transparent 17%),
    radial-gradient(ellipse at center 76%, #292e26 0 25%, transparent 26%),
    linear-gradient(145deg, #20231d, #12140f);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55);
}

.scan-frame span {
  position: absolute;
  width: 58px;
  height: 58px;
  border-color: var(--acid);
  border-style: solid;
}

.scan-frame span:nth-child(1) {
  top: 18px;
  left: 18px;
  border-width: 2px 0 0 2px;
}

.scan-frame span:nth-child(2) {
  top: 18px;
  right: 18px;
  border-width: 2px 2px 0 0;
}

.scan-frame span:nth-child(3) {
  bottom: 18px;
  right: 18px;
  border-width: 0 2px 2px 0;
}

.scan-frame span:nth-child(4) {
  bottom: 18px;
  left: 18px;
  border-width: 0 0 2px 2px;
}

.scan-line {
  position: absolute;
  top: 30%;
  right: 24px;
  left: 24px;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 18px var(--acid);
  animation: scan 3.4s ease-in-out infinite alternate;
}

@keyframes scan {
  from { transform: translateY(0); }
  to { transform: translateY(230px); }
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(220, 217, 207, 0.8);
  backdrop-filter: blur(16px);
  background: rgba(242, 240, 232, 0.88);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.topbar-actions,
.account-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-link {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.top-link:hover {
  color: var(--ink);
}

.account-pill {
  color: var(--muted);
  font-size: 12px;
}

.account-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5a89e;
  content: "";
}

.account-pill.connected::before {
  background: #4f9f61;
  box-shadow: 0 0 0 4px rgba(79, 159, 97, 0.12);
}

.dashboard {
  width: min(1440px, 100%);
  margin: auto;
  padding: clamp(32px, 6vw, 88px) clamp(20px, 4vw, 64px) 100px;
}

.hero-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
}

.hero-row .eyebrow {
  margin-top: 0;
}

.hero-row h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5.3vw, 78px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.hero-row h1 em {
  color: #68705e;
  font-weight: 400;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding-bottom: 10px;
}

.hero-status strong,
.hero-status small {
  display: block;
}

.hero-status strong {
  font-size: 13px;
}

.hero-status small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.status-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--acid-deep);
  box-shadow: 0 0 0 7px rgba(185, 236, 17, 0.13);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 0.65fr)) minmax(260px, 1.35fr);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 150px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.metric-card:last-child {
  border-right: 0;
}

.metric-card > span,
.metric-card > div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.metric-card > strong,
.metric-card > div > strong {
  display: block;
  margin: 18px 0 4px;
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 500;
}

.metric-card small {
  color: #989b92;
  font-size: 10px;
}

.metric-card.accent {
  background: var(--acid);
}

.metric-card.accent span,
.metric-card.accent small {
  color: #34382e;
}

.telegram-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--green);
  color: white;
}

.telegram-card > div > strong {
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 24px;
  border: 1px solid var(--line);
  background: rgba(251, 250, 245, 0.72);
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.workflow-step:last-child {
  border-right: 0;
}

.workflow-step > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.workflow-step.complete > span {
  border-color: var(--ink);
  background: var(--acid);
  color: var(--ink);
}

.workflow-step strong,
.workflow-step small {
  display: block;
}

.workflow-step strong {
  font-size: 12px;
}

.workflow-step small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.75fr) minmax(420px, 1.25fr);
  gap: 24px;
  margin-top: 24px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.system-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--card);
}

.system-card .eyebrow {
  margin-top: 0;
}

.system-card h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 500;
}

.system-card > p:not(.eyebrow) {
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.system-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e9e7df;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.status-badge.active {
  background: var(--acid);
  color: var(--ink);
}

.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.code-line code {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-card > .button {
  margin-top: 14px;
}

.bot-user-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin: 20px 0;
}

.bot-user-form input {
  min-width: 0;
  border: 1px solid var(--line);
  outline: none;
  background: white;
  padding: 12px;
  font-size: 12px;
}

.bot-user-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(215, 255, 79, 0.45);
}

.authorized-user-list {
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
}

.authorized-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.authorized-user-row:last-child {
  border-bottom: 0;
}

.authorized-user-row strong,
.authorized-user-row small {
  display: block;
}

.authorized-user-row strong {
  font-size: 13px;
}

.authorized-user-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.progress-track {
  height: 7px;
  margin-top: 28px;
  overflow: hidden;
  background: #e7e5dd;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--acid-deep);
  transition: width 400ms ease;
}

.progress-track span.active {
  width: 72%;
  animation: progress-pulse 2s ease-in-out infinite alternate;
}

@keyframes progress-pulse {
  from { transform: translateX(-25%); }
  to { transform: translateX(40%); }
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 15px;
  color: #565a51;
  font-size: 10px;
  line-height: 1.5;
}

.feature-list li::before {
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid-deep);
  content: "";
}

.panel {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading {
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading .eyebrow,
.section-heading .eyebrow {
  margin: 0 0 5px;
}

.panel-heading h2,
.section-heading h2,
.modal h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.step-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
}

.search-panel {
  padding-bottom: 26px;
}

.search-panel > .button,
.search-panel > .inline-message {
  width: calc(100% - 52px);
  margin-right: 26px;
  margin-left: 26px;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 250px;
  margin: 26px;
  border: 1px dashed #b9bcb1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.62)),
    repeating-linear-gradient(45deg, transparent 0 12px, #f0efe8 12px 24px);
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease;
}

.dropzone.dragging {
  border-color: var(--ink);
  background: rgba(215, 255, 79, 0.15);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dropzone strong {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 500;
}

.dropzone small {
  margin-top: -16px;
  color: var(--muted);
}

.upload-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 22px;
}

.file-chip {
  max-width: 80%;
  overflow: hidden;
  padding: 6px 9px;
  background: #e9e7df;
  color: #777a71;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone:has(input:focus-visible) {
  outline: 3px solid rgba(185, 236, 17, 0.5);
  outline-offset: 3px;
}

.source-list {
  max-height: 470px;
  overflow: auto;
}

.source-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 19px 24px;
  border-bottom: 1px solid var(--line);
}

.source-row:last-child {
  border-bottom: 0;
}

.source-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e8e9e2;
  color: #5e6558;
  font-size: 12px;
  font-weight: 900;
}

.source-row.scanning .source-icon {
  background: var(--acid);
}

.source-copy {
  min-width: 0;
}

.source-copy strong,
.source-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-copy strong {
  font-size: 14px;
}

.source-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.source-actions {
  display: flex;
  gap: 5px;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.icon-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.empty-state {
  padding: 60px 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 500;
}

.results-section {
  margin-top: 70px;
}

.section-heading {
  margin-bottom: 22px;
}

.result-summary {
  color: var(--muted);
  font-size: 12px;
}

.results-list {
  display: grid;
  gap: 34px;
}

.face-group > h3 {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.match-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}

.match-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #deddd6;
}

.match-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 7px 9px;
  background: var(--acid);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 900;
}

.match-copy {
  padding: 15px;
}

.match-copy strong,
.match-copy small {
  display: block;
}

.match-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-copy small {
  margin: 6px 0 13px;
  color: var(--muted);
}

.match-copy a {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.review-notice {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-left: 3px solid var(--rust);
  background: rgba(189, 90, 54, 0.08);
  color: var(--rust);
  font-size: 11px;
  line-height: 1.6;
}

.feedback-row {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.feedback-button {
  flex: 1;
  padding: 7px;
  border: 1px solid var(--line);
  background: #f5f4ee;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.feedback-button.selected-good {
  border-color: #4f9f61;
  background: rgba(79, 159, 97, 0.12);
  color: #367344;
}

.feedback-button.selected-bad {
  border-color: var(--rust);
  background: rgba(189, 90, 54, 0.1);
  color: var(--rust);
}

.modal {
  width: min(92vw, 500px);
  max-height: 86vh;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 34px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

.modal::backdrop {
  background: rgba(17, 19, 15, 0.72);
  backdrop-filter: blur(5px);
}

.modal .eyebrow {
  margin-top: 0;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  background: #eceae3;
  font-size: 20px;
}

.modal-copy {
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.qr-stage {
  display: grid;
  place-items: center;
  min-height: 292px;
  margin: 18px 0;
  background: white;
}

.qr-stage img {
  width: 260px;
  height: 260px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dedfd8;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.spinner.small {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.source-modal {
  width: min(92vw, 620px);
}

.dialog-list {
  max-height: 350px;
  margin: 14px 0 20px;
  overflow: auto;
  border: 1px solid var(--line);
}

.dialog-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.dialog-row:last-child {
  border-bottom: 0;
}

.dialog-row:hover {
  background: #f2f1eb;
}

.dialog-row input {
  accent-color: var(--ink);
}

.dialog-row span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-row small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .telegram-card {
    grid-column: 1 / -1;
    min-height: 110px;
  }

  .metric-card:nth-child(3) {
    border-right: 0;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .system-grid {
    grid-template-columns: 1fr 1fr;
  }


  .source-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-panel {
    min-height: 100vh;
    padding: 60px 28px;
  }

  .login-aside {
    display: none;
  }

  .topbar {
    min-height: 64px;
  }

  .account-pill,
  .topbar .button,
  .top-link {
    font-size: 0;
  }

  .account-pill::before {
    width: 9px;
    height: 9px;
  }

  .topbar .button::after {
    content: "退出";
    font-size: 11px;
  }

  .dashboard {
    padding-top: 48px;
  }

  .hero-row {
    display: block;
  }

  .hero-status {
    margin-top: 28px;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card {
    min-height: 130px;
  }

  .metric-card:nth-child(2) {
    border-right: 0;
  }

  .metric-card:nth-child(3) {
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .telegram-card {
    grid-column: auto;
    align-items: start;
    border-top: 1px solid var(--line);
  }

  .telegram-card > div > strong {
    font-size: 15px;
  }

  .telegram-card .button {
    padding: 7px;
    white-space: nowrap;
  }

  .workflow-strip,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .workflow-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-step:last-child {
    border-bottom: 0;
  }


  .bot-user-form {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .panel-heading .button {
    max-width: 140px;
  }

  .source-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .source-actions {
    grid-column: 2;
  }

  .modal {
    padding: 28px 20px;
  }
}
