:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --text: #1f2933;
  --muted: #64707d;
  --line: #d8dee6;
  --panel: #ffffff;
  --accent: #0b72e7;
  --accent-hover: #075fc4;
  --ok: #0f7b52;
  --warn: #9a6400;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(31, 41, 51, 0.12);
  padding: 24px;
}

.auth-card h1 {
  margin-bottom: 6px;
}

.auth-logo {
  margin-bottom: 10px;
}

.auth-logo img {
  display: block;
  width: 186px;
  height: auto;
}

.legal-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 2px 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.legal-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.legal-consent a {
  color: var(--accent);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.legal-consent a:hover {
  color: var(--accent-hover);
}

.cabinet-brand img {
  display: block;
  width: 194px;
  height: auto;
  margin-bottom: 6px;
}

.auth-card p {
  color: var(--muted);
}

.auth-actions,
.top-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-actions button {
  flex: 1;
}

.auth-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.auth-link-button {
  justify-self: center;
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 850;
  text-decoration: none;
}

.auth-link-button:hover {
  color: var(--accent-hover);
  background: transparent;
  text-decoration: underline;
}

.auth-status {
  min-height: 22px;
  color: var(--muted);
  font-weight: 750;
}

.auth-status.warn {
  color: var(--warn);
}

.auth-status.error {
  color: var(--error);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-visibility {
  position: absolute;
  top: 50%;
  right: 5px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.password-visibility:hover {
  background: #eef5ff;
}

.password-eye {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
  margin: auto;
  border: 2px solid currentColor;
  border-radius: 16px / 12px;
}

.password-eye::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.password-visibility.is-visible .password-eye::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 5px;
  left: -3px;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-35deg);
}

.layout {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.tabs-panel,
.panel,
.add-source-panel,
.summary,
.results,
.status-band {
  border: 1px solid var(--line);
  background: var(--panel);
}

.tabs-panel {
  padding: 18px 18px 14px;
  margin-bottom: 16px;
}

.tabs-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.tabs-head > div:first-child {
  min-width: 0;
}

.top-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.wallet-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

#logout-button {
  white-space: nowrap;
}

.notifications-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #243244;
  text-decoration: none;
}

.notifications-button:hover {
  border-color: rgba(11, 114, 231, 0.45);
  background: #eef6ff;
  color: #075fc4;
}

.notifications-button svg {
  width: 22px;
  height: 22px;
}

.top-news-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #243244;
  padding: 0 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.top-news-button:hover {
  border-color: rgba(11, 114, 231, 0.45);
  background: #eef6ff;
  color: #075fc4;
}

.news-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ff4053;
  color: #ffffff;
  padding: 0 5px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.user-public-id {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  background: #eef6ff;
  color: #075fc4;
  padding: 0 12px;
  font-weight: 900;
  white-space: nowrap;
}

.wallet-button strong {
  font-size: 16px;
}

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.account-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
}

.account-tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.account-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #66758a;
  font-size: 16px;
  line-height: 1;
}

.account-tab-close:hover {
  background: rgba(196, 48, 43, 0.12);
  color: #b42318;
}

.account-tab-leads-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(98, 20, 54, 0.32);
  background: #f57aa8;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 2px 6px rgba(168, 45, 92, 0.28);
  pointer-events: none;
  -webkit-text-stroke: 0.35px rgba(0, 0, 0, 0.78);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.55),
    1px 0 0 rgba(0, 0, 0, 0.42),
    -1px 0 0 rgba(0, 0, 0, 0.42);
}

.account-tab:hover {
  background: #eef6ff;
}

.account-tab.active {
  border-color: rgba(11, 114, 231, 0.42);
  background: #e8f2ff;
  color: #075fc4;
}

.account-tab-working {
  position: relative;
  border-color: rgba(20, 164, 104, 0.42);
  background: linear-gradient(180deg, #effff7 0%, #e2faee 100%);
  color: #087149;
  box-shadow: inset 0 0 0 1px rgba(20, 164, 104, 0.08);
}

.account-tab-working:hover {
  background: linear-gradient(180deg, #e6fff2 0%, #d8f7e8 100%);
}

.account-tab-working.active {
  border-color: rgba(20, 164, 104, 0.72);
  background: linear-gradient(180deg, #dffbea 0%, #cff4df 100%);
  color: #06623e;
}

.account-tab-scheduled::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 3px;
  border-radius: 999px;
  background: #e23b35;
}

.account-tab-plus {
  justify-content: center;
  width: 38px;
  min-width: 38px;
  padding: 0;
  font-size: 24px;
}

.account-form-panel.collapsed form {
  display: none;
}

.account-subtitle {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.account-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.account-form-panel:not(.collapsed) .account-summary-metrics {
  display: none;
}

.account-bulk-bids {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #cfe1f3;
  border-radius: 8px;
  background: #f7fbff;
}

.account-form-panel:not(.collapsed) .account-bulk-bids {
  display: none;
}

.account-bulk-bids-title {
  margin-right: 8px;
  color: #1f2a37;
  font-size: 14px;
}

.account-bulk-bids-category,
.account-bulk-bids-price {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 8px 0 10px;
  border: 1px solid #cfe1f3;
  border-radius: 8px;
  background: #fff;
  color: #607085;
  font-size: 14px;
}

.account-bulk-bids-category select {
  width: min(272px, 34vw);
  min-height: 30px;
  padding: 3px 4px;
  border: 0;
  background: transparent;
  color: #1f2a37;
  font-weight: 700;
  font-size: 14px;
}

.account-bulk-bids-price input {
  flex: 0 0 4.5ch;
  inline-size: 4.5ch;
  width: 4.5ch;
  min-width: 4.5ch;
  max-width: 4.5ch;
  min-height: 30px;
  padding: 3px 2px;
  border: 0;
  background: transparent;
  font-weight: 700;
  appearance: textfield;
}

.account-bulk-bids-price input::-webkit-inner-spin-button,
.account-bulk-bids-price input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.account-bulk-bids-category select:focus,
.account-bulk-bids-price input:focus {
  outline: 0;
}

.account-bulk-bids button {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 14px;
}

.account-bulk-bids-status {
  color: #607085;
  font-size: 13px;
}

.account-bulk-bids-last-price {
  color: #718195;
  font-size: 12px;
  line-height: 1.2;
}

.account-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #cfe1f3;
  border-radius: 8px;
  background: #f7fbff;
  color: #607085;
  font-size: 14px;
  line-height: 1.2;
}

.account-summary-chip strong {
  color: #1f2a37;
}

.account-summary-note {
  color: #9a6700;
  font-size: 13px;
}

.account-summary-history {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 14px;
}

.account-form-toggle {
  min-width: 118px;
}

.icon-plus,
.round-plus {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 26px;
  line-height: 1;
}

.add-account-row {
  display: grid;
  place-items: center;
  margin: 18px 0 84px;
}

.round-plus {
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 999px;
}

.panel {
  padding: 22px;
}

.search-panel {
  margin-top: 16px;
}

.add-source-panel {
  display: grid;
  place-items: center;
  margin-top: 12px;
  padding: 16px;
}

.ghost-button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
}

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
}

.ghost-button:hover {
  background: #eef6ff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.36);
}

.modal-card {
  width: min(520px, 100%);
  border: 1px solid #c8d7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.22);
  padding: 20px;
}

.modal-card h2 {
  margin-bottom: 14px;
}

.modal-note {
  color: var(--muted);
  font-weight: 700;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.wallet-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.wallet-grid span {
  color: var(--muted);
  font-weight: 800;
}

.wallet-grid strong {
  font-size: 17px;
}

.wallet-topup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  background: #f4f9ff;
  padding: 12px;
}

.wallet-topup-form label {
  gap: 5px;
}

.wallet-topup-form span {
  color: var(--muted);
  font-weight: 800;
}

.wallet-topup-form input {
  min-height: 42px;
}

.wallet-payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feature-modal-card {
  position: relative;
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.feature-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-right: 48px;
}

.feature-modal-head h2 {
  margin-bottom: 6px;
}

.feature-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  width: 34px;
  height: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #17212f;
  font-size: 24px;
  line-height: 1;
}

.feature-preview {
  display: block;
  width: 100%;
  height: min(44vh, 420px);
  margin: 14px 0;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #f7fbff;
  object-fit: contain;
}

#feature-modal[data-feature="massposting"] .feature-modal-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 14px 18px 18px;
  background: #ecfff4;
}

#feature-modal[data-feature="massposting"] .feature-preview {
  position: relative;
  order: 1;
  z-index: 0;
  width: 100%;
  height: auto;
  max-height: none;
  margin: 0 0 0;
  border: 1px solid rgba(191, 224, 204, 0.9);
  border-radius: 8px;
  background: #ecfff4;
  object-fit: contain;
  object-position: center top;
  opacity: 1;
  filter: none;
}

#feature-modal[data-feature="massposting"] .feature-modal-head,
#feature-modal[data-feature="massposting"] .feature-list,
#feature-modal[data-feature="massposting"] .feature-price-row,
#feature-modal[data-feature="massposting"] #feature-note,
#feature-modal[data-feature="massposting"] .modal-actions,
#feature-modal[data-feature="massposting"] .feature-payment-options {
  position: relative;
  z-index: 1;
  margin-left: 12px;
  margin-right: 12px;
  border: 1px solid rgba(191, 224, 204, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(23, 32, 44, 0.12);
  backdrop-filter: blur(1px);
}

#feature-modal[data-feature="massposting"] .feature-modal-head {
  order: 2;
  margin-top: 14px;
  padding: 14px;
}

#feature-modal[data-feature="massposting"] .feature-list {
  order: 3;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 14px 18px 14px 34px;
}

#feature-modal[data-feature="massposting"] .feature-price-row {
  order: 4;
  margin-top: 10px;
  margin-bottom: 10px;
}

#feature-modal[data-feature="massposting"] #feature-note {
  order: 5;
  padding: 10px 12px;
}

#feature-modal[data-feature="massposting"] .modal-actions,
#feature-modal[data-feature="massposting"] .feature-payment-options {
  order: 6;
  padding: 10px;
}

#feature-modal[data-feature="analytics"] .feature-modal-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 14px 18px 18px;
  background: #f0f8ff;
}

#feature-modal[data-feature="analytics"] .feature-preview {
  position: relative;
  order: 1;
  z-index: 0;
  width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  border: 1px solid rgba(191, 218, 241, 0.95);
  border-radius: 8px;
  background: #f0f8ff;
  object-fit: contain;
  object-position: center top;
  opacity: 1;
  filter: none;
}

#feature-modal[data-feature="analytics"] .feature-modal-head,
#feature-modal[data-feature="analytics"] .feature-list,
#feature-modal[data-feature="analytics"] .feature-price-row,
#feature-modal[data-feature="analytics"] #feature-note,
#feature-modal[data-feature="analytics"] .modal-actions,
#feature-modal[data-feature="analytics"] .feature-payment-options {
  position: relative;
  z-index: 1;
  margin-left: 12px;
  margin-right: 12px;
  border: 1px solid rgba(191, 218, 241, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px rgba(23, 32, 44, 0.1);
  backdrop-filter: blur(1px);
}

#feature-modal[data-feature="analytics"] .feature-modal-head {
  order: 2;
  margin-top: 14px;
  padding: 14px;
}

#feature-modal[data-feature="analytics"] .feature-list {
  order: 3;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 14px 18px 14px 34px;
}

#feature-modal[data-feature="analytics"] .feature-price-row {
  order: 4;
  margin-top: 10px;
  margin-bottom: 10px;
}

#feature-modal[data-feature="analytics"] #feature-note {
  order: 5;
  padding: 10px 12px;
}

#feature-modal[data-feature="analytics"] .modal-actions,
#feature-modal[data-feature="analytics"] .feature-payment-options {
  order: 6;
  padding: 10px;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding-left: 20px;
  color: #17212f;
  font-weight: 750;
}

.feature-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  background: #f4f9ff;
}

.feature-price-row span {
  color: var(--muted);
  font-weight: 850;
}

.feature-price-row strong {
  color: #17212f;
  font-size: 18px;
}

.feature-payment-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.feature-payment-options[hidden] {
  display: none;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.finance-history-modal {
  width: min(660px, 100%);
}

.finance-history-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.finance-history-head h2 {
  margin-bottom: 4px;
}

.finance-history-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid #d7e3f0;
  border-radius: 8px;
}

.finance-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.finance-history-table th,
.finance-history-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #e4ecf5;
  text-align: right;
  white-space: nowrap;
}

.finance-history-table th:first-child,
.finance-history-table td:first-child {
  text-align: left;
}

.finance-history-table th {
  color: #607085;
  background: #f7fbff;
}

.finance-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
}

h2 {
  font-size: 17px;
}

.heading p,
.privacy {
  color: var(--muted);
}

form {
  display: grid;
  gap: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 650;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 82px;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(11, 114, 231, 0.2);
  border-color: var(--accent);
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.search-sources {
  display: grid;
  gap: 16px;
}

.search-source {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 16px;
}

.search-source.collapsed {
  padding: 14px 16px;
}

.source-block-head,
.source-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.source-block-head {
  margin-bottom: 12px;
}

.source-block-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.source-collapsed-title,
.source-section-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.source-collapsed-title strong {
  font-size: 17px;
}

.source-collapsed-title span,
.source-section-title span {
  color: var(--muted);
  font-weight: 650;
}

.source-name-field input {
  max-width: 520px;
}

.source-toggle,
.source-search-toggle,
.source-delete {
  white-space: nowrap;
}

.source-search-area,
.source-work-area {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 12px;
}

.source-work-area {
  margin-top: 12px;
}

.source-section-head,
.source-work-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.source-work-head {
  margin-bottom: 10px;
}

.search-source-actions button {
  min-height: 40px;
}

.search-url-field input {
  min-height: 42px;
}

.source-result {
  margin-top: 12px;
}

.source-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.source-result-head button {
  min-height: 34px;
  background: #334155;
}

.source-result-head button:hover {
  background: #1f2937;
}

.candidate-list {
  display: grid;
  gap: 8px;
}

.candidate-card {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  padding: 8px;
  cursor: pointer;
}

.candidate-card input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.candidate-thumb {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
}

.candidate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.candidate-info {
  display: grid;
  gap: 4px;
}

.candidate-info span {
  color: var(--muted);
  font-size: 13px;
}

.source-empty,
.source-error {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  padding: 10px 12px;
}

.source-error {
  border-color: rgba(180, 35, 24, 0.28);
  background: #fff5f4;
  color: var(--error);
}

.add-link-row {
  display: grid;
  place-items: center;
  margin-top: 14px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.status-band,
.summary,
.results {
  margin-top: 16px;
  padding: 16px;
}

.status-band.ok {
  border-color: rgba(15, 123, 82, 0.35);
  color: var(--ok);
}

.status-band.warn {
  border-color: rgba(154, 100, 0, 0.35);
  color: var(--warn);
}

.status-band.error {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--error);
  white-space: pre-wrap;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.positions-line {
  border: 1px solid rgba(15, 123, 82, 0.28);
  background: #f0fdf7;
  color: var(--ok);
  margin-bottom: 12px;
  padding: 10px 12px;
}

.bulk-select-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #c8d7eb;
  border-radius: 8px;
  background: #f8fbff;
}

.check-control,
.ad-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
}

.check-control input,
.ad-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.top-takeover,
.source-pill-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px 5px 10px;
  border: 1px solid #bfd3ee;
  border-radius: 999px;
  background: #f7fbff;
  color: var(--text);
  font-weight: 850;
}

.top-takeover input[type="number"],
.source-pill-control input[type="number"] {
  width: 54px;
  min-height: 30px;
  border: 1px solid #b8c9df;
  border-radius: 999px;
  padding: 4px 8px;
  text-align: center;
  font-weight: 900;
}

.source-bid-control input[type="number"] {
  width: 72px;
}

.source-run-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #13b66b;
  color: #ffffff;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(19, 182, 107, 0.24);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.source-run-button:hover {
  background: #0fa45f;
  box-shadow: 0 10px 22px rgba(19, 182, 107, 0.32);
  transform: translateY(-1px);
}

.source-run-button:active {
  box-shadow: 0 5px 12px rgba(19, 182, 107, 0.26);
  transform: translateY(1px) scale(0.96);
}

.source-start-all-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #13b66b;
  color: #ffffff;
  padding: 0 18px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(19, 182, 107, 0.22);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.source-start-all-button:hover {
  background: #0fa45f;
  box-shadow: 0 12px 26px rgba(19, 182, 107, 0.32);
  transform: translateY(-1px);
}

.source-start-all-button:active {
  box-shadow: 0 6px 14px rgba(19, 182, 107, 0.26);
  transform: translateY(1px) scale(0.98);
}

.source-start-all-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.ios-switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 28px;
  cursor: pointer;
}

.ios-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ios-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.18s ease;
}

.ios-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s ease;
}

.ios-switch input:checked + span {
  background: #34c759;
}

.ios-switch input:checked + span::after {
  transform: translateX(18px);
}

.position-badge {
  display: inline-flex;
  min-width: 34px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e8f2ff;
  color: #075fc4;
  font-weight: 800;
}

#copy-button {
  min-height: 34px;
  background: #334155;
}

.matches-list {
  display: grid;
  gap: 12px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.match-card.selected {
  border-color: rgba(11, 114, 231, 0.55);
  box-shadow: 0 0 0 2px rgba(11, 114, 231, 0.08);
}

.ad-side {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.ad-top-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ad-preview {
  width: 100%;
  display: grid;
  gap: 8px;
}

.ad-preview img,
.no-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #eef2f6;
}

.no-image {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.ad-title {
  font-size: 15px;
  line-height: 1.25;
}

.ad-price {
  font-size: 18px;
  font-weight: 800;
}

.ad-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.bid-side {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.bid-side h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 16px;
}

.bid-field {
  gap: 7px;
}

.bid-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.bid-control input {
  border: 0;
  border-radius: 0;
}

.bid-control input:focus {
  outline: 0;
}

.bid-control span {
  padding: 0 11px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.bid-actions {
  display: flex;
  align-items: end;
}

.bid-actions button {
  width: 100%;
}

.stop-button {
  background: #b42318;
}

.stop-button:hover {
  background: #941b12;
}

.bid-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.bid-status div {
  display: flex;
  gap: 6px;
  align-items: baseline;
  justify-content: space-between;
}

.bid-status strong {
  color: var(--text);
}

.bid-note {
  justify-content: flex-start !important;
  color: var(--text);
  line-height: 1.35;
}

.bid-error {
  grid-column: 1 / -1;
  border: 1px solid rgba(180, 35, 24, 0.28);
  border-radius: 6px;
  background: #fff5f4;
  color: var(--error);
  padding: 10px 12px;
  font-weight: 700;
  line-height: 1.35;
}

.bid-chart {
  display: grid !important;
  gap: 6px !important;
  justify-content: stretch !important;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #ffffff;
  padding: 8px 10px 9px;
}

.bid-chart-head {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  align-items: center !important;
}

.bid-chart-head span {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-weight: 700;
}

.bid-chart-head span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.legend-price::before {
  background: #0b72e7;
}

.legend-position::before {
  background: #0f7b52;
}

.bid-chart svg {
  width: 100%;
  height: 118px;
  min-height: 0;
  display: block;
}

.chart-grid {
  stroke: #e5edf6;
  stroke-width: 0.75;
}

.chart-price-line,
.chart-position-line {
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-price-line {
  stroke: #0b72e7;
}

.chart-position-line {
  stroke: #0f7b52;
}

.chart-price-dot {
  fill: #0b72e7;
}

.chart-position-dot {
  fill: #0f7b52;
}

.chart-point-group:hover .chart-price-dot,
.chart-point-group:hover .chart-position-dot {
  r: 3.8;
}

.chart-hit-dot {
  fill: transparent;
  pointer-events: all;
}

.chart-point-group {
  cursor: default;
}

.chart-hover-label {
  fill: #1f2933;
  font: 700 10px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  paint-order: stroke;
  pointer-events: none;
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 4px;
  transition: opacity 120ms ease;
}

.chart-point-group:hover .chart-hover-label {
  opacity: 1;
}

.chart-empty {
  fill: #64707d;
  font: 700 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bulk-menu {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  width: min(980px, calc(100vw - 32px));
  max-height: min(76vh, 620px);
  overflow: hidden;
  transform: translateX(-50%);
  border: 1px solid #c8d7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(31, 41, 51, 0.16);
  padding: 14px;
}

.bulk-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bulk-menu-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-menu-head strong {
  font-size: 15px;
}

.bulk-menu button {
  min-height: 36px;
}

#bulk-reset-min,
#bulk-clear-schedule,
#bulk-menu-ok {
  background: #334155;
}

#bulk-reset-min:hover,
#bulk-clear-schedule:hover,
#bulk-menu-ok:hover {
  background: #1f2937;
}

#bulk-menu-ok {
  min-width: 74px;
}

.bulk-schedule-form {
  display: grid;
  grid-template-columns: 88px 88px minmax(190px, 1fr) 126px 126px 110px;
  gap: 10px;
  align-items: end;
}

.bulk-schedule-max-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  max-height: 232px;
  overflow: auto;
  border-top: 1px solid #e2e8f0;
  padding: 10px 4px 0 0;
}

.bulk-max-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 2px;
}

.bulk-max-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  padding: 7px 8px;
}

.bulk-max-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bulk-max-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-max-info span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.bulk-max-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  justify-self: end;
  width: 112px;
}

.bulk-max-control input {
  border: 0;
  border-radius: 0;
  min-height: 34px;
  padding: 7px 6px 7px 8px;
  text-align: right;
}

.bulk-max-control span {
  padding-right: 8px;
  color: var(--muted);
  font-weight: 800;
}

.bulk-schedule-form label {
  gap: 5px;
  font-size: 12px;
}

.bulk-schedule-form input,
.bulk-schedule-form select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  color: var(--text);
  background: #fff;
}

.bulk-schedule-form input[type="number"] {
  text-align: right;
}

.bulk-schedule-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(31, 41, 51, 0.18);
  color: var(--text);
  font-weight: 750;
  line-height: 1.35;
  padding: 12px 14px;
}

.toast.ok {
  border-color: rgba(15, 123, 82, 0.32);
  background: #f0fdf7;
  color: #0f5137;
}

.bid-status-scheduled {
  display: block;
  border-top: 1px solid #f1b7b0;
  color: #b42318;
  font-weight: 900;
}

.toast.warn {
  border-color: rgba(154, 100, 0, 0.3);
  background: #fffbeb;
  color: #7c4a03;
}

.toast.error {
  border-color: rgba(180, 35, 24, 0.3);
  background: #fff5f4;
  color: var(--error);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 650;
}

a:hover {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

/* Compact pastel workspace */
:root {
  --bg: #eef4f8;
  --line: #b9c7d8;
  --line-strong: #8fa7c4;
}

.layout {
  width: min(1440px, calc(100vw - 24px));
  padding: 16px 0 28px;
}

.tabs-panel,
.panel,
.add-source-panel,
.summary,
.results,
.status-band {
  border-color: var(--line-strong);
}

.tabs-panel {
  padding: 14px 16px 12px;
  margin-bottom: 12px;
  background: #f6fbff;
  border-color: #9dc4ef;
}

.tabs-head,
.heading {
  gap: 14px;
  margin-bottom: 10px;
}

.account-tabs {
  gap: 6px;
}

.account-tab {
  min-height: 32px;
  border-color: #a9bdd5;
  background: #f5f9ff;
}

.account-tab-title {
  max-width: 130px;
}

.account-tab.active {
  border-color: #6da7ef;
  background: #e8f2ff;
}

.panel {
  padding: 14px 16px;
  background: #fbfdff;
}

.search-panel,
.status-band,
.summary,
.results {
  margin-top: 12px;
}

.add-source-panel {
  margin-top: 10px;
  padding: 10px;
  background: #f2f8ff;
  border-color: #a8c7e8;
}

form,
.grid {
  gap: 10px;
}

label {
  gap: 5px;
}

input,
textarea {
  border-color: #aebdd0;
  padding: 8px 10px;
}

button {
  min-height: 36px;
  padding: 0 13px;
}

.search-sources {
  gap: 12px;
}

.search-source {
  padding: 10px 12px;
  border-color: #d2b66d;
  background: #fffdf4;
  box-shadow: inset 4px 0 0 #f6d777;
}

.search-source.collapsed {
  padding: 10px 12px;
}

.source-block-head,
.source-url-row,
.source-section-head,
.source-work-head,
.source-result-head {
  gap: 10px;
}

  .source-block-head,
  .source-section-head,
  .source-work-head,
  .source-result-head {
    margin-bottom: 8px;
  }

  .source-block-actions {
    gap: 6px;
  }

.source-collapsed-title strong {
  font-size: 16px;
}

.source-search-area {
  padding: 9px 10px;
  border-color: #9dc9eb;
  background: #f3fbff;
}

.source-work-area {
  margin-top: 9px;
  padding: 9px 10px;
  border-color: #9ed2b2;
  background: #f2fff7;
}

.search-source-actions button,
.source-result-head button,
#copy-button {
  min-height: 34px;
}

.search-url-field input {
  min-height: 36px;
}

.source-result {
  margin-top: 8px;
}

.candidate-list {
  gap: 6px;
}

.candidate-card {
  grid-template-columns: auto 58px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 8px;
  border-color: #a9bfd7;
  background: #ffffff;
}

.candidate-thumb {
  width: 58px;
  border-color: #a9bfd7;
}

.source-empty,
.source-error {
  padding: 8px 10px;
  border-color: #a9bfd7;
}

.add-link-row {
  margin-top: 10px;
}

.status-band,
.summary,
.results {
  padding: 10px 12px;
}

.status-band {
  background: #fbfdff;
}

.summary {
  gap: 10px;
  background: #f9fbff;
  border-color: #aebed0;
}

.results {
  background: #fff7f1;
  border-color: #d7ad8a;
  box-shadow: inset 4px 0 0 #ffc48f;
}

.results-head,
.bulk-select-row {
  margin-bottom: 8px;
}

.positions-line {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-color: rgba(15, 123, 82, 0.42);
}

.position-badge {
  min-height: 26px;
}

.matches-list {
  gap: 8px;
}

.match-card {
  grid-template-columns: minmax(150px, 190px) minmax(420px, 1fr);
  gap: 10px;
  padding: 9px;
  border-color: #96acc7;
  background: #fffefa;
  box-shadow: inset 4px 0 0 #9fd0ff;
}

.match-card.selected {
  border-color: #4e95e8;
  box-shadow: inset 4px 0 0 #5fb3ff, 0 0 0 2px rgba(11, 114, 231, 0.11);
}

.ad-side {
  gap: 7px;
}

.ad-preview {
  gap: 5px;
}

.ad-preview img,
.no-image {
  border-color: #9fb0c5;
}

.ad-price {
  font-size: 16px;
}

.ad-meta {
  gap: 8px;
}

.bid-side {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-color: #9bb9df;
  background: #f3f8ff;
}

.bid-side h3 {
  font-size: 15px;
}

.bid-field {
  gap: 4px;
}

.bid-control {
  border-color: #a8b9ce;
}

.bid-control input {
  min-height: 34px;
  padding: 7px 8px;
}

.bid-control span {
  padding-right: 8px;
}

.bid-status {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px 8px;
  border-top-color: #a9bfd7;
  padding-top: 7px;
}

.bid-status div {
  min-width: 0;
}

.bid-note,
.bid-chart,
.bid-error {
  grid-column: 1 / -1;
}

.bid-error {
  padding: 8px 10px;
}

.bid-chart {
  gap: 4px !important;
  padding: 6px 8px 7px;
  border-color: #a6c9f4;
  background: #fbfdff;
}

.bid-chart svg {
  height: 78px;
}

.chart-grid {
  stroke: #d7e4f2;
}

.chart-price-line,
.chart-position-line {
  stroke-width: 1.35;
}

.chart-price-dot,
.chart-position-dot {
  r: 2.4;
}

.bulk-menu {
  border-color: #8fa7c4;
  background: #fbfdff;
}

/* Scandinavian compact refinement */
:root {
  --bg: #f5f6f4;
  --panel: #fffefd;
  --line: #c7d0da;
  --line-strong: #aebbc8;
  --text: #202832;
  --muted: #657180;
}

.layout {
  width: min(1160px, calc(100vw - 40px));
  padding-top: 18px;
}

.tabs-panel,
.panel,
.add-source-panel,
.summary,
.results,
.status-band,
.search-source,
.source-search-area,
.source-work-area,
.match-card,
.bid-side,
.candidate-card,
.bid-chart {
  border-width: 1px;
  border-radius: 7px;
  box-shadow: none;
}

.tabs-panel,
.panel {
  background: #fffefd;
}

.tabs-panel {
  border-color: #b9c9d9;
}

.search-source {
  border-color: #d8cfae;
  background: #fffdf6;
  box-shadow: inset 3px 0 0 #eadc9a;
}

.source-search-area {
  border-color: #bfd2e1;
  background: #f7fbfd;
}

.source-work-area {
  border-color: #bdd6c6;
  background: #f7fcf8;
}

.results {
  border-color: #d7c2af;
  background: #fffaf6;
  box-shadow: inset 3px 0 0 #e9c8a9;
}

.match-card {
  grid-template-columns: minmax(140px, 174px) minmax(0, 1fr);
  border-color: #b3c0ce;
  background: #fffefd;
  box-shadow: inset 3px 0 0 #b8d4eb;
}

.match-card.selected {
  border-color: #7fa9d6;
  box-shadow: inset 3px 0 0 #7fbce8, 0 0 0 2px rgba(64, 126, 184, 0.08);
}

.bid-side {
  border-color: #b8c9da;
  background: #f7fafd;
}

.bid-chart {
  border-color: #bdcddd;
  background: #ffffff;
}

.add-source-panel {
  border-color: #bdcddd;
  background: #f8fbfd;
}

.summary,
.status-band {
  background: #fffefd;
}

.account-tab,
.ghost-button {
  border-color: #c0cad5;
  background: #fbfcfd;
}

.account-tab.active {
  border-color: #8eb5db;
  background: #eef6fb;
  color: #255f91;
}

.account-tab.account-tab-working {
  border-color: rgba(20, 164, 104, 0.48);
  background: linear-gradient(180deg, #effff7 0%, #e3faef 100%);
  color: #087149;
}

.account-tab.account-tab-working.active {
  border-color: rgba(20, 164, 104, 0.78);
  background: linear-gradient(180deg, #dffbea 0%, #cff4df 100%);
  color: #06623e;
}

.account-tab.account-tab-working .account-tab-close {
  color: rgba(8, 113, 73, 0.72);
}

.account-tab.account-tab-scheduled {
  padding-bottom: 4px;
}

.position-badge {
  background: #edf6fb;
  color: #255f91;
}

.ad-preview img,
.no-image {
  border-color: #bac6d2;
}

.bid-chart svg {
  height: 72px;
}

@media (min-width: 761px) {
  .round-plus {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  .layout {
    width: min(100vw - 20px, 1180px);
    padding-top: 14px;
  }

  .heading,
  .actions,
  .results-head,
  .tabs-head,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .grid,
  .summary,
  .match-card,
  .bid-side,
  .source-block-head,
  .source-url-row,
  .bulk-schedule-form,
  .bulk-max-row,
  .wallet-grid,
  .wallet-topup-form {
    grid-template-columns: 1fr;
  }

  .wallet-payment-options {
    grid-template-columns: 1fr;
  }

  .match-card {
    gap: 14px;
  }

  .bulk-menu {
    bottom: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    overflow: auto;
  }

  .bulk-select-row {
    align-items: flex-start;
  }

  .top-takeover {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
  }

  .toast {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }

  .bulk-menu-head,
  .source-result-head,
  .source-section-head,
  .bulk-schedule-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-menu-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}

/* Compact ad work cards */
@media (min-width: 900px) {
  .source-work-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .match-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .ad-side {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 8px;
    align-items: start;
  }

  .ad-top-line {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-items: flex-start;
    gap: 6px;
  }

  .ad-preview {
    grid-column: 2;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
      "image title"
      "image price";
    gap: 4px 8px;
    align-items: start;
  }

  .ad-preview img,
  .no-image {
    grid-area: image;
  }

  .ad-title {
    grid-area: title;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .ad-price {
    grid-area: price;
  }

  .ad-meta {
    grid-column: 2;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .bid-side {
    grid-template-columns: repeat(4, 76px) 112px;
    justify-content: start;
    align-items: end;
    gap: 7px;
    padding: 8px;
  }

  .bid-side h3 {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .bid-field {
    width: 76px;
    min-width: 0;
  }

  .bid-field > span {
    min-height: 28px;
    font-size: 12px;
    line-height: 1.15;
  }

  .bid-control {
    width: 76px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bid-control input {
    min-width: 0;
    padding: 7px 5px 7px 7px;
  }

  .bid-control span {
    padding-right: 6px;
  }

  .bid-actions {
    width: 112px;
  }

  .bid-actions button {
    min-height: 34px;
    padding: 0 10px;
  }

  .bid-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .bid-status div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    align-items: baseline;
  }

  .bid-status span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .bid-status strong {
    white-space: nowrap;
  }

  .bid-chart {
    width: 100%;
    justify-self: start;
  }

  .bid-chart svg {
    height: 92px;
  }
}

@media (max-width: 899px) {
  .source-work-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .account-bulk-bids {
    align-items: stretch;
  }

  .account-bulk-bids-title,
  .account-bulk-bids-category,
  .account-bulk-bids-price,
  .account-bulk-bids-status,
  .account-bulk-bids-last-price {
    width: 100%;
  }

  .account-bulk-bids-category select {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .account-bulk-bids-price input {
    margin-left: auto;
  }

  .account-bulk-bids button {
    width: 100%;
  }

  .bid-status {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bid-status div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
  }

  .bid-status span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .bid-status strong {
    white-space: nowrap;
  }

  .bid-note {
    display: block !important;
  }

  .bid-chart {
    width: 100%;
  }
}

/* Chart repair */
.bid-chart {
  display: block !important;
  overflow: hidden;
}

.bid-chart-head {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  margin-bottom: 4px;
  white-space: nowrap;
}

.bid-chart-head strong,
.bid-chart-head span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.bid-chart-head span {
  padding-left: 13px;
  overflow: visible;
  word-break: keep-all;
}

.bid-chart svg {
  width: 100%;
  height: 96px;
}

@media (min-width: 900px) {
  .bid-chart {
    max-width: 100%;
  }

  .bid-chart svg {
    height: 96px;
  }
}

/* Delete controls and left-aligned block selection */
.source-work-head {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.source-work-head .source-select-all {
  order: 0;
}

.source-work-head .source-top-takeover {
  order: 1;
}

.source-work-head .source-initial-bid-control {
  order: 2;
}

.source-work-head .source-max-bid-control {
  order: 3;
}

.source-work-head .source-start-all-button {
  order: 4;
}

.source-work-head > strong {
  order: 5;
}

.bulk-menu-head-actions {
  flex-wrap: wrap;
}

#bulk-delete-selected,
.delete-ad-button,
.source-delete {
  background: #f8e8e5;
  border: 1px solid #d49a92;
  color: #962015;
}

#bulk-delete-selected:hover,
.delete-ad-button:hover,
.source-delete:hover {
  background: #f2d2cc;
  color: #7a1a11;
}

.bid-actions {
  gap: 6px;
}

@media (min-width: 900px) {
  .bid-side {
    grid-template-columns: repeat(4, 76px) 168px;
  }

  .bid-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    width: 168px;
  }

  .delete-ad-button {
    min-width: 0;
    padding-inline: 8px;
  }
}

@media (max-width: 899px) {
  .bid-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(96px, auto);
    align-items: end;
  }
}

@media (max-width: 760px) {
  .bid-actions {
    grid-template-columns: 1fr;
  }

  .source-work-head {
    align-items: flex-start;
  }
}

.bid-status [data-role="today-metrics"] {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 5px 8px;
  border: 1px solid #d4e3f5;
  border-radius: 6px;
  background: #fff;
}

.bid-status [data-role="today-metrics"] > span,
.bid-status [data-role="next-check"] > span {
  white-space: nowrap;
  overflow-wrap: normal;
}

.bid-status [data-role="today-metrics"] > strong {
  white-space: normal;
  overflow-wrap: normal;
}

.match-card.billing-inactive {
  border-color: #c7ced7;
  background: #f1f3f5;
  box-shadow: inset 4px 0 0 #b8c0cb;
  filter: grayscale(1);
  opacity: 0.78;
}

.match-card.billing-inactive .bid-side {
  border-color: #c7ced7;
  background: #eef0f3;
}

.bid-status-unpaid {
  display: block;
  border-top-color: #d7dce3;
  color: #5f6875;
  font-weight: 800;
}

.bid-title-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bid-title-row h3 {
  grid-column: auto;
  margin: 0;
}

.auto-renew-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.auto-renew-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.auto-renew-until {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.auto-renew-switch.ios-switch {
  width: 38px;
  height: 22px;
}

.auto-renew-switch.ios-switch span::after {
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
}

.auto-renew-switch.ios-switch input:checked + span::after {
  transform: translateX(16px);
}

.pay-item-button {
  background: var(--accent);
  color: #fff;
}

.pay-item-button:hover {
  background: var(--accent-hover);
}

.workspace-tabs {
  display: flex;
  gap: 10px;
  align-items: stretch;
  max-width: 1180px;
  margin: 0 auto 14px;
  padding: 6px;
  border: 1px solid #d7e4f3;
  border-radius: 12px;
  background: #f7fbff;
}

.workspace-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1 1 0;
  gap: 5px;
  min-height: 58px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #5f6f84;
  text-align: center;
  box-shadow: none;
}

.workspace-tab.has-feature-renewal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(102px, 30%);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 6px;
  row-gap: 3px;
  padding: 8px 8px 8px 12px;
  overflow: hidden;
}

.workspace-tab > span,
.workspace-tab > small {
  display: block;
}

.workspace-tab > span {
  color: inherit;
  font-size: 16px;
  font-weight: 950;
  min-width: 0;
}

.workspace-tab > small {
  margin-top: 0;
  color: #6b7a90;
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
}

.workspace-feature-renewal {
  grid-column: 2;
  grid-row: 1 / 3;
  justify-self: end;
  align-self: center;
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 1px;
  color: #647386;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.05;
  text-align: right;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
}

.workspace-renewal-line {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
}

.workspace-renewal-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 10px;
  border: 1px solid #b9c6d7;
  border-radius: 999px;
  background: #dfe6ee;
  cursor: pointer;
  pointer-events: auto;
  z-index: 1;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.workspace-renewal-switch::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(23, 32, 44, 0.22);
  transition: transform 0.16s ease;
}

.workspace-renewal-switch.is-on {
  border-color: #0aa968;
  background: #11b978;
}

.workspace-renewal-switch.is-on::after {
  transform: translateX(8px);
}

.workspace-renewal-switch.is-disabled {
  cursor: default;
  opacity: 0.55;
}

.workspace-renewal-until {
  color: #718198;
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.workspace-tab.active .workspace-feature-renewal {
  color: #075fc4;
}

.workspace-tab:hover {
  border-color: #c8dcf4;
  background: #ffffff;
}

.workspace-tab.active {
  border-color: #9fcbff;
  background: linear-gradient(135deg, #e8f3ff 0%, #f0fff6 100%);
  color: #075fc4;
  box-shadow: 0 12px 24px rgba(11, 114, 231, 0.1);
}

.workspace-tab.locked {
  position: relative;
  border-color: #d7dde6;
  background: #eef1f5;
  color: #7a8595;
  box-shadow: none;
}

.workspace-tab.locked:hover {
  border-color: #c5ccd8;
  background: #e6eaf0;
}

.workspace-tab.locked::after {
  content: "🔒";
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.workspace-tab.locked.has-feature-renewal::after {
  top: 6px;
  right: 7px;
  font-size: 12px;
}

.workspace-tab.locked.has-feature-renewal .workspace-feature-renewal {
  padding-top: 8px;
}

.workspace-tab.locked small {
  color: #8893a3;
}

.workspace-tab.locked .workspace-feature-renewal,
.workspace-tab.locked .workspace-renewal-until {
  color: #8e98a8;
}

.workspace-tab.development {
  border-color: #d8dde6;
  background: #eceff4;
  color: #7b8493;
  box-shadow: none;
}

.workspace-tab.development::before {
  content: "В разработке";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(236, 240, 246, 0.88);
  color: #4b5565;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
  pointer-events: none;
  z-index: 2;
}

.workspace-tab.development:hover {
  border-color: #c8cfdb;
  background: #e7ebf1;
}

.contact-analytics-panel {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 18px;
  border-color: #cbe0f6;
  background:
    linear-gradient(135deg, rgba(232, 244, 255, 0.88), rgba(245, 255, 249, 0.9)),
    #ffffff;
}

.analytics-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.analytics-head h2 {
  margin: 4px 0 6px;
  color: #17212f;
  font-size: 28px;
  line-height: 1.08;
}

.analytics-head p {
  margin: 0;
  max-width: 680px;
  color: #5f6f84;
}

.analytics-eyebrow {
  color: #078f59;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.analytics-status-pill {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  background: #ffffff;
  color: #5f6f84;
  font-size: 13px;
  font-weight: 850;
}

.analytics-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.analytics-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  background: #ffffff;
  color: #5f6f84;
  font-size: 13px;
  font-weight: 850;
}

.analytics-period select {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #17212f;
  font: inherit;
  outline: none;
}

.analytics-refresh-button {
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: #0b72e7;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.analytics-refresh-button:disabled {
  background: #b8c7d8;
  cursor: wait;
}

.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.analytics-metric-card {
  display: grid;
  gap: 4px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid #d7e4f3;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(31, 42, 55, 0.06);
}

.analytics-metric-card span {
  color: #6b7a90;
  font-size: 13px;
  font-weight: 850;
}

.analytics-metric-card strong {
  color: #17212f;
  font-size: 28px;
  line-height: 1.05;
}

.analytics-metric-card small {
  color: #7b8797;
  font-size: 12px;
  line-height: 1.35;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analytics-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d7e4f3;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 42, 55, 0.07);
}

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

.analytics-card h3 {
  margin: 0;
  color: #17212f;
  font-size: 18px;
  line-height: 1.2;
}

.analytics-card p {
  margin: 0;
  color: #6b7a90;
  font-size: 13px;
  font-weight: 800;
}

.analytics-chart {
  width: 100%;
  height: 190px;
  display: block;
  overflow: visible;
}

.analytics-grid-line {
  stroke: #dfeaf7;
  stroke-width: 1;
}

.analytics-axis-label {
  fill: #7b8797;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
}

.analytics-empty-text {
  fill: #9aa7b7;
  font-size: 15px;
  font-weight: 900;
}

.analytics-point {
  cursor: default;
}

.analytics-point-label {
  opacity: 0;
  pointer-events: none;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 5px;
  stroke-linejoin: round;
  fill: #17212f;
  font-size: 13px;
  font-weight: 950;
  text-anchor: middle;
  transition: opacity 0.12s ease;
}

.analytics-point:hover .analytics-point-label {
  opacity: 1;
}

.analytics-note,
.analytics-empty-wide {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f8fd;
  color: #66758a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.analytics-empty-wide {
  border: 1px solid #d7e4f3;
  background: #ffffff;
}

.massposting-panel {
  --masspost-links-width: 280px;
  --masspost-folder-width: 190px;
  --masspost-randomizer-width: minmax(420px, 1fr);
  --masspost-result-width: 320px;
  --masspost-grid-min-width: 1210px;
  max-width: none;
  margin: 0 0 18px;
  padding: 14px;
  border-color: #cfe8d6;
  background:
    linear-gradient(135deg, rgba(234, 255, 241, 0.92), rgba(248, 255, 251, 0.95)),
    #ffffff;
}

.masspost-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.masspost-head h2 {
  margin: 4px 0 6px;
  color: #17212f;
  font-size: 28px;
  line-height: 1.08;
}

.masspost-head p {
  margin: 0;
  max-width: 760px;
  color: #5f6f84;
}

.masspost-eyebrow {
  color: #078f59;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.masspost-status-pill {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid #cfe8d6;
  border-radius: 999px;
  background: #ffffff;
  color: #5f6f84;
  font-size: 13px;
  font-weight: 850;
}

.masspost-auth {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #cfe8d6;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.masspost-auth label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #5f6f84;
  font-size: 12px;
  font-weight: 850;
}

.masspost-auth input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #c8d8c9;
  border-radius: 9px;
  background: #ffffff;
  color: #17212f;
  font-size: 14px;
  font-weight: 800;
}

.masspost-auth button,
.masspost-toolbar button,
.masspost-token-link {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #c8d8c9;
  border-radius: 9px;
  background: #ffffff;
  color: #17212f;
  font-size: 13px;
  font-weight: 900;
}

.masspost-token-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.masspost-auth .primary,
.masspost-toolbar .primary {
  border-color: #0aa968;
  background: #0aa968;
  color: #ffffff;
}

.masspost-auth .danger {
  border-color: #f1c7c0;
  background: #fff5f2;
  color: #a32818;
}

.masspost-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.masspost-toolbar-note {
  color: #6b7a90;
  font-size: 13px;
  font-weight: 800;
}

.masspost-grid-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #d9dee5;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.masspost-top-scroll {
  width: 100%;
  height: 16px;
  overflow-x: scroll;
  overflow-y: hidden;
  border: 1px solid #d9dee5;
  border-bottom: 0;
  background: #eef3f8;
}

.masspost-top-scroll-spacer {
  width: var(--masspost-grid-min-width);
  height: 1px;
}

.masspost-top-scroll::-webkit-scrollbar,
.masspost-grid-wrap::-webkit-scrollbar {
  height: 12px;
}

.masspost-top-scroll::-webkit-scrollbar-track,
.masspost-grid-wrap::-webkit-scrollbar-track {
  background: #eef3f8;
}

.masspost-top-scroll::-webkit-scrollbar-thumb,
.masspost-grid-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #eef3f8;
  border-radius: 999px;
  background: #8aa3bd;
}

.masspost-grid {
  width: 100%;
  min-width: var(--masspost-grid-min-width);
  user-select: none;
}

.masspost-row {
  display: grid;
  grid-template-columns:
    var(--masspost-links-width)
    var(--masspost-folder-width)
    var(--masspost-randomizer-width)
    var(--masspost-result-width);
  min-height: 28px;
}

.masspost-row + .masspost-row {
  border-top: 1px solid #dde2e8;
}

.masspost-cell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 2px 4px;
  border-right: 2px solid #b8c7d6;
  background: #ffffff;
  cursor: cell;
}

.masspost-row.head .masspost-cell {
  min-height: 34px;
  justify-content: center;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
}

.masspost-row.head .masspost-cell:nth-child(1),
.masspost-cell.links-cell {
  border-right-color: #62a8e5;
  background: #eef8ff;
}

.masspost-row.head .masspost-cell:nth-child(2),
.masspost-cell.path-cell {
  border-right-color: #3fb7c8;
  background: #effcff;
}

.masspost-row.head .masspost-cell:nth-child(3),
.masspost-cell.randomizer-cell {
  border-right-color: #f09a3f;
  background: #fff7ed;
}

.masspost-row.head .masspost-cell:nth-child(4),
.masspost-cell.result-cell {
  border-right-color: #dc7a2e;
  background: #fff3e7;
}

.masspost-row.head .masspost-cell:nth-child(1) {
  background: #dff1ff;
}

.masspost-row.head .masspost-cell:nth-child(2) {
  background: #dff9ff;
}

.masspost-row.head .masspost-cell:nth-child(3) {
  background: #ffe8c7;
}

.masspost-row.head .masspost-cell:nth-child(4) {
  background: #ffdfbf;
}

.masspost-row .masspost-cell:last-child {
  border-right: 0;
}

.masspost-row-number {
  justify-content: center;
  color: #718294;
  font-size: 13px;
  font-weight: 900;
}

.masspost-cell.selected {
  outline: 2px solid #0aa968;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 999px rgba(242, 255, 246, 0.72);
}

.masspost-input,
.masspost-output {
  width: 100%;
  height: 24px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #17212f;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 24px;
  outline: none;
  overflow: hidden;
  padding: 0;
  text-overflow: clip;
  white-space: nowrap;
}

.masspost-input {
  user-select: text;
}

.masspost-output {
  display: block;
  cursor: cell;
  user-select: none;
}

.masspost-output.placeholder {
  color: #94a3b8;
}

.masspost-output.loading {
  color: #078f59;
}

.masspost-output.error {
  color: #a32818;
}

.masspost-cell-editor {
  position: fixed;
  z-index: 35;
  display: block;
  resize: both;
  min-width: 320px;
  min-height: 150px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  padding: 6px 8px;
  border: 2px solid #0b72e7;
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.28;
  outline: none;
  overflow: auto;
  white-space: pre-wrap;
}

.masspost-fill-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid #0aa968;
  border-radius: 2px;
  background: #ffffff;
  cursor: ns-resize;
}

.masspost-cell.fill-preview,
.masspost-row.fill-preview .masspost-cell.path-cell {
  background: #e7f8ed;
}

.masspost-row-status {
  justify-content: center;
  color: #6b7a90;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.masspost-row-status.ok {
  color: #078f59;
}

.masspost-row-status.error {
  color: #a32818;
}

.masspost-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: #66758a;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.4;
}

.danger-text-button {
  color: #a32818;
}

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

@media (max-width: 760px) {
  .workspace-tabs {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 10px;
  }

  .workspace-tab {
    width: 100%;
  }

  .feature-modal-head,
  .feature-payment-options {
    grid-template-columns: 1fr;
  }

  .feature-modal-head {
    flex-direction: column;
  }

  .contact-analytics-panel {
    padding: 14px;
  }

  .analytics-head {
    flex-direction: column;
    gap: 10px;
  }

  .analytics-head h2 {
    font-size: 23px;
  }

  .analytics-status-pill {
    width: 100%;
    text-align: center;
  }

  .analytics-controls,
  .analytics-period,
  .analytics-refresh-button {
    width: 100%;
  }

  .analytics-period {
    justify-content: space-between;
  }

  .analytics-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .analytics-chart {
    height: 170px;
  }

  .massposting-panel {
    padding: 14px;
  }

  .masspost-head {
    flex-direction: column;
    gap: 10px;
  }

  .masspost-head h2 {
    font-size: 23px;
  }

  .masspost-status-pill {
    width: 100%;
    text-align: center;
  }

  .masspost-auth {
    grid-template-columns: 1fr;
  }

  .masspost-grid {
    min-width: 720px;
  }
}
